master
parent
8d6cb9bbb6
commit
6be7b6651c
|
@ -40,7 +40,7 @@ public class OrderPayCustomer extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 是否开启
|
* 是否开启
|
||||||
*/
|
*/
|
||||||
private Integer status;
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,73 @@
|
||||||
|
package com.muyu.domain.resp;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.muyu.domain.OrderPayCustomer;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Builder
|
||||||
|
@Tag(name = "客户信息相应对象",description = "负责客户信息查询结果")
|
||||||
|
public class CustomerResp {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键自增
|
||||||
|
*/
|
||||||
|
@Schema(type = "Long" , defaultValue = "ID" , description = "客户名称,为微服务中文名称")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务/客户名称
|
||||||
|
*/
|
||||||
|
@Schema(defaultValue = "客户名称",type = "String" , description = "客户名称")
|
||||||
|
private String appName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务/客户编号
|
||||||
|
*/
|
||||||
|
@Schema(defaultValue = "客户编码",type = "String" , description = "客户名称")
|
||||||
|
private String appCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户描述
|
||||||
|
*/
|
||||||
|
@Schema(defaultValue = "客户描述",type = "String" , description = "客户名称")
|
||||||
|
private String appDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否开启
|
||||||
|
*/
|
||||||
|
@Schema(defaultValue = "Y",type = "String" , description = "客户状态")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
@Schema(defaultValue = "创建人",type = "String" , description = "muyu")
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
@Schema(defaultValue = "2024-8-4 10:33:25",type = "String" , description = "创建时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回结果
|
||||||
|
*/
|
||||||
|
public static CustomerResp customerBuild (OrderPayCustomer orderPayCustomer) {
|
||||||
|
return CustomerResp.builder()
|
||||||
|
.id(orderPayCustomer.getId())
|
||||||
|
.appName(orderPayCustomer.getAppName())
|
||||||
|
.appCode(orderPayCustomer.getAppCode())
|
||||||
|
.status(orderPayCustomer.getStatus())
|
||||||
|
.createBy(orderPayCustomer.getCreateBy())
|
||||||
|
.createTime(orderPayCustomer.getCreateTime())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,6 +3,7 @@ package com.muyu.pay.controller;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.domain.OrderPayCustomer;
|
import com.muyu.domain.OrderPayCustomer;
|
||||||
import com.muyu.domain.req.CustomerListReq;
|
import com.muyu.domain.req.CustomerListReq;
|
||||||
|
import com.muyu.domain.resp.CustomerResp;
|
||||||
import com.muyu.pay.service.OrderPayCustomerService;
|
import com.muyu.pay.service.OrderPayCustomerService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
@ -30,12 +31,9 @@ public class OrderPayCustomerController {
|
||||||
*/
|
*/
|
||||||
@RequestMapping(path = "/list",method = RequestMethod.POST)
|
@RequestMapping(path = "/list",method = RequestMethod.POST)
|
||||||
@Operation(summary = "查看客户" , description = "根据客户的名称,编码,是否开启等可以镜像客户的筛选")
|
@Operation(summary = "查看客户" , description = "根据客户的名称,编码,是否开启等可以镜像客户的筛选")
|
||||||
public Result<List<OrderPayCustomer>> selectList(@Validated @RequestBody CustomerListReq customerListReq){
|
public Result<List<CustomerResp>> selectList(@Validated @RequestBody CustomerListReq customerListReq){
|
||||||
return Result.success(
|
return Result.success(
|
||||||
orderPayCustomerService.selectList(customerListReq)
|
orderPayCustomerService.selectList(customerListReq)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.muyu.pay.service;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.domain.OrderPayCustomer;
|
import com.muyu.domain.OrderPayCustomer;
|
||||||
import com.muyu.domain.req.CustomerListReq;
|
import com.muyu.domain.req.CustomerListReq;
|
||||||
|
import com.muyu.domain.resp.CustomerResp;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -11,5 +12,5 @@ public interface OrderPayCustomerService extends IService<OrderPayCustomer> {
|
||||||
/**
|
/**
|
||||||
* 客户列表
|
* 客户列表
|
||||||
*/
|
*/
|
||||||
public List<OrderPayCustomer> selectList(CustomerListReq customerListReq);
|
public List<CustomerResp> selectList(CustomerListReq customerListReq);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.muyu.common.core.utils.StringUtils;
|
import com.muyu.common.core.utils.StringUtils;
|
||||||
import com.muyu.domain.OrderPayCustomer;
|
import com.muyu.domain.OrderPayCustomer;
|
||||||
import com.muyu.domain.req.CustomerListReq;
|
import com.muyu.domain.req.CustomerListReq;
|
||||||
|
import com.muyu.domain.resp.CustomerResp;
|
||||||
import com.muyu.pay.controller.OrderPayCustomerController;
|
import com.muyu.pay.controller.OrderPayCustomerController;
|
||||||
import com.muyu.pay.mapper.OrderPayCustomerMapper;
|
import com.muyu.pay.mapper.OrderPayCustomerMapper;
|
||||||
import com.muyu.pay.service.OrderPayCustomerService;
|
import com.muyu.pay.service.OrderPayCustomerService;
|
||||||
|
@ -21,7 +22,7 @@ public class OrderPayCustomerServiceImpl extends ServiceImpl<OrderPayCustomerMap
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<OrderPayCustomer> selectList(CustomerListReq customerListReq) {
|
public List<CustomerResp> selectList(CustomerListReq customerListReq) {
|
||||||
LambdaQueryWrapper<OrderPayCustomer> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<OrderPayCustomer> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.like(
|
queryWrapper.like(
|
||||||
StringUtils.isNotEmpty(customerListReq.getAppCode()),
|
StringUtils.isNotEmpty(customerListReq.getAppCode()),
|
||||||
|
@ -35,6 +36,9 @@ public class OrderPayCustomerServiceImpl extends ServiceImpl<OrderPayCustomerMap
|
||||||
StringUtils.isNotEmpty(customerListReq.getStatus()),
|
StringUtils.isNotEmpty(customerListReq.getStatus()),
|
||||||
OrderPayCustomer::getStatus, customerListReq.getStatus()
|
OrderPayCustomer::getStatus, customerListReq.getStatus()
|
||||||
);
|
);
|
||||||
return this.list(queryWrapper);
|
List<OrderPayCustomer> orderPayCustomerList = this.list(queryWrapper);
|
||||||
|
return orderPayCustomerList.stream()
|
||||||
|
.map(CustomerResp::customerBuild)
|
||||||
|
.toList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue