This commit is contained in:
zhangchenbiao
2024-04-16 15:24:53 +08:00
parent d0e5616579
commit 77ad656b8c
32 changed files with 1029 additions and 26 deletions

View File

@@ -99,4 +99,13 @@
status = if(line_id = #{lineId}, 2, 3)
where point_id = #{pointId} and deleted = 0
</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>

View File

@@ -35,4 +35,29 @@
<select id="getShopList" resultMap="BaseResultMap">
select <include refid="allColumn"/> from xfsg_shop_info where line_id = #{lineId} and deleted= '0'
</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>

View File

@@ -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>

View File

@@ -49,8 +49,20 @@
is_terminated = #{isTerminated},
remark = #{remark},
actual_complete_time = if(is_terminated, now(), null)
<if test="auditId != null">
, audit_id = #{auditId}
</if>
where
shop_id = #{shopId} and shop_sub_stage = #{shopSubStage}
</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>