选址阶段
This commit is contained in:
@@ -91,6 +91,8 @@ public enum ErrorCodeEnum {
|
||||
NOT_ALLOW_MODIFY_WANT_SHOP_NUM(600006, "当前阶段不允许直接修改意向开店数量", null),
|
||||
USER_NOT_ALLOW_ENTER_ROOM(600007, "当前用户不允许进入面试房间", null),
|
||||
|
||||
SHOP_STAGE_ERROR(600008, "店铺阶段错误", null),
|
||||
|
||||
INTERVIEW_ENTER_FAIL(1021101, "进入面审间失败", null),
|
||||
DINGDING_USER_NOT_EXIST(1021102, "用户钉钉信息不存在,无法发起资质审核!", null),
|
||||
INTERVIEW_NOT_EXIST(1021103, "面审信息不存在!", null),
|
||||
|
||||
@@ -12,63 +12,63 @@ import java.util.List;
|
||||
public enum ShopSubStageStatusEnum {
|
||||
|
||||
//选址
|
||||
SHOP_SUB_STAGE_STATUS_0(ShopSubStageEnum.SHOP_STAGE_1, 100, "待选址"),
|
||||
SHOP_SUB_STAGE_STATUS_1(ShopSubStageEnum.SHOP_STAGE_1, 110, "已选址"),
|
||||
SHOP_SUB_STAGE_STATUS_0(ShopSubStageEnum.SHOP_STAGE_1, 100, "待选址", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_1(ShopSubStageEnum.SHOP_STAGE_1, 110, "已选址", Boolean.TRUE),
|
||||
|
||||
//上传租赁合同
|
||||
SHOP_SUB_STAGE_STATUS_2(ShopSubStageEnum.SHOP_STAGE_2, 200, "待上传"),
|
||||
SHOP_SUB_STAGE_STATUS_3(ShopSubStageEnum.SHOP_STAGE_2, 210, "已上传"),
|
||||
SHOP_SUB_STAGE_STATUS_4(ShopSubStageEnum.SHOP_STAGE_2, 220, "审核未通过"),
|
||||
SHOP_SUB_STAGE_STATUS_5(ShopSubStageEnum.SHOP_STAGE_2, 230, "审核通过"),
|
||||
SHOP_SUB_STAGE_STATUS_2(ShopSubStageEnum.SHOP_STAGE_2, 200, "待上传", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_3(ShopSubStageEnum.SHOP_STAGE_2, 210, "已上传", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_4(ShopSubStageEnum.SHOP_STAGE_2, 220, "审核未通过", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_5(ShopSubStageEnum.SHOP_STAGE_2, 230, "审核通过", Boolean.TRUE),
|
||||
|
||||
//系统建店
|
||||
SHOP_SUB_STAGE_STATUS_6(ShopSubStageEnum.SHOP_STAGE_3, 300, "待建店"),
|
||||
SHOP_SUB_STAGE_STATUS_7(ShopSubStageEnum.SHOP_STAGE_3, 310, "审核中"),
|
||||
SHOP_SUB_STAGE_STATUS_8(ShopSubStageEnum.SHOP_STAGE_3, 320, "未通过"),
|
||||
SHOP_SUB_STAGE_STATUS_9(ShopSubStageEnum.SHOP_STAGE_3, 330, "已通过"),
|
||||
SHOP_SUB_STAGE_STATUS_6(ShopSubStageEnum.SHOP_STAGE_3, 300, "待建店", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_7(ShopSubStageEnum.SHOP_STAGE_3, 310, "审核中", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_8(ShopSubStageEnum.SHOP_STAGE_3, 320, "未通过", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_9(ShopSubStageEnum.SHOP_STAGE_3, 330, "已通过", Boolean.TRUE),
|
||||
|
||||
//证照办理
|
||||
SHOP_SUB_STAGE_STATUS_10(ShopSubStageEnum.SHOP_STAGE_4, 400, "待提交"),
|
||||
SHOP_SUB_STAGE_STATUS_11(ShopSubStageEnum.SHOP_STAGE_4, 410, "待审核"),
|
||||
SHOP_SUB_STAGE_STATUS_12(ShopSubStageEnum.SHOP_STAGE_4, 420, "审核未通过"),
|
||||
SHOP_SUB_STAGE_STATUS_13(ShopSubStageEnum.SHOP_STAGE_4, 430, "审核通过"),
|
||||
SHOP_SUB_STAGE_STATUS_10(ShopSubStageEnum.SHOP_STAGE_4, 400, "待提交", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_11(ShopSubStageEnum.SHOP_STAGE_4, 410, "待审核", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_12(ShopSubStageEnum.SHOP_STAGE_4, 420, "审核未通过", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_13(ShopSubStageEnum.SHOP_STAGE_4, 430, "审核通过", Boolean.TRUE),
|
||||
|
||||
//员工招聘
|
||||
SHOP_SUB_STAGE_STATUS_14(ShopSubStageEnum.SHOP_STAGE_5, 500, "招聘中"),
|
||||
SHOP_SUB_STAGE_STATUS_15(ShopSubStageEnum.SHOP_STAGE_5, 510, "已完成"),
|
||||
SHOP_SUB_STAGE_STATUS_14(ShopSubStageEnum.SHOP_STAGE_5, 500, "招聘中", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_15(ShopSubStageEnum.SHOP_STAGE_5, 510, "已完成", Boolean.TRUE),
|
||||
|
||||
//加盟商/员工培训
|
||||
SHOP_SUB_STAGE_STATUS_16(ShopSubStageEnum.SHOP_STAGE_6, 600, "培训中"),
|
||||
SHOP_SUB_STAGE_STATUS_17(ShopSubStageEnum.SHOP_STAGE_6, 610, "已完成"),
|
||||
SHOP_SUB_STAGE_STATUS_16(ShopSubStageEnum.SHOP_STAGE_6, 600, "培训中", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_17(ShopSubStageEnum.SHOP_STAGE_6, 610, "已完成", Boolean.TRUE),
|
||||
|
||||
//缴纳加盟费/保证金
|
||||
SHOP_SUB_STAGE_STATUS_18(ShopSubStageEnum.SHOP_STAGE_7, 700, "待缴费"),
|
||||
SHOP_SUB_STAGE_STATUS_19(ShopSubStageEnum.SHOP_STAGE_7, 710, "已缴费"),
|
||||
SHOP_SUB_STAGE_STATUS_20(ShopSubStageEnum.SHOP_STAGE_7, 720, "缴费失败"),
|
||||
SHOP_SUB_STAGE_STATUS_18(ShopSubStageEnum.SHOP_STAGE_7, 700, "待缴费", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_19(ShopSubStageEnum.SHOP_STAGE_7, 710, "已缴费", Boolean.TRUE),
|
||||
SHOP_SUB_STAGE_STATUS_20(ShopSubStageEnum.SHOP_STAGE_7, 720, "缴费失败", Boolean.FALSE),
|
||||
|
||||
//加盟合同签约
|
||||
SHOP_SUB_STAGE_STATUS_21(ShopSubStageEnum.SHOP_STAGE_8, 800, "待提交"),
|
||||
SHOP_SUB_STAGE_STATUS_22(ShopSubStageEnum.SHOP_STAGE_8, 810, "信息核对"),
|
||||
SHOP_SUB_STAGE_STATUS_23(ShopSubStageEnum.SHOP_STAGE_8, 820, "待加盟商签约"),
|
||||
SHOP_SUB_STAGE_STATUS_24(ShopSubStageEnum.SHOP_STAGE_8, 830, "审核中"),
|
||||
SHOP_SUB_STAGE_STATUS_25(ShopSubStageEnum.SHOP_STAGE_8, 840, "已签约"),
|
||||
SHOP_SUB_STAGE_STATUS_26(ShopSubStageEnum.SHOP_STAGE_8, 850, "退回"),
|
||||
SHOP_SUB_STAGE_STATUS_21(ShopSubStageEnum.SHOP_STAGE_8, 800, "待提交", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_22(ShopSubStageEnum.SHOP_STAGE_8, 810, "信息核对", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_23(ShopSubStageEnum.SHOP_STAGE_8, 820, "待加盟商签约", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_24(ShopSubStageEnum.SHOP_STAGE_8, 830, "审核中", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_25(ShopSubStageEnum.SHOP_STAGE_8, 840, "已签约", Boolean.TRUE),
|
||||
SHOP_SUB_STAGE_STATUS_26(ShopSubStageEnum.SHOP_STAGE_8, 850, "退回", Boolean.FALSE),
|
||||
|
||||
//设计阶段
|
||||
SHOP_SUB_STAGE_STATUS_27(ShopSubStageEnum.SHOP_STAGE_9, 900, "进行中"),
|
||||
SHOP_SUB_STAGE_STATUS_28(ShopSubStageEnum.SHOP_STAGE_9, 910, "已完成"),
|
||||
SHOP_SUB_STAGE_STATUS_27(ShopSubStageEnum.SHOP_STAGE_9, 900, "进行中", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_28(ShopSubStageEnum.SHOP_STAGE_9, 910, "已完成", Boolean.TRUE),
|
||||
|
||||
//施工阶段
|
||||
SHOP_SUB_STAGE_STATUS_32(ShopSubStageEnum.SHOP_STAGE_10, 1000, "待施工"),
|
||||
SHOP_SUB_STAGE_STATUS_33(ShopSubStageEnum.SHOP_STAGE_10, 1010, "施工中"),
|
||||
SHOP_SUB_STAGE_STATUS_34(ShopSubStageEnum.SHOP_STAGE_10, 1020, "已完成"),
|
||||
SHOP_SUB_STAGE_STATUS_32(ShopSubStageEnum.SHOP_STAGE_10, 1000, "待施工", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_33(ShopSubStageEnum.SHOP_STAGE_10, 1010, "施工中", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_34(ShopSubStageEnum.SHOP_STAGE_10, 1020, "已完成", Boolean.TRUE),
|
||||
|
||||
//三方验收
|
||||
SHOP_SUB_STAGE_STATUS_35(ShopSubStageEnum.SHOP_STAGE_11, 1100, "待预约"),
|
||||
SHOP_SUB_STAGE_STATUS_36(ShopSubStageEnum.SHOP_STAGE_11, 1110, "待确认"),
|
||||
SHOP_SUB_STAGE_STATUS_37(ShopSubStageEnum.SHOP_STAGE_11, 1120, "待验收"),
|
||||
SHOP_SUB_STAGE_STATUS_38(ShopSubStageEnum.SHOP_STAGE_11, 1130, "验收中"),
|
||||
SHOP_SUB_STAGE_STATUS_39(ShopSubStageEnum.SHOP_STAGE_11, 1140, "已验收"),
|
||||
SHOP_SUB_STAGE_STATUS_35(ShopSubStageEnum.SHOP_STAGE_11, 1100, "待预约", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_36(ShopSubStageEnum.SHOP_STAGE_11, 1110, "待确认", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_37(ShopSubStageEnum.SHOP_STAGE_11, 1120, "待验收", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_38(ShopSubStageEnum.SHOP_STAGE_11, 1130, "验收中", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_39(ShopSubStageEnum.SHOP_STAGE_11, 1140, "已验收", Boolean.TRUE),
|
||||
|
||||
|
||||
;
|
||||
@@ -79,11 +79,14 @@ public enum ShopSubStageStatusEnum {
|
||||
|
||||
private String shopSubStageStatusName;
|
||||
|
||||
private boolean isTerminated;
|
||||
|
||||
ShopSubStageStatusEnum(ShopSubStageEnum shopSubStageEnum, Integer shopSubStageStatus, String shopSubStageStatusName) {
|
||||
|
||||
ShopSubStageStatusEnum(ShopSubStageEnum shopSubStageEnum, Integer shopSubStageStatus, String shopSubStageStatusName, Boolean isTerminated) {
|
||||
this.shopSubStageEnum = shopSubStageEnum;
|
||||
this.shopSubStageStatus = shopSubStageStatus;
|
||||
this.shopSubStageStatusName = shopSubStageStatusName;
|
||||
this.isTerminated = isTerminated;
|
||||
}
|
||||
|
||||
public static List<ShopSubStageStatusEnum> getShopSubStageStatusEnum(ShopSubStageEnum shopSubStage) {
|
||||
@@ -111,4 +114,8 @@ public enum ShopSubStageStatusEnum {
|
||||
public String getShopSubStageName() {
|
||||
return shopSubStageEnum.getShopSubStageName();
|
||||
}
|
||||
|
||||
public boolean isTerminated() {
|
||||
return isTerminated;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,8 +48,10 @@ public class ShopStageInfoDAO {
|
||||
shopStageInfo.setShopId(shopId);
|
||||
shopStageInfo.setShopStage(shopStage);
|
||||
shopStageInfo.setShopSubStage(shopSubStageEnum.getShopSubStage());
|
||||
shopStageInfo.setShopSubStageStatus(shopSubStageEnum.getInitStatus().getShopSubStageStatus());
|
||||
ShopSubStageStatusEnum initStatus = shopSubStageEnum.getInitStatus();
|
||||
shopStageInfo.setShopSubStageStatus(initStatus.getShopSubStageStatus());
|
||||
shopStageInfo.setRemark(shopSubStageEnum.getShopSubStageName() + CommonConstants.PATH_BAR +shopSubStageEnum.getInitStatus().getShopSubStageStatusName());
|
||||
shopStageInfo.setIsTerminated(initStatus.isTerminated());
|
||||
addShopStageList.add(shopStageInfo);
|
||||
}
|
||||
}
|
||||
@@ -61,11 +63,11 @@ public class ShopStageInfoDAO {
|
||||
* @param shopId
|
||||
* @return
|
||||
*/
|
||||
public List<ShopStageInfoDO> getShopStageInfo(Long shopId) {
|
||||
public List<ShopStageInfoDO> getShopStageInfo(Long shopId, Integer shopStage) {
|
||||
if(Objects.isNull(shopId)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return shopStageInfoMapper.getShopStageInfo(shopId);
|
||||
return shopStageInfoMapper.getShopStageInfo(shopId, shopStage);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -79,7 +81,8 @@ public class ShopStageInfoDAO {
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
String remark = shopStageInfo.getShopSubStageName() + CommonConstants.PATH_BAR +shopStageInfo.getShopSubStageStatusName();
|
||||
return shopStageInfoMapper.updateShopStageInfo(shopId, shopStageInfo.getShopSubStageEnum().getShopSubStage(), shopStageInfo.getShopSubStageStatus(), remark);
|
||||
boolean isTerminated = shopStageInfo.isTerminated();
|
||||
return shopStageInfoMapper.updateShopStageInfo(shopId, shopStageInfo.getShopSubStageEnum().getShopSubStage(), shopStageInfo.getShopSubStageStatus(), isTerminated, remark);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,17 +18,20 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
|
||||
/**
|
||||
* 获取店铺阶段信息
|
||||
* @param shopId
|
||||
* @param shopStage
|
||||
* @return
|
||||
*/
|
||||
List<ShopStageInfoDO> getShopStageInfo(@Param("shopId") Long shopId);
|
||||
List<ShopStageInfoDO> getShopStageInfo(@Param("shopId") Long shopId, @Param("shopStage") Integer shopStage);
|
||||
|
||||
/**
|
||||
* 跟新店铺阶段信息
|
||||
* @param shopId
|
||||
* @param shopSubStage
|
||||
* @param shopSubStageStatus
|
||||
* @param isTerminated
|
||||
* @param remark
|
||||
* @return
|
||||
*/
|
||||
Integer updateShopStageInfo(@Param("shopId") Long shopId, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus, @Param("remark") String remark);
|
||||
Integer updateShopStageInfo(@Param("shopId") Long shopId, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus,
|
||||
@Param("isTerminated")boolean isTerminated, @Param("remark") String remark);
|
||||
}
|
||||
@@ -42,45 +42,51 @@
|
||||
</select>
|
||||
<select id="getMyPointPage" resultMap="BaseResultMap">
|
||||
select
|
||||
pi.id,
|
||||
pi.point_name,
|
||||
pi.point_code,
|
||||
pi.address,
|
||||
pi.region_id,
|
||||
pi.point_status,
|
||||
pi.point_score,
|
||||
pi.point_area,
|
||||
pi.development_manager,
|
||||
pi.operate_user_id,
|
||||
pi.development_time,
|
||||
pi.select_status,
|
||||
pi.create_time,
|
||||
pi.update_time
|
||||
from xfsg_point_info pi
|
||||
where pi.deleted = 0 and pi.development_manager = #{request.developmentManager}
|
||||
id,
|
||||
point_name,
|
||||
point_code,
|
||||
address,
|
||||
region_id,
|
||||
point_status,
|
||||
point_score,
|
||||
point_area,
|
||||
development_manager,
|
||||
operate_user_id,
|
||||
development_time,
|
||||
select_status,
|
||||
create_time,
|
||||
update_time
|
||||
from xfsg_point_info
|
||||
where deleted = 0 and development_manager = #{request.developmentManager}
|
||||
<if test="request.keyword != null and request.keyword != ''">
|
||||
and (pi.point_code like concat('%', #{request.keyword}, '%') or pi.point_name like concat('%', #{request.keyword}, '%'))
|
||||
and (point_code like concat('%', #{request.keyword}, '%') or point_name like concat('%', #{request.keyword}, '%'))
|
||||
</if>
|
||||
<if test="request.developmentStartTime != null and request.developmentStartTime != ''">
|
||||
and pi.development_time >= #{request.developmentStartTime}
|
||||
and development_time >= #{request.developmentStartTime}
|
||||
</if>
|
||||
<if test="request.developmentEndTime != null and request.developmentEndTime != ''">
|
||||
<![CDATA[and pi.development_time <= #{request.developmentEndTime}]]>
|
||||
<![CDATA[and development_time <= #{request.developmentEndTime}]]>
|
||||
</if>
|
||||
<if test="request.pointStatusList != null and request.pointStatusList.size() > 0">
|
||||
and pi.point_status in
|
||||
and point_status in
|
||||
<foreach collection="request.pointStatusList" item="pointStatus" open="(" close=")" separator=",">
|
||||
#{pointStatus}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.storageStatus != null and request.storageStatus == 1">
|
||||
and pi.point_status in (4,5,6,7)
|
||||
and point_status in (4,5,6,7)
|
||||
</if>
|
||||
<if test="request.storageStatus != null and request.storageStatus == 2">
|
||||
and pi.point_status in (1,2,3,7)
|
||||
and point_status in (1,2,3,7)
|
||||
</if>
|
||||
<if test="request.operateUserId != null and request.operateUserId != ''">
|
||||
and pi.operate_user_id = #{request.operateUserId}
|
||||
and operate_user_id = #{request.operateUserId}
|
||||
</if>
|
||||
<if test="request.createStartTime != null and request.createStartTime != ''">
|
||||
and create_time >= #{request.createStartTime}
|
||||
</if>
|
||||
<if test="request.createEndTime != null and request.createEndTime != ''">
|
||||
<![CDATA[and create_time <= #{request.createEndTime}]]>
|
||||
</if>
|
||||
</select>
|
||||
<select id="getSelectedShopNum" resultType="com.cool.store.dto.point.LineCountDTO">
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<result column="shop_stage" jdbcType="TINYINT" property="shopStage" />
|
||||
<result column="shop_sub_stage" jdbcType="TINYINT" property="shopSubStage" />
|
||||
<result column="shop_sub_stage_status" jdbcType="TINYINT" property="shopSubStageStatus" />
|
||||
<result column="is_terminated" jdbcType="BIT" property="isTerminated" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
@@ -15,13 +16,13 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="allColumn">
|
||||
id, line_id, shop_id, shop_stage, shop_sub_stage, shop_sub_stage_status, remark, deleted, create_time, update_time
|
||||
id, line_id, shop_id, shop_stage, shop_sub_stage, shop_sub_stage_status, is_terminated, remark, deleted, create_time, update_time
|
||||
</sql>
|
||||
|
||||
<insert id="batchInsert">
|
||||
<foreach collection="addShopStageList" separator=";" item="shop">
|
||||
INSERT INTO xfsg_shop_stage_info(line_id, shop_id, shop_stage, shop_sub_stage, shop_sub_stage_status, remark)
|
||||
VALUES(#{shop.lineId}, #{shop.shopId}, #{shop.shopStage}, #{shop.shopSubStage}, #{shop.shopSubStageStatus}, #{shop.remark})
|
||||
INSERT INTO xfsg_shop_stage_info(line_id, shop_id, shop_stage, shop_sub_stage, shop_sub_stage_status, is_terminated, remark)
|
||||
VALUES(#{shop.lineId}, #{shop.shopId}, #{shop.shopStage}, #{shop.shopSubStage}, #{shop.shopSubStageStatus}, #{shop.isTerminated}, #{shop.remark})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
@@ -32,10 +33,13 @@
|
||||
xfsg_shop_stage_info
|
||||
where
|
||||
shop_id = #{shopId} and deleted = 0
|
||||
<if test="shopStage != null">
|
||||
and shop_stage = #{shopStage}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<update id="updateShopStageInfo">
|
||||
update xfsg_shop_stage_info set shop_sub_stage_status = #{shopSubStageStatus}, remark = #{remark} where shop_id = #{shopId} and shop_sub_stage = #{shopSubStage}
|
||||
update xfsg_shop_stage_info set shop_sub_stage_status = #{shopSubStageStatus}, is_terminated = #{isTerminated}, remark = #{remark} where shop_id = #{shopId} and shop_sub_stage = #{shopSubStage}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -39,6 +39,12 @@ public class ShopStageInfoDO {
|
||||
@Column(name = "shop_sub_stage_status")
|
||||
private Integer shopSubStageStatus;
|
||||
|
||||
/**
|
||||
* 当前阶段是否结束 0未结束 1已结束
|
||||
*/
|
||||
@Column(name = "is_terminated")
|
||||
private Boolean isTerminated;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
||||
@@ -42,6 +42,12 @@ public class PointPageRequest extends PageBasicInfo {
|
||||
@ApiModelProperty("1.采集中、2.已评估、3.待审核、5.已审核、6.已签约、7.已失效")
|
||||
private Integer pointStatus;
|
||||
|
||||
@ApiModelProperty("创建时间-开始")
|
||||
private String createStartTime;
|
||||
|
||||
@ApiModelProperty("创建时间-结束")
|
||||
private String createEndTime;
|
||||
|
||||
@ApiModelProperty(value = "铺位状态列表", hidden = true)
|
||||
private List<Integer> pointStatusList;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.cool.store.request;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@@ -20,7 +21,7 @@ public class UpdateWantShopNumRequest {
|
||||
private Long lineId;
|
||||
|
||||
@NotNull
|
||||
@Min(1)
|
||||
@Min(1)@Max(10)
|
||||
@ApiModelProperty("意向开店数量")
|
||||
private Integer wantShopNum;
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.cool.store.vo.shop;
|
||||
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: MiniHomePageShopVO
|
||||
* @Description:
|
||||
* @date 2024-04-11 16:50
|
||||
*/
|
||||
@Data
|
||||
public class MiniShopPageVO {
|
||||
|
||||
@ApiModelProperty("店铺id")
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty("店铺名称")
|
||||
private String shopName;
|
||||
|
||||
|
||||
public MiniShopPageVO(Long shopId, String shopName) {
|
||||
this.shopId = shopId;
|
||||
this.shopName = shopName;
|
||||
}
|
||||
|
||||
public static List<MiniShopPageVO> convertList(List<ShopInfoDO> shopInfoList) {
|
||||
List<MiniShopPageVO> resultList = new ArrayList<>();
|
||||
for (ShopInfoDO shopInfo : shopInfoList) {
|
||||
resultList.add(new MiniShopPageVO(shopInfo.getId(), shopInfo.getShopName()));
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.cool.store.vo.shop;
|
||||
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
import com.google.common.collect.Lists;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: ShopStageInfoVO
|
||||
* @Description:
|
||||
* @date 2024-04-11 17:10
|
||||
*/
|
||||
@Data
|
||||
public class ShopStageInfoVO {
|
||||
|
||||
@ApiModelProperty("店铺阶段")
|
||||
private Integer shopStage;
|
||||
|
||||
@ApiModelProperty("店铺子阶段")
|
||||
private Integer shopSubStage;
|
||||
|
||||
@ApiModelProperty("店铺阶段状态")
|
||||
private Integer shopSubStageStatus;
|
||||
|
||||
@ApiModelProperty("当前阶段是否结束 0未结束 1已结束")
|
||||
private Boolean isTerminated;
|
||||
|
||||
public ShopStageInfoVO(Integer shopStage, Integer shopSubStage, Integer shopSubStageStatus, Boolean isTerminated) {
|
||||
this.shopStage = shopStage;
|
||||
this.shopSubStage = shopSubStage;
|
||||
this.shopSubStageStatus = shopSubStageStatus;
|
||||
this.isTerminated = isTerminated;
|
||||
}
|
||||
|
||||
public static List<ShopStageInfoVO> convertList(List<ShopStageInfoDO> stageList){
|
||||
if(CollectionUtils.isEmpty(stageList)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
List<ShopStageInfoVO> resultList = new ArrayList<>();
|
||||
for (ShopStageInfoDO stageInfo : stageList) {
|
||||
resultList.add(new ShopStageInfoVO(stageInfo.getShopStage(), stageInfo.getShopSubStage(), stageInfo.getShopSubStageStatus(), stageInfo.getIsTerminated()));
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,10 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.vo.shop.MiniShopPageVO;
|
||||
import com.cool.store.vo.shop.ShopStageInfoVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
@@ -17,4 +21,19 @@ public interface ShopService {
|
||||
*/
|
||||
Integer initShop(LineInfoDO lineInfo);
|
||||
|
||||
/**
|
||||
* 获取首页数据
|
||||
* @param lineId
|
||||
* @return
|
||||
*/
|
||||
List<MiniShopPageVO> getShopList(Long lineId);
|
||||
|
||||
/**
|
||||
* 获取店铺阶段信息
|
||||
* @param lineId
|
||||
* @param shopId
|
||||
* @param shopStage
|
||||
* @return
|
||||
*/
|
||||
List<ShopStageInfoVO> getShopStageInfo(Long lineId, Long shopId, Integer shopStage);
|
||||
}
|
||||
|
||||
@@ -4,10 +4,13 @@ import com.cool.store.dao.ShopInfoDAO;
|
||||
import com.cool.store.dao.ShopStageInfoDAO;
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.point.ShopStageEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.utils.NumberConverter;
|
||||
import com.cool.store.vo.shop.MiniShopPageVO;
|
||||
import com.cool.store.vo.shop.ShopStageInfoVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -24,7 +27,7 @@ import java.util.stream.Collectors;
|
||||
* @date 2024-04-11 10:26
|
||||
*/
|
||||
@Service
|
||||
public class ShopServiceImpl implements ShopService{
|
||||
public class ShopServiceImpl implements ShopService {
|
||||
|
||||
@Resource
|
||||
private ShopInfoDAO shopInfoDAO;
|
||||
@@ -52,4 +55,20 @@ public class ShopServiceImpl implements ShopService{
|
||||
List<Long> shopIds = shopList.stream().map(ShopInfoDO::getId).collect(Collectors.toList());
|
||||
return shopStageInfoDAO.initShopStageInfo(lineInfo.getId(), shopIds, ShopStageEnum.SHOP_STAGE_1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MiniShopPageVO> getShopList(Long lineId) {
|
||||
List<ShopInfoDO> shopList = shopInfoDAO.getShopList(lineId);
|
||||
return MiniShopPageVO.convertList(shopList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ShopStageInfoVO> getShopStageInfo(Long lineId, Long shopId, Integer shopStage) {
|
||||
ShopStageEnum shopStageEnum = ShopStageEnum.getShopStageEnum(shopStage);
|
||||
if(Objects.isNull(shopStageEnum)){
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_ERROR);
|
||||
}
|
||||
List<ShopStageInfoDO> shopStageInfo = shopStageInfoDAO.getShopStageInfo(shopId, shopStage);
|
||||
return ShopStageInfoVO.convertList(shopStageInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
* @Description:
|
||||
* @date 2024-03-29 15:36
|
||||
*/
|
||||
@Api(tags = "铺位")
|
||||
@Api(tags = "选址/铺位")
|
||||
@RestController
|
||||
@RequestMapping("/pc/point")
|
||||
public class PointController {
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.cool.store.controller.webc;
|
||||
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.PointService;
|
||||
import com.cool.store.service.ShopService;
|
||||
import com.cool.store.vo.shop.MiniShopPageVO;
|
||||
import com.cool.store.vo.shop.ShopStageInfoVO;
|
||||
import com.cool.store.vo.shop.ShopStageVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: MiniPointController
|
||||
* @Description:
|
||||
* @date 2024-04-11 16:29
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags ="小程序店铺选址")
|
||||
@RequestMapping({"/mini/shop"})
|
||||
public class MiniShopController {
|
||||
|
||||
@Resource
|
||||
private ShopService shopService;
|
||||
@Resource
|
||||
private PointService pointService;
|
||||
|
||||
@ApiOperation("获取店铺列表")
|
||||
@GetMapping("/getShopList")
|
||||
public ResponseResult<List<MiniShopPageVO>> getShopList() {
|
||||
Long lineId = PartnerUserHolder.getUser().getLineId();
|
||||
return ResponseResult.success(shopService.getShopList(lineId));
|
||||
}
|
||||
|
||||
@ApiOperation("获取店铺的阶段信息")
|
||||
@GetMapping("/getShopStageInfo")
|
||||
public ResponseResult<List<ShopStageInfoVO>> getShopStageInfo(@RequestParam("shopId")Long shopId, @RequestParam("shopStage")Integer shopStage) {
|
||||
Long lineId = PartnerUserHolder.getUser().getLineId();
|
||||
return ResponseResult.success(shopService.getShopStageInfo(lineId, shopId, shopStage));
|
||||
}
|
||||
|
||||
@ApiOperation("获取阶段/子阶段/子阶段状态枚举")
|
||||
@GetMapping("/getShopSubStageStatusEnum")
|
||||
public ResponseResult<List<ShopStageVO>> getShopSubStageStatusEnum() {
|
||||
return ResponseResult.success(ShopStageVO.getShopStageList());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user