修改结算人信息接口
This commit is contained in:
@@ -0,0 +1,82 @@
|
|||||||
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.hibernate.validator.constraints.Length;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: WangShuo
|
||||||
|
* @Date: 2025/06/10/09:33
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BuildSettlerRequest {
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算人身份证信息是否和加盟商一致,false否,true是")
|
||||||
|
@NotNull(message = "结算人身份证信息是否和加盟商一致不能为空")
|
||||||
|
private Boolean settlerIsSamePartner ;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算人姓名")
|
||||||
|
@NotBlank(message = "结算人姓名 不能为空")
|
||||||
|
@JsonProperty("settlerName")
|
||||||
|
private String settlerName;
|
||||||
|
|
||||||
|
@NotBlank(message = "结算人身份证正面 不能为空")
|
||||||
|
@Length(max = 250 , message = "结算人身份证正面 长度不能超过250")
|
||||||
|
@ApiModelProperty("结算人身份证正面(图片)")
|
||||||
|
private String settlerIdCardFront;
|
||||||
|
|
||||||
|
@NotBlank(message = "结算人手持身份证正面 不能为空")
|
||||||
|
@Length(max = 250 , message = "结算人手持身份证正面 长度不能超过250")
|
||||||
|
@ApiModelProperty("结算人手持身份证正面")
|
||||||
|
private String settlerInHandFrontPicture;
|
||||||
|
|
||||||
|
@NotBlank(message = "结算人手持身份证反面 不能为空")
|
||||||
|
@Length(max = 250 , message = "结算人手持身份证反面 长度不能超过250")
|
||||||
|
@ApiModelProperty("结算人手持身份证反面 (图片)")
|
||||||
|
private String settlerInHandBackPicture;
|
||||||
|
|
||||||
|
@NotBlank(message = "结算人身份证反面 不能为空")
|
||||||
|
@Length(max = 250 , message = "结算人身份证反面 长度不能超过250")
|
||||||
|
@ApiModelProperty("结算人身份证反面(图片)")
|
||||||
|
private String settlerIdCardReverse;
|
||||||
|
|
||||||
|
@NotBlank(message = "结算人身份证号 不能为空")
|
||||||
|
@Length(max = 64 , message = "结算人身份证号 长度不能超过64")
|
||||||
|
@ApiModelProperty("结算人身份证号")
|
||||||
|
private String settlerIdCardNo;
|
||||||
|
|
||||||
|
@NotBlank(message = "结算人银行卡照片 不能为空")
|
||||||
|
@Length(max = 250, message = "结算人银行卡照片 长度不能超过250")
|
||||||
|
@ApiModelProperty("结算人银行卡照片")
|
||||||
|
private String settlerBankPhotoUrl;
|
||||||
|
|
||||||
|
@NotBlank(message = "结算人银行卡背面照片 不能为空")
|
||||||
|
@Length(max = 250, message = "结算人银行卡背面照片 长度不能超过250")
|
||||||
|
@ApiModelProperty("结算人银行卡背面照片")
|
||||||
|
@JsonProperty("settlerBankBackPhotoUrl")
|
||||||
|
private String settlerBankBackPhotoUrl;
|
||||||
|
|
||||||
|
@NotBlank(message = "结算人银行卡号 不能为空")
|
||||||
|
@Length(max = 64 , message = "结算人银行卡号 长度不能超过64")
|
||||||
|
@ApiModelProperty("结算人银行卡号")
|
||||||
|
private String settlerBankNumber;
|
||||||
|
|
||||||
|
@NotBlank(message = "结算人银行卡预留手机号 不能为空")
|
||||||
|
@Length(min = 11,max = 11 , message = "结算人银行卡预留手机号 长度必须为11")
|
||||||
|
@ApiModelProperty("结算人银行卡预留手机号")
|
||||||
|
private String settlerBankMobile;
|
||||||
|
|
||||||
|
@NotBlank(message = "结算开户银行支行 不能为空")
|
||||||
|
@Length(max =100, message = "结算开户银行支行 长度不能超过100")
|
||||||
|
@ApiModelProperty("结算开户银行支行")
|
||||||
|
private String settlerBankName;
|
||||||
|
}
|
||||||
@@ -2,6 +2,7 @@ package com.cool.store.service;
|
|||||||
|
|
||||||
|
|
||||||
import com.cool.store.request.BuildInformationRequest;
|
import com.cool.store.request.BuildInformationRequest;
|
||||||
|
import com.cool.store.request.BuildSettlerRequest;
|
||||||
import com.cool.store.response.BuildInformationResponse;
|
import com.cool.store.response.BuildInformationResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -17,4 +18,6 @@ public interface BuildInformationService {
|
|||||||
|
|
||||||
Integer getJoinType(Long lineId);
|
Integer getJoinType(Long lineId);
|
||||||
|
|
||||||
|
Boolean updateBuildSettler(BuildSettlerRequest request,String userId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
|||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.mapper.WarehouseInfoMapper;
|
import com.cool.store.mapper.WarehouseInfoMapper;
|
||||||
import com.cool.store.request.BuildInformationRequest;
|
import com.cool.store.request.BuildInformationRequest;
|
||||||
|
import com.cool.store.request.BuildSettlerRequest;
|
||||||
import com.cool.store.response.BuildInformationResponse;
|
import com.cool.store.response.BuildInformationResponse;
|
||||||
import com.cool.store.service.BuildInformationService;
|
import com.cool.store.service.BuildInformationService;
|
||||||
import com.cool.store.mapper.BuildInformationMapper;
|
import com.cool.store.mapper.BuildInformationMapper;
|
||||||
@@ -284,6 +285,45 @@ public class BuildInformationServiceImpl implements BuildInformationService {
|
|||||||
return qualificationsInfoDO.getJoinType();
|
return qualificationsInfoDO.getJoinType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Boolean updateBuildSettler(BuildSettlerRequest request,String userId) {
|
||||||
|
|
||||||
|
BuildInformationDO buildInformationDO = buildInformationDAO.selectOneByShopId(request.getShopId());
|
||||||
|
buildInformationDO.setSettlerIsSamePartner(request.getSettlerIsSamePartner());
|
||||||
|
buildInformationDO.setSettlerName(request.getSettlerName());
|
||||||
|
buildInformationDO.setSettlerIdCardFront(request.getSettlerIdCardFront());
|
||||||
|
buildInformationDO.setSettlerIdCardReverse(request.getSettlerIdCardReverse());
|
||||||
|
buildInformationDO.setSettlerInHandBackPicture(request.getSettlerInHandBackPicture());
|
||||||
|
buildInformationDO.setSettlerInHandFrontPicture(request.getSettlerInHandFrontPicture());
|
||||||
|
buildInformationDO.setSettlerIdCardNo(request.getSettlerIdCardNo());
|
||||||
|
buildInformationDO.setSettlerBankPhotoUrl(request.getSettlerBankPhotoUrl());
|
||||||
|
buildInformationDO.setSettlerBankNumber(request.getSettlerBankNumber());
|
||||||
|
buildInformationDO.setSettlerBankMobile(request.getSettlerBankMobile());
|
||||||
|
buildInformationDO.setSettlerBankName(request.getSettlerBankName());
|
||||||
|
buildInformationDO.setSettlerBankBackPhotoUrl(request.getSettlerBankBackPhotoUrl());
|
||||||
|
buildInformationDO.setUpdateTime(new Date());
|
||||||
|
buildInformationDO.setUpdateUser(userId);
|
||||||
|
buildInformationDAO.updateByShopIdSelective(buildInformationDO);
|
||||||
|
List<PlatformBuildDO> platformBuildDOS = platformBuildDAO.selectByShopId(request.getShopId());
|
||||||
|
if (CollectionUtils.isNotEmpty(platformBuildDOS)){
|
||||||
|
for (PlatformBuildDO platformBuildDO : platformBuildDOS){
|
||||||
|
platformBuildDO.setSettlerName(request.getSettlerName());
|
||||||
|
platformBuildDO.setSettlerIdCardFront(request.getSettlerIdCardFront());
|
||||||
|
platformBuildDO.setSettlerIdCardReverse(request.getSettlerIdCardReverse());
|
||||||
|
platformBuildDO.setSettlerInHandBackPicture(request.getSettlerInHandBackPicture());
|
||||||
|
platformBuildDO.setSettlerInHandFrontPicture(request.getSettlerInHandFrontPicture());
|
||||||
|
platformBuildDO.setSettlerIdCardNo(request.getSettlerIdCardNo());
|
||||||
|
platformBuildDO.setSettlerBankPhotoUrl(request.getSettlerBankPhotoUrl());
|
||||||
|
platformBuildDO.setSettlerBankNumber(request.getSettlerBankNumber());
|
||||||
|
platformBuildDO.setSettlerBankMobile(request.getSettlerBankMobile());
|
||||||
|
platformBuildDO.setSettlerBankName(request.getSettlerBankName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
platformBuildDAO.batchUpdate(platformBuildDOS);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
package com.cool.store.controller.webc;
|
package com.cool.store.controller.webc;
|
||||||
|
|
||||||
|
import com.cool.store.context.PartnerUserHolder;
|
||||||
import com.cool.store.request.BuildInformationRequest;
|
import com.cool.store.request.BuildInformationRequest;
|
||||||
|
import com.cool.store.request.BuildSettlerRequest;
|
||||||
import com.cool.store.response.BuildInformationResponse;
|
import com.cool.store.response.BuildInformationResponse;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
import com.cool.store.service.BuildInformationService;
|
import com.cool.store.service.BuildInformationService;
|
||||||
|
import com.cool.store.vo.PartnerUserInfoVO;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@@ -42,4 +45,11 @@ public class MiniBuildInformationController {
|
|||||||
return ResponseResult.success(buildInformationService.getJoinType(lineId));
|
return ResponseResult.success(buildInformationService.getJoinType(lineId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改结算人信息")
|
||||||
|
@PostMapping("/updateSettler")
|
||||||
|
public ResponseResult<Boolean> updateSettler(@RequestBody @Validated BuildSettlerRequest request) {
|
||||||
|
PartnerUserInfoVO user = PartnerUserHolder.getUser();
|
||||||
|
return ResponseResult.success(buildInformationService.updateBuildSettler(request,user.getPartnerId()));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user