B端 部分接口3

This commit is contained in:
苏竹红
2023-06-14 19:38:38 +08:00
parent df2f2e307d
commit c0cf731ac3
21 changed files with 762 additions and 50 deletions

View File

@@ -231,14 +231,29 @@
<select id="getUserInfoById" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>,
<include refid="Blob_Column_List"/>
<include refid="Base_Column_List"/>,
<include refid="Blob_Column_List"/>
from
enterprise_user
enterprise_user
where
user_id = #{userId}
user_id = #{userId}
</select>
<select id="getUserInfoByIds" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>,
<include refid="Blob_Column_List"/>
from
enterprise_user
<where>
<if test="userIdList !=null and userIdList.size>0">
<foreach collection="userIdList" item="userId" open="and user_id in (" close=")" separator=",">
#{userId}
</foreach>
</if>
</where>
</select>
<update id="deleteUser">
update enterprise_user set deleted = 1 where user_id not in <foreach collection="excludeUserIds" open="(" close=")" separator="," item="userId">#{userId}</foreach>
</update>

View File

@@ -14,9 +14,17 @@
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
</resultMap>
<sql id="Base_Column_List">
id, zone_name, associated_region_id, type, last_allot_user_id, deleted, create_time,
id, zone_name, associated_region_id, type, last_allot_user_id, deleted, create_time,
update_time, create_user_id, update_user_id
</sql>
<select id="selectById" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
from hy_intend_dev_zone_info
where id = #{id}
</select>
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
insert into hy_intend_dev_zone_info
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -111,4 +119,11 @@
</set>
where id = #{record.id}
</update>
<select id="getHyIntendDevZoneInfoList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
from hy_intend_dev_zone_info
where type = #{type}
</select>
</mapper>

View File

@@ -70,4 +70,64 @@
</set>
where id = #{record.id}
</update>
<delete id="deleteByOpenAreaIds">
delete from hy_intend_developement_mapping
<where>
<if test="type!=null and type!=''">
and type = #{type}
</if>
<if test="openAreaIdList!=null and openAreaIdList.size>0">
<foreach collection="openAreaIdList" open="and open_area_mapping_id in (" close=")" separator="," item="openAreaId">
#{openAreaId}
</foreach>
</if>
</where>
</delete>
<delete id="deleteByMappingIds">
delete from hy_intend_developement_mapping
<where>
<if test="type!=null and type!=''">
and type = #{type}
</if>
<if test="deleteByMappingIds!=null and deleteByMappingIds.size>0">
<foreach collection="deleteByMappingIds" open="and mapping_id in (" close=")" separator="," item="mappingId">
#{mappingId}
</foreach>
</if>
</where>
</delete>
<insert id="batchInsert">
insert into
hy_intend_developement_mapping
(
mapping_id,
open_area_mapping_id,
type
)
values
<foreach collection="recordList" item="record" separator=",">
(#{record.mappingId},
#{record.openAreaMappingId},
#{record.type}
</foreach>
</insert>
<select id="selectByMappingIdList" resultType="com.cool.store.dto.partner.ZoneCheckDTO">
select
a.open_area_mapping_id as openAreaMappingId,
b.zone_name as zoneName
from hy_intend_developement_mapping a inner join hy_intend_dev_zone_info b on a.mapping_id = b.id
<where>
<if test="mappingIdList!=null and mappingIdList.size>0">
<foreach collection="mappingIdList" open="and a.open_area_mapping_id in (" close=")" separator="," item="mappingId">
#{mappingId}
</foreach>
</if>
</where>
</select>
</mapper>

View File

@@ -15,7 +15,7 @@
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
</resultMap>
<sql id="Base_Column_List">
id, parent_id, area_name, area_path, background_banner, detail_banner, area_status,
id, parent_id, area_name, area_path, background_banner, detail_banner, area_status,
deleted, create_time, update_time, update_user_id
</sql>
<insert id="insertSelective" parameterType="com.cool.store.entity.HyOpenAreaInfoDO" keyProperty="record.id" useGeneratedKeys="true">
@@ -123,6 +123,59 @@
</update>
<update id="batchUpdateById">
update hy_open_area_info
<set>
<if test="backgroundBanner != null">
background_banner = #{backgroundBanner},
</if>
<if test="detailBanner != null">
detail_banner = #{detailBanner},
</if>
<if test="areaStatus != null">
area_status = #{areaStatus},
</if>
<if test="updateUserId != null">
update_user_id = #{updateUserId},
</if>
</set>
<where>
<if test="ids !=null and ids.size>0">
<foreach collection="ids" item="id" open="and id in (" close=")" separator=",">
#{id}
</foreach>
</if>
</where>
</update>
<update id="batchUpdateByParentId">
update hy_open_area_info
<set>
<if test="backgroundBanner != null">
background_banner = #{backgroundBanner},
</if>
<if test="detailBanner != null">
detail_banner = #{detailBanner},
</if>
<if test="areaStatus != null">
area_status = #{areaStatus},
</if>
<if test="updateUserId != null">
update_user_id = #{updateUserId},
</if>
</set>
<where>
<if test="parentIdList !=null and parentIdList.size>0">
<foreach collection="parentIdList" item="parentId" open="and parent_id in (" close=")" separator=",">
#{parentId}
</foreach>
</if>
</where>
</update>
<select id="queryKeyOpenArea" resultMap="BaseResultMap">
select * from
hy_open_area_info
@@ -182,4 +235,17 @@
</where>
</select>
<select id="selectByIds" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
from hy_open_area_info
<where>
<if test="idList !=null and idList.size>0">
<foreach collection="idList" item="id" open="and id in (" close=")" separator=",">
#{id}
</foreach>
</if>
</where>
</select>
</mapper>