add
This commit is contained in:
@@ -102,6 +102,8 @@ public enum ErrorCodeEnum {
|
|||||||
POINT_IS_LOCK(600014, "当前铺位已被锁定,刷新后再试", null),
|
POINT_IS_LOCK(600014, "当前铺位已被锁定,刷新后再试", null),
|
||||||
POINT_IS_INVALID(600015, "该铺位已失效", null),
|
POINT_IS_INVALID(600015, "该铺位已失效", null),
|
||||||
POINT_SELECTED(600016, "该铺位已被选择", null),
|
POINT_SELECTED(600016, "该铺位已被选择", null),
|
||||||
|
NOT_EXIST_UNSELECT_POINT(600017, "当前没有未选择的铺位", null),
|
||||||
|
SELECT_POINT_ERROR(600018, "铺位选中失败", null),
|
||||||
|
|
||||||
INTERVIEW_ENTER_FAIL(1021101, "进入面审间失败", null),
|
INTERVIEW_ENTER_FAIL(1021101, "进入面审间失败", null),
|
||||||
DINGDING_USER_NOT_EXIST(1021102, "用户钉钉信息不存在,无法发起资质审核!", null),
|
DINGDING_USER_NOT_EXIST(1021102, "用户钉钉信息不存在,无法发起资质审核!", null),
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.cool.store.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhangchenbiao
|
||||||
|
* @FileName: RentTypeEnum
|
||||||
|
* @Description:
|
||||||
|
* @date 2024-04-16 11:47
|
||||||
|
*/
|
||||||
|
public enum RentTypeEnum {
|
||||||
|
|
||||||
|
RENT(1,"铺位直租"),
|
||||||
|
OWN(2,"自有铺位"),
|
||||||
|
;
|
||||||
|
;
|
||||||
|
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
RentTypeEnum(Integer code, String message) {
|
||||||
|
this.code = code;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.cool.store.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhangchenbiao
|
||||||
|
* @FileName: RentTypeEnum
|
||||||
|
* @Description:
|
||||||
|
* @date 2024-04-16 11:47
|
||||||
|
*/
|
||||||
|
public enum ShopRentTypeEnum {
|
||||||
|
|
||||||
|
FIXED(1,"固定租金"),
|
||||||
|
NOT_FIXED(2,"非固定租金"),
|
||||||
|
;
|
||||||
|
;
|
||||||
|
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
ShopRentTypeEnum(Integer code, String message) {
|
||||||
|
this.code = code;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.dao;
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.dto.point.LineCountDTO;
|
import com.cool.store.dto.point.LineCountDTO;
|
||||||
import com.cool.store.dto.point.MiniPointPageDTO;
|
import com.cool.store.dto.point.MiniPointPageDTO;
|
||||||
import com.cool.store.entity.PointRecommendDO;
|
import com.cool.store.entity.PointRecommendDO;
|
||||||
@@ -85,6 +86,9 @@ public class PointRecommendDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Integer addRecommendPoint(List<PointRecommendDO> recommendList) {
|
public Integer addRecommendPoint(List<PointRecommendDO> recommendList) {
|
||||||
|
if(CollectionUtils.isEmpty(recommendList)){
|
||||||
|
return CommonConstants.ZERO;
|
||||||
|
}
|
||||||
return pointRecommendMapper.batchInsert(recommendList);
|
return pointRecommendMapper.batchInsert(recommendList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,4 +117,18 @@ public class PointRecommendDAO {
|
|||||||
}
|
}
|
||||||
return pointRecommendMapper.updateStatusByPointIdAndLineId(pointId, lineId);
|
return pointRecommendMapper.updateStatusByPointIdAndLineId(pointId, lineId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 铺位拒绝
|
||||||
|
* @param lineId
|
||||||
|
* @param pointId
|
||||||
|
* @param reason
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Integer rejectPoint(Long lineId, Long pointId, String reason) {
|
||||||
|
if(Objects.isNull(lineId) || Objects.isNull(pointId)){
|
||||||
|
return CommonConstants.ZERO;
|
||||||
|
}
|
||||||
|
return pointRecommendMapper.rejectPoint(lineId, pointId, reason);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import com.cool.store.enums.ErrorCodeEnum;
|
|||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.mapper.ShopInfoMapper;
|
import com.cool.store.mapper.ShopInfoMapper;
|
||||||
import com.cool.store.utils.NumberConverter;
|
import com.cool.store.utils.NumberConverter;
|
||||||
|
import com.cool.store.vo.shop.StageShopCountVO;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
@@ -75,4 +76,32 @@ public class ShopInfoDAO {
|
|||||||
return shopInfoMapper.updateByPrimaryKeySelective(shopInfo);
|
return shopInfoMapper.updateByPrimaryKeySelective(shopInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店绑定铺位
|
||||||
|
* @param unSelectShopIds
|
||||||
|
* @param pointId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Integer occupyShopPoint(List<Long> unSelectShopIds, Long pointId) {
|
||||||
|
if(CollectionUtils.isEmpty(unSelectShopIds) || Objects.isNull(pointId)){
|
||||||
|
return CommonConstants.ZERO;
|
||||||
|
}
|
||||||
|
return shopInfoMapper.occupyShopPoint(unSelectShopIds, pointId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ShopInfoDO getShopInfoByPointId(Long lineId, Long pointId){
|
||||||
|
if(Objects.isNull(lineId) || Objects.isNull(pointId)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return shopInfoMapper.getShopInfoByPointId(lineId, pointId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取各个阶段店铺数量
|
||||||
|
* @param lineId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public StageShopCountVO getStageShopCount(Long lineId) {
|
||||||
|
return shopInfoMapper.getStageShopCount(lineId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.entity.ShopRentInfoDO;
|
||||||
|
import com.cool.store.mapper.ShopRentInfoMapper;
|
||||||
|
import com.cool.store.vo.point.ShopRentInfoVO;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhangchenbiao
|
||||||
|
* @FileName: ShopRentInfoDAO
|
||||||
|
* @Description:
|
||||||
|
* @date 2024-04-16 11:34
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class ShopRentInfoDAO {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ShopRentInfoMapper shopRentInfoMapper;
|
||||||
|
|
||||||
|
public Long addShopRentInfo(ShopRentInfoDO shopRentInfo) {
|
||||||
|
shopRentInfoMapper.insertSelective(shopRentInfo);
|
||||||
|
return shopRentInfo.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ShopRentInfoDO getRentContractByShopId(Long shopId) {
|
||||||
|
if(Objects.isNull(shopId)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return shopRentInfoMapper.getRentContractByShopId(shopId);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -73,19 +73,41 @@ public class ShopStageInfoDAO {
|
|||||||
return shopStageInfoMapper.getShopStageInfo(shopId, shopStage);
|
return shopStageInfoMapper.getShopStageInfo(shopId, shopStage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取子阶段信息
|
||||||
|
* @param shopId
|
||||||
|
* @param shopSubStageEnum
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ShopStageInfoDO getShopSubStageInfo(Long shopId, ShopSubStageEnum shopSubStageEnum) {
|
||||||
|
if(Objects.isNull(shopId) || Objects.isNull(shopSubStageEnum)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return shopStageInfoMapper.getShopSubStageInfo(shopId, shopSubStageEnum.getShopSubStage());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新店铺阶段状态
|
* 更新店铺阶段状态
|
||||||
* @param shopId
|
* @param shopId
|
||||||
* @param shopStageInfo
|
* @param shopStageInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
public Integer updateShopStageInfo(Long shopId, ShopSubStageStatusEnum shopStageInfo, Long auditId) {
|
||||||
|
if(Objects.isNull(shopId) || Objects.isNull(shopStageInfo)){
|
||||||
|
return CommonConstants.ZERO;
|
||||||
|
}
|
||||||
|
String remark = shopStageInfo.getShopSubStageName() + CommonConstants.PATH_BAR +shopStageInfo.getShopSubStageStatusName();
|
||||||
|
boolean isTerminated = shopStageInfo.isTerminated();
|
||||||
|
return shopStageInfoMapper.updateShopStageInfo(shopId, shopStageInfo.getShopSubStageEnum().getShopSubStage(), shopStageInfo.getShopSubStageStatus(), isTerminated, remark, auditId);
|
||||||
|
}
|
||||||
|
|
||||||
public Integer updateShopStageInfo(Long shopId, ShopSubStageStatusEnum shopStageInfo) {
|
public Integer updateShopStageInfo(Long shopId, ShopSubStageStatusEnum shopStageInfo) {
|
||||||
if(Objects.isNull(shopId) || Objects.isNull(shopStageInfo)){
|
if(Objects.isNull(shopId) || Objects.isNull(shopStageInfo)){
|
||||||
return CommonConstants.ZERO;
|
return CommonConstants.ZERO;
|
||||||
}
|
}
|
||||||
String remark = shopStageInfo.getShopSubStageName() + CommonConstants.PATH_BAR +shopStageInfo.getShopSubStageStatusName();
|
String remark = shopStageInfo.getShopSubStageName() + CommonConstants.PATH_BAR +shopStageInfo.getShopSubStageStatusName();
|
||||||
boolean isTerminated = shopStageInfo.isTerminated();
|
boolean isTerminated = shopStageInfo.isTerminated();
|
||||||
return shopStageInfoMapper.updateShopStageInfo(shopId, shopStageInfo.getShopSubStageEnum().getShopSubStage(), shopStageInfo.getShopSubStageStatus(), isTerminated, remark);
|
return shopStageInfoMapper.updateShopStageInfo(shopId, shopStageInfo.getShopSubStageEnum().getShopSubStage(), shopStageInfo.getShopSubStageStatus(), isTerminated, remark, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,4 +72,12 @@ public interface PointRecommendMapper extends Mapper<PointRecommendDO> {
|
|||||||
*/
|
*/
|
||||||
Integer updateStatusByPointIdAndLineId(@Param("pointId") Long pointId, @Param("lineId") Long lineId);
|
Integer updateStatusByPointIdAndLineId(@Param("pointId") Long pointId, @Param("lineId") Long lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 铺位拒绝
|
||||||
|
* @param lineId
|
||||||
|
* @param pointId
|
||||||
|
* @param reason
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer rejectPoint(@Param("lineId") Long lineId, @Param("pointId") Long pointId, @Param("reason") String reason);
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.cool.store.mapper;
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
import com.cool.store.entity.ShopInfoDO;
|
import com.cool.store.entity.ShopInfoDO;
|
||||||
|
import com.cool.store.vo.shop.StageShopCountVO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import tk.mybatis.mapper.common.Mapper;
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
@@ -23,4 +24,26 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
|||||||
*/
|
*/
|
||||||
List<ShopInfoDO> getShopList(@Param("lineId") Long lineId);
|
List<ShopInfoDO> getShopList(@Param("lineId") Long lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店占铺位
|
||||||
|
* @param unSelectShopIds
|
||||||
|
* @param pointId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer occupyShopPoint(@Param("unSelectShopIds") List<Long> unSelectShopIds, @Param("pointId") Long pointId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺信息
|
||||||
|
* @param lineId
|
||||||
|
* @param pointId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ShopInfoDO getShopInfoByPointId(@Param("lineId") Long lineId, @Param("pointId") Long pointId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取各个阶段店铺数量
|
||||||
|
* @param lineId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
StageShopCountVO getStageShopCount(@Param("lineId") Long lineId);
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.entity.ShopRentInfoDO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
public interface ShopRentInfoMapper extends Mapper<ShopRentInfoDO> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据店铺id获取租赁合同
|
||||||
|
* @param shopId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ShopRentInfoDO getRentContractByShopId(@Param("shopId") Long shopId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -33,5 +33,13 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Integer updateShopStageInfo(@Param("shopId") Long shopId, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus,
|
Integer updateShopStageInfo(@Param("shopId") Long shopId, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus,
|
||||||
@Param("isTerminated")boolean isTerminated, @Param("remark") String remark);
|
@Param("isTerminated")boolean isTerminated, @Param("remark") String remark, @Param("auditId")Long auditId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取子阶段信息
|
||||||
|
* @param shopId
|
||||||
|
* @param shopSubStage
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ShopStageInfoDO getShopSubStageInfo(@Param("shopId") Long shopId, @Param("shopSubStage") Integer shopSubStage);
|
||||||
}
|
}
|
||||||
@@ -99,4 +99,13 @@
|
|||||||
status = if(line_id = #{lineId}, 2, 3)
|
status = if(line_id = #{lineId}, 2, 3)
|
||||||
where point_id = #{pointId} and deleted = 0
|
where point_id = #{pointId} and deleted = 0
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="rejectPoint">
|
||||||
|
update
|
||||||
|
xfsg_point_recommend
|
||||||
|
set
|
||||||
|
status = 4,
|
||||||
|
reason = #{reason}
|
||||||
|
where point_id = #{pointId} and line_id = #{lineId} and deleted = 0
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -35,4 +35,29 @@
|
|||||||
<select id="getShopList" resultMap="BaseResultMap">
|
<select id="getShopList" resultMap="BaseResultMap">
|
||||||
select <include refid="allColumn"/> from xfsg_shop_info where line_id = #{lineId} and deleted= '0'
|
select <include refid="allColumn"/> from xfsg_shop_info where line_id = #{lineId} and deleted= '0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="occupyShopPoint">
|
||||||
|
update xfsg_shop_info set point_id = #{pointId} where point_id is null and shop_stage = '1' and deleted = '0' and id in
|
||||||
|
<foreach collection="unSelectShopIds" item="shopId" separator="," open="(" close=")">
|
||||||
|
#{shopId}
|
||||||
|
</foreach>
|
||||||
|
order by id asc limit 1
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<select id="getShopInfoByPointId" resultMap="BaseResultMap">
|
||||||
|
select <include refid="allColumn"/> from xfsg_shop_info where point_id = #{pointId} and deleted= '0'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getStageShopCount" resultType="com.cool.store.vo.shop.StageShopCountVO">
|
||||||
|
select
|
||||||
|
sum(if(shop_stage = 1, 1, 0)) as selectPointCount,
|
||||||
|
sum(if(shop_stage = 2, 1, 0)) as buildShopCount,
|
||||||
|
sum(if(shop_stage = 3, 1, 0)) as openShopCount
|
||||||
|
from
|
||||||
|
xfsg_shop_info
|
||||||
|
where
|
||||||
|
deleted = '0' and line_id = #{lineId}
|
||||||
|
group by shop_stage
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cool.store.mapper.ShopRentInfoMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.ShopRentInfoDO">
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="shop_id" jdbcType="BIGINT" property="shopId" />
|
||||||
|
<result column="point_id" jdbcType="BIGINT" property="pointId" />
|
||||||
|
<result column="rent_type" jdbcType="TINYINT" property="rentType" />
|
||||||
|
<result column="sign_time" jdbcType="TIMESTAMP" property="signTime" />
|
||||||
|
<result column="contract_start_time" jdbcType="TIMESTAMP" property="contractStartTime" />
|
||||||
|
<result column="contract_months" jdbcType="INTEGER" property="contractMonths" />
|
||||||
|
<result column="shop_rent_type" jdbcType="TINYINT" property="shopRentType" />
|
||||||
|
<result column="month_rent" jdbcType="VARCHAR" property="monthRent" />
|
||||||
|
<result column="first_year_month_rent" jdbcType="VARCHAR" property="firstYearMonthRent" />
|
||||||
|
<result column="second_year_month_rent" jdbcType="VARCHAR" property="secondYearMonthRent" />
|
||||||
|
<result column="third_year_month_rent" jdbcType="VARCHAR" property="thirdYearMonthRent" />
|
||||||
|
<result column="contract_pic" jdbcType="VARCHAR" property="contractPic" />
|
||||||
|
<result column="house_certificate_pic" jdbcType="VARCHAR" property="houseCertificatePic" />
|
||||||
|
<result column="audit_id" jdbcType="BIGINT" property="auditId" />
|
||||||
|
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="allColumn">
|
||||||
|
id, shop_id, point_id, rent_type, sign_time, contract_start_time, contract_months, shop_rent_type,
|
||||||
|
month_rent, first_year_month_rent, second_year_month_rent, third_year_month_rent, contract_pic,
|
||||||
|
house_certificate_pic, audit_id, deleted, create_time, update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="getRentContractByShopId" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="allColumn"/>
|
||||||
|
from
|
||||||
|
where shop_id = #{shopId} and deleted = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -49,8 +49,20 @@
|
|||||||
is_terminated = #{isTerminated},
|
is_terminated = #{isTerminated},
|
||||||
remark = #{remark},
|
remark = #{remark},
|
||||||
actual_complete_time = if(is_terminated, now(), null)
|
actual_complete_time = if(is_terminated, now(), null)
|
||||||
|
<if test="auditId != null">
|
||||||
|
, audit_id = #{auditId}
|
||||||
|
</if>
|
||||||
where
|
where
|
||||||
shop_id = #{shopId} and shop_sub_stage = #{shopSubStage}
|
shop_id = #{shopId} and shop_sub_stage = #{shopSubStage}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="getShopSubStageInfo" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="allColumn"/>
|
||||||
|
from
|
||||||
|
xfsg_shop_stage_info
|
||||||
|
where
|
||||||
|
shop_id = #{shopId} and shop_sub_stage = #{shopSubStage} and deleted = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -3,6 +3,6 @@ jdbc.url = jdbc:mysql://dingpushcoolcollege.mysql.rds.aliyuncs.com:3306/coolcoll
|
|||||||
jdbc.user= coolstore
|
jdbc.user= coolstore
|
||||||
jdbc.password = CSCErYcXniNYm7bT
|
jdbc.password = CSCErYcXniNYm7bT
|
||||||
|
|
||||||
table.name = xfsg_shop_stage_info
|
table.name = xfsg_shop_rent_info
|
||||||
table.object.class = ShopStageInfoDO
|
table.object.class = ShopRentInfoDO
|
||||||
table.mapper = ShopStageInfoMapper
|
table.mapper = ShopRentInfoMapper
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Table(name = "xfsg_shop_rent_info")
|
||||||
|
public class ShopRentInfoDO {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺id
|
||||||
|
*/
|
||||||
|
@Column(name = "shop_id")
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺id
|
||||||
|
*/
|
||||||
|
@Column(name = "point_id")
|
||||||
|
private Long pointId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租赁类型 1铺位直租 2自有铺位
|
||||||
|
*/
|
||||||
|
@Column(name = "rent_type")
|
||||||
|
private Integer rentType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签约日期
|
||||||
|
*/
|
||||||
|
@Column(name = "sign_time")
|
||||||
|
private Date signTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同开始日期
|
||||||
|
*/
|
||||||
|
@Column(name = "contract_start_time")
|
||||||
|
private Date contractStartTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签约年限
|
||||||
|
*/
|
||||||
|
@Column(name = "contract_months")
|
||||||
|
private Integer contractMonths;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺租金 1固定租金 2非固定租金
|
||||||
|
*/
|
||||||
|
@Column(name = "shop_rent_type")
|
||||||
|
private Integer shopRentType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 月租金
|
||||||
|
*/
|
||||||
|
@Column(name = "month_rent")
|
||||||
|
private String monthRent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 第一年月租金
|
||||||
|
*/
|
||||||
|
@Column(name = "first_year_month_rent")
|
||||||
|
private String firstYearMonthRent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 第二年月租金
|
||||||
|
*/
|
||||||
|
@Column(name = "second_year_month_rent")
|
||||||
|
private String secondYearMonthRent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 第三年月租金
|
||||||
|
*/
|
||||||
|
@Column(name = "third_year_month_rent")
|
||||||
|
private String thirdYearMonthRent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同图片
|
||||||
|
*/
|
||||||
|
@Column(name = "contract_pic")
|
||||||
|
private String contractPic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房产证明
|
||||||
|
*/
|
||||||
|
@Column(name = "house_certificate_pic")
|
||||||
|
private String houseCertificatePic;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核id
|
||||||
|
*/
|
||||||
|
@Column(name = "audit_id")
|
||||||
|
private Long auditId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标识
|
||||||
|
*/
|
||||||
|
private Boolean deleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(name = "create_time")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(name = "update_time")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import com.cool.store.entity.LineAuditInfoDO;
|
||||||
|
import com.cool.store.enums.AuditResultTypeEnum;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhangchenbiao
|
||||||
|
* @FileName: AuditRentContractRequest
|
||||||
|
* @Description:租赁合同审核
|
||||||
|
* @date 2024-04-16 14:30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AuditRentContractRequest {
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
@ApiModelProperty("店铺id")
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
@ApiModelProperty("0通过,1拒绝")
|
||||||
|
private Integer resultType;
|
||||||
|
|
||||||
|
@ApiModelProperty("原因")
|
||||||
|
private String reason;
|
||||||
|
|
||||||
|
public static LineAuditInfoDO convert(AuditRentContractRequest request, String partnerId, Long lineId){
|
||||||
|
LineAuditInfoDO result = new LineAuditInfoDO();
|
||||||
|
result.setPartnerId(partnerId);
|
||||||
|
result.setLineId(lineId);
|
||||||
|
result.setResultType(request.getResultType());
|
||||||
|
if(AuditResultTypeEnum.PASS.getCode().equals(request.getResultType())){
|
||||||
|
result.setResultType(AuditResultTypeEnum.PASS.getCode());
|
||||||
|
}else{
|
||||||
|
result.setPassReason(request.getReason());
|
||||||
|
result.setRejectRealReason(request.getReason());
|
||||||
|
}
|
||||||
|
result.setRejectPublicReason(request.getReason());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -7,6 +7,7 @@ import lombok.Data;
|
|||||||
|
|
||||||
import javax.validation.constraints.Max;
|
import javax.validation.constraints.Max;
|
||||||
import javax.validation.constraints.Min;
|
import javax.validation.constraints.Min;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class MiniAddPointRequest {
|
public class MiniAddPointRequest {
|
||||||
@@ -29,11 +30,6 @@ public class MiniAddPointRequest {
|
|||||||
@ApiModelProperty("经营状况")
|
@ApiModelProperty("经营状况")
|
||||||
private Integer businessStatus;
|
private Integer businessStatus;
|
||||||
|
|
||||||
@Min(1)
|
|
||||||
@Max(4)
|
|
||||||
@ApiModelProperty("立地条件1.单门面 2.双门面 3.多门面 4.转角")
|
|
||||||
private Integer siteConditions;
|
|
||||||
|
|
||||||
@ApiModelProperty("使用面积(一楼)")
|
@ApiModelProperty("使用面积(一楼)")
|
||||||
private String pointArea;
|
private String pointArea;
|
||||||
|
|
||||||
@@ -48,14 +44,21 @@ public class MiniAddPointRequest {
|
|||||||
@ApiModelProperty("图片对象")
|
@ApiModelProperty("图片对象")
|
||||||
private String pictureObj;
|
private String pictureObj;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "当前线索id", hidden = true)
|
||||||
|
private Long curLineId;
|
||||||
|
|
||||||
|
@ApiModelProperty("加盟商签名")
|
||||||
|
private String lineSign;
|
||||||
|
|
||||||
|
|
||||||
public static PointDetailInfoDO convertDO(MiniAddPointRequest request) {
|
public static PointDetailInfoDO convertDO(MiniAddPointRequest request) {
|
||||||
PointDetailInfoDO result = new PointDetailInfoDO();
|
PointDetailInfoDO result = new PointDetailInfoDO();
|
||||||
result.setBusinessStatus(request.getBusinessStatus());
|
result.setBusinessStatus(request.getBusinessStatus());
|
||||||
result.setSiteConditions(request.getSiteConditions());
|
|
||||||
result.setPaymentMethod(request.getPaymentMethod());
|
result.setPaymentMethod(request.getPaymentMethod());
|
||||||
result.setTransferFee(request.getTransferFee());
|
result.setTransferFee(request.getTransferFee());
|
||||||
result.setPictureObj(request.getPictureObj());
|
result.setPictureObj(request.getPictureObj());
|
||||||
|
result.setLineSign(request.getLineSign());
|
||||||
|
result.setLineSignTime(new Date());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class MiniPointPageRequest extends PageBasicInfo {
|
|||||||
@ApiModelProperty("1.待选择 2.已选择 3.拒绝/失效")
|
@ApiModelProperty("1.待选择 2.已选择 3.拒绝/失效")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
@ApiModelProperty(value = "线索id",hidden = true)
|
@ApiModelProperty(value = "线索id")
|
||||||
private Long lineId;
|
private Long lineId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhangchenbiao
|
||||||
|
* @FileName: SelectPointRequest
|
||||||
|
* @Description:
|
||||||
|
* @date 2024-04-12 15:08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RejectPointRequest {
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
@ApiModelProperty("铺位id")
|
||||||
|
private Long pointId;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty("拒绝原因")
|
||||||
|
private String reason;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "当前线索id", hidden = true)
|
||||||
|
private Long lineId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ package com.cool.store.request;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
|
||||||
@@ -26,4 +27,8 @@ public class SelectPointRequest {
|
|||||||
@ApiModelProperty(value = "当前线索id", hidden = true)
|
@ApiModelProperty(value = "当前线索id", hidden = true)
|
||||||
private Long lineId;
|
private Long lineId;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty("加盟商签字")
|
||||||
|
private String lineSign;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,125 @@
|
|||||||
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils;
|
||||||
|
import com.cool.store.entity.ShopRentInfoDO;
|
||||||
|
import com.cool.store.enums.RentTypeEnum;
|
||||||
|
import com.cool.store.enums.ShopRentTypeEnum;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhangchenbiao
|
||||||
|
* @FileName: UploadRentContractRequest
|
||||||
|
* @Description:上传租赁合同
|
||||||
|
* @date 2024-04-16 11:38
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class UploadRentContractRequest {
|
||||||
|
|
||||||
|
@ApiModelProperty("店铺id")
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
|
@ApiModelProperty("铺位id")
|
||||||
|
private Long pointId;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
@ApiModelProperty("租赁类型 1铺位直租 2自有铺位")
|
||||||
|
private Integer rentType;
|
||||||
|
|
||||||
|
@ApiModelProperty("签约日期")
|
||||||
|
private Date signTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同开始日期")
|
||||||
|
private Date contractStartTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("签约年限")
|
||||||
|
private Integer contractMonths;
|
||||||
|
|
||||||
|
@ApiModelProperty("店铺租金 1固定租金 2非固定租金")
|
||||||
|
private Integer shopRentType;
|
||||||
|
|
||||||
|
@ApiModelProperty("月租金")
|
||||||
|
private String monthRent;
|
||||||
|
|
||||||
|
@ApiModelProperty("第一年月租金")
|
||||||
|
private String firstYearMonthRent;
|
||||||
|
|
||||||
|
@ApiModelProperty("第二年月租金")
|
||||||
|
private String secondYearMonthRent;
|
||||||
|
|
||||||
|
@ApiModelProperty("第三年月租金")
|
||||||
|
private String thirdYearMonthRent;
|
||||||
|
|
||||||
|
@Size(max = 3, message = "最多上传三张租赁合同")
|
||||||
|
@ApiModelProperty("合同图片")
|
||||||
|
private List<String> contractPic;
|
||||||
|
|
||||||
|
@Size(max = 3, message = "最多上传三张房产证明")
|
||||||
|
@ApiModelProperty("房产证明")
|
||||||
|
private List<String> houseCertificatePic;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "当前线索id", hidden = true)
|
||||||
|
private Long curLineId;
|
||||||
|
|
||||||
|
public boolean check(){
|
||||||
|
if(Objects.isNull(shopId) && Objects.isNull(pointId)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(RentTypeEnum.OWN.getCode().equals(rentType)){
|
||||||
|
if(CollectionUtils.isEmpty(houseCertificatePic) || houseCertificatePic.size() > 3){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(Objects.isNull(signTime) || Objects.isNull(contractStartTime)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(Objects.isNull(contractMonths) || Objects.isNull(shopRentType)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(ShopRentTypeEnum.FIXED.getCode().equals(shopRentType)){
|
||||||
|
if(StringUtils.isBlank(monthRent)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(ShopRentTypeEnum.NOT_FIXED.getCode().equals(shopRentType)){
|
||||||
|
if(StringUtils.isAnyBlank(firstYearMonthRent, secondYearMonthRent, thirdYearMonthRent)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(CollectionUtils.isEmpty(contractPic) || contractPic.size() > 3){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ShopRentInfoDO convertDO(UploadRentContractRequest param){
|
||||||
|
if(Objects.isNull(param)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
ShopRentInfoDO shopRentInfoDO = new ShopRentInfoDO();
|
||||||
|
shopRentInfoDO.setShopId(param.getShopId());
|
||||||
|
shopRentInfoDO.setPointId(param.getPointId());
|
||||||
|
shopRentInfoDO.setRentType(param.getRentType());
|
||||||
|
shopRentInfoDO.setSignTime(param.getSignTime());
|
||||||
|
shopRentInfoDO.setContractStartTime(param.getContractStartTime());
|
||||||
|
shopRentInfoDO.setContractMonths(param.getContractMonths());
|
||||||
|
shopRentInfoDO.setShopRentType(param.getShopRentType());
|
||||||
|
shopRentInfoDO.setMonthRent(param.getMonthRent());
|
||||||
|
shopRentInfoDO.setFirstYearMonthRent(param.getFirstYearMonthRent());
|
||||||
|
shopRentInfoDO.setSecondYearMonthRent(param.getSecondYearMonthRent());
|
||||||
|
shopRentInfoDO.setThirdYearMonthRent(param.getThirdYearMonthRent());
|
||||||
|
shopRentInfoDO.setContractPic(JSONObject.toJSONString(param.getContractPic()));
|
||||||
|
shopRentInfoDO.setHouseCertificatePic(JSONObject.toJSONString(param.getHouseCertificatePic()));
|
||||||
|
return shopRentInfoDO;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
package com.cool.store.vo.point;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cool.store.entity.ShopRentInfoDO;
|
||||||
|
import com.cool.store.enums.RentTypeEnum;
|
||||||
|
import com.cool.store.vo.LineAuditInfoVO;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
import java.time.Instant;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhangchenbiao
|
||||||
|
* @FileName: ShopRentInfoVO
|
||||||
|
* @Description:
|
||||||
|
* @date 2024-04-16 14:03
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ShopRentInfoVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("店铺id")
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
|
@ApiModelProperty("铺位id")
|
||||||
|
private Long pointId;
|
||||||
|
|
||||||
|
@ApiModelProperty("租赁类型 1铺位直租 2自有铺位")
|
||||||
|
private Integer rentType;
|
||||||
|
|
||||||
|
@ApiModelProperty("签约日期")
|
||||||
|
private Date signTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同开始日期")
|
||||||
|
private Date contractStartTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同结束日期")
|
||||||
|
private Date contractEndTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("签约年限")
|
||||||
|
private Integer contractMonths;
|
||||||
|
|
||||||
|
@ApiModelProperty("店铺租金 1固定租金 2非固定租金")
|
||||||
|
private Integer shopRentType;
|
||||||
|
|
||||||
|
@ApiModelProperty("月租金")
|
||||||
|
private String monthRent;
|
||||||
|
|
||||||
|
@ApiModelProperty("第一年月租金")
|
||||||
|
private String firstYearMonthRent;
|
||||||
|
|
||||||
|
@ApiModelProperty("第二年月租金")
|
||||||
|
private String secondYearMonthRent;
|
||||||
|
|
||||||
|
@ApiModelProperty("第三年月租金")
|
||||||
|
private String thirdYearMonthRent;
|
||||||
|
|
||||||
|
@ApiModelProperty("合同图片")
|
||||||
|
private List<String> contractPic;
|
||||||
|
|
||||||
|
@ApiModelProperty("房产证明")
|
||||||
|
private List<String> houseCertificatePic;
|
||||||
|
|
||||||
|
@ApiModelProperty("状态")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty("审核信息")
|
||||||
|
private LineAuditInfoVO auditInfo;
|
||||||
|
|
||||||
|
public static ShopRentInfoVO build(ShopRentInfoDO shopRentInfo) {
|
||||||
|
ShopRentInfoVO result = new ShopRentInfoVO();
|
||||||
|
result.setShopId(shopRentInfo.getShopId());
|
||||||
|
result.setPointId(shopRentInfo.getPointId());
|
||||||
|
result.setRentType(shopRentInfo.getRentType());
|
||||||
|
result.setSignTime(shopRentInfo.getSignTime());
|
||||||
|
if(RentTypeEnum.RENT.getCode().equals(shopRentInfo.getRentType())){
|
||||||
|
result.setContractStartTime(shopRentInfo.getContractStartTime());
|
||||||
|
LocalDate start = shopRentInfo.getContractStartTime().toInstant().atZone(java.time.ZoneId.systemDefault()).toLocalDate();
|
||||||
|
Instant instant = start.plusMonths(shopRentInfo.getContractMonths()).minusDays(1L).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant();
|
||||||
|
result.setContractEndTime(Date.from(instant));
|
||||||
|
result.setContractMonths(shopRentInfo.getContractMonths());
|
||||||
|
}
|
||||||
|
result.setShopRentType(shopRentInfo.getShopRentType());
|
||||||
|
result.setMonthRent(shopRentInfo.getMonthRent());
|
||||||
|
result.setFirstYearMonthRent(shopRentInfo.getFirstYearMonthRent());
|
||||||
|
result.setSecondYearMonthRent(shopRentInfo.getSecondYearMonthRent());
|
||||||
|
result.setThirdYearMonthRent(shopRentInfo.getThirdYearMonthRent());
|
||||||
|
result.setContractPic(JSONObject.parseArray(shopRentInfo.getContractPic(), String.class));
|
||||||
|
result.setHouseCertificatePic(JSONObject.parseArray(shopRentInfo.getHouseCertificatePic(), String.class));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.cool.store.vo.shop;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhangchenbiao
|
||||||
|
* @FileName: StageShopCountVO
|
||||||
|
* @Description:
|
||||||
|
* @date 2024-04-16 14:59
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StageShopCountVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("选址数量")
|
||||||
|
private Integer selectPointCount;
|
||||||
|
|
||||||
|
@ApiModelProperty("筹建数量")
|
||||||
|
private Integer buildShopCount;
|
||||||
|
|
||||||
|
@ApiModelProperty("开业数量")
|
||||||
|
private Integer openShopCount;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -206,4 +206,40 @@ public interface PointService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Integer lineSelectPoint(SelectPointRequest request);
|
Integer lineSelectPoint(SelectPointRequest request);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拒绝铺位
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer lineRejectPoint(RejectPointRequest request);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加盟商提交新铺位
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Long miniAddPointDetailInfo(MiniAddPointRequest request);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传租赁合同
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer uploadRentContract(UploadRentContractRequest request);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取租赁合同详情
|
||||||
|
* @param shopId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ShopRentInfoVO getRentContractDetail(Long shopId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租赁合同审核
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer auditRentContract(AuditRentContractRequest request);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package com.cool.store.service;
|
|||||||
import com.cool.store.entity.LineInfoDO;
|
import com.cool.store.entity.LineInfoDO;
|
||||||
import com.cool.store.vo.shop.MiniShopPageVO;
|
import com.cool.store.vo.shop.MiniShopPageVO;
|
||||||
import com.cool.store.vo.shop.ShopStageInfoVO;
|
import com.cool.store.vo.shop.ShopStageInfoVO;
|
||||||
|
import com.cool.store.vo.shop.StageShopCountVO;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -36,4 +38,11 @@ public interface ShopService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<ShopStageInfoVO> getShopStageInfo(Long lineId, Long shopId, Integer shopStage);
|
List<ShopStageInfoVO> getShopStageInfo(Long lineId, Long shopId, Integer shopStage);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取各阶段店铺数量
|
||||||
|
* @param lineId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
StageShopCountVO getStageShopCount(Long lineId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
package com.cool.store.service.impl;
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.dto.point.AuditNodeDTO;
|
import com.cool.store.dto.point.AuditNodeDTO;
|
||||||
import com.cool.store.dto.point.MiniPointPageDTO;
|
import com.cool.store.dto.point.MiniPointPageDTO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.AuditStatusEnum;
|
import com.cool.store.enums.*;
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
|
||||||
import com.cool.store.enums.NodeNoEnum;
|
|
||||||
import com.cool.store.enums.WorkflowStageEnum;
|
|
||||||
import com.cool.store.enums.point.*;
|
import com.cool.store.enums.point.*;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
@@ -18,6 +16,7 @@ import com.cool.store.service.PointService;
|
|||||||
import com.cool.store.service.UserAuthMappingService;
|
import com.cool.store.service.UserAuthMappingService;
|
||||||
import com.cool.store.utils.RedisUtilPool;
|
import com.cool.store.utils.RedisUtilPool;
|
||||||
import com.cool.store.utils.poi.StringUtils;
|
import com.cool.store.utils.poi.StringUtils;
|
||||||
|
import com.cool.store.vo.LineAuditInfoVO;
|
||||||
import com.cool.store.vo.LinePointBaseInfoVO;
|
import com.cool.store.vo.LinePointBaseInfoVO;
|
||||||
import com.cool.store.vo.point.*;
|
import com.cool.store.vo.point.*;
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
@@ -76,6 +75,10 @@ public class PointServiceImpl implements PointService {
|
|||||||
private HyOpenAreaInfoDAO hyOpenAreaInfoDAO;
|
private HyOpenAreaInfoDAO hyOpenAreaInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
private ShopStageInfoDAO shopStageInfoDAO;
|
private ShopStageInfoDAO shopStageInfoDAO;
|
||||||
|
@Resource
|
||||||
|
private ShopRentInfoDAO shopRentInfoDAO;
|
||||||
|
@Resource
|
||||||
|
private LineAuditInfoDAO lineAuditInfoDAO;
|
||||||
@Value("${mybatis.configuration.variables.enterpriseId}")
|
@Value("${mybatis.configuration.variables.enterpriseId}")
|
||||||
private String enterpriseId;
|
private String enterpriseId;
|
||||||
|
|
||||||
@@ -594,6 +597,11 @@ public class PointServiceImpl implements PointService {
|
|||||||
updateShop.setPointId(pointId);
|
updateShop.setPointId(pointId);
|
||||||
shopInfoDAO.updateShopInfo(shopInfo);
|
shopInfoDAO.updateShopInfo(shopInfo);
|
||||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_1);
|
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_1);
|
||||||
|
PointDetailInfoDO updateDetail = new PointDetailInfoDO();
|
||||||
|
updateDetail.setPointId(pointId);
|
||||||
|
updateDetail.setLineSign(request.getLineSign());
|
||||||
|
updateDetail.setLineSignTime(new Date());
|
||||||
|
pointDetailInfoDAO.updatePointDetailInfo(updateDetail);
|
||||||
return pointRecommendDAO.updateStatusByPointIdAndLineId(pointId, lineId);
|
return pointRecommendDAO.updateStatusByPointIdAndLineId(pointId, lineId);
|
||||||
} catch (ServiceException e) {
|
} catch (ServiceException e) {
|
||||||
throw e;
|
throw e;
|
||||||
@@ -601,6 +609,105 @@ public class PointServiceImpl implements PointService {
|
|||||||
redisUtilPool.delKey(lockKey);
|
redisUtilPool.delKey(lockKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Integer lineRejectPoint(RejectPointRequest request){
|
||||||
|
return pointRecommendDAO.rejectPoint(request.getLineId(), request.getPointId(), request.getReason());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public Long miniAddPointDetailInfo(MiniAddPointRequest request) {
|
||||||
|
Long lineId = request.getCurLineId();
|
||||||
|
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
|
||||||
|
if(Objects.isNull(lineInfo)){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||||
|
}
|
||||||
|
PointDetailInfoDO pointDetailInfo = MiniAddPointRequest.convertDO(request);
|
||||||
|
PointInfoDO pointInfo = MiniAddPointRequest.convertPointDO(request);
|
||||||
|
pointInfo.setRegionId(lineInfo.getRegionId());
|
||||||
|
pointInfo.setLineId(lineId);
|
||||||
|
pointInfo.setSelectStatus(SelectStatusEnum.SELECT_STATUS_1.getCode());
|
||||||
|
pointInfo.setDevelopmentManager(lineInfo.getDevelopmentManager());
|
||||||
|
pointInfo.setDevelopmentTime(new Date());
|
||||||
|
pointInfo.setIsLineUpload(Boolean.TRUE);
|
||||||
|
Long pointId = pointInfoDAO.addPointInfo(pointInfo);
|
||||||
|
pointDetailInfo.setPointId(pointId);
|
||||||
|
pointDetailInfoDAO.addPointDetailInfo(pointDetailInfo);
|
||||||
|
List<ShopInfoDO> shopList = shopInfoDAO.getShopList(lineId);
|
||||||
|
List<Long> unSelectShopIds = shopList.stream().filter(o -> o.getShopStage().equals(ShopStageEnum.SHOP_STAGE_1.getShopStage())).filter(o -> Objects.isNull(o.getPointId())).map(ShopInfoDO::getId).collect(Collectors.toList());
|
||||||
|
if(CollectionUtils.isEmpty(unSelectShopIds)){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.NOT_EXIST_UNSELECT_POINT);
|
||||||
|
}
|
||||||
|
//门店占铺
|
||||||
|
Integer result = shopInfoDAO.occupyShopPoint(unSelectShopIds, pointId);
|
||||||
|
if(result != CommonConstants.ONE){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.SELECT_POINT_ERROR);
|
||||||
|
}
|
||||||
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfoByPointId(lineId, pointId);
|
||||||
|
if(Objects.isNull(shopInfo)){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.SELECT_POINT_ERROR);
|
||||||
|
}
|
||||||
|
PointRecommendDO pointRecommendDO = new PointRecommendDO();
|
||||||
|
pointRecommendDO.setLineId(lineId);
|
||||||
|
pointRecommendDO.setDevelopmentManager(lineInfo.getDevelopmentManager());
|
||||||
|
pointRecommendDO.setPointId(pointId);
|
||||||
|
pointRecommendDO.setStatus(PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_2.getCode());
|
||||||
|
//推荐列表新增
|
||||||
|
pointRecommendDAO.addRecommendPoint(Lists.newArrayList(pointRecommendDO));
|
||||||
|
//更新店铺所处阶段
|
||||||
|
shopStageInfoDAO.updateShopStageInfo(shopInfo.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_1);
|
||||||
|
PointInfoDO updatePoint = new PointInfoDO();
|
||||||
|
updatePoint.setId(pointId);
|
||||||
|
updatePoint.setShopId(shopInfo.getId());
|
||||||
|
pointInfoDAO.updatePointInfo(updatePoint);
|
||||||
|
return pointId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer uploadRentContract(UploadRentContractRequest request){
|
||||||
|
if(!request.check()){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
|
}
|
||||||
|
Long pointId = request.getPointId(), shopId = request.getShopId();
|
||||||
|
if(Objects.isNull(pointId) && Objects.nonNull(shopId)){
|
||||||
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||||
|
pointId = shopInfo.getPointId();
|
||||||
|
}
|
||||||
|
if(Objects.nonNull(pointId) && Objects.isNull(shopId)){
|
||||||
|
PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(pointId);
|
||||||
|
shopId = pointInfo.getShopId();
|
||||||
|
}
|
||||||
|
ShopRentInfoDO shopRentInfo = UploadRentContractRequest.convertDO(request);
|
||||||
|
shopRentInfo.setShopId(shopId);
|
||||||
|
shopRentInfo.setPointId(pointId);
|
||||||
|
shopRentInfoDAO.addShopRentInfo(shopRentInfo);
|
||||||
|
return shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_3);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ShopRentInfoVO getRentContractDetail(Long shopId) {
|
||||||
|
ShopRentInfoDO rentContract = shopRentInfoDAO.getRentContractByShopId(shopId);
|
||||||
|
ShopRentInfoVO result = ShopRentInfoVO.build(rentContract);
|
||||||
|
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_2);
|
||||||
|
result.setStatus(shopSubStageInfo.getShopSubStageStatus());
|
||||||
|
if(Objects.nonNull(shopSubStageInfo.getAuditId())){
|
||||||
|
LineAuditInfoDO auditInfo = lineAuditInfoDAO.getAuditInfo(shopSubStageInfo.getAuditId());
|
||||||
|
result.setAuditInfo(LineAuditInfoVO.convertVO(auditInfo));
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer auditRentContract(AuditRentContractRequest request) {
|
||||||
|
Long shopId = request.getShopId();
|
||||||
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||||
|
ShopRentInfoDO rentContract = shopRentInfoDAO.getRentContractByShopId(shopId);
|
||||||
|
Long auditId = lineAuditInfoDAO.addAuditInfo(AuditRentContractRequest.convert(request, shopInfo.getPartnerId(), shopInfo.getLineId()));
|
||||||
|
ShopSubStageStatusEnum subStageStatus = AuditResultTypeEnum.PASS.getCode().equals(request.getResultType()) ? ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_5 : ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_4;
|
||||||
|
return shopStageInfoDAO.updateShopStageInfo(shopId, subStageStatus, auditId);
|
||||||
|
}
|
||||||
|
|
||||||
public List<AuditNodeDTO> dealAuditNode(AuditSettingVO auditSetting, Long regionId, String operateUserId, String developmentManager) {
|
public List<AuditNodeDTO> dealAuditNode(AuditSettingVO auditSetting, Long regionId, String operateUserId, String developmentManager) {
|
||||||
List<String> roleIds = new ArrayList<>();
|
List<String> roleIds = new ArrayList<>();
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.cool.store.service;
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
import com.cool.store.dao.LineAuditInfoDAO;
|
import com.cool.store.dao.LineAuditInfoDAO;
|
||||||
import com.cool.store.dao.ShopInfoDAO;
|
import com.cool.store.dao.ShopInfoDAO;
|
||||||
@@ -10,9 +10,11 @@ import com.cool.store.entity.ShopStageInfoDO;
|
|||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
import com.cool.store.enums.point.ShopStageEnum;
|
import com.cool.store.enums.point.ShopStageEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.service.ShopService;
|
||||||
import com.cool.store.utils.NumberConverter;
|
import com.cool.store.utils.NumberConverter;
|
||||||
import com.cool.store.vo.shop.MiniShopPageVO;
|
import com.cool.store.vo.shop.MiniShopPageVO;
|
||||||
import com.cool.store.vo.shop.ShopStageInfoVO;
|
import com.cool.store.vo.shop.ShopStageInfoVO;
|
||||||
|
import com.cool.store.vo.shop.StageShopCountVO;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@@ -79,4 +81,9 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
List<LineAuditInfoDO> auditList = lineAuditInfoDAO.getLineAuditInfoList(auditIds);
|
List<LineAuditInfoDO> auditList = lineAuditInfoDAO.getLineAuditInfoList(auditIds);
|
||||||
return ShopStageInfoVO.convertList(shopStageInfo, auditList);
|
return ShopStageInfoVO.convertList(shopStageInfo, auditList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StageShopCountVO getStageShopCount(Long lineId) {
|
||||||
|
return shopInfoDAO.getStageShopCount(lineId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.cool.store.controller.webb;
|
||||||
|
|
||||||
|
import com.cool.store.context.PartnerUserHolder;
|
||||||
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.service.ShopService;
|
||||||
|
import com.cool.store.vo.shop.MiniShopPageVO;
|
||||||
|
import com.cool.store.vo.shop.StageShopCountVO;
|
||||||
|
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: PCShopController
|
||||||
|
* @Description:
|
||||||
|
* @date 2024-04-16 14:44
|
||||||
|
*/
|
||||||
|
@Api(tags = "pc店铺")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pc/shop")
|
||||||
|
public class PCShopController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ShopService shopService;
|
||||||
|
|
||||||
|
@ApiOperation("获取店铺列表")
|
||||||
|
@GetMapping("/getShopList")
|
||||||
|
public ResponseResult<List<MiniShopPageVO>> getShopList(@RequestParam("lineId")Long lineId) {
|
||||||
|
return ResponseResult.success(shopService.getShopList(lineId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("获取各个阶段店铺数量")
|
||||||
|
@GetMapping("/getStageShopCount")
|
||||||
|
public ResponseResult<StageShopCountVO> getStageShopCount(@RequestParam("lineId")Long lineId) {
|
||||||
|
return ResponseResult.success(shopService.getStageShopCount(lineId));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.cool.store.controller.webb;
|
package com.cool.store.controller.webb;
|
||||||
|
|
||||||
import com.cool.store.context.CurrentUserHolder;
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
|
import com.cool.store.context.PartnerUserHolder;
|
||||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
@@ -194,4 +195,22 @@ public class PointController {
|
|||||||
return ResponseResult.success(pointService.getTodoList(request));
|
return ResponseResult.success(pointService.getTodoList(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("获取租赁合同详情")
|
||||||
|
@GetMapping("/getRentContractDetail")
|
||||||
|
public ResponseResult<ShopRentInfoVO> getRentContractDetail(@RequestParam("shopId")Long shopId) {
|
||||||
|
return ResponseResult.success(pointService.getRentContractDetail(shopId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("租赁合同审核")
|
||||||
|
@PostMapping("/auditRentContract")
|
||||||
|
public ResponseResult<Integer> auditRentContract(@RequestBody @Validated AuditRentContractRequest request) {
|
||||||
|
return ResponseResult.success(pointService.auditRentContract(request));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("获取推荐给加盟商的铺位")
|
||||||
|
@PostMapping("/getLineRecommendPointPage")
|
||||||
|
public ResponseResult<PageInfo<MiniPointPageVO>> getLineRecommendPointPage(@RequestBody MiniPointPageRequest request) {
|
||||||
|
return ResponseResult.success(pointService.getLineRecommendPointPage(request));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,16 +2,14 @@ package com.cool.store.controller.webc;
|
|||||||
|
|
||||||
import com.cool.store.context.CurrentUserHolder;
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
import com.cool.store.context.PartnerUserHolder;
|
import com.cool.store.context.PartnerUserHolder;
|
||||||
import com.cool.store.request.AddPointDetailRequest;
|
import com.cool.store.request.*;
|
||||||
import com.cool.store.request.MiniPointPageRequest;
|
|
||||||
import com.cool.store.request.PointRecommendLineRequest;
|
|
||||||
import com.cool.store.request.SelectPointRequest;
|
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
import com.cool.store.service.PointService;
|
import com.cool.store.service.PointService;
|
||||||
import com.cool.store.service.ShopService;
|
import com.cool.store.service.ShopService;
|
||||||
import com.cool.store.vo.point.MiniPointPageVO;
|
import com.cool.store.vo.point.MiniPointPageVO;
|
||||||
import com.cool.store.vo.point.PointDetailVO;
|
import com.cool.store.vo.point.PointDetailVO;
|
||||||
import com.cool.store.vo.point.PointPageVO;
|
import com.cool.store.vo.point.PointPageVO;
|
||||||
|
import com.cool.store.vo.point.ShopRentInfoVO;
|
||||||
import com.cool.store.vo.shop.MiniShopPageVO;
|
import com.cool.store.vo.shop.MiniShopPageVO;
|
||||||
import com.cool.store.vo.shop.ShopStageInfoVO;
|
import com.cool.store.vo.shop.ShopStageInfoVO;
|
||||||
import com.cool.store.vo.shop.ShopStageVO;
|
import com.cool.store.vo.shop.ShopStageVO;
|
||||||
@@ -74,7 +72,7 @@ public class MiniShopController {
|
|||||||
return ResponseResult.success(pointService.getPointDetailInfo(pointId));
|
return ResponseResult.success(pointService.getPointDetailInfo(pointId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("选址铺位")
|
@ApiOperation("选择铺位")
|
||||||
@PostMapping("/selectPoint")
|
@PostMapping("/selectPoint")
|
||||||
public ResponseResult<Integer> lineSelectPoint(@RequestBody @Validated SelectPointRequest request) {
|
public ResponseResult<Integer> lineSelectPoint(@RequestBody @Validated SelectPointRequest request) {
|
||||||
Long lineId = PartnerUserHolder.getUser().getLineId();
|
Long lineId = PartnerUserHolder.getUser().getLineId();
|
||||||
@@ -82,10 +80,34 @@ public class MiniShopController {
|
|||||||
return ResponseResult.success(pointService.lineSelectPoint(request));
|
return ResponseResult.success(pointService.lineSelectPoint(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("提交新铺位")
|
@ApiOperation("拒绝铺位")
|
||||||
@PostMapping("/add")
|
@PostMapping("/rejectPoint")
|
||||||
public ResponseResult<Long> addPointDetailInfo(@RequestBody @Validated AddPointDetailRequest shopPointDetailRequest) {
|
public ResponseResult<Integer> lineRejectPoint(@RequestBody @Validated RejectPointRequest request) {
|
||||||
return ResponseResult.success(pointService.addPointDetailInfo(shopPointDetailRequest, CurrentUserHolder.getUserId()));
|
Long lineId = PartnerUserHolder.getUser().getLineId();
|
||||||
|
request.setLineId(lineId);
|
||||||
|
return ResponseResult.success(pointService.lineRejectPoint(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("提交新铺位")
|
||||||
|
@PostMapping("/addPoint")
|
||||||
|
public ResponseResult<Long> miniAddPointDetailInfo(@RequestBody @Validated MiniAddPointRequest request) {
|
||||||
|
request.setCurLineId(PartnerUserHolder.getUser().getLineId());
|
||||||
|
return ResponseResult.success(pointService.miniAddPointDetailInfo(request));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("上传租赁合同")
|
||||||
|
@PostMapping("/uploadRentContract")
|
||||||
|
public ResponseResult<Integer> uploadRentContract(@RequestBody @Validated UploadRentContractRequest request) {
|
||||||
|
Long lineId = PartnerUserHolder.getUser().getLineId();
|
||||||
|
request.setCurLineId(lineId);
|
||||||
|
return ResponseResult.success(pointService.uploadRentContract(request));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("获取租赁合同详情")
|
||||||
|
@GetMapping("/getRentContractDetail")
|
||||||
|
public ResponseResult<ShopRentInfoVO> getRentContractDetail(@RequestParam("shopId")Long shopId) {
|
||||||
|
return ResponseResult.success(pointService.getRentContractDetail(shopId));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user