Merge remote-tracking branch 'origin/cc_20250325_select' into cc_20250325_select
# Conflicts: # coolstore-partner-dao/src/main/java/com/cool/store/dao/ShopInfoDAO.java # coolstore-partner-dao/src/main/java/com/cool/store/mapper/ShopInfoMapper.java
This commit is contained in:
@@ -87,6 +87,7 @@ public enum ErrorCodeEnum {
|
||||
LINE_PAY_IS_NOT_EXIST(500019, "意向金信息不存在!", null),
|
||||
INTENT_PASS(500020, "审核已通过,请刷新页面!", null),
|
||||
APPOINTMENT_TIME_FAIL(500020, "预约失败,请刷新后再试", null),
|
||||
LINE_REGION_NOT_EXIST(500021, "线索的所属大区/分公司未填写", null),
|
||||
|
||||
POINT_NOT_COMPLETE(600000, "铺位信息未填写完全,请完善后生成评估报告", null),
|
||||
POINT_NOT_EXIST(600001, "铺位信息不存在", null),
|
||||
@@ -237,6 +238,7 @@ public enum ErrorCodeEnum {
|
||||
CONFIRM_THE_APPROVER(131006,"您提交的铺位暂时找不到选址审批人,请联系系统管理员配置选址审批权限后再提交铺位审批",null),
|
||||
CREATE_PASSWORD_FAIL(131007,"身份证号信息错误",null),
|
||||
GET_HOME_TEMPLATE_ERROR(131008,"获取首页模板失败",null),
|
||||
THE_DATA_IS_NOT_FILLED(131009,"您有数据还未填写",null),
|
||||
|
||||
TALLY_BOOK_NOT_EXIST(180001, "记账本数据不存在", null),
|
||||
|
||||
|
||||
@@ -36,15 +36,12 @@ public enum FranchiseBrandEnum {
|
||||
if (StringUtils.isBlank(code)){
|
||||
return null;
|
||||
}
|
||||
List<Integer> integerList = Arrays.stream(code.split(","))
|
||||
.map(Integer::parseInt)
|
||||
.collect(Collectors.toList());
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
int i = Integer.parseInt(code);
|
||||
for (FranchiseBrandEnum e : FranchiseBrandEnum.values()) {
|
||||
if (integerList.contains(e.getCode())) {
|
||||
stringBuffer.append(e.getDesc()).append(",");
|
||||
if (i == e.getCode()) {
|
||||
return e.getDesc();
|
||||
}
|
||||
}
|
||||
return stringBuffer.toString();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,4 +260,10 @@ public class ShopInfoDAO {
|
||||
}
|
||||
return shopInfoMapper.getShopIdList(lineId);
|
||||
}
|
||||
public MiniShopsResponse currentShopWhetherOpen(Long shopId,String eid){
|
||||
if (shopId == null){
|
||||
return null;
|
||||
}
|
||||
return shopInfoMapper.currentShopWhetherOpen(shopId,eid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,4 +134,7 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
||||
List<String> getShopCodeList(@Param("lineId") Long lineId);
|
||||
|
||||
List<Long> getShopIdList(@Param("lineId") Long lineId);
|
||||
|
||||
MiniShopsResponse currentShopWhetherOpen(@Param("shopId")Long shopId,@Param("eid")String eid);
|
||||
|
||||
}
|
||||
|
||||
@@ -126,15 +126,11 @@
|
||||
p.create_time as createTime,
|
||||
p.opportunity_point_code as opportunityPointCode,
|
||||
p.opportunity_point_name as opportunityPointName,
|
||||
c.picture_obj as pictureObj,
|
||||
pr.status as recommendStatus,
|
||||
e.store_name as shopName
|
||||
c.picture_obj as pictureObj
|
||||
from
|
||||
xfsg_point_recommend pr
|
||||
inner join xfsg_point_info p on p.id = pr.point_id
|
||||
left join xfsg_point_detail_info c on p.id = c.point_id
|
||||
left JOIN xfsg_shop_info d ON c.shop_id = d.id
|
||||
left JOIN store_${enterpriseId} e ON d.shop_code = e.store_num
|
||||
where
|
||||
p.deleted = 0 and pr.shop_id = #{request.shopId} and pr.deleted = 0
|
||||
<if test="request.status != null and request.status == 1">
|
||||
@@ -146,11 +142,6 @@
|
||||
<if test="request.status != null and request.status == 3">
|
||||
and pr.status in (5, 6)
|
||||
</if>
|
||||
<if test="request.areaCode!=null and request.areaCode !=''">
|
||||
and (p.province_code = #{request.areaCode} or p.city_code = #{request.areaCode} or p.district_code =
|
||||
#{request.areaCode})
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<update id="updateStatusByPointIdAndLineId">
|
||||
|
||||
@@ -438,6 +438,13 @@
|
||||
from xfsg_shop_info
|
||||
where deleted = 0 and line_id = #{lineId} and shop_code is not null
|
||||
</select>
|
||||
<select id="currentShopWhetherOpen" resultType="com.cool.store.response.MiniShopsResponse">
|
||||
select a.shop_name as shopName,
|
||||
a.shop_code as shopCode
|
||||
from xfsg_shop_info a
|
||||
inner join store_${eid} b on a.shop_code = b.store_num
|
||||
where a.id = #{shopId}
|
||||
</select>
|
||||
|
||||
<select id="getShopIdList" resultType="java.lang.String">
|
||||
select id
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.cool.store.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/04/10/11:30
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class GetUserDTO {
|
||||
private String keyword;
|
||||
private Integer pageNum =1;
|
||||
private Integer pageSize = 10;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.cool.store.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/04/09/13:42
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class ShopNameAndCodeDTO {
|
||||
|
||||
@ApiModelProperty("店铺名称")
|
||||
private String shopName;
|
||||
|
||||
@ApiModelProperty("店铺编码")
|
||||
private String shopCode;
|
||||
}
|
||||
@@ -16,27 +16,30 @@ import java.util.Objects;
|
||||
@Data
|
||||
public class AddPointDetailRequest {
|
||||
|
||||
@NotBlank
|
||||
@NotBlank(message = "铺位名称不能为空")
|
||||
@ApiModelProperty("铺位名称")
|
||||
private String pointName;
|
||||
|
||||
@ApiModelProperty("所属大区")
|
||||
private Long regionId;
|
||||
|
||||
@NotBlank
|
||||
@NotBlank(message = "经度不能为空")
|
||||
@ApiModelProperty("经度")
|
||||
private String longitude;
|
||||
|
||||
@NotBlank
|
||||
@NotBlank(message = "纬度不能为空")
|
||||
@ApiModelProperty("纬度")
|
||||
private String latitude;
|
||||
|
||||
@NotBlank(message = "省不能为空")
|
||||
@ApiModelProperty("省")
|
||||
private String province;
|
||||
|
||||
@NotBlank(message = "市不能为空")
|
||||
@ApiModelProperty("市")
|
||||
private String city;
|
||||
|
||||
@NotBlank(message = "区/县不能为空")
|
||||
@ApiModelProperty("区/县")
|
||||
private String district;
|
||||
|
||||
|
||||
@@ -26,12 +26,12 @@ public class AddSignFranchiseRequest {
|
||||
private String detailAddress;
|
||||
|
||||
|
||||
@ApiModelProperty("店铺品牌")
|
||||
@NotBlank(message = "店铺品牌不能为空")
|
||||
@ApiModelProperty("加盟品牌")
|
||||
@NotBlank(message = "加盟品牌不能为空")
|
||||
private String franchiseBrand;
|
||||
|
||||
@ApiModelProperty("经营模式(0 无 1直营 2加盟)")
|
||||
@NotBlank(message = "经营模式不能为空")
|
||||
@NotNull(message = "经营模式不能为空")
|
||||
private Integer businessModel;
|
||||
|
||||
@ApiModelProperty("加盟模式(1-加盟部加盟店、2-加盟公司、3-自有加盟、4-强加盟)")
|
||||
@@ -84,6 +84,7 @@ public class AddSignFranchiseRequest {
|
||||
@ApiModelProperty("合同金额")
|
||||
private String contractAmount;
|
||||
@ApiModelProperty("合伙签约人1")
|
||||
@NotBlank(message = "合伙签约人1不能为空")
|
||||
private String partnershipSignatoryFirst;
|
||||
@ApiModelProperty("合伙签约人2")
|
||||
private String partnershipSignatorySecond;
|
||||
|
||||
@@ -145,21 +145,27 @@ public class BuildInformationRequest {
|
||||
@ApiModelProperty("公司结算需要:开户许可证")
|
||||
private String accountOpeningPermit;
|
||||
|
||||
@NotBlank(message = "订货信息收件人 不能为空")
|
||||
@ApiModelProperty(value = "收件人")
|
||||
private String addresseeName;
|
||||
|
||||
@NotBlank(message = "订货信息手机号 不能为空")
|
||||
@ApiModelProperty(value = "手机号" )
|
||||
private String addresseeMobile;
|
||||
|
||||
@NotBlank(message = "订货信息收件省 不能为空")
|
||||
@ApiModelProperty(value = "收件省" )
|
||||
private String addresseeProvince;
|
||||
|
||||
@NotBlank(message = "订货信息收件市 不能为空")
|
||||
@ApiModelProperty(value = "收件市" )
|
||||
private String addresseeCity;
|
||||
|
||||
@NotBlank(message = "订货信息收件区 不能为空")
|
||||
@ApiModelProperty(value = "收件区" )
|
||||
private String addresseeDistrict;
|
||||
|
||||
@NotBlank(message = "订货信息详细地址 不能为空")
|
||||
@ApiModelProperty(value = "详细地址" )
|
||||
private String addresseeAddress;
|
||||
|
||||
|
||||
@@ -22,8 +22,10 @@ public class JoinIntentionRequest {
|
||||
@ApiModelProperty("加盟模式 1-社会加盟模式 2-强加盟模式")
|
||||
private Integer joinMode;
|
||||
@ApiModelProperty("姓名")
|
||||
@NotBlank(message = "姓名不能为空")
|
||||
private String userName;
|
||||
@ApiModelProperty("手机号")
|
||||
@NotBlank(message = "手机号不能为空")
|
||||
private String mobile;
|
||||
@ApiModelProperty("1男 2女")
|
||||
private Integer sex;
|
||||
@@ -38,9 +40,12 @@ public class JoinIntentionRequest {
|
||||
@ApiModelProperty("线索审核信息id")
|
||||
private Long auditId;
|
||||
@ApiModelProperty("身份证号码/统一社会信用代码")
|
||||
@NotBlank(message = "身份证号码不能为空")
|
||||
private String idCardNo;
|
||||
@ApiModelProperty("身份证正面")
|
||||
@NotBlank(message = "身份证正面不能为空")
|
||||
private String frontOfIdCard;
|
||||
@NotBlank(message = "身份证反面不能为空")
|
||||
@ApiModelProperty("身份证反面")
|
||||
private String backOfIdCard;
|
||||
@ApiModelProperty("婚姻状态 1-未婚 2-已婚 3-离婚 4-丧偶")
|
||||
@@ -72,14 +77,19 @@ public class JoinIntentionRequest {
|
||||
@ApiModelProperty("办公地址")
|
||||
private String officeAddress;
|
||||
@ApiModelProperty("法人姓名")
|
||||
@NotBlank(message = "法人姓名不能为空")
|
||||
private String legalName;
|
||||
@ApiModelProperty("法人身份证号码")
|
||||
@NotBlank(message = "法人身份证号码不能为空")
|
||||
private String legalIdCardNo;
|
||||
@ApiModelProperty("法人身份证正面")
|
||||
@NotBlank(message = "法人身份证正面不能为空")
|
||||
private String legalIdCardFront;
|
||||
@ApiModelProperty("法人身份证反面")
|
||||
@NotBlank(message = "法人身份证反面不能为空")
|
||||
private String legalIdCardBack;
|
||||
@ApiModelProperty("法人手机号")
|
||||
@NotBlank(message = "法人手机号不能为空")
|
||||
private String legalMobile;
|
||||
@ApiModelProperty("业务负责人姓名")
|
||||
private String businessLeaderName;
|
||||
|
||||
@@ -19,26 +19,26 @@ import java.util.Objects;
|
||||
@Data
|
||||
public class MiniAddPointRequest {
|
||||
|
||||
@NotNull
|
||||
|
||||
@ApiModelProperty("店铺id")
|
||||
private Long shopId;
|
||||
|
||||
@NotBlank
|
||||
@NotBlank(message = "铺位名称不能为空")
|
||||
@ApiModelProperty("铺位名称")
|
||||
private String pointName;
|
||||
|
||||
@ApiModelProperty("所属大区")
|
||||
private Long regionId;
|
||||
|
||||
@NotBlank
|
||||
@NotBlank(message = "经度不能为空")
|
||||
@ApiModelProperty("经度")
|
||||
private String longitude;
|
||||
|
||||
@NotBlank
|
||||
@NotBlank(message = "纬度不能为空")
|
||||
@ApiModelProperty("纬度")
|
||||
private String latitude;
|
||||
|
||||
@NotBlank
|
||||
@NotBlank(message = "详细地址不能为空")
|
||||
@ApiModelProperty("详细地址")
|
||||
private String address;
|
||||
|
||||
@@ -72,14 +72,15 @@ public class MiniAddPointRequest {
|
||||
@ApiModelProperty("加盟商签名")
|
||||
private String lineSign;
|
||||
|
||||
@NotBlank
|
||||
@NotBlank(message = "省不能为空")
|
||||
@ApiModelProperty("省")
|
||||
private String province;
|
||||
|
||||
@NotBlank
|
||||
@NotBlank(message = "市不能为空")
|
||||
@ApiModelProperty("市")
|
||||
private String city;
|
||||
|
||||
@NotBlank(message = "区/县不能为空")
|
||||
@ApiModelProperty("区/县")
|
||||
private String district;
|
||||
|
||||
@@ -100,7 +101,7 @@ public class MiniAddPointRequest {
|
||||
|
||||
@ApiModelProperty("区/县编码")
|
||||
private String districtCode;
|
||||
|
||||
@NotBlank(message = "铺位经纬度geohash不能为空")
|
||||
@ApiModelProperty("铺位经纬度geohash")
|
||||
private String location;
|
||||
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.entity.OrderSysInfoDO;
|
||||
import com.cool.store.enums.OrderSysTypeEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
@Data
|
||||
public class OrderSysInfoRequest {
|
||||
@@ -14,8 +17,7 @@ public class OrderSysInfoRequest {
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "店铺编码",required = true)
|
||||
@NotBlank(message = "店铺编码不能为空")
|
||||
@ApiModelProperty(value = "店铺编码")
|
||||
private String shopCode;
|
||||
|
||||
@ApiModelProperty(value = "店铺ID" ,required = true)
|
||||
@@ -105,4 +107,17 @@ public class OrderSysInfoRequest {
|
||||
|
||||
return orderSysInfoDO;
|
||||
}
|
||||
public Boolean check(){
|
||||
if (Objects.equals(this.type, OrderSysTypeEnum.ORDER_SYS_TYPE_1.getType())){
|
||||
if (StringUtils.isAnyBlank(this.xgjRegionId,this.xgjVicePresident,this.declareGoodsDate,this.declareGoodsLogisticsWarehouse,this.warehouseDeliveryDate)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (Objects.equals(this.type, OrderSysTypeEnum.ORDER_SYS_TYPE_2.getType())){
|
||||
if (StringUtils.isAnyBlank(this.receivingFirmName,this.receivingMsBankAccount,this.receivingMsBankBranch,this.bankUnionPayAccount,this.shopCode)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import com.cool.store.entity.AssessmentDataDO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -33,4 +34,11 @@ public class ThreeAcceptanceRequest {
|
||||
private String shopDoorwayPhoto;
|
||||
@ApiModelProperty("门店内景照片")
|
||||
private String shopInteriorPhoto;
|
||||
|
||||
public Boolean miniCheck(){
|
||||
if (StringUtils.isAnyBlank(this.ksAccount,this.verificationPhone,this.shopLocationScreenshots)){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,8 @@ public class OpportunityListRequest{
|
||||
private Integer inspectionStatus ;
|
||||
private Integer pageNum = 1;
|
||||
private Integer pageSize = 20;
|
||||
@ApiModelProperty("机会点名称")
|
||||
private String name;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.cool.store.response;
|
||||
|
||||
import com.cool.store.dto.ShopNameAndCodeDTO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/04/09/13:43
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class ShopResponse {
|
||||
|
||||
@ApiModelProperty(value = "当前店铺信息")
|
||||
private ShopNameAndCodeDTO currentShop;
|
||||
|
||||
@ApiModelProperty(value = "所有店铺信息")
|
||||
private List<ShopNameAndCodeDTO> shopList;
|
||||
}
|
||||
@@ -104,7 +104,12 @@ public class PartnerBaseInfoVO {
|
||||
|
||||
private String unifiedSocialCreditCode;
|
||||
|
||||
@ApiModelProperty("督导name")
|
||||
private String supervisorName;
|
||||
|
||||
private String supervisorId;
|
||||
@ApiModelProperty("督导手机号")
|
||||
private String supervisorMobile;
|
||||
|
||||
|
||||
public static PartnerBaseInfoVO from(QualificationsInfoDO qualificationsInfoDO, LineInfoDO lineInfoDO) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.cool.store.request.*;
|
||||
import com.cool.store.response.BranchShopDetailResponse;
|
||||
import com.cool.store.response.BranchShopResponse;
|
||||
import com.cool.store.response.MiniShopsResponse;
|
||||
import com.cool.store.response.ShopResponse;
|
||||
import com.cool.store.vo.shop.MiniShopPageVO;
|
||||
import com.cool.store.vo.shop.ShopStageInfoVO;
|
||||
import com.cool.store.vo.shop.StageShopCountVO;
|
||||
@@ -106,4 +107,6 @@ public interface ShopService {
|
||||
Boolean dataHandler(Long shopId);
|
||||
|
||||
List<MiniShopsResponse> getShopListSuccessOpen(Long lineId);
|
||||
|
||||
ShopResponse getShopNameAndCode(Long shopId,Long lineId);
|
||||
}
|
||||
|
||||
@@ -350,6 +350,9 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean miniSubmitAcceptanceSign(ThreeAcceptanceRequest request) {
|
||||
if (!request.miniCheck()){
|
||||
throw new ServiceException(ErrorCodeEnum.THE_DATA_IS_NOT_FILLED);
|
||||
}
|
||||
//加盟商
|
||||
if (Objects.nonNull(request.getPartnerAcceptance())) {
|
||||
request.getPartnerAcceptance().setStatus(CommonConstants.ONE);
|
||||
@@ -688,6 +691,9 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
@Override
|
||||
public Boolean pcSubmitAcceptanceSign(ThreeAcceptanceRequest request) {
|
||||
log.info("submitAcceptance, request:{} ", JSONObject.toJSONString(request));
|
||||
if(StringUtils.isAnyBlank(request.getShopDoorwayPhoto(),request.getShopInteriorPhoto())){
|
||||
throw new ServiceException(ErrorCodeEnum.THE_DATA_IS_NOT_FILLED);
|
||||
}
|
||||
//营运部 验收签名
|
||||
AcceptanceInfoDO acceptanceInfoDO1 = acceptanceInfoDAO.selectByShopId(request.getShopId());
|
||||
if (StringUtils.isNotEmpty(acceptanceInfoDO1.getPartnerAcceptanceSignatures())
|
||||
|
||||
@@ -203,8 +203,12 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
log.info("initiating request:{}", JSONObject.toJSONString(request));
|
||||
SigningBaseInfoDO signingBaseInfoDO = request.toSigningBaseInfoDO();
|
||||
boolean submitStatus = intentAgreementMapper.insert(signingBaseInfoDO);
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByPartnerId(request.getPartnerId());
|
||||
if (Objects.isNull(lineInfoDO.getRegionId())){
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_REGION_NOT_EXIST);
|
||||
}
|
||||
if (submitStatus) {
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByPartnerId(request.getPartnerId());
|
||||
|
||||
if (Objects.isNull(lineInfoDO)) {
|
||||
throw new ServiceException(ErrorCodeEnum.INTERVIEW_PARTNER_NOT_EXIST);
|
||||
}
|
||||
@@ -243,7 +247,9 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
if (!WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode().equals(lineInfo.getWorkflowSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
|
||||
}
|
||||
|
||||
if (Objects.isNull(lineInfo.getRegionId())||lineInfo.getRegionId() == 0){
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_REGION_NOT_EXIST);
|
||||
}
|
||||
lineInfo.setWorkflowStage(WorkflowStageEnum.STORE.getCode());
|
||||
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_125.getCode());
|
||||
lineInfo.setDevelopmentManager(lineInfo.getInvestmentManager());
|
||||
|
||||
@@ -2,10 +2,7 @@ package com.cool.store.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.HyPartnerUserInfoDAO;
|
||||
import com.cool.store.dao.LineInfoDAO;
|
||||
import com.cool.store.dao.QualificationsInfoDAO;
|
||||
import com.cool.store.dao.RegionAreaConfigDao;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
@@ -35,6 +32,8 @@ import java.util.*;
|
||||
@Slf4j
|
||||
public class JoinIntentionServiceImpl extends LineFlowService implements JoinIntentionService {
|
||||
|
||||
@Resource
|
||||
private EnterpriseUserDAO enterpriseUserDAO;
|
||||
@Resource
|
||||
JoinIntentionMapper joinIntentionMapper;
|
||||
|
||||
@@ -91,9 +90,12 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
// Long regionId = regionAreaConfigDao.getByWantShopAreaId(lineInfoParam.getWantShopAreaId());
|
||||
// lineInfoParam.setRegionId(regionId);
|
||||
// }
|
||||
if (StringUtils.isBlank(lineInfoDO.getInvestmentManager())) {
|
||||
if (StringUtils.isBlank(lineInfoParam.getInvestmentManager())) {
|
||||
lineInfoParam.setFranchiseBrand(String.valueOf(FranchiseBrandEnum.ZXJP.getCode()));
|
||||
lineInfoParam.setLineStatus(0);
|
||||
}else{
|
||||
lineInfoParam.setFranchiseBrand(String.valueOf(FranchiseBrandEnum.ZXJP.getCode()));
|
||||
lineInfoParam.setLineStatus(1);
|
||||
}
|
||||
lineInfoDAO.insertOrUpdate(lineInfoParam);
|
||||
QualificationsInfoDO qualificationsInfoDO = request.toQualificationsInfoDO();
|
||||
@@ -119,7 +121,7 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
//更新加盟问卷信息
|
||||
qualificationsInfoDAO.updateAuditIdByLineId(auditId, lineInfo.getId());
|
||||
QualificationsInfoDO qualificationsInfoDO = qualificationsInfoDAO.getByLineId(lineInfo.getId());
|
||||
if (StringUtils.isBlank(qualificationsInfoDO.getIdCardNo())||qualificationsInfoDO.getIdCardNo().length()<6){
|
||||
if (StringUtils.isBlank(qualificationsInfoDO.getIdCardNo()) || qualificationsInfoDO.getIdCardNo().length() < 6) {
|
||||
throw new ServiceException(ErrorCodeEnum.CREATE_PASSWORD_FAIL);
|
||||
}
|
||||
String substring = qualificationsInfoDO.getIdCardNo().substring(qualificationsInfoDO.getIdCardNo().length() - 6);
|
||||
@@ -167,6 +169,12 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
response.setRejectPublicReason(lineAuditInfoDO.getRejectPublicReason());
|
||||
}
|
||||
response.setBigRegionId(byLineId.getBigRegionId());
|
||||
response.setSupervisorId(byLineId.getInvestmentManager());
|
||||
EnterpriseUserDO enterpriseUserDO = enterpriseUserDAO.getUserInfoById(byLineId.getInvestmentManager());
|
||||
if (Objects.nonNull(enterpriseUserDO)) {
|
||||
response.setSupervisorName(enterpriseUserDO.getName());
|
||||
response.setSupervisorMobile(enterpriseUserDO.getMobile());
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,10 +8,12 @@ import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.entity.OrderSysInfoDO;
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.MessageEnum;
|
||||
import com.cool.store.enums.OrderSysTypeEnum;
|
||||
import com.cool.store.enums.UserRoleEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.OrderSysInfoRequest;
|
||||
import com.cool.store.service.OrderSysInfoService;
|
||||
import com.cool.store.service.UserAuthMappingService;
|
||||
@@ -51,8 +53,10 @@ public class OrderSysInfoServiceImpl implements OrderSysInfoService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Integer updateByShopId(OrderSysInfoRequest request, String userId) {
|
||||
|
||||
|
||||
//参数校验
|
||||
if (!request.check()){
|
||||
throw new ServiceException(ErrorCodeEnum.THE_DATA_IS_NOT_FILLED);
|
||||
}
|
||||
OrderSysInfoDO orderSysInfoDO = orderSysInfoDAO.selectByShopId(request.getShopId());
|
||||
if (request.getType().equals(OrderSysTypeEnum.ORDER_SYS_TYPE_1.getType())) {
|
||||
orderSysInfoDO.setXgjVicePresident(request.getXgjVicePresident());
|
||||
|
||||
@@ -873,6 +873,21 @@ public class PointServiceImpl implements PointService {
|
||||
if (Objects.isNull(lineInfo)) {
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
if(request.getShopId()==null){
|
||||
PointDetailInfoDO pointDetailInfo = MiniAddPointRequest.convertDO(request);
|
||||
PointInfoDO pointInfo = MiniAddPointRequest.convertPointDO(request);
|
||||
pointInfo.setRegionId(lineInfo.getRegionId());
|
||||
pointInfo.setLineId(lineId);
|
||||
pointInfo.setSelectStatus(SelectStatusEnum.SELECT_STATUS_0.getCode());
|
||||
pointInfo.setPointSource(PointSourceEnum.POINT_SOURCE_2.getCode());
|
||||
pointInfo.setPointCode(generateCode());
|
||||
Long pointId = pointInfoDAO.addPointInfo(pointInfo);
|
||||
pointDetailInfo.setPointId(pointId);
|
||||
pointDetailInfoDAO.addPointDetailInfo(pointDetailInfo);
|
||||
//推送铺位至三方平台
|
||||
extracted(request, lineInfo, pointId, pointInfo);
|
||||
return pointId;
|
||||
}
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (Objects.isNull(shopInfo)) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
@@ -910,6 +925,19 @@ public class PointServiceImpl implements PointService {
|
||||
updatePoint.setId(pointId);
|
||||
updatePoint.setShopId(shopInfo.getId());
|
||||
pointInfoDAO.updatePointInfo(updatePoint);
|
||||
//推送铺位至三方平台
|
||||
extracted(request, lineInfo, pointId, pointInfo);
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername", lineInfo.getUsername());
|
||||
map.put("partnerMobile", lineInfo.getMobile());
|
||||
map.put("pointName", pointInfo.getPointName());
|
||||
commonService.sendQWMessage(Collections.singletonList(shopInfo.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_51,
|
||||
map);
|
||||
return pointId;
|
||||
}
|
||||
|
||||
private void extracted(MiniAddPointRequest request, LineInfoDO lineInfo, Long pointId, PointInfoDO pointInfo) {
|
||||
//推送铺位至三方平台
|
||||
BerthOperationRequest request1 = new BerthOperationRequest();
|
||||
request1.setOpType(OpTypeEnum.INSERT.getCode());
|
||||
@@ -922,14 +950,6 @@ public class PointServiceImpl implements PointService {
|
||||
request1.setAddress(pointInfo.getAddress());
|
||||
request1.setLocation(request.getLocation());
|
||||
thirdOpportunityService.berthOperation(request1);
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername", lineInfo.getUsername());
|
||||
map.put("partnerMobile", lineInfo.getMobile());
|
||||
map.put("pointName", pointInfo.getPointName());
|
||||
commonService.sendQWMessage(Collections.singletonList(shopInfo.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_51,
|
||||
map);
|
||||
return pointId;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.cool.store.dao.*;
|
||||
import com.cool.store.dto.Preparation.PreparationDTO;
|
||||
import com.cool.store.dto.Preparation.ScheduleDTO;
|
||||
import com.cool.store.dto.RegionNode;
|
||||
import com.cool.store.dto.ShopNameAndCodeDTO;
|
||||
import com.cool.store.dto.openPreparation.PlanLineDTO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.*;
|
||||
@@ -17,6 +18,7 @@ import com.cool.store.request.*;
|
||||
import com.cool.store.response.BranchShopDetailResponse;
|
||||
import com.cool.store.response.BranchShopResponse;
|
||||
import com.cool.store.response.MiniShopsResponse;
|
||||
import com.cool.store.response.ShopResponse;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.utils.NumberConverter;
|
||||
import com.cool.store.utils.RandomEightCharCodeUtils;
|
||||
@@ -128,7 +130,7 @@ public class ShopServiceImpl implements ShopService {
|
||||
Integer result = shopStageInfoDAO.initShopStageInfo(lineInfo.getId(), shopIds, true);
|
||||
//初始化平台账号
|
||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(lineInfo.getPartnerId());
|
||||
shopAccountDAO.initShopAccount(hyPartnerUserInfoDO,shopIds);
|
||||
shopAccountDAO.initShopAccount(hyPartnerUserInfoDO, shopIds);
|
||||
Set<String> publishFranchiseFeeUsers = new HashSet<>();
|
||||
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, lineInfo.getRegionId());
|
||||
if (Objects.nonNull(joinUser)) {
|
||||
@@ -352,7 +354,7 @@ public class ShopServiceImpl implements ShopService {
|
||||
}
|
||||
//初始化平台账号
|
||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(lineInfo.getPartnerId());
|
||||
shopAccountDAO.initShopAccount(hyPartnerUserInfoDO,Collections.singletonList(shopId));
|
||||
shopAccountDAO.initShopAccount(hyPartnerUserInfoDO, Collections.singletonList(shopId));
|
||||
return shopId;
|
||||
}
|
||||
|
||||
@@ -570,7 +572,39 @@ public class ShopServiceImpl implements ShopService {
|
||||
|
||||
@Override
|
||||
public List<MiniShopsResponse> getShopListSuccessOpen(Long lineId) {
|
||||
return shopInfoDAO.getShopListSuccessOpen(eid,lineId);
|
||||
return shopInfoDAO.getShopListSuccessOpen(eid, lineId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShopResponse getShopNameAndCode(Long shopId, Long lineId) {
|
||||
boolean flag = false;
|
||||
MiniShopsResponse shopInfo = shopInfoDAO.currentShopWhetherOpen(shopId,eid);
|
||||
ShopResponse response = new ShopResponse();
|
||||
if (Objects.nonNull(shopInfo)&&StringUtils.isNotBlank(shopInfo.getShopCode())) {
|
||||
ShopNameAndCodeDTO currentShop = new ShopNameAndCodeDTO();
|
||||
currentShop.setShopName(shopInfo.getShopName());
|
||||
currentShop.setShopCode(shopInfo.getShopCode());
|
||||
response.setCurrentShop(currentShop);
|
||||
flag = true;
|
||||
}
|
||||
List<MiniShopsResponse> shopList = shopInfoDAO.getShopListSuccessOpen(eid,lineId);
|
||||
List<ShopNameAndCodeDTO> list = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(shopList)) {
|
||||
for (MiniShopsResponse shopInfoDO : shopList) {
|
||||
ShopNameAndCodeDTO dto = new ShopNameAndCodeDTO();
|
||||
dto.setShopName(shopInfoDO.getShopName());
|
||||
dto.setShopCode(shopInfoDO.getShopCode());
|
||||
list.add(dto);
|
||||
}
|
||||
response.setShopList(list);
|
||||
flag = true;
|
||||
}
|
||||
if (flag) {
|
||||
return response;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.DownSystemTypeEnum;
|
||||
@@ -10,7 +13,9 @@ import com.cool.store.mapper.ApplyLicenseMapper;
|
||||
import com.cool.store.mapper.SignFranchiseMapper;
|
||||
import com.cool.store.request.ZxjpApiRequest;
|
||||
import com.cool.store.service.SyncDataService;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
import com.cool.store.utils.poi.constant.Constants;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -26,6 +31,7 @@ import java.util.stream.Collectors;
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class SyncDataServiceImpl implements SyncDataService {
|
||||
|
||||
@@ -106,7 +112,10 @@ public class SyncDataServiceImpl implements SyncDataService {
|
||||
request.setCrmAccount(lineInfoDO.getMobile());
|
||||
request.setDownstreamSystemPassword(hyPartnerUserInfoDO.getDownstreamSystemPassword());
|
||||
request.setDownstreamSystemSalt(hyPartnerUserInfoDO.getDownstreamSystemSalting());
|
||||
request.setCrmAccount(lineInfoDO.getMobile());
|
||||
if (StringUtils.isNotBlank(shopInfo.getFranchiseBrand())) {
|
||||
String[] split = shopInfo.getFranchiseBrand().split(Constants.COMMA);
|
||||
request.setFranchiseBrand(split[0]);
|
||||
}
|
||||
request.setFxyAccount(lineInfoDO.getMobile());
|
||||
request.setXzjAccount(shopInfo.getShopCode());
|
||||
request.setYlsAccount(shopInfo.getShopCode());
|
||||
@@ -117,7 +126,7 @@ public class SyncDataServiceImpl implements SyncDataService {
|
||||
if (systemType.equals(DownSystemTypeEnum.POS)) {
|
||||
if (buildInformationDO != null) {
|
||||
String brand = FranchiseBrandEnum.getDescByCode(shopInfo.getFranchiseBrand());
|
||||
request.setDownstreamSystemShopName(brand + "(" + buildInformationDO + ")");
|
||||
request.setDownstreamSystemShopName(brand + "(" + buildInformationDO.getCShopName() + ")");
|
||||
}
|
||||
}
|
||||
if (orderSysInfoDO != null) {
|
||||
@@ -154,34 +163,46 @@ public class SyncDataServiceImpl implements SyncDataService {
|
||||
request.setVerificationMobile(acceptanceInfoDO.getVerificationMobile());
|
||||
request.setKsAccount(acceptanceInfoDO.getKsAccount());
|
||||
}
|
||||
if (buildInformationDO!=null){
|
||||
if (buildInformationDO != null) {
|
||||
request.setBusinessHours(buildInformationDO.getBusinessHours());
|
||||
request.setShopContactName(buildInformationDO.getShopContactName());
|
||||
request.setBusinessMobile(buildInformationDO.getBusinessMobile());
|
||||
request.setSettlerName(buildInformationDO.getSettlerName());
|
||||
request.setSettlerBankPhotoUrl(buildInformationDO.getSettlerBankPhotoUrl());
|
||||
request.setSettlerBankBackPhotoUrl(buildInformationDO.getSettlerBankBackPhotoUrl());
|
||||
if (StringUtils.isNotBlank(buildInformationDO.getSettlerBankPhotoUrl())) {
|
||||
request.setSettlerBankPhotoUrl(getUrl(buildInformationDO.getSettlerBankPhotoUrl()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(buildInformationDO.getSettlerBankBackPhotoUrl())) {
|
||||
request.setSettlerBankBackPhotoUrl(getUrl(buildInformationDO.getSettlerBankBackPhotoUrl()));
|
||||
}
|
||||
request.setSettlerBankBranchName(buildInformationDO.getSettlerBankName());
|
||||
request.setSettlerBankNumber(buildInformationDO.getSettlerBankNumber());
|
||||
request.setSettlerBankMobile(buildInformationDO.getSettlerBankMobile());
|
||||
request.setSettlerIdCardFront(buildInformationDO.getSettlerIdCardFront());
|
||||
request.setSettlerIdCardReverse(buildInformationDO.getSettlerIdCardReverse());
|
||||
request.setSettlerInHandBackPicture(buildInformationDO.getSettlerInHandBackPicture());
|
||||
request.setSettlerInHandFrontPicture(buildInformationDO.getSettlerInHandFrontPicture());
|
||||
if (StringUtils.isNotBlank(buildInformationDO.getSettlerIdCardFront())) {
|
||||
request.setSettlerIdCardFront(getUrl(buildInformationDO.getSettlerIdCardFront()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(buildInformationDO.getSettlerIdCardReverse())) {
|
||||
request.setSettlerIdCardReverse(getUrl(buildInformationDO.getSettlerIdCardReverse()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(buildInformationDO.getSettlerInHandBackPicture())) {
|
||||
request.setSettlerInHandBackPicture(getUrl(buildInformationDO.getSettlerInHandBackPicture()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(buildInformationDO.getSettlerInHandFrontPicture())) {
|
||||
request.setSettlerInHandFrontPicture(getUrl(buildInformationDO.getSettlerInHandFrontPicture()));
|
||||
}
|
||||
request.setSettlerIdCardNo(buildInformationDO.getSettlerIdCardNo());
|
||||
|
||||
}
|
||||
if (licenseTransactDO != null){
|
||||
if (licenseTransactDO != null) {
|
||||
request.setCreditUrl(licenseTransactDO.getCreditUrl());
|
||||
//二证合一标识;0否 1 是
|
||||
if (Objects.equals(licenseTransactDO.getTwoCertificatesOne(), Constants.ONE_INTEGER)){
|
||||
if (Objects.equals(licenseTransactDO.getTwoCertificatesOne(), Constants.ONE_INTEGER)) {
|
||||
request.setFoodBusinessLicenseUrl(licenseTransactDO.getCreditUrl());
|
||||
}else {
|
||||
} else {
|
||||
request.setFoodBusinessLicenseUrl(licenseTransactDO.getFoodBusinessLicenseUrl());
|
||||
}
|
||||
}
|
||||
if (pointInfo!=null){
|
||||
request.setShopProvinceCityDistrict(pointInfo.getProvince()+pointInfo.getCity()+pointInfo.getDistrict());
|
||||
if (pointInfo != null) {
|
||||
request.setShopProvinceCityDistrict(pointInfo.getProvince() + pointInfo.getCity() + pointInfo.getDistrict());
|
||||
request.setShopLongitude(pointInfo.getLongitude());
|
||||
request.setShopLatitude(pointInfo.getLatitude());
|
||||
request.setShopAddress(pointInfo.getAddress());
|
||||
@@ -191,4 +212,23 @@ public class SyncDataServiceImpl implements SyncDataService {
|
||||
|
||||
return request;
|
||||
}
|
||||
|
||||
private static String getUrl(String json) {
|
||||
if (StringUtils.isBlank(json)) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
// 将 JSON 字符串解析为 JSONArray
|
||||
JSONArray jsonArray = JSONArray.parseArray(json);
|
||||
|
||||
// 获取第一个对象
|
||||
JSONObject jsonObject = jsonArray.getJSONObject(0);
|
||||
|
||||
// 提取 "url" 的值
|
||||
return jsonObject.getString("url");
|
||||
} catch (Exception e) {
|
||||
log.info("getUrl error:{},JSON:{}", e.getMessage(), json);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.controller.webc;
|
||||
|
||||
import com.cool.store.dto.GetUserDTO;
|
||||
import com.cool.store.dto.UserDTO;
|
||||
import com.cool.store.request.LinesRequest;
|
||||
import com.cool.store.request.UpdatePartnerNameRequest;
|
||||
@@ -75,11 +76,9 @@ public class LineController {
|
||||
}
|
||||
|
||||
@ApiOperation("查询所有人支持模糊查询")
|
||||
@GetMapping("/getAllUser")
|
||||
public ResponseResult<PageInfo<UserDTO>> getAllUser(@RequestParam("keyword")String keyword ,
|
||||
@RequestParam("pageNum")Integer pageNum,
|
||||
@RequestParam("pageSize")Integer pageSize ) {
|
||||
return ResponseResult.success(userAuthMappingService.getAllUser(keyword,pageNum,pageSize));
|
||||
@PostMapping("/getAllUser")
|
||||
public ResponseResult<PageInfo<UserDTO>> getAllUser(@RequestBody GetUserDTO dto) {
|
||||
return ResponseResult.success(userAuthMappingService.getAllUser(dto.getKeyword(),dto.getPageNum(),dto.getPageSize()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.response.MiniShopsResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.ShopResponse;
|
||||
import com.cool.store.service.PointService;
|
||||
import com.cool.store.service.ShopService;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
@@ -125,4 +126,11 @@ public class MiniShopController {
|
||||
request.setLineId(PartnerUserHolder.getUser().getLineId());
|
||||
return ResponseResult.success(pointService.getRecommendedOrMyPointList( request));
|
||||
}
|
||||
|
||||
@ApiOperation("给bot的门店信息")
|
||||
@GetMapping("/getShopNameAndCode")
|
||||
public ResponseResult<ShopResponse> getShopNameAndCode(@RequestParam("shopId")Long shopId, @RequestParam("lineId")Long lineId) {
|
||||
return ResponseResult.success(shopService.getShopNameAndCode(shopId,lineId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user