feat:装修配置表
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?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.decoration.DecorationTeamConfigMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.decoration.DecorationTeamConfigDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="team_name" jdbcType="VARCHAR" property="teamName" />
|
||||
<result column="team_code" jdbcType="VARCHAR" property="teamCode" />
|
||||
<result column="use_system" jdbcType="TINYINT" property="useSystem" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="deleted" jdbcType="TINYINT" property="deleted" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?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.decoration.ShopDecorationAssignMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.decoration.ShopDecorationAssignDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="shop_id" jdbcType="BIGINT" property="shopId" />
|
||||
<result column="decoration_desc_status" jdbcType="TINYINT" property="decorationDescStatus" />
|
||||
<result column="decoration_team_id" jdbcType="BIGINT" property="decorationTeamId" />
|
||||
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
|
||||
<result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -0,0 +1,66 @@
|
||||
<?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.decoration.TeamAreaMappingMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.decoration.TeamAreaMappingDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="team_id" jdbcType="BIGINT" property="teamId" />
|
||||
<result column="open_city_id" jdbcType="BIGINT" property="openCityId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<!-- 批量插入 -->
|
||||
<insert id="batchInsert" parameterType="java.util.List">
|
||||
INSERT INTO zxjp_team_area_mapping (
|
||||
team_id,
|
||||
open_city_id
|
||||
) VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.teamId},
|
||||
#{item.openCityId}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!-- 根据团队id删除 更新团队id时候删除 -->
|
||||
<delete id="deletedByTeamId" parameterType="java.lang.Long">
|
||||
DELETE FROM zxjp_team_area_mapping
|
||||
WHERE team_id = #{teamId}
|
||||
</delete>
|
||||
|
||||
<!-- 根据ids删除 -->
|
||||
<delete id="deletedIds" parameterType="java.util.List">
|
||||
DELETE FROM zxjp_team_area_mapping
|
||||
WHERE id IN
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getByCityId" parameterType="java.lang.Long" resultType="com.cool.store.entity.decoration.TeamAreaMappingDO">
|
||||
SELECT
|
||||
*
|
||||
FROM zxjp_team_area_mapping
|
||||
WHERE open_city_id = #{cityId}
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="listByTeamIdList" parameterType="java.util.List" resultType="com.cool.store.dto.decoration.TeamAreaMappingDTO">
|
||||
SELECT
|
||||
a.team_id as teamId,
|
||||
a.open_city_id as openCityId,
|
||||
b.area_name as openCityName
|
||||
FROM zxjp_team_area_mapping a
|
||||
left join xfsg_open_area_info b on a.open_city_id = b.id
|
||||
WHERE a.team_id IN
|
||||
<foreach collection="teamIdList" item="teamId" open="(" separator="," close=")">
|
||||
#{teamId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user