SampleResultFeedbackMapper.xml
1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?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.lframework.xingyun.sc.mappers.SampleResultFeedbackMapper">
<resultMap id="SampleResultFeedback" type="com.lframework.xingyun.sc.entity.SampleResultFeedback">
<id column="id" property="id"/>
<result column="customer_id" property="customerId"/>
<result column="workshop_id" property="workshopId"/>
<result column="order_id" property="orderId"/>
<result column="create_by_id" property="createById"/>
<result column="update_by_id" property="updateById"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<sql id="SampleResultFeedback_sql">
SELECT
tb.id,
tb.customer_id,
tb.workshop_id,
tb.order_id,
tb.create_by_id,
tb.update_by_id,
tb.create_time,
tb.update_time
FROM sample_result_feedback AS tb
</sql>
<select id="query" resultMap="SampleResultFeedback">
<include refid="SampleResultFeedback_sql"/>
<where>
<if test="vo.customerId != null and vo.customerId != ''">
AND tb.customer_id = #{vo.customerId}
</if>
<if test="vo.workshopId != null and vo.workshopId != ''">
AND tb.workshop_id = #{vo.workshopId}
</if>
<if test="vo.orderId != null and vo.orderId != ''">
AND tb.order_id = #{vo.orderId}
</if>
</where>
</select>
</mapper>