Merge branch 'cc_20250520_point' into 'master'
Cc 20250520 point See merge request hangzhou/java/custom_zxjp!94
This commit is contained in:
@@ -55,6 +55,7 @@
|
||||
where a.design_user_id = #{userId}
|
||||
and b.shop_sub_stage_status = 901
|
||||
and c.deleted = 0
|
||||
and c.shop_status !=2
|
||||
order by b.update_time desc
|
||||
</select>
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
where a.measure_user_id = #{measureUserId}
|
||||
and b.shop_sub_stage_status = 892
|
||||
and c.deleted = 0
|
||||
and c.shop_status !=2
|
||||
order by b.update_time desc
|
||||
</select>
|
||||
<select id="getShopIdListByDesignUserIdAndShopStage" resultType="com.cool.store.vo.desk.PreparationCommonPendingVO">
|
||||
@@ -75,6 +76,7 @@
|
||||
where a.design_user_id = #{userId}
|
||||
and b.shop_sub_stage_status = 900
|
||||
and c.deleted = 0
|
||||
and c.shop_status !=2
|
||||
order by b.update_time desc
|
||||
</select>
|
||||
<select id="getShopIdListByDesignUserIdOrQuotationAndShopStage" resultType="com.cool.store.vo.desk.PreparationCommonPendingVO">
|
||||
@@ -99,7 +101,7 @@
|
||||
left join xfsg_decoration_design_info d on a.shop_id = d.shop_id
|
||||
where
|
||||
((b.shop_sub_stage_status = 900 and a.design_user_id = #{userId}) or (b.shop_sub_stage_status = 901 and d.design_user_id = #{userId}))
|
||||
and c.deleted = 0
|
||||
and c.deleted = 0 and c.shop_status !=2
|
||||
order by b.update_time desc
|
||||
|
||||
</select>
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
left join xfsg_shop_info b on a.shop_id = b.id
|
||||
where
|
||||
b.deleted=0
|
||||
and b.shop_status !=2
|
||||
and a.operator = #{userId}
|
||||
and a.shop_sub_stage_status in
|
||||
<foreach collection="list" index="index" item="item" open="(" close=")" separator=",">
|
||||
|
||||
@@ -305,7 +305,7 @@
|
||||
from xfsg_shop_stage_info a
|
||||
left join xfsg_shop_info si on a.shop_id = si.id
|
||||
<where>
|
||||
si.deleted = 0 and a.is_terminated = 0
|
||||
si.deleted = 0 and a.is_terminated = 0 and si.shop_status !=2
|
||||
<if test="shopIds != null and shopIds.size() > 0">
|
||||
and a.shop_id in
|
||||
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
||||
|
||||
@@ -16,6 +16,8 @@ import java.util.Objects;
|
||||
@Data
|
||||
public class AddPointDetailRequest {
|
||||
|
||||
private Long shopId;
|
||||
private Long lineId;
|
||||
@NotBlank(message = "铺位名称不能为空")
|
||||
@ApiModelProperty("铺位名称")
|
||||
private String pointName;
|
||||
|
||||
@@ -42,7 +42,6 @@ public class MiniAddPointRequest {
|
||||
@ApiModelProperty("详细地址")
|
||||
private String address;
|
||||
|
||||
@NotNull
|
||||
@Min(1)
|
||||
@Max(2)
|
||||
@ApiModelProperty("经营状况 1营业中 2空铺")
|
||||
@@ -57,7 +56,6 @@ public class MiniAddPointRequest {
|
||||
@ApiModelProperty("支付方式 1.月付 2.季付 3.半年付 4.年付")
|
||||
private Integer paymentMethod;
|
||||
|
||||
@NotBlank
|
||||
@ApiModelProperty("转让费")
|
||||
private String transferFee;
|
||||
|
||||
@@ -105,6 +103,9 @@ public class MiniAddPointRequest {
|
||||
@ApiModelProperty("铺位经纬度geohash")
|
||||
private String location;
|
||||
|
||||
@ApiModelProperty("门店月房租")
|
||||
private String monthRent;
|
||||
|
||||
public static PointDetailInfoDO convertDO(MiniAddPointRequest request) {
|
||||
PointDetailInfoDO result = new PointDetailInfoDO();
|
||||
result.setBusinessStatus(request.getBusinessStatus());
|
||||
@@ -113,6 +114,7 @@ public class MiniAddPointRequest {
|
||||
result.setPictureObj(request.getPictureObj());
|
||||
result.setLineSign(request.getLineSign());
|
||||
result.setLineSignTime(new Date());
|
||||
result.setMonthRent(request.getMonthRent());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import java.util.Date;
|
||||
@Data
|
||||
public class BranchShopDetailResponse {
|
||||
|
||||
private Long lineId;
|
||||
@ApiModelProperty("加盟商名称")
|
||||
private String username;
|
||||
|
||||
|
||||
@@ -104,8 +104,19 @@ public class PointServiceImpl implements PointService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long addPointDetailInfo(AddPointDetailRequest shopPointDetailRequest, LoginUserInfo user) {
|
||||
Long shopId = shopPointDetailRequest.getShopId();
|
||||
Long lineId = shopPointDetailRequest.getLineId();
|
||||
String userId = user.getUserId();
|
||||
PointInfoDO pointInfo = AddPointDetailRequest.convertPointDO(shopPointDetailRequest);
|
||||
if (shopId != null) {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
if (Objects.isNull(shopInfo)){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_ID_NOT_EXIST);
|
||||
}
|
||||
pointInfo.setSelectStatus(SelectStatusEnum.SELECT_STATUS_1.getCode());
|
||||
pointInfo.setShopId(shopId);
|
||||
pointInfo.setLineId(lineId);
|
||||
}
|
||||
pointInfo.setPointCode(generateCode());
|
||||
pointInfo.setPointLocation(shopPointDetailRequest.getLocation());
|
||||
pointInfo.setDevelopmentManager(userId);
|
||||
@@ -114,13 +125,25 @@ public class PointServiceImpl implements PointService {
|
||||
PointDetailInfoDO shopPoint = AddPointDetailRequest.convertDO(shopPointDetailRequest);
|
||||
shopPoint.setPointId(pointId);
|
||||
pointDetailInfoDAO.addPointDetailInfo(shopPoint);
|
||||
if (shopId !=null){
|
||||
PointRecommendDO pointRecommendDO = new PointRecommendDO();
|
||||
pointRecommendDO.setLineId(lineId);
|
||||
pointRecommendDO.setShopId(shopId);
|
||||
pointRecommendDO.setDevelopmentManager(userId);
|
||||
pointRecommendDO.setPointId(pointId);
|
||||
pointRecommendDO.setStatus(PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_2.getCode());
|
||||
//推荐列表新增
|
||||
pointRecommendDAO.addRecommendPoint(Lists.newArrayList(pointRecommendDO));
|
||||
//更新店铺所处阶段
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_11);
|
||||
}
|
||||
//推送铺位至三方平台
|
||||
if (StringUtils.isNotBlank(shopPointDetailRequest.getOpportunityPointCode())) {
|
||||
BerthOperationRequest request1 = new BerthOperationRequest();
|
||||
request1.setOpType(OpTypeEnum.INSERT.getCode());
|
||||
request1.setCode(shopPointDetailRequest.getOpportunityPointCode());
|
||||
request1.setUserId(userId);
|
||||
request1.setMobile(StringUtils.isNotBlank(user.getMobile())?user.getMobile():"");
|
||||
request1.setMobile(StringUtils.isNotBlank(user.getMobile()) ? user.getMobile() : "");
|
||||
if (StringUtils.isBlank(user.getName())) {
|
||||
if (StringUtils.isNotBlank(user.getMobile()) && user.getMobile().length() >= 4) {
|
||||
// 获取后4位
|
||||
@@ -194,7 +217,7 @@ public class PointServiceImpl implements PointService {
|
||||
request1.setUserName(user.getName());
|
||||
} else {
|
||||
request1.setUserId(lineInfoDO.getPartnerId());
|
||||
request1.setMobile(StringUtils.isNotBlank(lineInfoDO.getMobile())?lineInfoDO.getMobile():"");
|
||||
request1.setMobile(StringUtils.isNotBlank(lineInfoDO.getMobile()) ? lineInfoDO.getMobile() : "");
|
||||
request1.setUserName(lineInfoDO.getUsername());
|
||||
}
|
||||
request1.setOpType(OpTypeEnum.UPDATE.getCode());
|
||||
@@ -350,7 +373,7 @@ public class PointServiceImpl implements PointService {
|
||||
if (StringUtils.isAnyBlank(pointInfo.getPointArea(), pointInfo.getLatitude(),
|
||||
pointInfo.getLongitude(), pointInfo.getAddress(), pointInfo.getProvince(), pointInfo.getCity(),
|
||||
pointInfo.getDistrict(), pointDetailInfoDO.getMonthRent()
|
||||
)) {
|
||||
)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -841,16 +864,16 @@ public class PointServiceImpl implements PointService {
|
||||
throw new ServiceException(ErrorCodeEnum.POINT_IS_SELECTED);
|
||||
}
|
||||
PointInfoDO updatePoint = new PointInfoDO();
|
||||
if (StringUtils.isNotBlank(shopInfo.getProvince())){
|
||||
if (StringUtils.isNotBlank(shopInfo.getProvince())) {
|
||||
updatePoint.setProvince(shopInfo.getProvince());
|
||||
}
|
||||
if (StringUtils.isNotBlank(shopInfo.getCity())){
|
||||
if (StringUtils.isNotBlank(shopInfo.getCity())) {
|
||||
updatePoint.setCity(shopInfo.getCity());
|
||||
}
|
||||
if (StringUtils.isNotBlank(shopInfo.getDistrict())){
|
||||
if (StringUtils.isNotBlank(shopInfo.getDistrict())) {
|
||||
updatePoint.setDistrict(shopInfo.getDistrict());
|
||||
}
|
||||
if (StringUtils.isNotBlank(shopInfo.getDetailAddress())){
|
||||
if (StringUtils.isNotBlank(shopInfo.getDetailAddress())) {
|
||||
updatePoint.setAddress(shopInfo.getDetailAddress());
|
||||
}
|
||||
updatePoint.setId(pointId);
|
||||
@@ -962,16 +985,17 @@ public class PointServiceImpl implements PointService {
|
||||
//更新店铺所处阶段
|
||||
shopStageInfoDAO.updateShopStageInfo(shopInfo.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_11);
|
||||
PointInfoDO updatePoint = new PointInfoDO();
|
||||
if (StringUtils.isNotBlank(shopInfo.getProvince())){
|
||||
//如果合同已经签署此时门店已有省市区和详细地址,直接赋值这个地址,经纬度不改
|
||||
if (StringUtils.isNotBlank(shopInfo.getProvince())) {
|
||||
updatePoint.setProvince(shopInfo.getProvince());
|
||||
}
|
||||
if (StringUtils.isNotBlank(shopInfo.getCity())){
|
||||
if (StringUtils.isNotBlank(shopInfo.getCity())) {
|
||||
updatePoint.setCity(shopInfo.getCity());
|
||||
}
|
||||
if (StringUtils.isNotBlank(shopInfo.getDistrict())){
|
||||
if (StringUtils.isNotBlank(shopInfo.getDistrict())) {
|
||||
updatePoint.setDistrict(shopInfo.getDistrict());
|
||||
}
|
||||
if (StringUtils.isNotBlank(shopInfo.getDetailAddress())){
|
||||
if (StringUtils.isNotBlank(shopInfo.getDetailAddress())) {
|
||||
updatePoint.setAddress(shopInfo.getDetailAddress());
|
||||
}
|
||||
updatePoint.setId(pointId);
|
||||
@@ -996,7 +1020,7 @@ public class PointServiceImpl implements PointService {
|
||||
request1.setOpType(OpTypeEnum.INSERT.getCode());
|
||||
request1.setCode(request.getOpportunityPointCode());
|
||||
request1.setUserId(lineInfo.getPartnerId());
|
||||
request1.setMobile(StringUtils.isNotBlank(lineInfo.getMobile())?lineInfo.getMobile():"");
|
||||
request1.setMobile(StringUtils.isNotBlank(lineInfo.getMobile()) ? lineInfo.getMobile() : "");
|
||||
if (StringUtils.isBlank(lineInfo.getUsername())) {
|
||||
if (StringUtils.isNotBlank(lineInfo.getMobile()) && lineInfo.getMobile().length() >= 4) {
|
||||
// 获取后4位
|
||||
|
||||
@@ -386,6 +386,7 @@ public class ShopServiceImpl implements ShopService {
|
||||
response.setUsername(lineInfo.getUsername());
|
||||
response.setMobile(lineInfo.getMobile());
|
||||
response.setShopId(shopId);
|
||||
response.setLineId(lineInfo.getId());
|
||||
response.setShopName(shopInfo.getShopName());
|
||||
response.setJoinMode(shopInfo.getJoinMode());
|
||||
response.setShopCode(shopInfo.getShopCode());
|
||||
|
||||
Reference in New Issue
Block a user