feat():测试Excel导出1
parent
f38587b213
commit
bc737c9f82
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
|||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.muyu.cloud.pay.domain.req.OrderCustomerAddReq;
|
||||
import com.muyu.cloud.pay.domain.req.OrderCustomerUpdReq;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import lombok.*;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
@ -31,24 +32,29 @@ public class OrderPayCustomer extends BaseEntity{
|
|||
* 主键
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
@Excel(name = "ID",cellType = Excel.ColumnType.NUMERIC)
|
||||
private Long id;
|
||||
|
||||
|
||||
/**
|
||||
* 服务/客户名称
|
||||
*/
|
||||
@Excel(name = "服务/客户名称")
|
||||
private String appName;
|
||||
/**
|
||||
* 服务/客户编码
|
||||
*/
|
||||
@Excel(name = "服务/客户编码")
|
||||
private String appCode;
|
||||
/**
|
||||
* 客户描述
|
||||
*/
|
||||
@Excel(name = "客户描述")
|
||||
private String appDesc;
|
||||
/**
|
||||
* 是否开启
|
||||
*/
|
||||
@Excel(name = "是否开启:开启(Y),禁用(N)")
|
||||
private String status;
|
||||
|
||||
public static OrderPayCustomer addBuild(OrderCustomerAddReq req){
|
||||
|
|
|
@ -9,11 +9,15 @@ import com.muyu.cloud.pay.domain.req.OrderCustomerUpdReq;
|
|||
import com.muyu.cloud.pay.domain.resp.CustomerResp;
|
||||
import com.muyu.cloud.pay.service.OrderPayCustomerService;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.java.Log;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
@ -162,5 +166,16 @@ public class OrderPayCustomerController {
|
|||
|
||||
}
|
||||
|
||||
@RequiresPermissions("pay:customer:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response){
|
||||
|
||||
List<OrderPayCustomer> list=orderPayCustomerService.selectPayList();
|
||||
ExcelUtil<OrderPayCustomer> orderPayCustomerExcelUtil = new ExcelUtil<OrderPayCustomer>(OrderPayCustomer.class);
|
||||
orderPayCustomerExcelUtil.exportExcel(response,list,"支付管理模块");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -45,4 +45,7 @@ public interface OrderPayCustomerService extends IService<OrderPayCustomer>{
|
|||
* @param status 状态 SysIsYesNo
|
||||
*/
|
||||
void settingStatus(Long orderCustomerId,String status);
|
||||
|
||||
List<OrderPayCustomer> selectPayList();
|
||||
|
||||
}
|
||||
|
|
|
@ -150,6 +150,14 @@ public class OrderPayCustomerServiceImpl
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderPayCustomer> selectPayList() {
|
||||
|
||||
List<OrderPayCustomer> list = this.list();
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* @param orderPayCustomer
|
||||
|
|
Loading…
Reference in New Issue