改造平台建店接口

This commit is contained in:
shuo.wang
2025-04-08 20:39:17 +08:00
parent e276cd8ef9
commit d82f99533b
9 changed files with 93 additions and 6 deletions

View File

@@ -21,4 +21,13 @@ public enum DownSystemTypeEnum {
public String getDesc() { public String getDesc() {
return desc; return desc;
} }
public static DownSystemTypeEnum getByCode(Integer code){
for (DownSystemTypeEnum value : DownSystemTypeEnum.values()) {
if(value.getCode().equals(code)){
return value;
}
}
return null;
}
} }

View File

@@ -34,7 +34,7 @@
decoration_planned_start_time,construction_completion_time,engineering_acceptance_signatures, decoration_planned_start_time,construction_completion_time,engineering_acceptance_signatures,
operations_acceptance_signatures,partner_acceptance_signatures, operations_acceptance_signatures,partner_acceptance_signatures,
create_time,update_time,deleted,plan_acceptance_time,actual_acceptance_time,booking_user,plan_exit_time, create_time,update_time,deleted,plan_acceptance_time,actual_acceptance_time,booking_user,plan_exit_time,
ks_account,verification_mobile,shop_location_screenshots,shop_doorway_photo,shop_Interior_photo ks_account,verification_mobile,shop_location_screenshots,shop_doorway_photo,shop_interior_photo
</sql> </sql>
<update id="updateByShopIDSelective"> <update id="updateByShopIDSelective">
update xfsg_acceptance_info update xfsg_acceptance_info
@@ -97,7 +97,7 @@
shop_doorway_photo =#{shopDoorwayPhoto} shop_doorway_photo =#{shopDoorwayPhoto}
</if> </if>
<if test="shopInteriorPhoto !=null"> <if test="shopInteriorPhoto !=null">
shop_Interior_photo =#{shopInteriorPhoto} shop_interior_photo =#{shopInteriorPhoto}
</if> </if>
</set> </set>
where shop_id = #{shopId} where shop_id = #{shopId}

View File

@@ -9,6 +9,7 @@
<result property="shopId" column="shop_id" jdbcType="BIGINT"/> <result property="shopId" column="shop_id" jdbcType="BIGINT"/>
<result property="auditId" column="audit_id" jdbcType="BIGINT"/> <result property="auditId" column="audit_id" jdbcType="BIGINT"/>
<result property="type" column="type" jdbcType="TINYINT"/> <result property="type" column="type" jdbcType="TINYINT"/>
<result property="settlerName" column="settler_name" jdbcType="VARCHAR"/>
<result property="settlerIdCardFront" column="settler_id_card_front" jdbcType="VARCHAR"/> <result property="settlerIdCardFront" column="settler_id_card_front" jdbcType="VARCHAR"/>
<result property="settlerIdCardReverse" column="settler_id_card_reverse" jdbcType="VARCHAR"/> <result property="settlerIdCardReverse" column="settler_id_card_reverse" jdbcType="VARCHAR"/>
<result property="settlerIdCardNo" column="settler_id_card_no" jdbcType="VARCHAR"/> <result property="settlerIdCardNo" column="settler_id_card_no" jdbcType="VARCHAR"/>
@@ -32,7 +33,7 @@
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id id
,shop_id,audit_id, ,shop_id,audit_id,
type,settler_id_card_front,settler_id_card_reverse,password,ks_account, type,settler_name,settler_id_card_front,settler_id_card_reverse,password,ks_account,
settler_id_card_no,settler_bank_number,settler_bank_mobile, settler_id_card_no,settler_bank_number,settler_bank_mobile,
settler_bank_name, settler_bank_name,
account,store_positioning_url,authorization_url, account,store_positioning_url,authorization_url,

View File

