GarUserOrderMessageMapper.xml
1.84 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
<?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.trash.garbage.mapper.GarUserOrderMessageMapper">
<resultMap id="BaseResultMap" type="com.trash.garbage.pojo.domain.GarUserOrderMessage">
<id property="garId" column="gar_id" jdbcType="VARCHAR"/>
<result property="garContent" column="gar_content" jdbcType="VARCHAR"/>
<result property="garCreateTime" column="gar_create_time" jdbcType="TIMESTAMP"/>
<result property="garUpdateTime" column="gar_update_time" jdbcType="TIMESTAMP"/>
<result property="garCreateBy" column="gar_create_by" jdbcType="VARCHAR"/>
<result property="garUpdateBy" column="gar_update_by" jdbcType="VARCHAR"/>
<result property="garRemark" column="gar_remark" jdbcType="VARCHAR"/>
<result property="garUserId" column="gar_user_id" jdbcType="VARCHAR"/>
<result property="garUserTel" column="gar_user_tel" jdbcType="VARCHAR"/>
<result property="garMessageState" column="gar_message_state" jdbcType="TINYINT"/>
</resultMap>
<sql id="Base_Column_List">
gar_id,gar_content,gar_create_time,gar_user_id,
gar_update_time,gar_create_by,gar_update_by,
gar_remark,gar_user_tel,gar_message_state
</sql>
<select id="queryMessageListByUserIdWithState"
resultType="com.trash.garbage.pojo.vo.GarUserOrderMessageVo">
select gar_id,gar_content,gar_user_tel
from gar_user_order_message
<where>
<if test="userId != null">
and gar_user_id = #{userId}
</if>
<if test="userId != null">
and gar_message_state = #{status}
</if>
</where>
</select>
</mapper>