FunctionValueMapper.xml
2.25 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?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="cn.com.glsx.dj.system.mapper.FunctionValueMapper" >
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.system.model.FunctionValue" >
<!--
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="function_id" property="functionId" jdbcType="INTEGER" />
<result column="val_text" property="valText" jdbcType="VARCHAR" />
<result column="val_code" property="valCode" jdbcType="VARCHAR" />
<result column="order_no" property="orderNo" jdbcType="INTEGER" />
<result column="created_by" property="createdBy" jdbcType="VARCHAR" />
<result column="created_date" property="createdDate" jdbcType="TIMESTAMP" />
<result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
<result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" />
<result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" />
</resultMap>
<sql id="Base_Column_List" >
<!--
WARNING - @mbg.generated
-->
id, function_id, val_text, val_code, order_no, created_by, created_date, updated_by,
updated_date, deleted_flag
</sql>
<select id="listValText" parameterType="cn.com.glsx.dj.system.model.FunctionValue" resultType="java.lang.String">
SELECT GROUP_CONCAT(val_text) from dj_system_function_value
<where>
<if test="functionId != null">
function_id = #{functionId}
</if>
</where>
</select>
<select id="listValStrs" parameterType="cn.com.glsx.dj.system.model.FunctionValue" resultType="java.lang.String">
SELECT GROUP_CONCAT(CONCAT_WS(',',val_code,val_text) separator ';') from dj_system_function_value
<where>
deleted_flag = 'N'
<if test="functionId != null">
and function_id = #{functionId}
</if>
</where>
</select>
<update id="updateByFunctionId" parameterType="cn.com.glsx.dj.system.model.FunctionValue">
update dj_system_function_value
<set>
<if test="deletedFlag != null and deletedFlag != ''">
deleted_flag = #{deletedFlag},
</if>
</set>
where function_id = #{functionId}
</update>
</mapper>