Merge branch 'master' into cc_20250826_notice
# Conflicts: # coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java
This commit is contained in:
@@ -302,6 +302,10 @@ public enum ErrorCodeEnum {
|
|||||||
CONFIG_NOT_EXIST(1610006,"配置不存在或被禁用,请确认!",null),
|
CONFIG_NOT_EXIST(1610006,"配置不存在或被禁用,请确认!",null),
|
||||||
MESSAGE_NOT_EXIST(1610007,"消息模板不存在或已被删除",null),
|
MESSAGE_NOT_EXIST(1610007,"消息模板不存在或已被删除",null),
|
||||||
MESSAGE_NOT_HANDLED(1610008,"当前消息无需处理,请确认消息处理类型!",null),
|
MESSAGE_NOT_HANDLED(1610008,"当前消息无需处理,请确认消息处理类型!",null),
|
||||||
|
|
||||||
|
|
||||||
|
NOT_FLAGSHIP_STORE(16100005,"非直营店,无法跳过缴费阶段!",null),
|
||||||
|
NOT_FLAGSHIP_STORE_NOT_EXIST(16100006,"当前阶段加盟类型不能变更!",null),
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,17 @@ public enum FranchiseBrandEnum {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
public static String getDescByCode(Integer code) {
|
||||||
|
if (code==null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (FranchiseBrandEnum e : FranchiseBrandEnum.values()) {
|
||||||
|
if (code == e.getCode()) {
|
||||||
|
return e.getDesc();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public static FranchiseBrandEnum getEnumByCode(Integer code) {
|
public static FranchiseBrandEnum getEnumByCode(Integer code) {
|
||||||
if (code == null){
|
if (code == null){
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ public enum JoinModeEnum {
|
|||||||
OWN_STORE(3,"加盟公司自有店"),
|
OWN_STORE(3,"加盟公司自有店"),
|
||||||
STRONG_FRANCHISE(4,"强加盟"),
|
STRONG_FRANCHISE(4,"强加盟"),
|
||||||
DIRECT_SALES_TO_JOINING(5,"老店转加盟"),
|
DIRECT_SALES_TO_JOINING(5,"老店转加盟"),
|
||||||
AFFILIATES(6,"联营店")
|
AFFILIATES(6,"联营店"),
|
||||||
|
FLAGSHIP_STORE(7,"直营店"),
|
||||||
;
|
;
|
||||||
private int code;
|
private int code;
|
||||||
private String desc;
|
private String desc;
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ public enum RocketMqTagEnum {
|
|||||||
DEPT_EVENT("dept_event","部门事件"),
|
DEPT_EVENT("dept_event","部门事件"),
|
||||||
STORE_DING_QUEUE("store_ding_queue", "微应用钉钉消息发送"),
|
STORE_DING_QUEUE("store_ding_queue", "微应用钉钉消息发送"),
|
||||||
ZXJP_CREATE_STORE("zxjp_create_store", "正新鸡排招商创建门店"),
|
ZXJP_CREATE_STORE("zxjp_create_store", "正新鸡排招商创建门店"),
|
||||||
PARTNER_LICENSE_SYNC_QUEUE("partner_license_sync_queue", "招商证照信息同步");
|
PARTNER_LICENSE_SYNC_QUEUE("partner_license_sync_queue", "招商证照信息同步"),
|
||||||
|
BUSINESS_SYNC("business_sync", "工商食安信息同步"),
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,17 +11,19 @@ import java.util.Objects;
|
|||||||
public enum PaymentMethodEnum {
|
public enum PaymentMethodEnum {
|
||||||
|
|
||||||
//1.月付 2.季付 3.半年付 4.年付
|
//1.月付 2.季付 3.半年付 4.年付
|
||||||
PAYMENT_METHOD_1(1, "月付"),
|
PAYMENT_METHOD_1(1, "月付",1),
|
||||||
PAYMENT_METHOD_2(2, "季付"),
|
PAYMENT_METHOD_2(2, "季付",3),
|
||||||
PAYMENT_METHOD_3(3, "半年付"),
|
PAYMENT_METHOD_3(3, "半年付",6),
|
||||||
PAYMENT_METHOD_4(4, "年付"),
|
PAYMENT_METHOD_4(4, "年付",12),
|
||||||
;
|
;
|
||||||
|
|
||||||
private Integer code;
|
private Integer code;
|
||||||
|
|
||||||
private String desc;
|
private String desc;
|
||||||
|
|
||||||
PaymentMethodEnum(Integer code, String desc) {
|
private Integer totalMonth;
|
||||||
|
|
||||||
|
PaymentMethodEnum(Integer code, String desc,Integer totalMonth) {
|
||||||
this.code = code;
|
this.code = code;
|
||||||
this.desc = desc;
|
this.desc = desc;
|
||||||
}
|
}
|
||||||
@@ -34,6 +36,9 @@ public enum PaymentMethodEnum {
|
|||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getTotalMonth() {
|
||||||
|
return totalMonth;
|
||||||
|
}
|
||||||
|
|
||||||
public static PaymentMethodEnum getByCode(Integer code) {
|
public static PaymentMethodEnum getByCode(Integer code) {
|
||||||
if(Objects.isNull(code)){
|
if(Objects.isNull(code)){
|
||||||
|
|||||||
@@ -165,8 +165,8 @@ public class EnterpriseUserDAO {
|
|||||||
return enterpriseUserMapper.getUserListByRegionId(regionId);
|
return enterpriseUserMapper.getUserListByRegionId(regionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<UserDTO> getAllUser(String eid, String keyword) {
|
public List<UserDTO> getAllUser(String eid, String keyword,List<Long> roleIdList) {
|
||||||
return enterpriseUserMapper.getAllUser(eid, keyword);
|
return enterpriseUserMapper.getAllUser(eid, keyword,roleIdList);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<EnterpriseUserDO> findUserInfoByUserIdsAndKeyword(List<String> userIdList, String keyword) {
|
public List<EnterpriseUserDO> findUserInfoByUserIdsAndKeyword(List<String> userIdList, String keyword) {
|
||||||
|
|||||||
@@ -34,4 +34,8 @@ public class SignFranchiseDAO {
|
|||||||
}
|
}
|
||||||
return signFranchiseMapper.getSignType(shopIds);
|
return signFranchiseMapper.getSignType(shopIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SignFranchiseDO selectByShopId(Long shopId){
|
||||||
|
return signFranchiseMapper.selectByShopId(shopId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ public interface EnterpriseUserMapper {
|
|||||||
*/
|
*/
|
||||||
List<EnterpriseUserDO> getUserListByRegionId( @Param("regionId") Long regionId);
|
List<EnterpriseUserDO> getUserListByRegionId( @Param("regionId") Long regionId);
|
||||||
|
|
||||||
List<UserDTO> getAllUser(@Param("eid")String id, @Param("keyword") String keyword);
|
List<UserDTO> getAllUser(@Param("eid")String id, @Param("keyword") String keyword, @Param("roleIdList") List<Long> roleIdList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户id和关键字搜索用户
|
* 根据用户id和关键字搜索用户
|
||||||
|
|||||||
@@ -70,4 +70,6 @@ public interface LinePayMapper {
|
|||||||
Integer updateXgjClaimStatus(@Param("list") List<Long> shopIds,@Param("xgjClaimStatus") Integer xgjClaimStatus,@Param("payBusinessType") Integer payBusinessType);
|
Integer updateXgjClaimStatus(@Param("list") List<Long> shopIds,@Param("xgjClaimStatus") Integer xgjClaimStatus,@Param("payBusinessType") Integer payBusinessType);
|
||||||
|
|
||||||
Integer deleteByShopId(@Param("list")List<Long> shopIds);
|
Integer deleteByShopId(@Param("list")List<Long> shopIds);
|
||||||
|
|
||||||
|
LinePayDO getLastPay(@Param("shopId") Long shopId);
|
||||||
}
|
}
|
||||||
@@ -191,13 +191,19 @@
|
|||||||
</select>
|
</select>
|
||||||
<select id="getAllUser" resultType="com.cool.store.dto.UserDTO">
|
<select id="getAllUser" resultType="com.cool.store.dto.UserDTO">
|
||||||
select
|
select
|
||||||
user_id as userId,
|
DISTINCT a.user_id as userId,
|
||||||
name,
|
a.name,
|
||||||
mobile
|
a.mobile
|
||||||
from enterprise_user_${eid}
|
from enterprise_user_${eid} a left join enterprise_user_role_${eid} b on a.`user_id` = b.`user_id`
|
||||||
where active = true
|
where active = true
|
||||||
<if test="keyword!=null and keyword!=''">
|
<if test="keyword!=null and keyword!=''">
|
||||||
and( name like concat('%',#{keyword},'%') or mobile like concat('%',#{keyword},'%'))
|
and( a.name like concat('%',#{keyword},'%') or a.mobile like concat('%',#{keyword},'%'))
|
||||||
|
</if>
|
||||||
|
<if test="roleIdList !=null and roleIdList.size>0">
|
||||||
|
and b.role_id in
|
||||||
|
<foreach item="roleId" index="index" collection="roleIdList" open="(" separator="," close=")">
|
||||||
|
#{roleId}
|
||||||
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -414,6 +414,16 @@
|
|||||||
select * from xfsg_line_pay where deleted = 0 and payment_receipt_code = #{paymentReceiptCode} and
|
select * from xfsg_line_pay where deleted = 0 and payment_receipt_code = #{paymentReceiptCode} and
|
||||||
pay_business_type = 1 order by create_time desc
|
pay_business_type = 1 order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getLastPay" resultMap="BaseResultMap">
|
||||||
|
select * from xfsg_line_pay
|
||||||
|
where deleted = 0
|
||||||
|
and shop_id = #{shopId}
|
||||||
|
and pay_business_type = 1
|
||||||
|
and xgj_claim_status = 1
|
||||||
|
order by update_time desc limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
<update id="dataUpdateLinePay">
|
<update id="dataUpdateLinePay">
|
||||||
<foreach collection="list" separator=";" item="item" index="index">
|
<foreach collection="list" separator=";" item="item" index="index">
|
||||||
update xfsg_line_pay
|
update xfsg_line_pay
|
||||||
|
|||||||
@@ -36,6 +36,14 @@
|
|||||||
<result column="region_id" property="regionId" jdbcType="VARCHAR"/>
|
<result column="region_id" property="regionId" jdbcType="VARCHAR"/>
|
||||||
<result column="store_status" property="storeStatus" jdbcType="VARCHAR"/>
|
<result column="store_status" property="storeStatus" jdbcType="VARCHAR"/>
|
||||||
<result column="open_date" property="openDate" jdbcType="DATE"/>
|
<result column="open_date" property="openDate" jdbcType="DATE"/>
|
||||||
|
<result column="monthly_rent" property="monthlyRent"/>
|
||||||
|
<result column="monthly_personnel_salary" property="monthlyPersonnelSalary"/>
|
||||||
|
<result column="monthly_other_expenses" property="monthlyOtherExpenses"/>
|
||||||
|
<result column="unified_management" property="unifiedManagement" jdbcType="TINYINT"/>
|
||||||
|
<result column="join_model" property="joinModel" jdbcType="TINYINT"/>
|
||||||
|
<result column="join_brand" property="joinBrand" jdbcType="TINYINT"/>
|
||||||
|
<result column="store_type" property="storeType" jdbcType="TINYINT"/>
|
||||||
|
<result column="mini_program_order_store_name" property="miniProgramOrderStoreName"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="getByStoreId" resultMap="BaseResultMap">
|
<select id="getByStoreId" resultMap="BaseResultMap">
|
||||||
@@ -171,5 +179,4 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.cool.store.dto;
|
||||||
|
|
||||||
|
import com.cool.store.entity.LicenseTransactDO;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/8/13 15:49
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BusinessDTO {
|
||||||
|
|
||||||
|
private String enterpriseId;
|
||||||
|
|
||||||
|
List<LicenseTransactDO> requests;
|
||||||
|
|
||||||
|
Map<Long, String> transactMap;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -17,16 +17,6 @@ public class StoreDTO {
|
|||||||
private String storeName;
|
private String storeName;
|
||||||
@ApiModelProperty("门店CODE")
|
@ApiModelProperty("门店CODE")
|
||||||
private String storeCode;
|
private String storeCode;
|
||||||
@ApiModelProperty("店长手机号")
|
|
||||||
private String managerPhone;
|
|
||||||
@ApiModelProperty("签约人1姓名")
|
|
||||||
private String signer1Name;
|
|
||||||
@ApiModelProperty("签约人2手机号")
|
|
||||||
private String signer1Phone;
|
|
||||||
@ApiModelProperty("签约人2姓名")
|
|
||||||
private String signer2Name;
|
|
||||||
@ApiModelProperty("签约人2手机号")
|
|
||||||
private String signer2Phone;
|
|
||||||
@ApiModelProperty("订单小程序名称")
|
@ApiModelProperty("订单小程序名称")
|
||||||
private String orderMiniProgramName;
|
private String orderMiniProgramName;
|
||||||
@ApiModelProperty("加盟模式")
|
@ApiModelProperty("加盟模式")
|
||||||
@@ -47,5 +37,10 @@ public class StoreDTO {
|
|||||||
private BigDecimal monthlyPersonnelSalary;
|
private BigDecimal monthlyPersonnelSalary;
|
||||||
@ApiModelProperty("月水电费")
|
@ApiModelProperty("月水电费")
|
||||||
private BigDecimal monthlyOtherExpenses;
|
private BigDecimal monthlyOtherExpenses;
|
||||||
|
@ApiModelProperty("统管 1-统管 0-非统管")
|
||||||
|
private Integer unifiedManagement;
|
||||||
|
|
||||||
|
private String longitude;
|
||||||
|
|
||||||
|
private String latitude;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.cool.store.entity;
|
|||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -220,4 +221,22 @@ public class StoreDO {
|
|||||||
* 距离我的距离
|
* 距离我的距离
|
||||||
*/
|
*/
|
||||||
private String distance;
|
private String distance;
|
||||||
|
|
||||||
|
private BigDecimal monthlyRent;
|
||||||
|
|
||||||
|
private BigDecimal monthlyPersonnelSalary;
|
||||||
|
|
||||||
|
private BigDecimal monthlyOtherExpenses;
|
||||||
|
|
||||||
|
private Integer unifiedManagement;
|
||||||
|
|
||||||
|
private Integer joinBrand;
|
||||||
|
|
||||||
|
private Integer joinModel;
|
||||||
|
|
||||||
|
private Integer storeType;
|
||||||
|
|
||||||
|
private String miniProgramOrderStoreName;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,12 +85,9 @@ public class AddSignFranchiseRequest {
|
|||||||
private String mobile;
|
private String mobile;
|
||||||
|
|
||||||
@ApiModelProperty("合同编码")
|
@ApiModelProperty("合同编码")
|
||||||
@NotBlank(message = "合同编码不能为空")
|
|
||||||
private String contractCode;
|
private String contractCode;
|
||||||
@ApiModelProperty("合同金额")
|
@ApiModelProperty("合同金额")
|
||||||
@NotBlank(message = "合同金额不能为空")
|
|
||||||
private String contractAmount;
|
private String contractAmount;
|
||||||
@NotBlank(message = "合伙签约人1不能为空")
|
|
||||||
@ApiModelProperty("合伙签约人1")
|
@ApiModelProperty("合伙签约人1")
|
||||||
private String partnershipSignatoryFirst;
|
private String partnershipSignatoryFirst;
|
||||||
@ApiModelProperty("合伙签约人2")
|
@ApiModelProperty("合伙签约人2")
|
||||||
@@ -116,7 +113,6 @@ public class AddSignFranchiseRequest {
|
|||||||
private String introductionAward;
|
private String introductionAward;
|
||||||
//签约人1第几家分店
|
//签约人1第几家分店
|
||||||
@ApiModelProperty("签约人1第几家分店")
|
@ApiModelProperty("签约人1第几家分店")
|
||||||
@NotNull(message = "签约人1第哪家分店不能为空")
|
|
||||||
private Integer partnershipSignatoryFirstWhichStore;
|
private Integer partnershipSignatoryFirstWhichStore;
|
||||||
|
|
||||||
//省
|
//省
|
||||||
|
|||||||
@@ -91,20 +91,16 @@ public class BuildInformationRequest {
|
|||||||
private String juridicalHandheldIdCardReverse;
|
private String juridicalHandheldIdCardReverse;
|
||||||
|
|
||||||
@ApiModelProperty("结算人身份证信息是否和加盟商一致,false否,true是")
|
@ApiModelProperty("结算人身份证信息是否和加盟商一致,false否,true是")
|
||||||
@NotNull(message = "结算人身份证信息是否和加盟商一致不能为空")
|
|
||||||
private Boolean settlerIsSamePartner ;
|
private Boolean settlerIsSamePartner ;
|
||||||
|
|
||||||
@ApiModelProperty("结算人姓名")
|
@ApiModelProperty("结算人姓名")
|
||||||
// @NotBlank(message = "结算人姓名 不能为空")
|
|
||||||
@JsonProperty("settlerName")
|
@JsonProperty("settlerName")
|
||||||
private String settlerName;
|
private String settlerName;
|
||||||
|
|
||||||
//@NotBlank(message = "结算人身份证正面 不能为空")
|
|
||||||
@Length(max = 250 , message = "结算人身份证正面 长度不能超过250")
|
@Length(max = 250 , message = "结算人身份证正面 长度不能超过250")
|
||||||
@ApiModelProperty("结算人身份证正面(图片)")
|
@ApiModelProperty("结算人身份证正面(图片)")
|
||||||
private String settlerIdCardFront;
|
private String settlerIdCardFront;
|
||||||
|
|
||||||
@NotBlank(message = "结算人手持身份证正面 不能为空")
|
|
||||||
@Length(max = 250 , message = "结算人手持身份证正面 长度不能超过250")
|
@Length(max = 250 , message = "结算人手持身份证正面 长度不能超过250")
|
||||||
@ApiModelProperty("结算人手持身份证正面")
|
@ApiModelProperty("结算人手持身份证正面")
|
||||||
private String settlerInHandFrontPicture;
|
private String settlerInHandFrontPicture;
|
||||||
@@ -129,23 +125,19 @@ public class BuildInformationRequest {
|
|||||||
@ApiModelProperty("结算人银行卡照片")
|
@ApiModelProperty("结算人银行卡照片")
|
||||||
private String settlerBankPhotoUrl;
|
private String settlerBankPhotoUrl;
|
||||||
|
|
||||||
@NotBlank(message = "结算人银行卡背面照片 不能为空")
|
|
||||||
@Length(max = 250, message = "结算人银行卡背面照片 长度不能超过250")
|
@Length(max = 250, message = "结算人银行卡背面照片 长度不能超过250")
|
||||||
@ApiModelProperty("结算人银行卡背面照片")
|
@ApiModelProperty("结算人银行卡背面照片")
|
||||||
@JsonProperty("settlerBankBackPhotoUrl")
|
@JsonProperty("settlerBankBackPhotoUrl")
|
||||||
private String settlerBankBackPhotoUrl;
|
private String settlerBankBackPhotoUrl;
|
||||||
|
|
||||||
@NotBlank(message = "结算人银行卡号 不能为空")
|
|
||||||
@Length(max = 64 , message = "结算人银行卡号 长度不能超过64")
|
@Length(max = 64 , message = "结算人银行卡号 长度不能超过64")
|
||||||
@ApiModelProperty("结算人银行卡号")
|
@ApiModelProperty("结算人银行卡号")
|
||||||
private String settlerBankNumber;
|
private String settlerBankNumber;
|
||||||
|
|
||||||
@NotBlank(message = "结算人银行卡预留手机号 不能为空")
|
|
||||||
@Length(min = 11,max = 11 , message = "结算人银行卡预留手机号 长度必须为11")
|
@Length(min = 11,max = 11 , message = "结算人银行卡预留手机号 长度必须为11")
|
||||||
@ApiModelProperty("结算人银行卡预留手机号")
|
@ApiModelProperty("结算人银行卡预留手机号")
|
||||||
private String settlerBankMobile;
|
private String settlerBankMobile;
|
||||||
|
|
||||||
@NotBlank(message = "结算开户银行支行 不能为空")
|
|
||||||
@Length(max =100, message = "结算开户银行支行 长度不能超过100")
|
@Length(max =100, message = "结算开户银行支行 长度不能超过100")
|
||||||
@ApiModelProperty("结算开户银行支行")
|
@ApiModelProperty("结算开户银行支行")
|
||||||
private String settlerBankName;
|
private String settlerBankName;
|
||||||
|
|||||||
@@ -128,6 +128,9 @@ public class OrderSysInfoRequest {
|
|||||||
if (Objects.equals(joinMode, JoinModeEnum.OWN_STORE.getCode())&&this.shopCode!=null){
|
if (Objects.equals(joinMode, JoinModeEnum.OWN_STORE.getCode())&&this.shopCode!=null){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (Objects.equals(joinMode, JoinModeEnum.FLAGSHIP_STORE.getCode())&&this.shopCode!=null){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (StringUtils.isAnyBlank(this.receivingFirmName,this.receivingMsBankAccount,this.receivingMsBankBranch,this.bankUnionPayAccount,this.shopCode)){
|
if (StringUtils.isAnyBlank(this.receivingFirmName,this.receivingMsBankAccount,this.receivingMsBankBranch,this.bankUnionPayAccount,this.shopCode)){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,162 @@
|
|||||||
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import com.aliyun.ons20190214.models.OnsMessageTraceRequest;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/8/13 13:41
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StoreMasterDTO {
|
||||||
|
|
||||||
|
private String enterpriseId;
|
||||||
|
|
||||||
|
@ApiModelProperty("门店名称(加盟签约)")
|
||||||
|
private String storeName;
|
||||||
|
@ApiModelProperty("门店名称(小程序点单)")
|
||||||
|
private String miniProgramOrderStoreName;
|
||||||
|
@ApiModelProperty("门店编码")
|
||||||
|
private String storeNum;
|
||||||
|
@ApiModelProperty("加盟品牌")
|
||||||
|
private Integer joinBrand;
|
||||||
|
@ApiModelProperty("加盟模式")
|
||||||
|
private Integer joinModel;
|
||||||
|
@ApiModelProperty("门店类型")
|
||||||
|
private Integer storeType;
|
||||||
|
@ApiModelProperty("经营模式")
|
||||||
|
private Integer manageModel;
|
||||||
|
@ApiModelProperty("签约类型")
|
||||||
|
private Integer signType;
|
||||||
|
@ApiModelProperty("门店状态")
|
||||||
|
private String storeStatus;
|
||||||
|
@ApiModelProperty("门店带宽")
|
||||||
|
private Integer storeBandwidth;
|
||||||
|
|
||||||
|
@ApiModelProperty("所属加盟集团")
|
||||||
|
private String bloc;
|
||||||
|
@ApiModelProperty("所属大区")
|
||||||
|
private Long branch;
|
||||||
|
@ApiModelProperty("加盟督导-人")
|
||||||
|
private String joinSupervision;
|
||||||
|
@ApiModelProperty("管理督导-组织")
|
||||||
|
private Long regionId;
|
||||||
|
|
||||||
|
@ApiModelProperty("省市区")
|
||||||
|
private String area;
|
||||||
|
@ApiModelProperty("乡镇")
|
||||||
|
private String town;
|
||||||
|
@ApiModelProperty("门店地址")
|
||||||
|
private String storeAddress;
|
||||||
|
@ApiModelProperty("点位编码")
|
||||||
|
private String pointCode;
|
||||||
|
@ApiModelProperty("高德定位 暂时没有")
|
||||||
|
private String locationScreenshot;
|
||||||
|
@ApiModelProperty("定位地址")
|
||||||
|
private String locationAddress;
|
||||||
|
@ApiModelProperty("经度")
|
||||||
|
private String longitude;
|
||||||
|
@ApiModelProperty("纬度")
|
||||||
|
private String latitude;
|
||||||
|
@ApiModelProperty("保护距离")
|
||||||
|
private Integer protectiveDistance;
|
||||||
|
|
||||||
|
@ApiModelProperty("月租金")
|
||||||
|
private BigDecimal monthlyRent;
|
||||||
|
|
||||||
|
@ApiModelProperty("收件人")
|
||||||
|
private String addresseeName;
|
||||||
|
@ApiModelProperty("手机号")
|
||||||
|
private String addresseeMobile;
|
||||||
|
@ApiModelProperty("收件省市区")
|
||||||
|
private String addresseeArea;
|
||||||
|
@ApiModelProperty("收件详细地址")
|
||||||
|
private String addresseeAddress;
|
||||||
|
@ApiModelProperty("报货物流仓库(编码)")
|
||||||
|
private String declareGoodsLogisticsWarehouse;
|
||||||
|
@ApiModelProperty("报货类型 0-按周报货 1-按月报货 2-自提 3-按2周/次投货 4-按3周/次投货")
|
||||||
|
private Integer declareGoodsType;
|
||||||
|
@ApiModelProperty("报送货日期 数组格式\"[{\"declareGoods\": \"\",\"deliverGoods\":\"\"}]\"")
|
||||||
|
private String declareGoodsDate;
|
||||||
|
|
||||||
|
@ApiModelProperty("营业时间")
|
||||||
|
private String businessHours;
|
||||||
|
|
||||||
|
@ApiModelProperty("门头照 暂时没有")
|
||||||
|
private String avatar;
|
||||||
|
@ApiModelProperty("门店内景照 暂时没有")
|
||||||
|
private String interiorPhotos;
|
||||||
|
|
||||||
|
private SignerInfo signerInfo;
|
||||||
|
|
||||||
|
private SettlerInfo settlerInfo;
|
||||||
|
@ApiModelProperty("是否统管")
|
||||||
|
private Integer unifiedManagement;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class SignerInfo {
|
||||||
|
@ApiModelProperty("签约人1姓名")
|
||||||
|
private String Signer1Name;
|
||||||
|
@ApiModelProperty("签约人1姓名")
|
||||||
|
private String Signer1Mobile;
|
||||||
|
@ApiModelProperty("签约人1姓名")
|
||||||
|
private String Signer1IdCard;
|
||||||
|
@ApiModelProperty("签约人1姓名")
|
||||||
|
private String Signer1IdCardPhoto;
|
||||||
|
@ApiModelProperty("签约人1姓名")
|
||||||
|
private String Signer1IdCardPhotoBack;
|
||||||
|
@ApiModelProperty("角色")
|
||||||
|
private Long partnerRoleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class SettlerInfo{
|
||||||
|
@ApiModelProperty("结算人姓名")
|
||||||
|
private String settlerName;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算人身份证号(加密)")
|
||||||
|
private String settlerIdCardNo;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算人身份证正面路径")
|
||||||
|
private String settlerIdCardFront;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算人身份证反面路径")
|
||||||
|
private String settlerIdCardReverse;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算人手持身份证正面照片路径")
|
||||||
|
private String settlerInHandFrontPicture;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算人手持身份证反面照片路径")
|
||||||
|
private String settlerInHandBackPicture;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算人银行卡号(加密)")
|
||||||
|
private String settlerBankNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算人银行卡预留手机号")
|
||||||
|
private String settlerBankMobile;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算开户银行")
|
||||||
|
private String settlerBankName;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算开户银行支行")
|
||||||
|
private String settlerBankBranchName;
|
||||||
|
|
||||||
|
@ApiModelProperty("结算人银行卡照片路径")
|
||||||
|
private String settlerBankPhotoUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty("门店POS收款银行卡反面路径")
|
||||||
|
private String settlerBankBackPhotoUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -23,6 +23,13 @@ public interface FranchiseFeeService {
|
|||||||
*/
|
*/
|
||||||
FranchiseFeeResponse getDetail(Long shopId);
|
FranchiseFeeResponse getDetail(Long shopId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳过 Stage
|
||||||
|
* @param shopId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean stageSkip(Long shopId);
|
||||||
|
|
||||||
Boolean auditFranchiseFee(AuditFranchiseFeeRequest request, LoginUserInfo user);
|
Boolean auditFranchiseFee(AuditFranchiseFeeRequest request, LoginUserInfo user);
|
||||||
|
|
||||||
ApiResponse<Boolean> changePaymentStatus(FranchiseFeeCallBackRequest request);
|
ApiResponse<Boolean> changePaymentStatus(FranchiseFeeCallBackRequest request);
|
||||||
|
|||||||
@@ -201,6 +201,16 @@ public class BuildInformationServiceImpl implements BuildInformationService {
|
|||||||
try {
|
try {
|
||||||
acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.TEN_SECONDS);
|
acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.TEN_SECONDS);
|
||||||
if (Boolean.TRUE.equals(acquired)) {
|
if (Boolean.TRUE.equals(acquired)) {
|
||||||
|
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||||
|
// if (JoinModeEnum.FLAGSHIP_STORE.getCode()!=shopInfoDO.getJoinMode()){
|
||||||
|
// //校验结算人非空
|
||||||
|
// if (StringUtils.isAnyBlank(request.getSettlerName(),request.getSettlerIdCardFront(),
|
||||||
|
// request.getSettlerInHandFrontPicture(),request.getSettlerBankBackPhotoUrl(),
|
||||||
|
// request.getSettlerBankNumber(),request.getSettlerBankMobile(),request.getSettlerBankName())) {
|
||||||
|
// throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
BuildInformationDO informationDO = buildInformationDAO.selectOneByShopId(request.getShopId());
|
BuildInformationDO informationDO = buildInformationDAO.selectOneByShopId(request.getShopId());
|
||||||
BuildInformationDO buildInformationDO = request.toDO();
|
BuildInformationDO buildInformationDO = request.toDO();
|
||||||
OrderSysInfoDO orderSysInfoDO = getOrderSysInfoDO(request);
|
OrderSysInfoDO orderSysInfoDO = getOrderSysInfoDO(request);
|
||||||
@@ -210,7 +220,6 @@ public class BuildInformationServiceImpl implements BuildInformationService {
|
|||||||
} else {
|
} else {
|
||||||
orderSysInfoDAO.insertSelective(orderSysInfoDO);
|
orderSysInfoDAO.insertSelective(orderSysInfoDO);
|
||||||
}
|
}
|
||||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
|
||||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
|
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
|
||||||
QualificationsInfoDO qualificationsInfoDO = qualificationsInfoDAO.getByLineId(lineInfoDO.getId());
|
QualificationsInfoDO qualificationsInfoDO = qualificationsInfoDAO.getByLineId(lineInfoDO.getId());
|
||||||
if (request.getJuridicalIsSamePartner()) {
|
if (request.getJuridicalIsSamePartner()) {
|
||||||
@@ -219,7 +228,7 @@ public class BuildInformationServiceImpl implements BuildInformationService {
|
|||||||
buildInformationDO.setJuridicalIdCardFront(qualificationsInfoDO.getFrontOfIdCard());
|
buildInformationDO.setJuridicalIdCardFront(qualificationsInfoDO.getFrontOfIdCard());
|
||||||
buildInformationDO.setJuridicalIdCardReverse(qualificationsInfoDO.getBackOfIdCard());
|
buildInformationDO.setJuridicalIdCardReverse(qualificationsInfoDO.getBackOfIdCard());
|
||||||
}
|
}
|
||||||
if (request.getSettlerIsSamePartner()) {
|
if (request.getSettlerIsSamePartner()!=null&&request.getSettlerIsSamePartner()) {
|
||||||
buildInformationDO.setSettlerIdCardNo(qualificationsInfoDO.getIdCardNo());
|
buildInformationDO.setSettlerIdCardNo(qualificationsInfoDO.getIdCardNo());
|
||||||
buildInformationDO.setSettlerName(lineInfoDO.getUsername());
|
buildInformationDO.setSettlerName(lineInfoDO.getUsername());
|
||||||
buildInformationDO.setSettlerIdCardFront(qualificationsInfoDO.getFrontOfIdCard());
|
buildInformationDO.setSettlerIdCardFront(qualificationsInfoDO.getFrontOfIdCard());
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import com.cool.store.dao.PointInfoDAO;
|
|||||||
import com.cool.store.dao.ShopStageInfoDAO;
|
import com.cool.store.dao.ShopStageInfoDAO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
|
import com.cool.store.enums.point.PayBusinessTypeEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
@@ -138,6 +139,24 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
|||||||
return resp;
|
return resp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean stageSkip(Long shopId) {
|
||||||
|
//校验是否是自营店FLAGSHIP_STORE
|
||||||
|
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(shopId);
|
||||||
|
if (shopInfoDO==null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||||
|
}
|
||||||
|
if (JoinModeEnum.FLAGSHIP_STORE.getCode()!=shopInfoDO.getJoinMode()){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.NOT_FLAGSHIP_STORE);
|
||||||
|
}
|
||||||
|
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_7);
|
||||||
|
if (!shopStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70.getShopSubStageStatus())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
|
}
|
||||||
|
shopStageInfoDAO.batchUpdateShopStageStatus(shopId,Arrays.asList(SHOP_SUB_STAGE_STATUS_73,SHOP_SUB_STAGE_STATUS_80));
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean auditFranchiseFee(AuditFranchiseFeeRequest request, LoginUserInfo user) {
|
public Boolean auditFranchiseFee(AuditFranchiseFeeRequest request, LoginUserInfo user) {
|
||||||
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_7);
|
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_7);
|
||||||
@@ -215,10 +234,21 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
|||||||
franchiseFeeDO.setXgjCollectionStatus(request.getPaymentStatus());
|
franchiseFeeDO.setXgjCollectionStatus(request.getPaymentStatus());
|
||||||
franchiseFeeDO.setXgjRemainderPayableAmount(request.getRemainingFee());
|
franchiseFeeDO.setXgjRemainderPayableAmount(request.getRemainingFee());
|
||||||
franchiseFeeDO.setXgjFeesPaid(request.getPaidFees());
|
franchiseFeeDO.setXgjFeesPaid(request.getPaidFees());
|
||||||
|
if (request.getPayableFee().compareTo(request.getPaidFees())==-1){
|
||||||
|
franchiseFeeDO.setXgjRemainderPayableAmount(new BigDecimal("0"));
|
||||||
|
franchiseFeeDO.setXgjCollectionStatus(XGJCollectionStatusEnum.COMPLETED.getCode());
|
||||||
|
//如果多缴费 都缴部分退款或者其他用处 这里缴费费用还是填写所需缴的费用
|
||||||
|
franchiseFeeDO.setXgjFeesPaid(request.getPaidFees().add(request.getRemainingFee()));
|
||||||
|
LinePayDO lastPay = linePayMapper.getLastPay(franchiseFeeDO.getShopId());
|
||||||
|
lastPay.setRemark(lastPay.getRemark()+"系统监测到您多缴费"+request.getPaidFees().subtract(request.getPayableFee())+"元 请申请退款或留做他用!");
|
||||||
|
linePayMapper.updateByPrimaryKeySelective(lastPay);
|
||||||
|
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(),Arrays.asList(SHOP_SUB_STAGE_STATUS_73,SHOP_SUB_STAGE_STATUS_80));
|
||||||
|
}
|
||||||
franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO);
|
franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO);
|
||||||
if (XGJCollectionStatusEnum.COMPLETED.getCode().equals(request.getPaymentStatus())){
|
if (XGJCollectionStatusEnum.COMPLETED.getCode().equals(request.getPaymentStatus())){
|
||||||
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(),Arrays.asList(SHOP_SUB_STAGE_STATUS_73,SHOP_SUB_STAGE_STATUS_80));
|
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(),Arrays.asList(SHOP_SUB_STAGE_STATUS_73,SHOP_SUB_STAGE_STATUS_80));
|
||||||
}
|
}
|
||||||
return ApiResponse.success(Boolean.TRUE);
|
return ApiResponse.success(Boolean.TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -171,21 +171,21 @@ public class LinePayServiceImpl implements LinePayService {
|
|||||||
if (request.getId()!=null){
|
if (request.getId()!=null){
|
||||||
payIdMap.remove(request.getId());
|
payIdMap.remove(request.getId());
|
||||||
}
|
}
|
||||||
//判断缴费金额不能大于未缴费金额
|
// //判断缴费金额不能大于未缴费金额
|
||||||
BigDecimal total = payIdMap.values().stream()
|
// BigDecimal total = payIdMap.values().stream()
|
||||||
.map(LinePayDO::getAmount)
|
// .map(LinePayDO::getAmount)
|
||||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
// .reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
//应缴金额
|
// //应缴金额
|
||||||
BigDecimal amountDue = new BigDecimal(franchiseFeeDO.getYearFranchiseFee())
|
// BigDecimal amountDue = new BigDecimal(franchiseFeeDO.getYearFranchiseFee())
|
||||||
.add(new BigDecimal(franchiseFeeDO.getLoanMargin()))
|
// .add(new BigDecimal(franchiseFeeDO.getLoanMargin()))
|
||||||
.add(new BigDecimal(franchiseFeeDO.getFirstYearFee()))
|
// .add(new BigDecimal(franchiseFeeDO.getFirstYearFee()))
|
||||||
.add(new BigDecimal(franchiseFeeDO.getFirstYearManageFee()))
|
// .add(new BigDecimal(franchiseFeeDO.getFirstYearManageFee()))
|
||||||
.add(new BigDecimal(franchiseFeeDO.getPerformanceBond()));
|
// .add(new BigDecimal(franchiseFeeDO.getPerformanceBond()));
|
||||||
//未缴费金额
|
// //未缴费金额
|
||||||
BigDecimal amountUnpaid = amountDue.subtract(total);
|
// BigDecimal amountUnpaid = amountDue.subtract(total);
|
||||||
if( request.getAmount().compareTo(amountUnpaid) > 0 ){
|
// if( request.getAmount().compareTo(amountUnpaid) > 0 ){
|
||||||
throw new ServiceException(ErrorCodeEnum.PAY_AMOUNT_ERROR);
|
// throw new ServiceException(ErrorCodeEnum.PAY_AMOUNT_ERROR);
|
||||||
}
|
// }
|
||||||
Set<String> payUserList = list.stream().map(LinePayDO::getPayUserName).collect(Collectors.toSet());
|
Set<String> payUserList = list.stream().map(LinePayDO::getPayUserName).collect(Collectors.toSet());
|
||||||
if (!payUserList.contains(request.getPayUserName()) && payUserList.size() >= 2) {
|
if (!payUserList.contains(request.getPayUserName()) && payUserList.size() >= 2) {
|
||||||
throw new ServiceException(ErrorCodeEnum.PAY_USER_NAME_ERROR);
|
throw new ServiceException(ErrorCodeEnum.PAY_USER_NAME_ERROR);
|
||||||
@@ -321,6 +321,7 @@ public class LinePayServiceImpl implements LinePayService {
|
|||||||
return ApiResponse.error(ErrorCodeEnum.RECEIPT_NOT_EXIST);
|
return ApiResponse.error(ErrorCodeEnum.RECEIPT_NOT_EXIST);
|
||||||
}
|
}
|
||||||
linePayDO.setXgjClaimStatus(request.getClaimStatus());
|
linePayDO.setXgjClaimStatus(request.getClaimStatus());
|
||||||
|
linePayDO.setUpdateTime(new Date());
|
||||||
linePayDAO.updateLinePay(linePayDO);
|
linePayDAO.updateLinePay(linePayDO);
|
||||||
return ApiResponse.success(Boolean.TRUE);
|
return ApiResponse.success(Boolean.TRUE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -437,7 +437,16 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
if(StringUtils.isNotEmpty(request.getShopCode())&&this.checkShopCodeRepeat(request.getShopCode(), request.getShopId())){
|
if(StringUtils.isNotEmpty(request.getShopCode())&&this.checkShopCodeRepeat(request.getShopCode(), request.getShopId())){
|
||||||
throw new ServiceException(ErrorCodeEnum.SHOP_CODE_EXIST);
|
throw new ServiceException(ErrorCodeEnum.SHOP_CODE_EXIST);
|
||||||
}
|
}
|
||||||
|
//新增校验 缴费阶段之后 不能修改加盟模式
|
||||||
|
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_7);
|
||||||
|
//缴费阶段之后 加盟模式不能切换为直营店 直营店也不能切换为其他店
|
||||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||||
|
if (shopSubStageInfo.getShopSubStageStatus()>ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70.getShopSubStageStatus()){
|
||||||
|
if (request.getJoinMode()!=shopInfo.getJoinMode()&&
|
||||||
|
(request.getShopId()!=JoinModeEnum.FLAGSHIP_STORE.getCode()||shopInfo.getJoinMode()!=JoinModeEnum.FLAGSHIP_STORE.getCode())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.NOT_FLAGSHIP_STORE_NOT_EXIST);
|
||||||
|
}
|
||||||
|
}
|
||||||
shopInfo.setUpdateUserId(userId);
|
shopInfo.setUpdateUserId(userId);
|
||||||
shopInfo.setUpdateTime(new Date());
|
shopInfo.setUpdateTime(new Date());
|
||||||
if (StringUtils.isNotEmpty(request.getShopCode())){
|
if (StringUtils.isNotEmpty(request.getShopCode())){
|
||||||
|
|||||||
@@ -553,12 +553,14 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
addSignFranchiseResponse.setPartnershipSignatoryFirstWhichStore(signFranchiseDO.getPartnershipSignatoryFirstWhichStore());
|
addSignFranchiseResponse.setPartnershipSignatoryFirstWhichStore(signFranchiseDO.getPartnershipSignatoryFirstWhichStore());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
if (Objects.nonNull(franchiseFeeDO)) {
|
||||||
BigDecimal total = new BigDecimal(franchiseFeeDO.getYearFranchiseFee())
|
BigDecimal total = new BigDecimal(franchiseFeeDO.getYearFranchiseFee())
|
||||||
.add(new BigDecimal(franchiseFeeDO.getLoanMargin()))
|
.add(new BigDecimal(franchiseFeeDO.getLoanMargin()))
|
||||||
.add(new BigDecimal(franchiseFeeDO.getFirstYearFee()))
|
.add(new BigDecimal(franchiseFeeDO.getFirstYearFee()))
|
||||||
.add(new BigDecimal(franchiseFeeDO.getFirstYearManageFee()))
|
.add(new BigDecimal(franchiseFeeDO.getFirstYearManageFee()))
|
||||||
.add(new BigDecimal(franchiseFeeDO.getPerformanceBond()));
|
.add(new BigDecimal(franchiseFeeDO.getPerformanceBond()));
|
||||||
addSignFranchiseResponse.setContractAmount(total.toString());
|
addSignFranchiseResponse.setContractAmount(total.toString());
|
||||||
|
}
|
||||||
addSignFranchiseResponse.setMobile(lineInfoDO.getMobile());
|
addSignFranchiseResponse.setMobile(lineInfoDO.getMobile());
|
||||||
}
|
}
|
||||||
addSignFranchiseResponse.setStoreName(shopInfoDO.getShopName());
|
addSignFranchiseResponse.setStoreName(shopInfoDO.getShopName());
|
||||||
|
|||||||
@@ -343,11 +343,6 @@ public class StoreServiceImpl implements StoreService {
|
|||||||
|
|
||||||
|
|
||||||
public static List<StoreDTO> processStores(List<StoreDO> stores) {
|
public static List<StoreDTO> processStores(List<StoreDO> stores) {
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
|
||||||
|
|
||||||
// 创建配置映射:key -> 枚举项
|
|
||||||
Map<String, ExtendFieldTypeEnum> configMap = ExtendFieldTypeEnum.configMap();
|
|
||||||
|
|
||||||
// 处理每个门店
|
// 处理每个门店
|
||||||
return stores.stream().map(store -> {
|
return stores.stream().map(store -> {
|
||||||
StoreDTO dto = new StoreDTO();
|
StoreDTO dto = new StoreDTO();
|
||||||
@@ -356,65 +351,18 @@ public class StoreServiceImpl implements StoreService {
|
|||||||
dto.setStoreAddress(store.getStoreAddress());
|
dto.setStoreAddress(store.getStoreAddress());
|
||||||
dto.setStoreAvatar(store.getAvatar());
|
dto.setStoreAvatar(store.getAvatar());
|
||||||
dto.setTelephone(store.getTelephone());
|
dto.setTelephone(store.getTelephone());
|
||||||
try {
|
dto.setMonthlyRent(store.getMonthlyRent());
|
||||||
// 解析门店的扩展字段
|
dto.setMonthlyPersonnelSalary(store.getMonthlyPersonnelSalary());
|
||||||
Map<String, String> extendFields = objectMapper.readValue(
|
dto.setMonthlyOtherExpenses(store.getMonthlyOtherExpenses());
|
||||||
store.getExtendField(),
|
dto.setUnifiedManagement(store.getUnifiedManagement());
|
||||||
new TypeReference<Map<String, String>>() {}
|
dto.setStoreType(StoreTypeEnum.getMessage(store.getStoreType()));
|
||||||
);
|
dto.setJoinMode(JoinModeEnum.getByCode(store.getJoinModel()));
|
||||||
|
dto.setBrand(FranchiseBrandEnum.getDescByCode(store.getJoinBrand()));
|
||||||
// 匹配并设置DTO字段
|
dto.setOrderMiniProgramName(store.getMiniProgramOrderStoreName());
|
||||||
for (Map.Entry<String, String> entry : extendFields.entrySet()) {
|
dto.setLongitude(store.getLongitude());
|
||||||
ExtendFieldTypeEnum fieldEnum = configMap.get(entry.getKey());
|
dto.setLatitude(store.getLatitude());
|
||||||
if (fieldEnum != null) {
|
|
||||||
switch (fieldEnum) {
|
|
||||||
case TEST_STORE_MANAGER_MOBILE:
|
|
||||||
case ONLINE_STORE_MANAGER_MOBILE:
|
|
||||||
dto.setManagerPhone(entry.getValue());
|
|
||||||
break;
|
|
||||||
case TEST_SIGNATORY_NAME_1:
|
|
||||||
case ONLINE_SIGNATORY_NAME_1:
|
|
||||||
dto.setSigner1Name(entry.getValue());
|
|
||||||
break;
|
|
||||||
case TEST_SIGNATORY_MOBILE_1:
|
|
||||||
case ONLINE_SIGNATORY_MOBILE_1:
|
|
||||||
dto.setSigner1Phone(entry.getValue());
|
|
||||||
break;
|
|
||||||
case TEST_SIGNATORY_NAME_2:
|
|
||||||
case ONLINE_SIGNATORY_NAME_2:
|
|
||||||
dto.setSigner2Name(entry.getValue());
|
|
||||||
break;
|
|
||||||
case TEST_SIGNATORY_MOBILE_2:
|
|
||||||
case ONLINE_SIGNATORY_MOBILE_2:
|
|
||||||
dto.setSigner2Phone(entry.getValue());
|
|
||||||
break;
|
|
||||||
case TEST_ORDER_NAME:
|
|
||||||
case ONLINE_ORDER_NAME:
|
|
||||||
dto.setOrderMiniProgramName(entry.getValue());
|
|
||||||
break;
|
|
||||||
case TEST_JOIN_MODE:
|
|
||||||
case ONLINE_JOIN_MODE:
|
|
||||||
dto.setJoinMode(entry.getValue());
|
|
||||||
break;
|
|
||||||
case TEST_STORE_TYPE:
|
|
||||||
case ONLINE_STORE_TYPE:
|
|
||||||
dto.setStoreType(entry.getValue());
|
|
||||||
break;
|
|
||||||
case TEST_BRAND:
|
|
||||||
case ONLINE_BRAND:
|
|
||||||
dto.setBrand(entry.getValue());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
// 处理JSON解析异常
|
|
||||||
log.error("解析门店扩展字段失败: {} " + store.getStoreNum());
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
return dto;
|
return dto;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,10 +5,12 @@ import com.cool.store.context.CurrentUserHolder;
|
|||||||
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.*;
|
import com.cool.store.enums.*;
|
||||||
|
import com.cool.store.enums.point.PaymentMethodEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.mapper.FranchiseFeeMapper;
|
import com.cool.store.mapper.FranchiseFeeMapper;
|
||||||
import com.cool.store.mapper.SignFranchiseMapper;
|
import com.cool.store.mapper.SignFranchiseMapper;
|
||||||
import com.cool.store.mq.producer.SimpleMessageService;
|
import com.cool.store.mq.producer.SimpleMessageService;
|
||||||
|
import com.cool.store.request.StoreMasterDTO;
|
||||||
import com.cool.store.request.StoreRequestBody;
|
import com.cool.store.request.StoreRequestBody;
|
||||||
import com.cool.store.service.OperationLogService;
|
import com.cool.store.service.OperationLogService;
|
||||||
import com.cool.store.service.SyncMainSysServer;
|
import com.cool.store.service.SyncMainSysServer;
|
||||||
@@ -20,6 +22,7 @@ import org.springframework.scheduling.annotation.Async;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalTime;
|
import java.time.LocalTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@@ -72,46 +75,56 @@ public class SyncMainSysServerImpl implements SyncMainSysServer {
|
|||||||
private String eid;
|
private String eid;
|
||||||
@Resource
|
@Resource
|
||||||
private StoreDao storeDao;
|
private StoreDao storeDao;
|
||||||
|
@Resource
|
||||||
|
SignFranchiseDAO signFranchiseDAO;
|
||||||
|
@Resource
|
||||||
|
PointDetailInfoDAO pointDetailDAO;
|
||||||
|
@Resource
|
||||||
|
QualificationsInfoDAO qualificationsInfoDAO;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Async
|
@Async
|
||||||
public void syncStore(Long shopId) {
|
public void syncStore(Long shopId) {
|
||||||
StoreRequestBody requestBody = new StoreRequestBody();
|
log.info("开始同步门店 syncStore:{}", shopId);
|
||||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
addStore(shopId);
|
||||||
StoreDO storeDO = storeDao.getByStoreNum(shopInfo.getShopCode());
|
|
||||||
if (Objects.nonNull(storeDO)) {
|
|
||||||
throw new ServiceException(ErrorCodeEnum.STORE_IS_EXIST);
|
|
||||||
}
|
}
|
||||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
|
||||||
PointInfoDO pointInfoDO = pointInfoDAO.getPointInfoById(shopInfo.getPointId());
|
|
||||||
BuildInformationDO buildInformationDO = buildInformationDAO.selectOneByShopId(shopId);
|
|
||||||
SignFranchiseDO signFranchiseDO = signFranchiseMapper.selectByShopId(shopId);
|
|
||||||
|
|
||||||
requestBody.setStore_name(shopInfo.getShopName());
|
|
||||||
requestBody.setStore_num(shopInfo.getShopCode());
|
/**
|
||||||
requestBody.setProvince(shopInfo.getProvince());
|
* 添加门店
|
||||||
requestBody.setCity(shopInfo.getCity());
|
* @param shopId
|
||||||
requestBody.setCounty(shopInfo.getDistrict());
|
*/
|
||||||
requestBody.setLocation_address(shopInfo.getDetailAddress());
|
public void addStore(Long shopId) {
|
||||||
requestBody.setStore_address(shopInfo.getDetailAddress());
|
try {
|
||||||
if (shopInfo.getManagerRegionId() == null) {
|
StoreMasterDTO storeMasterDTO = new StoreMasterDTO();
|
||||||
BigRegionDO byRegionId = bigRegionDAO.getByRegionId(shopInfo.getRegionId());
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||||
if (byRegionId != null) {
|
if (shopInfo == null){
|
||||||
requestBody.setStore_area(byRegionId.getStoreManageRegionId() == null
|
log.info("门店不存在:{}", shopId);
|
||||||
? shopInfo.getRegionId().toString() : byRegionId.getStoreManageRegionId().toString());
|
return;
|
||||||
} else {
|
|
||||||
requestBody.setStore_area(shopInfo.getRegionId().toString());
|
|
||||||
}
|
}
|
||||||
} else {
|
storeMasterDTO.setEnterpriseId(eid);
|
||||||
requestBody.setStore_area(shopInfo.getManagerRegionId().toString());
|
storeMasterDTO.setStoreStatus("not_open");
|
||||||
}
|
storeMasterDTO.setStoreName(shopInfo.getShopName());
|
||||||
//未开业
|
storeMasterDTO.setStoreNum(shopInfo.getShopCode());
|
||||||
requestBody.setStore_status("not_open");
|
storeMasterDTO.setJoinBrand(StringUtils.isNotEmpty(shopInfo.getFranchiseBrand())?Integer.valueOf(shopInfo.getFranchiseBrand()):null);
|
||||||
if (pointInfoDO != null) {
|
storeMasterDTO.setJoinModel(shopInfo.getJoinMode());
|
||||||
requestBody.setStore_acreage(pointInfoDO.getPointArea());
|
storeMasterDTO.setStoreType(shopInfo.getStoreType());
|
||||||
requestBody.setLongitude_latitude(pointInfoDO.getLongitude() + "," + pointInfoDO.getLatitude());
|
|
||||||
}
|
SignFranchiseDO signFranchiseDO = signFranchiseDAO.selectByShopId(shopId);
|
||||||
requestBody.setTelephone(buildInformationDO.getBusinessMobile());
|
storeMasterDTO.setManageModel(signFranchiseDO.getBusinessModel());
|
||||||
|
storeMasterDTO.setSignType(signFranchiseDO.getSignType());
|
||||||
|
storeMasterDTO.setProtectiveDistance(signFranchiseDO.getProtectiveDistance());
|
||||||
|
storeMasterDTO.setUnifiedManagement(signFranchiseDO.getUnifiedManagement());
|
||||||
|
|
||||||
|
BigRegionDO region = bigRegionDAO.getByRegionId(shopInfo.getRegionId());
|
||||||
|
storeMasterDTO.setBloc(region.getGroupName());
|
||||||
|
storeMasterDTO.setBranch(region.getRegionId());
|
||||||
|
storeMasterDTO.setRegionId(shopInfo.getManagerRegionId());
|
||||||
|
storeMasterDTO.setJoinSupervision(shopInfo.getInvestmentManager());
|
||||||
|
|
||||||
|
BuildInformationDO buildInformationDO = buildInformationDAO.selectOneByShopId(shopId);
|
||||||
|
if (buildInformationDO != null){
|
||||||
|
storeMasterDTO.setMiniProgramOrderStoreName(buildInformationDO.getCShopName());
|
||||||
if (StringUtils.isNotBlank(buildInformationDO.getBusinessHours())) {
|
if (StringUtils.isNotBlank(buildInformationDO.getBusinessHours())) {
|
||||||
try {
|
try {
|
||||||
String[] times = buildInformationDO.getBusinessHours().split("~");
|
String[] times = buildInformationDO.getBusinessHours().split("~");
|
||||||
@@ -120,28 +133,80 @@ public class SyncMainSysServerImpl implements SyncMainSysServer {
|
|||||||
LocalTime endTime = LocalTime.parse(times[1], formatter);
|
LocalTime endTime = LocalTime.parse(times[1], formatter);
|
||||||
String startMillis = String.valueOf(startTime.toSecondOfDay() * 1000L);
|
String startMillis = String.valueOf(startTime.toSecondOfDay() * 1000L);
|
||||||
String endMillis = String.valueOf(endTime.toSecondOfDay() * 1000L);
|
String endMillis = String.valueOf(endTime.toSecondOfDay() * 1000L);
|
||||||
requestBody.setBusiness_hours(startMillis + "," + endMillis);
|
storeMasterDTO.setBusinessHours(startMillis + "," + endMillis);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.info("时间转换异常:{},shopId:{},time:{}", e.getMessage(), shopId.toString(), buildInformationDO.getBusinessHours());
|
log.info("时间转换异常:{},shopId:{},time:{}", e.getMessage(), shopId.toString(), buildInformationDO.getBusinessHours());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Map<String, ExtendFieldTypeEnum> configMapByActive = ExtendFieldTypeEnum.getConfigMapByActive(active);
|
StoreMasterDTO.SettlerInfo settlerInfo = new StoreMasterDTO.SettlerInfo();
|
||||||
Map<String, String> extendField = new HashMap<>();
|
settlerInfo.setSettlerName(buildInformationDO.getSettlerName());
|
||||||
extendField.put(configMapByActive.get(ONLINE_STORE_MANAGER_MOBILE.getMsg()).getKey(), "");
|
settlerInfo.setSettlerIdCardNo(buildInformationDO.getSettlerIdCardNo());
|
||||||
extendField.put(configMapByActive.get(ONLINE_SIGNATORY_NAME_1.getMsg()).getKey(), signFranchiseDO.getPartnershipSignatoryFirst());
|
settlerInfo.setSettlerIdCardFront(buildInformationDO.getSettlerIdCardFront());
|
||||||
extendField.put(configMapByActive.get(ONLINE_SIGNATORY_MOBILE_1.getMsg()).getKey(), lineInfoDO.getMobile());
|
settlerInfo.setSettlerIdCardReverse(buildInformationDO.getSettlerIdCardReverse());
|
||||||
extendField.put(configMapByActive.get(ONLINE_SIGNATORY_NAME_2.getMsg()).getKey(), signFranchiseDO.getPartnershipSignatorySecond());
|
settlerInfo.setSettlerInHandFrontPicture(buildInformationDO.getSettlerInHandFrontPicture());
|
||||||
extendField.put(configMapByActive.get(ONLINE_SIGNATORY_MOBILE_2.getMsg()).getKey(), signFranchiseDO.getPartnershipSignatorySecondMobile());
|
settlerInfo.setSettlerInHandBackPicture(buildInformationDO.getSettlerInHandBackPicture());
|
||||||
extendField.put(configMapByActive.get(ONLINE_ORDER_NAME.getMsg()).getKey(), buildInformationDO.getCShopName());
|
settlerInfo.setSettlerBankName(buildInformationDO.getSettlerBankName());
|
||||||
extendField.put(configMapByActive.get(ONLINE_JOIN_MODE.getMsg()).getKey(), JoinModeEnum.getByCode(shopInfo.getJoinMode()));
|
settlerInfo.setSettlerBankBranchName(buildInformationDO.getSettlerBankName());
|
||||||
extendField.put(configMapByActive.get(ONLINE_STORE_TYPE.getMsg()).getKey(), StoreTypeEnum.getMessage(shopInfo.getStoreType()));
|
settlerInfo.setSettlerBankNumber(buildInformationDO.getSettlerBankNumber());
|
||||||
extendField.put(configMapByActive.get(ONLINE_BRAND.getMsg()).getKey(), FranchiseBrandEnum.getDescByCode(shopInfo.getFranchiseBrand()));
|
settlerInfo.setSettlerBankMobile(buildInformationDO.getSettlerBankMobile());
|
||||||
requestBody.setExtend_field(JSONObject.toJSONString(extendField));
|
settlerInfo.setSettlerBankPhotoUrl(buildInformationDO.getSettlerBankPhotoUrl());
|
||||||
requestBody.setEid(eid);
|
settlerInfo.setSettlerBankBackPhotoUrl(buildInformationDO.getSettlerBankBackPhotoUrl());
|
||||||
requestBody.setPartnerName(lineInfoDO.getUsername());
|
storeMasterDTO.setSettlerInfo(settlerInfo);
|
||||||
requestBody.setPartnerMobile(lineInfoDO.getMobile());
|
|
||||||
requestBody.setPartnerRoleId(UserRoleEnum.FRANCHISEES.getCode());
|
|
||||||
simpleMessageService.send(JSONObject.toJSONString(requestBody), RocketMqTagEnum.ZXJP_CREATE_STORE);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (shopInfo.getPointId()!=null){
|
||||||
|
PointInfoDO info = pointInfoDAO.getPointInfoById(shopInfo.getPointId());
|
||||||
|
PointDetailInfoDO pointDetail = pointDetailDAO.getPointDetailInfoByPointId(shopInfo.getPointId());
|
||||||
|
if (info != null){
|
||||||
|
storeMasterDTO.setArea(info.getProvince()+info.getCity()+info.getDistrict());
|
||||||
|
storeMasterDTO.setTown(info.getTownship());
|
||||||
|
storeMasterDTO.setStoreAddress(info.getAddress());
|
||||||
|
storeMasterDTO.setLocationAddress(info.getAddress());
|
||||||
|
storeMasterDTO.setPointCode(info.getPointCode());
|
||||||
|
storeMasterDTO.setLongitude(info.getLongitude());
|
||||||
|
storeMasterDTO.setLatitude(info.getLatitude());
|
||||||
|
try {
|
||||||
|
if (StringUtils.isNotEmpty(pointDetail.getMonthRent())&&pointDetail.getPaymentMethod()!=null){
|
||||||
|
//获取支付方式
|
||||||
|
PaymentMethodEnum paymentMethodEnum = PaymentMethodEnum.getByCode(pointDetail.getPaymentMethod());
|
||||||
|
BigDecimal monthlyRent = new BigDecimal(pointDetail.getMonthRent()).divide(new BigDecimal(paymentMethodEnum.getTotalMonth()));
|
||||||
|
storeMasterDTO.setMonthlyRent(monthlyRent);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.info("月租转换异常:{},shopId:{},time:{}", e.getMessage(), shopId.toString(), pointDetail.getMonthRent());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
OrderSysInfoDO orderSysInfoDO = orderSysInfoDAO.selectByShopId(shopId);
|
||||||
|
if (orderSysInfoDO != null){
|
||||||
|
storeMasterDTO.setAddresseeName(orderSysInfoDO.getAddresseeName());
|
||||||
|
storeMasterDTO.setAddresseeMobile(orderSysInfoDO.getAddresseeMobile());
|
||||||
|
storeMasterDTO.setAddresseeArea(orderSysInfoDO.getAddresseeProvince()+orderSysInfoDO.getAddresseeCity()+orderSysInfoDO.getAddresseeDistrict());
|
||||||
|
storeMasterDTO.setAddresseeAddress(orderSysInfoDO.getAddresseeAddress());
|
||||||
|
storeMasterDTO.setDeclareGoodsLogisticsWarehouse(orderSysInfoDO.getDeclareGoodsLogisticsWarehouse());
|
||||||
|
storeMasterDTO.setDeclareGoodsType(Integer.valueOf(orderSysInfoDO.getDeclareGoodsType()));
|
||||||
|
storeMasterDTO.setDeclareGoodsDate(orderSysInfoDO.getDeclareGoodsDate());
|
||||||
|
}
|
||||||
|
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||||
|
StoreMasterDTO.SignerInfo signerInfo = new StoreMasterDTO.SignerInfo();
|
||||||
|
if (lineInfoDO != null){
|
||||||
|
signerInfo.setSigner1Name(lineInfoDO.getUsername());
|
||||||
|
signerInfo.setSigner1Mobile(lineInfoDO.getMobile());
|
||||||
|
signerInfo.setPartnerRoleId(UserRoleEnum.FRANCHISEES.getCode());
|
||||||
|
}
|
||||||
|
QualificationsInfoDO infoDO = qualificationsInfoDAO.getByLineId(shopInfo.getLineId());
|
||||||
|
if (infoDO != null){
|
||||||
|
signerInfo.setSigner1IdCard(infoDO.getIdCardNo());
|
||||||
|
signerInfo.setSigner1IdCardPhoto(infoDO.getFrontOfIdCard());
|
||||||
|
signerInfo.setSigner1IdCardPhotoBack(infoDO.getBackOfIdCard());
|
||||||
|
}
|
||||||
|
storeMasterDTO.setSignerInfo(signerInfo);
|
||||||
|
simpleMessageService.send(JSONObject.toJSONString(storeMasterDTO), RocketMqTagEnum.ZXJP_CREATE_STORE);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.info("asdStore_error:{},shopId:{}", e.getMessage(), shopId.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -479,7 +479,7 @@ public class UserAuthMappingServiceImpl implements UserAuthMappingService {
|
|||||||
@Override
|
@Override
|
||||||
public PageInfo<UserDTO> getAllUser(String keyword, Integer pageNum, Integer pageSize) {
|
public PageInfo<UserDTO> getAllUser(String keyword, Integer pageNum, Integer pageSize) {
|
||||||
PageHelper.startPage(pageNum, pageSize);
|
PageHelper.startPage(pageNum, pageSize);
|
||||||
List<UserDTO> allUser = enterpriseUserDAO.getAllUser(eid, keyword);
|
List<UserDTO> allUser = enterpriseUserDAO.getAllUser(eid, keyword,Arrays.asList(UserRoleEnum.SUPERVISION.getCode(), UserRoleEnum.QW_SUPERVISION.getCode()));
|
||||||
return new PageInfo<>(allUser);
|
return new PageInfo<>(allUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,11 @@ public class PCFranchiseFeeController {
|
|||||||
return ResponseResult.success(franchiseFeeService.update(request));
|
return ResponseResult.success(franchiseFeeService.update(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("缴费阶段跳过")
|
||||||
|
@GetMapping("/stageSkip")
|
||||||
|
public ResponseResult<Boolean> stageSkip(@RequestParam("shopId") Long shopId) {
|
||||||
|
return ResponseResult.success(franchiseFeeService.stageSkip(shopId));
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation("基本信息查询")
|
@ApiOperation("基本信息查询")
|
||||||
@GetMapping("/getDetail")
|
@GetMapping("/getDetail")
|
||||||
|
|||||||
@@ -239,6 +239,7 @@ public class XxlJobHandler {
|
|||||||
}
|
}
|
||||||
Map<Long, LicenseTransactDO> transactDOMap = licenseTransactDOS.stream().collect(Collectors.toMap(LicenseTransactDO::getShopId, x -> x));
|
Map<Long, LicenseTransactDO> transactDOMap = licenseTransactDOS.stream().collect(Collectors.toMap(LicenseTransactDO::getShopId, x -> x));
|
||||||
List<LicenseSyncInfoDTO> pushList = new ArrayList<>();
|
List<LicenseSyncInfoDTO> pushList = new ArrayList<>();
|
||||||
|
List<LicenseTransactDO> pushBusinessList = new ArrayList<>();
|
||||||
infoDOS.forEach(x -> {
|
infoDOS.forEach(x -> {
|
||||||
LicenseTransactDO licenseTransactDO = transactDOMap.get(x.getShopId());
|
LicenseTransactDO licenseTransactDO = transactDOMap.get(x.getShopId());
|
||||||
Integer currentStoreSyncCount = 0;
|
Integer currentStoreSyncCount = 0;
|
||||||
@@ -248,6 +249,7 @@ public class XxlJobHandler {
|
|||||||
pushList.add(createLicenseSyncInfoDTO(x.getStoreId(), CommonConstants.ONE,
|
pushList.add(createLicenseSyncInfoDTO(x.getStoreId(), CommonConstants.ONE,
|
||||||
licenseTransactDO.getCreditUrl(), licenseTransactDO.getIssueTime(), licenseTransactDO.getValidity()));
|
licenseTransactDO.getCreditUrl(), licenseTransactDO.getIssueTime(), licenseTransactDO.getValidity()));
|
||||||
currentStoreSyncCount++;
|
currentStoreSyncCount++;
|
||||||
|
pushBusinessList.add(licenseTransactDO);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 同步食品经营许可证
|
// 同步食品经营许可证
|
||||||
@@ -265,6 +267,12 @@ public class XxlJobHandler {
|
|||||||
currentStoreSyncCount++;
|
currentStoreSyncCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (currentStoreSyncCount == CommonConstants.TWO) {
|
||||||
|
updateSyncList.add(licenseTransactDO.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
// 发送消息
|
// 发送消息
|
||||||
if (!pushList.isEmpty()) {
|
if (!pushList.isEmpty()) {
|
||||||
LicenseDTO licenseDTO = new LicenseDTO();
|
LicenseDTO licenseDTO = new LicenseDTO();
|
||||||
@@ -273,16 +281,20 @@ public class XxlJobHandler {
|
|||||||
log.info("licenseDTO:{}",JSONObject.toJSONString(licenseDTO));
|
log.info("licenseDTO:{}",JSONObject.toJSONString(licenseDTO));
|
||||||
simpleMessageService.send(JSONObject.toJSONString(licenseDTO), RocketMqTagEnum.PARTNER_LICENSE_SYNC_QUEUE);
|
simpleMessageService.send(JSONObject.toJSONString(licenseDTO), RocketMqTagEnum.PARTNER_LICENSE_SYNC_QUEUE);
|
||||||
}
|
}
|
||||||
if (currentStoreSyncCount == CommonConstants.TWO) {
|
//工商信息变更
|
||||||
updateSyncList.add(licenseTransactDO.getId());
|
if (!pushBusinessList.isEmpty()){
|
||||||
|
Map<Long, String> transactMap = infoDOS.stream().collect(Collectors.toMap(LicenseSyncDTO::getShopId, LicenseSyncDTO::getStoreId));
|
||||||
|
BusinessDTO businessDTO = new BusinessDTO();
|
||||||
|
businessDTO.setEnterpriseId(eid);
|
||||||
|
businessDTO.setTransactMap(transactMap);
|
||||||
|
businessDTO.setRequests(pushBusinessList);
|
||||||
|
simpleMessageService.send(JSONObject.toJSONString(businessDTO), RocketMqTagEnum.BUSINESS_SYNC);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
hasNext = licenseTransactDOS.size() >= pageSize;
|
hasNext = licenseTransactDOS.size() >= pageSize;
|
||||||
pageNum++;
|
pageNum++;
|
||||||
}
|
}
|
||||||
|
|
||||||
log.info("licenseDTO:{}",JSONObject.toJSONString(updateSyncList));
|
log.info("licenseDTO:{}",JSONObject.toJSONString(updateSyncList));
|
||||||
if (CollectionUtils.isNotEmpty(updateSyncList)) {
|
if (CollectionUtils.isNotEmpty(updateSyncList)) {
|
||||||
applyLicenseMapper.updateSyncFlagByIds(updateSyncList);
|
applyLicenseMapper.updateSyncFlagByIds(updateSyncList);
|
||||||
|
|||||||
@@ -58,10 +58,10 @@ signKey=77fea013c3a6459685b83c21a2fc3411
|
|||||||
fixMobileOpenid=HSAY5531DA7
|
fixMobileOpenid=HSAY5531DA7
|
||||||
#xxljob配置
|
#xxljob配置
|
||||||
#xxljob配置
|
#xxljob配置
|
||||||
xxl.job.admin.addresses = http://10.7.53.224:10001/xxl-job-admin
|
xxl.job.admin.addresses = http://10.6.48.226:10001/xxl-job-admin
|
||||||
xxl.job.executor.appname = ${spring.application.name}
|
xxl.job.executor.appname = ${spring.application.name}
|
||||||
xxl.job.executor.ip =
|
xxl.job.executor.ip =
|
||||||
xxl.job.executor.port = 40001
|
xxl.job.executor.port = 40301
|
||||||
xxl.job.executor.logpath = logs/xxl-job/jobhandler
|
xxl.job.executor.logpath = logs/xxl-job/jobhandler
|
||||||
xxl.job.executor.logretentiondays = 30
|
xxl.job.executor.logretentiondays = 30
|
||||||
xxl.job.accessToken = 25365115eed84e9ba5e0040abb255a09
|
xxl.job.accessToken = 25365115eed84e9ba5e0040abb255a09
|
||||||
@@ -81,6 +81,50 @@ aliyun.sms.signName=酷店掌
|
|||||||
mybatis.configuration.variables.enterpriseId=e17cd2dc350541df8a8b0af9bd27f77d
|
mybatis.configuration.variables.enterpriseId=e17cd2dc350541df8a8b0af9bd27f77d
|
||||||
enterprise.dingCorpId=dingef2502a50df74ccc35c2f4657eb6378f
|
enterprise.dingCorpId=dingef2502a50df74ccc35c2f4657eb6378f
|
||||||
|
|
||||||
|
qywx.task.notice.url2=https://tstore-h5.coolstore.cn/?corpId=%s&appType=%s#/notice?target=%s¬iceType=zx&corpId=%s&appType=%s&eid=%s
|
||||||
|
|
||||||
|
#机会点地址
|
||||||
|
third.party.appKey=IGSAEQoakR2HEaYx
|
||||||
|
third.party.appSecret=aPsA99K1obFeFm3m
|
||||||
|
zx.opportunity.url=https://snp.wenmatech.com/
|
||||||
|
|
||||||
|
#大数据地址
|
||||||
|
zx.big.data.url=https://ds.zhengxinfood.com/
|
||||||
|
zx.big.data.appKey=ff203b5567744feaaae49fb86f58c5bf
|
||||||
|
zx.big.data.appSecret=35b8b9a400b4430fa022190be0913cd6
|
||||||
|
|
||||||
|
#火吗POS
|
||||||
|
api.auth.url=https://api.hmdzg.top
|
||||||
|
api.auth.username=VA59C0ubfcpcVpl
|
||||||
|
api.auth.secret=H9YKHF6R7N16Fvy
|
||||||
|
|
||||||
|
#新管家账号
|
||||||
|
xgj.api.auth.url=http://117.139.13.24:11180
|
||||||
|
xgj.api.auth.username=6446346061e043e392dd53c9c8d1af0b
|
||||||
|
xgj.api.auth.secret=3ba6e4c5632547b8b2b3acefe08667bb
|
||||||
|
xgj.api.token.url=http://117.139.13.24:29000
|
||||||
|
|
||||||
|
#云流水账号
|
||||||
|
#yls.api.auth.url=http://scm330-test.366ec.net
|
||||||
|
#yls.api.auth.username=096d4009072c927c
|
||||||
|
#yls.api.auth.secret=3b56198f096d4009072c927c96fbc8b6
|
||||||
|
|
||||||
|
yls.api.auth.url=http://yuanguiwuliu.com
|
||||||
|
yls.api.auth.username=096d4009072c927c
|
||||||
|
yls.api.auth.secret=3b56198f096d4009072c927c96fbc8b6
|
||||||
|
|
||||||
|
#新掌柜账号
|
||||||
|
xzg.api.auth.url=http://webapi.zhengxinfood.com
|
||||||
|
|
||||||
|
zx.food.url=https://datacenter.zhengxinfood.com
|
||||||
|
|
||||||
|
cool.api.appKey=k8J7fG2qR5tY9vX3
|
||||||
|
cool.api.secret=wP4sN6dL8zK2xM9c
|
||||||
|
|
||||||
|
#maozhejun userID
|
||||||
|
special.user.id=wpayJeDAAAhGIFgUJpJN-zg39JuNbYhg_woayJeDAAA0TC8mkCJeXouw94hYA-D3Q
|
||||||
|
|
||||||
|
ask.bot.url=https://test.auth.wx.askbot.cn
|
||||||
|
|
||||||
|
|
||||||
hqt.token.url=https://tc.cloud.hecom.cn
|
hqt.token.url=https://tc.cloud.hecom.cn
|
||||||
|
|||||||
Reference in New Issue
Block a user