|
@@ -1,7 +1,7 @@
|
|
|
<?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.xt.js.gkaq.frame.mappers.CodeModelMapper" >
|
|
|
- <resultMap id="BaseResultMap" type="com.xt.js.gkaq.frame.model.CodeModel" >
|
|
|
+ <resultMap id="BaseResultMap" type="com.xt.js.gkaq.frame.model.CodeModelDto" >
|
|
|
<id column="ID" property="id" jdbcType="VARCHAR" />
|
|
|
<result column="PID" property="pid" jdbcType="VARCHAR" />
|
|
|
<result column="PCODE" property="pcode" jdbcType="VARCHAR" />
|
|
@@ -14,6 +14,7 @@
|
|
|
<result column="CREATE_TIME" property="createTime" jdbcType="TIMESTAMP" />
|
|
|
<result column="UPDATE_TIME" property="updateTime" jdbcType="TIMESTAMP" />
|
|
|
<result column="STATE" property="state" jdbcType="CHAR" />
|
|
|
+ <result column="PTEXT" property="ptext" jdbcType="VARCHAR" />
|
|
|
</resultMap>
|
|
|
<resultMap id="ComboBoxMap" type="com.xt.js.gkaq.frame.model.ComboBoxDto" >
|
|
|
<result column="VAL" property="optVal" jdbcType="VARCHAR" />
|
|
@@ -23,7 +24,7 @@
|
|
|
delete from AQ_BASIC_FRAME_CODE
|
|
|
where ID = #{id,jdbcType=VARCHAR}
|
|
|
</delete>
|
|
|
- <insert id="insert" parameterType="com.xt.js.gkaq.frame.model.CodeModel" >
|
|
|
+ <insert id="insert" parameterType="com.xt.js.gkaq.frame.model.CodeModelDto" >
|
|
|
insert into AQ_BASIC_FRAME_CODE (ID, PID, PCODE,
|
|
|
TEXT, CODE, VAL, LEAF,
|
|
|
SORTNO, REMARK, CREATE_TIME,
|
|
@@ -33,7 +34,7 @@
|
|
|
#{sortno,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
#{updateTime,jdbcType=TIMESTAMP}, #{state,jdbcType=CHAR})
|
|
|
</insert>
|
|
|
- <update id="updateByPrimaryKey" parameterType="com.xt.js.gkaq.frame.model.CodeModel" >
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.xt.js.gkaq.frame.model.CodeModelDto" >
|
|
|
update AQ_BASIC_FRAME_CODE
|
|
|
set PID = #{pid,jdbcType=VARCHAR},
|
|
|
PCODE = #{pcode,jdbcType=VARCHAR},
|
|
@@ -59,6 +60,25 @@
|
|
|
STATE
|
|
|
from AQ_BASIC_FRAME_CODE
|
|
|
</select>
|
|
|
+ <select id="selectAllByCond" resultMap="BaseResultMap" parameterType="com.xt.js.gkaq.frame.model.OrgModelDto" >
|
|
|
+ select C.ID, P.ID PID, P.CODE PCODE, P.TEXT PTEXT, C.TEXT, C.CODE, C.VAL, C.LEAF, C.SORTNO, C.REMARK
|
|
|
+ from AQ_BASIC_FRAME_CODE C left join AQ_BASIC_FRAME_CODE P on C.PID = P.ID
|
|
|
+ <where>
|
|
|
+ <if test="pid != null and pid != ''">
|
|
|
+ P.ID = #{pid,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="pcode != null and pcode != ''">
|
|
|
+ P.CODE = #{pcode,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="code != null and code != ''">
|
|
|
+ and C.CODE = #{code,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="text != null and text != ''">
|
|
|
+ and C.TEXT like #{text,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ order by P.CODE desc, C.SORTNO
|
|
|
+ </select>
|
|
|
<select id="selectInitDict" resultMap="BaseResultMap" >
|
|
|
select ID, PID, TEXT, CODE, LEAF, SORTNO
|
|
|
from AQ_BASIC_FRAME_CODE
|