Blame view

backend/uc/src/main/resources/mapper/MatrixColDefMapper.xml 2.64 KB
8ea9c133   陈威   初始化提交
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
61
62
63
64
65
66
67
68
<?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.hotent.uc.dao.MatrixColDefDao">
	<resultMap id="MatrixColDef" type="com.hotent.uc.model.MatrixColDef">
		<id property="id" column="ID_" jdbcType="VARCHAR"/>
		<result property="matrixId" column="MATRIX_ID_" jdbcType="VARCHAR"/>
		<result property="code" column="CODE_" jdbcType="VARCHAR"/>
		<result property="name" column="NAME_" jdbcType="VARCHAR"/>
		<result property="status" column="STATUS_" jdbcType="NUMERIC"/>
		<result property="colType" column="COL_TYPE_" jdbcType="NUMERIC"/>
		<result property="selectType" column="SELECT_TYPE_" jdbcType="NUMERIC"/>
		<result property="ctrlType" column="CTRL_TYPE_" jdbcType="VARCHAR"/>
		<result property="queryAlias" column="QUERY_ALIAS_" jdbcType="VARCHAR"/>
		<result property="colConfig" column="COL_CONFIG_" jdbcType="VARCHAR"/>
		<result property="isDele" column="IS_DELE_" jdbcType="NUMERIC"/>
		<result property="createBy" column="CREATE_BY_" jdbcType="VARCHAR"/>
		<result property="createTime" column="CREATE_TIME_" jdbcType="TIMESTAMP"/>
		<result property="createOrgId" column="CREATE_ORG_ID_" jdbcType="VARCHAR"/>
		<result property="updateBy" column="UPDATE_BY_" jdbcType="VARCHAR"/>
		<result property="updateTime" column="UPDATE_TIME_" jdbcType="TIMESTAMP"/>
		<result property="tenantId" column="TENANT_ID_" jdbcType="VARCHAR"/>
		<result property="sn" column="SN_" jdbcType="NUMERIC"/>
		
		<result property="bindKey" column="BIND_KEY_" jdbcType="VARCHAR"/>
		<result property="bindValue" column="BIND_VALUE_" jdbcType="VARCHAR"/>
		<result property="searchField" column="SEARCH_FIELD_" jdbcType="VARCHAR"/>
	</resultMap>
	
	<select id="getColList" parameterType="java.util.Map" resultMap="MatrixColDef">
		 SELECT * FROM uc_matrix_col_def
		 WHERE
		 COL_TYPE_ = #{colType}
		 AND 
		 MATRIX_ID_	=#{matrixId} 
		 AND
		 IS_DELE_ = 0
		 ORDER BY SN_ 
	</select>
	
	<select id="getColAllList" parameterType="java.util.Map" resultMap="MatrixColDef">
		 SELECT * FROM uc_matrix_col_def
		 WHERE
		 COL_TYPE_ = #{colType}
		 AND 
		 MATRIX_ID_	=#{matrixId} 
		 ORDER BY SN_ 
	</select>
	
	<select id="getByCode" parameterType="java.util.Map" resultMap="MatrixColDef">
		 SELECT * FROM uc_matrix_col_def
		 WHERE
		 COL_TYPE_ = #{colType}
		 AND 
		 MATRIX_ID_	=#{matrixId}
		 AND
		 lower(CODE_) = lower(#{code})
	</select>
	
	<update id="updateStatus" parameterType="java.util.Map">
		UPDATE uc_matrix_col_def SET 
		STATUS_ = #{status}
		WHERE
		ID_ IN 
		<foreach collection="ids" item="item" open="(" close=")" separator=",">
			#{item}
		</foreach>
	</update>
</mapper>