chenchaod преди 4 седмици
родител
ревизия
27e7b0b24e

+ 3
- 1
gly-base-core/src/main/java/cn/com/taiji/core/repo/jpa/comm/CommonWxSignConfigRepo.java Целия файл

@@ -7,9 +7,11 @@ import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface CommonWxSignConfigRepo extends AbstractJpaRepo<CommonWxSignConfig, String>{

CommonWxSignConfig findByParentId(String parentId);
List<CommonWxSignConfig> findByParentId(String parentId);

CommonWxSignConfig findByParentIdAndVersion(String parentId, Integer version);


+ 9
- 3
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/dto/wx/WxCarPageReqDTO.java Целия файл

@@ -5,6 +5,10 @@ import cn.com.taiji.core.model.comm.protocol.constraint.FixedLength;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
* @Author:ChenChao
* @Date:2025/5/20 14:52
@@ -14,8 +18,10 @@ import lombok.Data;
@Data
public class WxCarPageReqDTO extends AbstractStaffBizPageRequestDTO {

@ApiModelProperty(value = "渠道编号")
@FixedLength(length = 11)
private String agencyId;
// @ApiModelProperty(value = "渠道编号")
// @FixedLength(length = 11)
// private String agencyId;
@ApiModelProperty(value = "父表ID")
private String parentId;//父表ID

}

+ 4
- 0
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/dto/wx/WxPayAddReqDTO.java Целия файл

@@ -12,6 +12,7 @@ import lombok.Data;
import javax.persistence.Column;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
* @Author:ChenChao
@@ -57,6 +58,8 @@ public class WxPayAddReqDTO extends AbstractStaffBizRequestDTO {
private Integer wxServiceType;//微信商户下单类型,1普通商户,2服务商
@ApiModelProperty(value = "微信商户号")
private String wxSubMchId;//微信商户号
@ApiModelProperty(value = "微信子appid")
private String wxSubAppId;//微信子appid
@ApiModelProperty(value = "微信商户公钥ID")
private String wxPublicKeyId;
@ApiModelProperty(value = "微信商户公钥")
@@ -83,6 +86,7 @@ public class WxPayAddReqDTO extends AbstractStaffBizRequestDTO {
}
if (wxServiceType != null && wxServiceType==2){
validator.validFieldNotBlank("wxSubMchId",wxSubMchId);
validator.validFieldNotBlank("wxSubAppId",wxSubAppId);
}
}


+ 8
- 0
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/manager/wx/ParentSignConfigManagerImpl.java Целия файл

@@ -4,6 +4,7 @@ import cn.com.taiji.common.manager.AbstractManager;
import cn.com.taiji.common.manager.ManagerException;
import cn.com.taiji.common.model.dao.Pagination;
import cn.com.taiji.core.entity.comm.CommonPASignConfig;
import cn.com.taiji.core.entity.comm.CommonWxSignConfig;
import cn.com.taiji.core.repo.jpa.comm.CommonPASignConfigRepo;
import cn.com.taiji.core.repo.jpa.comm.CommonWxSignConfigRepo;
import cn.com.taiji.userw.dto.wx.CarParentAddReqDTO;
@@ -15,6 +16,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDateTime;
import java.util.List;

/**
* @Author:ChenChao
@@ -47,6 +49,12 @@ public class ParentSignConfigManagerImpl extends AbstractManager implements Pare
CommonPASignConfig paSignConfig = commonPASignConfigRepo.findById(reqDto.getId()).orElse(null);
if (paSignConfig == null) throw new ManagerException("该配置不存在");
paSignConfig.setInfo(reqDto.getInfo());
if (!reqDto.getPayChannelType().equals(paSignConfig.getPayChannelType())){
List<CommonWxSignConfig> byParentId = commonWxSignConfigRepo.findByParentId(reqDto.getId());
if (!isEmpty(byParentId)){
throw new ManagerException("该配置已存在详情支付配置");
}
}
if (!paSignConfig.getMchId().equals(reqDto.getMchId())){
paSignConfig.setMchId(reqDto.getMchId());
//更新子表商户号

+ 6
- 2
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/repo/jpa/request/CommonWxSignConfigPageRequest.java Целия файл

@@ -6,12 +6,16 @@ import cn.com.taiji.core.entity.comm.CommonWxSignConfig;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

@Getter
@Setter
public class CommonWxSignConfigPageRequest extends JpaDateTimePageableDataRequest<CommonWxSignConfig> {


private String agencyId;//渠道编号
private String parentId;//父表ID


public CommonWxSignConfigPageRequest() {
@@ -22,7 +26,7 @@ public class CommonWxSignConfigPageRequest extends JpaDateTimePageableDataReques
@Override
public HqlBuilder toSelectHql(){
HqlBuilder hql = new HqlBuilder("from "+CommonWxSignConfig.class.getName()+" where 1=1 ");
hql.append(" and agencyId=:agencyId", agencyId);
hql.append(" and parentId=:parentId", parentId);
return hql;
}


Loading…
Отказ
Запис