feat():修改
parent
94b9339a8d
commit
6ed6d654ac
|
@ -1,6 +1,7 @@
|
||||||
package com.bwie.cloud.pay.domain.req;
|
package com.bwie.cloud.pay.domain.req;
|
||||||
|
|
||||||
import com.muyu.common.core.validation.custom.IsSystemYseNo;
|
import com.muyu.common.core.validation.custom.IsSystemYseNo;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
@ -27,6 +28,8 @@ public class OrderCustomerAddReq {
|
||||||
* 服务/客户名称
|
* 服务/客户名称
|
||||||
*/
|
*/
|
||||||
@NotEmpty(message = "服务客户名称不可为空")
|
@NotEmpty(message = "服务客户名称不可为空")
|
||||||
|
@Schema(title = "服务/客户名称",type = "String",defaultValue = "会员服务",
|
||||||
|
description = "客户名称一般为微服务的中文名称,方便使用者进行区分",requiredProperties = {"appName"})
|
||||||
private String appName;
|
private String appName;
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,11 +37,14 @@ public class OrderCustomerAddReq {
|
||||||
* 服务/客户编码
|
* 服务/客户编码
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "服务客户编码不可为空")
|
@NotBlank(message = "服务客户编码不可为空")
|
||||||
|
@Schema(title = "服务/客户编码",type = "String",defaultValue = "bwie-vip",
|
||||||
|
description = "客户编码,从[/customer/all]接口当中进行获取",requiredProperties = {"appCode"})
|
||||||
private String appCode;
|
private String appCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务/客户描述
|
* 服务/客户描述
|
||||||
*/
|
*/
|
||||||
|
@Schema(title = "服务/客户描述",type = "String")
|
||||||
private String appDesc;
|
private String appDesc;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,11 +52,13 @@ public class OrderCustomerAddReq {
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "客户状态不可为空")
|
@NotBlank(message = "客户状态不可为空")
|
||||||
@IsSystemYseNo
|
@IsSystemYseNo
|
||||||
|
@Schema(title = "服务/客户开通状态",type = "String",defaultValue = "Y",description = "状态为Y和N,如果为Y用户可以使用支付接口,若为N顾客不可以使用支付接口类")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 客户备注
|
* 客户备注
|
||||||
*/
|
*/
|
||||||
|
@Schema(title = "服务/客户备注",type = "String")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.bwie.cloud.pay.controller;
|
||||||
|
|
||||||
import com.bwie.cloud.pay.domain.OrderPayCustomer;
|
import com.bwie.cloud.pay.domain.OrderPayCustomer;
|
||||||
import com.bwie.cloud.pay.domain.req.CustomerListReq;
|
import com.bwie.cloud.pay.domain.req.CustomerListReq;
|
||||||
|
import com.bwie.cloud.pay.domain.req.OrderCustomerAddReq;
|
||||||
import com.bwie.cloud.pay.domain.resp.CustomerResp;
|
import com.bwie.cloud.pay.domain.resp.CustomerResp;
|
||||||
import com.bwie.cloud.pay.service.OrderPayCustomerService;
|
import com.bwie.cloud.pay.service.OrderPayCustomerService;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
|
@ -55,4 +56,16 @@ public class OrderPayCustomerController {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加客户
|
||||||
|
* @param orderCustomerAddReq
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping
|
||||||
|
@Operation(summary = "客户信息添加",description = "添加支付平台客户信息,添加成功之后才可以使用支付类的产品")
|
||||||
|
public Result<String> save(@Validated @RequestBody OrderCustomerAddReq orderCustomerAddReq){
|
||||||
|
orderPayCustomerService.save(OrderPayCustomer.addBuild(orderCustomerAddReq));
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,12 +5,11 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.bwie.cloud.pay.domain.OrderPayCustomer;
|
import com.bwie.cloud.pay.domain.OrderPayCustomer;
|
||||||
import com.bwie.cloud.pay.domain.OrderPayInfo;
|
import com.bwie.cloud.pay.domain.OrderPayInfo;
|
||||||
import com.bwie.cloud.pay.domain.req.CustomerListReq;
|
import com.bwie.cloud.pay.domain.req.CustomerListReq;
|
||||||
import com.bwie.cloud.pay.domain.resp.CustomerOrderPaySimpleResp;
|
|
||||||
import com.bwie.cloud.pay.domain.resp.CustomerResp;
|
import com.bwie.cloud.pay.domain.resp.CustomerResp;
|
||||||
import com.bwie.cloud.pay.mapper.OrderPayCustomerMapper;
|
import com.bwie.cloud.pay.mapper.OrderPayCustomerMapper;
|
||||||
import com.bwie.cloud.pay.service.OrderPayCustomerService;
|
import com.bwie.cloud.pay.service.OrderPayCustomerService;
|
||||||
import com.bwie.cloud.pay.service.OrderPayService;
|
import com.bwie.cloud.pay.service.OrderPayService;
|
||||||
import com.bwie.nacos.remote.service.NacosServeService;
|
import com.bwie.nacos.service.NacosServeService;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -61,6 +60,7 @@ public class OrderPayCustomerServiceImpl
|
||||||
List<OrderPayCustomer> orderPayCustomerList = this.list(queryWrapper);
|
List<OrderPayCustomer> orderPayCustomerList = this.list(queryWrapper);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return orderPayCustomerList.stream()
|
return orderPayCustomerList.stream()
|
||||||
.map(orderPayCustomer -> CustomerResp.customerBuild(
|
.map(orderPayCustomer -> CustomerResp.customerBuild(
|
||||||
orderPayCustomer,
|
orderPayCustomer,
|
||||||
|
|
Loading…
Reference in New Issue