Showing
4 changed files
with
0 additions
and
336 deletions
1 | -package com.yoho.search.dal; | ||
2 | - | ||
3 | -import com.yoho.search.dal.model.ShopDecoratorBO; | ||
4 | -import com.yoho.search.dal.model.ShopsDecorator; | ||
5 | - | ||
6 | -import java.util.List; | ||
7 | - | ||
8 | -public interface ShopsDecoratorMapper { | ||
9 | - int deleteByPrimaryKey(Integer id); | ||
10 | - | ||
11 | - int insert(ShopsDecorator record); | ||
12 | - | ||
13 | - int insertSelective(ShopsDecorator record); | ||
14 | - | ||
15 | - ShopsDecorator selectByPrimaryKey(Integer id); | ||
16 | - | ||
17 | - int updateByPrimaryKeySelective(ShopsDecorator record); | ||
18 | - | ||
19 | - int updateByPrimaryKey(ShopsDecorator record); | ||
20 | - | ||
21 | - List<ShopDecoratorBO> selectForDecoratorId(); | ||
22 | -} |
1 | -package com.yoho.search.dal; | ||
2 | - | ||
3 | -import com.yoho.search.dal.model.ShopsDecoratorTemplate; | ||
4 | - | ||
5 | -import java.util.List; | ||
6 | - | ||
7 | -public interface ShopsDecoratorTemplateMapper { | ||
8 | - int deleteByPrimaryKey(Integer id); | ||
9 | - | ||
10 | - int insert(ShopsDecoratorTemplate record); | ||
11 | - | ||
12 | - int insertSelective(ShopsDecoratorTemplate record); | ||
13 | - | ||
14 | - ShopsDecoratorTemplate selectByPrimaryKey(Integer id); | ||
15 | - | ||
16 | - int updateByPrimaryKeySelective(ShopsDecoratorTemplate record); | ||
17 | - | ||
18 | - int updateByPrimaryKey(ShopsDecoratorTemplate record); | ||
19 | - | ||
20 | - List<ShopsDecoratorTemplate> getByShopsDecoratorIds(List<Integer> ids); | ||
21 | -} |
1 | -<?xml version="1.0" encoding="UTF-8" ?> | ||
2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | ||
3 | -<mapper namespace="com.yoho.search.dal.ShopsDecoratorMapper"> | ||
4 | - <resultMap id="BaseResultMap" type="com.yoho.search.dal.model.ShopsDecorator"> | ||
5 | - <id column="id" property="id" jdbcType="INTEGER"/> | ||
6 | - <result column="shops_id" property="shopsId" jdbcType="INTEGER"/> | ||
7 | - <result column="check_status" property="checkStatus" jdbcType="INTEGER"/> | ||
8 | - <result column="create_time" property="createTime" jdbcType="INTEGER"/> | ||
9 | - <result column="update_time" property="updateTime" jdbcType="INTEGER"/> | ||
10 | - <result column="status" property="status" jdbcType="INTEGER"/> | ||
11 | - <result column="app_type" property="appType" jdbcType="INTEGER"/> | ||
12 | - <result column="blk_check_status" property="blkCheckStatus" jdbcType="INTEGER"/> | ||
13 | - </resultMap> | ||
14 | - <sql id="Base_Column_List"> | ||
15 | - id, shops_id, check_status, create_time, update_time, status, app_type, blk_check_status | ||
16 | - </sql> | ||
17 | - <resultMap id="SelectForDecoratorIdResultMap" type="com.yoho.search.dal.model.ShopDecoratorBO"> | ||
18 | - <id column="shops_id" property="shopsId" jdbcType="INTEGER"/> | ||
19 | - <result column="shops_decorator_id" property="shopsDecoratorId" jdbcType="INTEGER"/> | ||
20 | - </resultMap> | ||
21 | - <select id="selectForDecoratorId" resultMap="SelectForDecoratorIdResultMap"> | ||
22 | - SELECT | ||
23 | - shops_id, | ||
24 | - max(id) shops_decorator_id | ||
25 | - FROM | ||
26 | - shops_decorator | ||
27 | - WHERE | ||
28 | - (shops_id, update_time) IN ( | ||
29 | - SELECT | ||
30 | - shops_id, | ||
31 | - max(update_time) | ||
32 | - FROM | ||
33 | - shops_decorator | ||
34 | - GROUP BY | ||
35 | - shops_id | ||
36 | - ) | ||
37 | - AND check_status = 300 | ||
38 | - GROUP BY | ||
39 | - shops_id; | ||
40 | - </select> | ||
41 | - <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer"> | ||
42 | - select | ||
43 | - <include refid="Base_Column_List"/> | ||
44 | - from shops_decorator | ||
45 | - where id = #{id,jdbcType=INTEGER} | ||
46 | - </select> | ||
47 | - <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> | ||
48 | - delete from shops_decorator | ||
49 | - where id = #{id,jdbcType=INTEGER} | ||
50 | - </delete> | ||
51 | - <insert id="insert" parameterType="com.yoho.search.dal.model.ShopsDecorator"> | ||
52 | - insert into shops_decorator (id, shops_id, check_status, | ||
53 | - create_time, update_time, status, | ||
54 | - app_type, blk_check_status) | ||
55 | - values (#{id,jdbcType=INTEGER}, #{shopsId,jdbcType=INTEGER}, #{checkStatus,jdbcType=INTEGER}, | ||
56 | - #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, | ||
57 | - #{appType,jdbcType=INTEGER}, #{blkCheckStatus,jdbcType=INTEGER}) | ||
58 | - </insert> | ||
59 | - <insert id="insertSelective" parameterType="com.yoho.search.dal.model.ShopsDecorator"> | ||
60 | - insert into shops_decorator | ||
61 | - <trim prefix="(" suffix=")" suffixOverrides=","> | ||
62 | - <if test="id != null"> | ||
63 | - id, | ||
64 | - </if> | ||
65 | - <if test="shopsId != null"> | ||
66 | - shops_id, | ||
67 | - </if> | ||
68 | - <if test="checkStatus != null"> | ||
69 | - check_status, | ||
70 | - </if> | ||
71 | - <if test="createTime != null"> | ||
72 | - create_time, | ||
73 | - </if> | ||
74 | - <if test="updateTime != null"> | ||
75 | - update_time, | ||
76 | - </if> | ||
77 | - <if test="status != null"> | ||
78 | - status, | ||
79 | - </if> | ||
80 | - <if test="appType != null"> | ||
81 | - app_type, | ||
82 | - </if> | ||
83 | - <if test="blkCheckStatus != null"> | ||
84 | - blk_check_status, | ||
85 | - </if> | ||
86 | - </trim> | ||
87 | - <trim prefix="values (" suffix=")" suffixOverrides=","> | ||
88 | - <if test="id != null"> | ||
89 | - #{id,jdbcType=INTEGER}, | ||
90 | - </if> | ||
91 | - <if test="shopsId != null"> | ||
92 | - #{shopsId,jdbcType=INTEGER}, | ||
93 | - </if> | ||
94 | - <if test="checkStatus != null"> | ||
95 | - #{checkStatus,jdbcType=INTEGER}, | ||
96 | - </if> | ||
97 | - <if test="createTime != null"> | ||
98 | - #{createTime,jdbcType=INTEGER}, | ||
99 | - </if> | ||
100 | - <if test="updateTime != null"> | ||
101 | - #{updateTime,jdbcType=INTEGER}, | ||
102 | - </if> | ||
103 | - <if test="status != null"> | ||
104 | - #{status,jdbcType=INTEGER}, | ||
105 | - </if> | ||
106 | - <if test="appType != null"> | ||
107 | - #{appType,jdbcType=INTEGER}, | ||
108 | - </if> | ||
109 | - <if test="blkCheckStatus != null"> | ||
110 | - #{blkCheckStatus,jdbcType=INTEGER}, | ||
111 | - </if> | ||
112 | - </trim> | ||
113 | - </insert> | ||
114 | - <update id="updateByPrimaryKeySelective" parameterType="com.yoho.search.dal.model.ShopsDecorator"> | ||
115 | - update shops_decorator | ||
116 | - <set> | ||
117 | - <if test="shopsId != null"> | ||
118 | - shops_id = #{shopsId,jdbcType=INTEGER}, | ||
119 | - </if> | ||
120 | - <if test="checkStatus != null"> | ||
121 | - check_status = #{checkStatus,jdbcType=INTEGER}, | ||
122 | - </if> | ||
123 | - <if test="createTime != null"> | ||
124 | - create_time = #{createTime,jdbcType=INTEGER}, | ||
125 | - </if> | ||
126 | - <if test="updateTime != null"> | ||
127 | - update_time = #{updateTime,jdbcType=INTEGER}, | ||
128 | - </if> | ||
129 | - <if test="status != null"> | ||
130 | - status = #{status,jdbcType=INTEGER}, | ||
131 | - </if> | ||
132 | - <if test="appType != null"> | ||
133 | - app_type = #{appType,jdbcType=INTEGER}, | ||
134 | - </if> | ||
135 | - <if test="blkCheckStatus != null"> | ||
136 | - blk_check_status = #{blkCheckStatus,jdbcType=INTEGER}, | ||
137 | - </if> | ||
138 | - </set> | ||
139 | - where id = #{id,jdbcType=INTEGER} | ||
140 | - </update> | ||
141 | - <update id="updateByPrimaryKey" parameterType="com.yoho.search.dal.model.ShopsDecorator"> | ||
142 | - update shops_decorator | ||
143 | - set shops_id = #{shopsId,jdbcType=INTEGER}, | ||
144 | - check_status = #{checkStatus,jdbcType=INTEGER}, | ||
145 | - create_time = #{createTime,jdbcType=INTEGER}, | ||
146 | - update_time = #{updateTime,jdbcType=INTEGER}, | ||
147 | - status = #{status,jdbcType=INTEGER}, | ||
148 | - app_type = #{appType,jdbcType=INTEGER}, | ||
149 | - blk_check_status = #{blkCheckStatus,jdbcType=INTEGER} | ||
150 | - where id = #{id,jdbcType=INTEGER} | ||
151 | - </update> | ||
152 | -</mapper> |
1 | -<?xml version="1.0" encoding="UTF-8" ?> | ||
2 | -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | ||
3 | -<mapper namespace="com.yoho.search.dal.ShopsDecoratorTemplateMapper" > | ||
4 | - <resultMap id="BaseResultMap" type="com.yoho.search.dal.model.ShopsDecoratorTemplate" > | ||
5 | - <id column="id" property="id" jdbcType="INTEGER" /> | ||
6 | - <result column="shops_decorator_id" property="shopsDecoratorId" jdbcType="INTEGER" /> | ||
7 | - <result column="platform" property="platform" jdbcType="VARCHAR" /> | ||
8 | - <result column="template_type" property="templateType" jdbcType="VARCHAR" /> | ||
9 | - <result column="create_time" property="createTime" jdbcType="INTEGER" /> | ||
10 | - <result column="update_time" property="updateTime" jdbcType="INTEGER" /> | ||
11 | - <result column="is_enable" property="isEnable" jdbcType="CHAR" /> | ||
12 | - <result column="app_type" property="appType" jdbcType="INTEGER" /> | ||
13 | - </resultMap> | ||
14 | - <sql id="Base_Column_List" > | ||
15 | - id, shops_decorator_id, platform, template_type, create_time, update_time, is_enable, | ||
16 | - app_type | ||
17 | - </sql> | ||
18 | - <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > | ||
19 | - select | ||
20 | - <include refid="Base_Column_List" /> | ||
21 | - from shops_decorator_template | ||
22 | - where id = #{id,jdbcType=INTEGER} | ||
23 | - </select> | ||
24 | - <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" > | ||
25 | - delete from shops_decorator_template | ||
26 | - where id = #{id,jdbcType=INTEGER} | ||
27 | - </delete> | ||
28 | - <insert id="insert" parameterType="com.yoho.search.dal.model.ShopsDecoratorTemplate" > | ||
29 | - insert into shops_decorator_template (id, shops_decorator_id, platform, | ||
30 | - template_type, create_time, update_time, | ||
31 | - is_enable, app_type) | ||
32 | - values (#{id,jdbcType=INTEGER}, #{shopsDecoratorId,jdbcType=INTEGER}, #{platform,jdbcType=VARCHAR}, | ||
33 | - #{templateType,jdbcType=VARCHAR}, #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}, | ||
34 | - #{isEnable,jdbcType=CHAR}, #{appType,jdbcType=INTEGER}) | ||
35 | - </insert> | ||
36 | - <insert id="insertSelective" parameterType="com.yoho.search.dal.model.ShopsDecoratorTemplate" > | ||
37 | - insert into shops_decorator_template | ||
38 | - <trim prefix="(" suffix=")" suffixOverrides="," > | ||
39 | - <if test="id != null" > | ||
40 | - id, | ||
41 | - </if> | ||
42 | - <if test="shopsDecoratorId != null" > | ||
43 | - shops_decorator_id, | ||
44 | - </if> | ||
45 | - <if test="platform != null" > | ||
46 | - platform, | ||
47 | - </if> | ||
48 | - <if test="templateType != null" > | ||
49 | - template_type, | ||
50 | - </if> | ||
51 | - <if test="createTime != null" > | ||
52 | - create_time, | ||
53 | - </if> | ||
54 | - <if test="updateTime != null" > | ||
55 | - update_time, | ||
56 | - </if> | ||
57 | - <if test="isEnable != null" > | ||
58 | - is_enable, | ||
59 | - </if> | ||
60 | - <if test="appType != null" > | ||
61 | - app_type, | ||
62 | - </if> | ||
63 | - </trim> | ||
64 | - <trim prefix="values (" suffix=")" suffixOverrides="," > | ||
65 | - <if test="id != null" > | ||
66 | - #{id,jdbcType=INTEGER}, | ||
67 | - </if> | ||
68 | - <if test="shopsDecoratorId != null" > | ||
69 | - #{shopsDecoratorId,jdbcType=INTEGER}, | ||
70 | - </if> | ||
71 | - <if test="platform != null" > | ||
72 | - #{platform,jdbcType=VARCHAR}, | ||
73 | - </if> | ||
74 | - <if test="templateType != null" > | ||
75 | - #{templateType,jdbcType=VARCHAR}, | ||
76 | - </if> | ||
77 | - <if test="createTime != null" > | ||
78 | - #{createTime,jdbcType=INTEGER}, | ||
79 | - </if> | ||
80 | - <if test="updateTime != null" > | ||
81 | - #{updateTime,jdbcType=INTEGER}, | ||
82 | - </if> | ||
83 | - <if test="isEnable != null" > | ||
84 | - #{isEnable,jdbcType=CHAR}, | ||
85 | - </if> | ||
86 | - <if test="appType != null" > | ||
87 | - #{appType,jdbcType=INTEGER}, | ||
88 | - </if> | ||
89 | - </trim> | ||
90 | - </insert> | ||
91 | - <update id="updateByPrimaryKeySelective" parameterType="com.yoho.search.dal.model.ShopsDecoratorTemplate" > | ||
92 | - update shops_decorator_template | ||
93 | - <set > | ||
94 | - <if test="shopsDecoratorId != null" > | ||
95 | - shops_decorator_id = #{shopsDecoratorId,jdbcType=INTEGER}, | ||
96 | - </if> | ||
97 | - <if test="platform != null" > | ||
98 | - platform = #{platform,jdbcType=VARCHAR}, | ||
99 | - </if> | ||
100 | - <if test="templateType != null" > | ||
101 | - template_type = #{templateType,jdbcType=VARCHAR}, | ||
102 | - </if> | ||
103 | - <if test="createTime != null" > | ||
104 | - create_time = #{createTime,jdbcType=INTEGER}, | ||
105 | - </if> | ||
106 | - <if test="updateTime != null" > | ||
107 | - update_time = #{updateTime,jdbcType=INTEGER}, | ||
108 | - </if> | ||
109 | - <if test="isEnable != null" > | ||
110 | - is_enable = #{isEnable,jdbcType=CHAR}, | ||
111 | - </if> | ||
112 | - <if test="appType != null" > | ||
113 | - app_type = #{appType,jdbcType=INTEGER}, | ||
114 | - </if> | ||
115 | - </set> | ||
116 | - where id = #{id,jdbcType=INTEGER} | ||
117 | - </update> | ||
118 | - <update id="updateByPrimaryKey" parameterType="com.yoho.search.dal.model.ShopsDecoratorTemplate" > | ||
119 | - update shops_decorator_template | ||
120 | - set shops_decorator_id = #{shopsDecoratorId,jdbcType=INTEGER}, | ||
121 | - platform = #{platform,jdbcType=VARCHAR}, | ||
122 | - template_type = #{templateType,jdbcType=VARCHAR}, | ||
123 | - create_time = #{createTime,jdbcType=INTEGER}, | ||
124 | - update_time = #{updateTime,jdbcType=INTEGER}, | ||
125 | - is_enable = #{isEnable,jdbcType=CHAR}, | ||
126 | - app_type = #{appType,jdbcType=INTEGER} | ||
127 | - where id = #{id,jdbcType=INTEGER} | ||
128 | - </update> | ||
129 | - <select id="getByShopsDecoratorIds" resultMap="BaseResultMap"> | ||
130 | - Select | ||
131 | - <include refid="Base_Column_List" /> | ||
132 | - from shops_decorator_template | ||
133 | - where | ||
134 | - shops_decorator_id | ||
135 | - in | ||
136 | - <foreach item="item" index="index" collection="list" | ||
137 | - open="(" separator="," close=")"> | ||
138 | - #{item} | ||
139 | - </foreach> | ||
140 | - </select> | ||
141 | -</mapper> |
-
Please register or login to post a comment