平台建店
This commit is contained in:
@@ -223,6 +223,8 @@ public enum ErrorCodeEnum {
|
||||
DESIGN_NO_COMPLETE(121007,"请先完成设计阶段!",null),
|
||||
|
||||
UPDATE_FAIL(131000,"修改失败,表单不存在!",null),
|
||||
LICENSE_LEGAL_STAGE_FAIL(131001,"营业执照阶段未上传!",null),
|
||||
BUILD_INFORMATION_STAGE_FAIL(131002,"建店资料收集阶段未完成!",null)
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -5,29 +5,32 @@
|
||||
<mapper namespace="com.cool.store.mapper.PlatformBuildMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.PlatformBuildDO">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="BIGINT"/>
|
||||
<result property="auditId" column="audit_id" jdbcType="BIGINT"/>
|
||||
<result property="type" column="type" jdbcType="TINYINT"/>
|
||||
<result property="settlerIdCardFront" column="settler_id_card_front" jdbcType="VARCHAR"/>
|
||||
<result property="settlerIdCardReverse" column="settler_id_card_reverse" jdbcType="VARCHAR"/>
|
||||
<result property="settlerIdCardNo" column="settler_id_card_no" jdbcType="VARCHAR"/>
|
||||
<result property="settlerBankNumber" column="settler_bank_number" jdbcType="VARCHAR"/>
|
||||
<result property="settlerBankMobile" column="settler_bank_mobile" jdbcType="VARCHAR"/>
|
||||
<result property="settlerBankName" column="settler_bank_name" jdbcType="VARCHAR"/>
|
||||
<result property="relationshipProofUrl" column="relationship_proof_url" jdbcType="VARCHAR"/>
|
||||
<result property="accountOpeningPermitUrl" column="account_opening_permit_url" jdbcType="VARCHAR"/>
|
||||
<result property="account" column="account" jdbcType="VARCHAR"/>
|
||||
<result property="storePositioningUrl" column="store_positioning_url" jdbcType="VARCHAR"/>
|
||||
<result property="authorizationUrl" column="authorization_url" jdbcType="VARCHAR"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="createUser" column="create_user" jdbcType="VARCHAR"/>
|
||||
<result property="updateUser" column="update_user" jdbcType="VARCHAR"/>
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="BIGINT"/>
|
||||
<result property="auditId" column="audit_id" jdbcType="BIGINT"/>
|
||||
<result property="type" column="type" jdbcType="TINYINT"/>
|
||||
<result property="settlerIdCardFront" column="settler_id_card_front" jdbcType="VARCHAR"/>
|
||||
<result property="settlerIdCardReverse" column="settler_id_card_reverse" jdbcType="VARCHAR"/>
|
||||
<result property="settlerIdCardNo" column="settler_id_card_no" jdbcType="VARCHAR"/>
|
||||
<result property="settlerName" column="settler_name" jdbcType="VARCHAR"/>
|
||||
<result property="settlerBankPhotoUrl" column="settler_bank_photo_url" jdbcType="VARCHAR"/>
|
||||
<result property="settlerBankNumber" column="settler_bank_number" jdbcType="VARCHAR"/>
|
||||
<result property="settlerBankMobile" column="settler_bank_mobile" jdbcType="VARCHAR"/>
|
||||
<result property="settlerBankName" column="settler_bank_name" jdbcType="VARCHAR"/>
|
||||
<result property="relationshipProofUrl" column="relationship_proof_url" jdbcType="VARCHAR"/>
|
||||
<result property="accountOpeningPermitUrl" column="account_opening_permit_url" jdbcType="VARCHAR"/>
|
||||
<result property="account" column="account" jdbcType="VARCHAR"/>
|
||||
<result property="storePositioningUrl" column="store_positioning_url" jdbcType="VARCHAR"/>
|
||||
<result property="authorizationUrl" column="authorization_url" jdbcType="VARCHAR"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="createUser" column="create_user" jdbcType="VARCHAR"/>
|
||||
<result property="updateUser" column="update_user" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,shop_id,audit_id,
|
||||
id
|
||||
,shop_id,audit_id,
|
||||
type,settler_id_card_front,settler_id_card_reverse,
|
||||
settler_id_card_no,settler_bank_number,settler_bank_mobile,
|
||||
settler_bank_name,relationship_proof_url,account_opening_permit_url,
|
||||
|
||||
@@ -50,12 +50,24 @@ public class PlatformBuildDO {
|
||||
@Column(name = "settler_id_card_reverse")
|
||||
private String settlerIdCardReverse;
|
||||
|
||||
/**
|
||||
* 结算人姓名
|
||||
*/
|
||||
@Column(name = "settler_name")
|
||||
private String settlerName;
|
||||
|
||||
/**
|
||||
* 结算人身份证号
|
||||
*/
|
||||
@Column(name = "settler_id_card_no")
|
||||
private String settlerIdCardNo;
|
||||
|
||||
/**
|
||||
* 结算人银行卡照片
|
||||
*/
|
||||
@Column(name = "settler_bank_photo_url")
|
||||
private String settlerBankPhotoUrl;
|
||||
|
||||
/**
|
||||
* 结算人银行卡号
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.entity.PlatformBuildDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
@@ -33,6 +34,11 @@ public class PlatformBuildRequest {
|
||||
@ApiModelProperty("结算人身份证反面(图片)")
|
||||
private String settlerIdCardReverse;
|
||||
|
||||
@NotBlank
|
||||
@Length(max = 120 , message = "结算人姓名 长度不能超过128")
|
||||
@ApiModelProperty("结算人姓名")
|
||||
private String settlerName;
|
||||
|
||||
@NotBlank
|
||||
@Length(max = 64 , message = "结算人身份证号 长度不能超过64")
|
||||
@ApiModelProperty("结算人身份证号")
|
||||
@@ -65,4 +71,15 @@ public class PlatformBuildRequest {
|
||||
@Length(max =1020, message = "授权书(抖音非法人结算需要) 长度不能超过1020")
|
||||
@ApiModelProperty("授权书(抖音非法人结算需要)")
|
||||
private String authorizationUrl;
|
||||
|
||||
public PlatformBuildDO toDO(){
|
||||
PlatformBuildDO platformBuildDO = new PlatformBuildDO();
|
||||
platformBuildDO.setShopId(this.shopId);
|
||||
platformBuildDO.setSettlerIdCardFront(this.settlerIdCardFront);
|
||||
platformBuildDO.setSettlerIdCardReverse(this.settlerIdCardReverse);
|
||||
platformBuildDO.setSettlerIdCardNo(this.settlerIdCardNo);
|
||||
platformBuildDO.setSettlerName(this.settlerName);
|
||||
return platformBuildDO;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.cool.store.response;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2024/08/29/下午2:33
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class AuditInfoResponse {
|
||||
|
||||
@ApiModelProperty("操作人集合")
|
||||
private List<AuditUserInfoVO> list;
|
||||
@ApiModelProperty("操作类型 0 提交审批 1-审批通过 2 审批不通过 3-待审批")
|
||||
private Integer type;
|
||||
@ApiModelProperty("生成时间")
|
||||
private Date createTime;
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
@ApiModelProperty("附件")
|
||||
private String annex;
|
||||
@ApiModelProperty("实际操作人id")
|
||||
private String actualUserId;
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@ApiModel(value = "可操作人信息")
|
||||
public static class AuditUserInfoVO {
|
||||
private String userId;
|
||||
private String name;
|
||||
@ApiModelProperty("头像")
|
||||
private String avatar;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
|
||||
import com.cool.store.request.PlatformBuildRequest;
|
||||
|
||||
/**
|
||||
* @author EDY
|
||||
@@ -11,6 +12,10 @@ public interface PlatformBuildService {
|
||||
|
||||
Boolean isJuridical(Long shopId);
|
||||
|
||||
Integer submitOrUpdate(PlatformBuildRequest request,String userId);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,24 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
|
||||
import com.cool.store.dao.BuildInformationDAO;
|
||||
import com.cool.store.entity.BuildInformationDO;
|
||||
import com.cool.store.entity.LicenseTransactDO;
|
||||
import com.cool.store.entity.PlatformBuildDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.ApplyLicenseMapper;
|
||||
import com.cool.store.request.PlatformBuildRequest;
|
||||
import com.cool.store.service.PlatformBuildService;
|
||||
import com.cool.store.mapper.PlatformBuildMapper;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Service;
|
||||
import springfox.documentation.swagger2.mappers.LicenseMapper;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author EDY
|
||||
@@ -14,6 +28,31 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class PlatformBuildServiceImpl implements PlatformBuildService{
|
||||
|
||||
@Resource
|
||||
private ApplyLicenseMapper applyLicenseMapper;
|
||||
@Autowired
|
||||
private BuildInformationDAO buildInformationDAO;
|
||||
|
||||
@Override
|
||||
public Boolean isJuridical(Long shopId) {
|
||||
LicenseTransactDO licenseTransactDO = applyLicenseMapper.selectByShopId(shopId);
|
||||
if(Objects.isNull(licenseTransactDO) || StringUtils.isBlank(licenseTransactDO.getLicenseLegalPerson())){
|
||||
throw new ServiceException(ErrorCodeEnum.LICENSE_LEGAL_STAGE_FAIL);
|
||||
}
|
||||
BuildInformationDO informationDO = buildInformationDAO.selectOneByShopId(shopId);
|
||||
if(Objects.isNull(informationDO) || StringUtils.isBlank(informationDO.getSettlerName())){
|
||||
throw new ServiceException(ErrorCodeEnum.BUILD_INFORMATION_STAGE_FAIL);
|
||||
}
|
||||
if (licenseTransactDO.getLicenseLegalPerson().equals(informationDO.getSettlerName())){
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer submitOrUpdate(PlatformBuildRequest request, String userId) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user