feat():测试
parent
60b717dd2c
commit
cab360dad2
|
@ -3,7 +3,6 @@ package com.muyu.cloud.pay.domain.req;
|
|||
import com.muyu.common.core.validation.IsSystemYesNo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.muyu.cloud.pay.domain.req;
|
|||
|
||||
import com.muyu.common.core.validation.IsSystemPayType;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -16,6 +17,7 @@ import lombok.NoArgsConstructor;
|
|||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Tag(name = "支付服务客户添加请求对象", description = "根据入参进行客户服务添加")
|
||||
public class OrderCustomerUpdReq {
|
||||
/**
|
||||
* 服务/客户名称
|
||||
|
|
|
@ -8,6 +8,7 @@ import lombok.AllArgsConstructor;
|
|||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
@ -43,9 +44,12 @@ public class CustomerResp {
|
|||
*/
|
||||
@Schema(description = "客户状态,同数据字典-系统是否",defaultValue = "Y",type = "String")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "创建人",defaultValue = "muyu",type = "String")
|
||||
private String createBy;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
@Schema(description = "创建时间",defaultValue = "2024-7-31",type = "Date")
|
||||
private Date createTime;
|
||||
|
||||
|
@ -53,6 +57,7 @@ public class CustomerResp {
|
|||
/**
|
||||
* 客户最近5条支付单
|
||||
*/
|
||||
@Schema(description = "客户最近五条支付记录", type = "List")
|
||||
private List<CustomerOrderPaySimpleResp> orderPaySimpleRespList;
|
||||
|
||||
|
||||
|
|
|
@ -38,5 +38,5 @@ public interface OrderPayCustomerService extends IService<OrderPayCustomer> {
|
|||
* @param orderCustomerId
|
||||
* @param status
|
||||
*/
|
||||
void settingStatus(Long orderCustomerId, String status);
|
||||
// void settingStatus(Long orderCustomerId, String status);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@ import lombok.extern.slf4j.Slf4j;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
@ -48,8 +47,8 @@ public class OrderPayCustomerServiceImpl extends ServiceImpl<OrderPayCustomerMap
|
|||
StringUtils.isNotEmpty(customerListReq.getStatus()), //是否开启
|
||||
OrderPayCustomer::getStatus, customerListReq.getStatus() //是否开启
|
||||
);
|
||||
List<OrderPayCustomer> orderPayCustomerList = this.list(queryWrapper);
|
||||
return orderPayCustomerList.stream()
|
||||
|
||||
return this.list(queryWrapper).stream()
|
||||
.map(orderPayCustomer -> CustomerResp.customerBuild(
|
||||
orderPayCustomer,
|
||||
() -> orderPayService.selectOrderPayByAppCodeAndLimit(orderPayCustomer.getAppCode(), 5)
|
||||
|
@ -107,7 +106,7 @@ public class OrderPayCustomerServiceImpl extends ServiceImpl<OrderPayCustomerMap
|
|||
*/
|
||||
@Override
|
||||
public void disable(Long orderCustomerId) {
|
||||
this.settingStatus(orderCustomerId, SystemYesNo.NO.getCode());
|
||||
settingStatus(orderCustomerId, SystemYesNo.NO.getCode());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -116,13 +115,21 @@ public class OrderPayCustomerServiceImpl extends ServiceImpl<OrderPayCustomerMap
|
|||
*/
|
||||
@Override
|
||||
public void enable(Long orderCustomerId) {
|
||||
this.settingStatus(orderCustomerId, SystemYesNo.YES.getCode());
|
||||
settingStatus(orderCustomerId, SystemYesNo.YES.getCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void settingStatus(Long orderCustomerId, String status) {
|
||||
|
||||
public void settingStatus(Long orderCustomerId,String status) {
|
||||
this.updateById(OrderPayCustomer.builder()
|
||||
.id(orderCustomerId)
|
||||
.status(status)
|
||||
.build());
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void settingStatus(Long orderCustomerId, String status) {
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue