|
@@ -15,15 +15,20 @@
|
15
|
15
|
<result column="cancel_time" property="cancelTime" jdbcType="TIMESTAMP" />
|
16
|
16
|
<result column="cancel_flag" property="cancelFlag" jdbcType="VARCHAR" />
|
17
|
17
|
<result column="belong_id" property="belongId" jdbcType="VARCHAR" />
|
|
18
|
+ <result column="keep_day" property="keepDay" jdbcType="DOUBLE" />
|
|
19
|
+ <result column="ord_price" property="ordPrice" jdbcType="DOUBLE" />
|
|
20
|
+ <result column="out_ord_price" property="outOrdPrice" jdbcType="DOUBLE" />
|
18
|
21
|
|
19
|
22
|
<association column="material_id" property="material" select="com.th.demo.mapping.maint.MaterialMapper.selectByPrimaryKey" />
|
20
|
23
|
<association column="add_id" property="addUser" select="com.th.demo.mapping.system.SysUserMapper.selectByPrimaryKey" />
|
21
|
24
|
<association column="modify_id" property="modifyUser" select="com.th.demo.mapping.system.SysUserMapper.selectByPrimaryKey" />
|
|
25
|
+ <association column="customer_id" property="customer" select="com.th.demo.mapping.maint.CustomerMapper.selectByPrimaryKey" />
|
22
|
26
|
|
23
|
27
|
</resultMap>
|
24
|
28
|
<sql id="Base_Column_List" >
|
25
|
29
|
id, material_id, storage_price,transfer_price, weight_price, add_id, add_time,
|
26
|
|
- modify_id, modify_time, cancel_id, cancel_time, cancel_flag, belong_id,storage_type
|
|
30
|
+ modify_id, modify_time, cancel_id, cancel_time, cancel_flag, belong_id,storage_type,
|
|
31
|
+ keep_day,ord_price,out_ord_price,customer_id
|
27
|
32
|
</sql>
|
28
|
33
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
29
|
34
|
select
|
|
@@ -45,12 +50,14 @@
|
45
|
50
|
transfer_price, weight_price, add_id,
|
46
|
51
|
add_time, modify_id, modify_time,
|
47
|
52
|
cancel_id, cancel_time, cancel_flag,
|
48
|
|
- belong_id,storage_type)
|
|
53
|
+ belong_id,storage_type,
|
|
54
|
+ keep_day,ord_price,out_ord_price,customer_id)
|
49
|
55
|
values (#{id,jdbcType=VARCHAR}, #{material.id,jdbcType=VARCHAR}, #{storagePrice,jdbcType=DOUBLE},
|
50
|
56
|
#{transferPrice,jdbcType=DOUBLE}, #{weightPrice,jdbcType=DOUBLE}, #{addUser.id,jdbcType=VARCHAR},
|
51
|
57
|
#{addTime,jdbcType=TIMESTAMP}, #{modifyUser.id,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP},
|
52
|
58
|
#{cancelId,jdbcType=VARCHAR}, #{cancelTime,jdbcType=TIMESTAMP}, #{cancelFlag,jdbcType=VARCHAR},
|
53
|
|
- #{belongId,jdbcType=VARCHAR},#{storageType,jdbcType=VARCHAR})
|
|
59
|
+ #{belongId,jdbcType=VARCHAR},#{storageType,jdbcType=VARCHAR}, #{keepDay,jdbcType=DOUBLE},
|
|
60
|
+ #{ordPrice,jdbcType=DOUBLE},#{outOrdPrice,jdbcType=DOUBLE},#{customer.id,jdbcType=VARCHAR})
|
54
|
61
|
</insert>
|
55
|
62
|
<insert id="insertSelective" parameterType="com.th.demo.model.maint.Price" >
|
56
|
63
|
insert into t_maint_price
|
|
@@ -193,7 +200,11 @@ transfer_price,
|
193
|
200
|
cancel_time = #{cancelTime,jdbcType=TIMESTAMP},
|
194
|
201
|
cancel_flag = #{cancelFlag,jdbcType=VARCHAR},
|
195
|
202
|
belong_id = #{belongId,jdbcType=VARCHAR},
|
196
|
|
- storage_type = #{storageType,jdbcType=VARCHAR}
|
|
203
|
+ storage_type = #{storageType,jdbcType=VARCHAR},
|
|
204
|
+ keep_day = #{keepDay,jdbcType=DOUBLE},
|
|
205
|
+ ord_price = #{ordPrice,jdbcType=DOUBLE},
|
|
206
|
+ out_ord_price = #{outOrdPrice,jdbcType=DOUBLE},
|
|
207
|
+ customer_id = #{customer.id,jdbcType=VARCHAR}
|
197
|
208
|
where id = #{id,jdbcType=VARCHAR}
|
198
|
209
|
</update>
|
199
|
210
|
|
|
@@ -207,11 +218,10 @@ transfer_price,
|
207
|
218
|
|
208
|
219
|
|
209
|
220
|
<select id="select" resultMap="BaseResultMap" >
|
210
|
|
- select t.* from t_maint_price t ,t_maint_material d
|
211
|
|
- where t.material_id = d.id
|
|
221
|
+ select t.* from t_maint_price t ,t_maint_customer d
|
|
222
|
+ where t.customer_id = d.id
|
212
|
223
|
and d.name like concat('%',#{param1,jdbcType=VARCHAR},'%')
|
213
|
|
- and d.standard like concat('%',#{param2,jdbcType=VARCHAR},'%')
|
214
|
|
- and t.belong_id=#{param3,jdbcType=VARCHAR}
|
|
224
|
+ and t.belong_id=#{param2,jdbcType=VARCHAR}
|
215
|
225
|
and t.cancel_flag = '0'
|
216
|
226
|
</select>
|
217
|
227
|
|
|
@@ -223,4 +233,12 @@ transfer_price,
|
223
|
233
|
and belong_id = #{param3,jdbcType=VARCHAR}
|
224
|
234
|
and cancel_flag = '0'
|
225
|
235
|
</select>
|
|
236
|
+
|
|
237
|
+ <select id="selectListByCustomer" resultMap="BaseResultMap" >
|
|
238
|
+ select t.* from t_maint_price t
|
|
239
|
+ where 1=1
|
|
240
|
+ and t.customer_id = #{param1,jdbcType=VARCHAR}
|
|
241
|
+ and t.belong_id = #{param2,jdbcType=VARCHAR}
|
|
242
|
+ and t.cancel_flag = '0'
|
|
243
|
+ </select>
|
226
|
244
|
</mapper>
|