@@ -37,7 +37,11 @@ public class PlatformBuildDO {
*/ */
@Column(name = "type") @Column(name = "type")
private Integer type; private Integer type;
/**
* 结算人姓名
*/
@Column(name = "settler_name")
private String settlerName;
/** /**
* 结算人身份证正面(图片) * 结算人身份证正面(图片)
*/ */

View File

@@ -24,7 +24,8 @@ public class PlatformBuildRequest {
@NotNull @NotNull
@ApiModelProperty(value = "'1-抖音2-快手3-美团团购4-饿了么5-美团外卖',") @ApiModelProperty(value = "'1-抖音2-快手3-美团团购4-饿了么5-美团外卖',")
private Integer type; private Integer type;
@ApiModelProperty("结算人姓名")
private String settlerName;
@NotBlank @NotBlank
@Length(max = 250, message = "结算人身份证正面 长度不能超过250") @Length(max = 250, message = "结算人身份证正面 长度不能超过250")
@ApiModelProperty("结算人身份证正面(图片)") @ApiModelProperty("结算人身份证正面(图片)")

View File

@@ -14,6 +14,8 @@ import org.hibernate.validator.constraints.Length;
public class PlatformBuildResponse { public class PlatformBuildResponse {
private Long shopId; private Long shopId;
@ApiModelProperty("结算人姓名")
private String settlerName;
@ApiModelProperty("结算人身份证正面(图片)") @ApiModelProperty("结算人身份证正面(图片)")
private String settlerIdCardFront; private String settlerIdCardFront;
@@ -62,4 +64,36 @@ public class PlatformBuildResponse {
@ApiModelProperty( "门店ID") @ApiModelProperty( "门店ID")
private String storeId; private String storeId;
@ApiModelProperty("当前店铺编号(账号)")
private String shopCode;
@ApiModelProperty("店铺名称")
private String shopName;
@ApiModelProperty("店铺品牌")
private String franchiseBrand;
@ApiModelProperty("门店门头照片")
private String shopDoorwayPhoto;
@ApiModelProperty("门店内景照片")
private String shopInteriorPhoto;
@ApiModelProperty("营业执照照片")
private String creditUrl;
@ApiModelProperty("食品经营许可证")
private String foodBusinessLicenseUrl;
@ApiModelProperty(" 法人姓名")
private String legalName ;
@ApiModelProperty("法人身份证正面")
private String legalIdCardFront;
@ApiModelProperty("法人身份证反面")
private String legalIdCardBack;
@ApiModelProperty("门店联系人手机号")
private String businessMobile;
@ApiModelProperty("门店经营省市区")
private String shopProvinceCityDistrict;
@ApiModelProperty("门店详细地址")
private String shopAddress;
} }

View File

@@ -52,6 +52,10 @@ import static com.cool.store.enums.point.ShopSubStageStatusEnum.*;
@Service @Service
public class PlatformBuildServiceImpl implements PlatformBuildService { public class PlatformBuildServiceImpl implements PlatformBuildService {
@Resource
private ApplyLicenseMapper applyLicenseMapper;
@Resource
private QualificationsInfoDAO qualificationsInfoDAO;
@Autowired @Autowired
private BuildInformationDAO buildInformationDAO; private BuildInformationDAO buildInformationDAO;
@Autowired @Autowired
@@ -324,8 +328,34 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
public PlatformBuildResponse get(Long shopId, Integer type) { public PlatformBuildResponse get(Long shopId, Integer type) {
PlatformBuildDO platformBuildDO = platformBuildDAO.selectOneByShopId(shopId, type); PlatformBuildDO platformBuildDO = platformBuildDAO.selectOneByShopId(shopId, type);
PlatformBuildResponse platformBuildResponse = new PlatformBuildResponse(); PlatformBuildResponse platformBuildResponse = new PlatformBuildResponse();
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(shopInfo.getPointId());
QualificationsInfoDO qualificationsInfoDO = qualificationsInfoDAO.getByLineId(shopInfo.getLineId());
BuildInformationDO informationDO = buildInformationDAO.selectOneByShopId(shopId);
LicenseTransactDO licenseTransactDO = applyLicenseMapper.selectByShopId(shopId);
if (Objects.nonNull(qualificationsInfoDO)) {
platformBuildResponse.setLegalName(qualificationsInfoDO.getLegalName());
platformBuildResponse.setLegalIdCardFront(qualificationsInfoDO.getLegalIdCardFront());
platformBuildResponse.setLegalIdCardBack(qualificationsInfoDO.getLegalIdCardBack());
}
if (Objects.nonNull(pointInfo)){
platformBuildResponse.setShopProvinceCityDistrict(pointInfo.getProvince()+pointInfo.getCity()+pointInfo.getDistrict());
platformBuildResponse.setShopAddress(pointInfo.getAddress());
}
platformBuildResponse.setShopCode(shopInfo.getShopCode());
platformBuildResponse.setFranchiseBrand(FranchiseBrandEnum.getDescByCode(shopInfo.getFranchiseBrand()));
platformBuildResponse.setShopName(shopInfo.getShopName());
platformBuildResponse.setBusinessMobile(informationDO.getBusinessMobile());
if (Objects.nonNull(licenseTransactDO)){
platformBuildResponse.setCreditUrl(licenseTransactDO.getCreditUrl());
//("二证合一标识0否 1 是")
if (licenseTransactDO.getTwoCertificatesOne().equals(1)){
platformBuildResponse.setFoodBusinessLicenseUrl(licenseTransactDO.getCreditUrl());
}else if (licenseTransactDO.getTwoCertificatesOne().equals(0)){
platformBuildResponse.setFoodBusinessLicenseUrl(licenseTransactDO.getFoodBusinessLicenseUrl());
}
}
if (Objects.isNull(platformBuildDO)) { if (Objects.isNull(platformBuildDO)) {
BuildInformationDO informationDO = buildInformationDAO.selectOneByShopId(shopId);
BeanUtils.copyProperties(informationDO, platformBuildResponse); BeanUtils.copyProperties(informationDO, platformBuildResponse);
return platformBuildResponse; return platformBuildResponse;
} }

View File

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.cool.store.constants.CommonConstants; import com.cool.store.constants.CommonConstants;
import com.cool.store.dao.*; import com.cool.store.dao.*;
import com.cool.store.entity.*; import com.cool.store.entity.*;
import com.cool.store.enums.DownSystemTypeEnum;
import com.cool.store.enums.MessageEnum; import com.cool.store.enums.MessageEnum;
import com.cool.store.enums.QWMessageEnum; import com.cool.store.enums.QWMessageEnum;
import com.cool.store.enums.SMSMsgEnum; import com.cool.store.enums.SMSMsgEnum;
@@ -57,6 +58,8 @@ public class PCTestController {
DataHandleService dataHandleService; DataHandleService dataHandleService;
static String url = "https://hzly.cloudcubic.net/ajaxHandle/synchronization/JCallBackSynchronizationHandler.ashx?action=app&controller=GetProjectDetails&projectid="; static String url = "https://hzly.cloudcubic.net/ajaxHandle/synchronization/JCallBackSynchronizationHandler.ashx?action=app&controller=GetProjectDetails&projectid=";
@Resource
private SyncDataService syncDataService;
@Resource @Resource
private HttpRestTemplateService httpRestTemplateService; private HttpRestTemplateService httpRestTemplateService;
@@ -235,4 +238,9 @@ public class PCTestController {
return ResponseResult.success(huoMaService.getShopInfo(request)); return ResponseResult.success(huoMaService.getShopInfo(request));
} }
@GetMapping("/getData")
public ResponseResult getData(@RequestParam("shopId")Long shopId,@RequestParam("type")Integer type){
return ResponseResult.success(syncDataService.getData(shopId, DownSystemTypeEnum.getByCode(type)));
}
} }