|
@@ -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.OrgModelMapper" >
|
|
|
- <resultMap id="BaseResultMap" type="com.xt.js.gkaq.frame.model.OrgModel" >
|
|
|
+ <resultMap id="BaseResultMap" type="com.xt.js.gkaq.frame.model.OrgModelDto" >
|
|
|
<id column="ID" property="id" jdbcType="VARCHAR" />
|
|
|
<result column="NAME" property="name" jdbcType="VARCHAR" />
|
|
|
<result column="ORG_TYPE" property="orgType" jdbcType="VARCHAR" />
|
|
@@ -18,24 +18,26 @@
|
|
|
<result column="LEVEL" property="level" jdbcType="VARCHAR" />
|
|
|
<result column="CREATE_USER" jdbcType="VARCHAR" property="createUser" />
|
|
|
<result column="UPDATE_USER" jdbcType="VARCHAR" property="updateUser" />
|
|
|
+ <result column="PCODE" property="pcode" jdbcType="VARCHAR" />
|
|
|
+ <result column="PNAME" property="pname" jdbcType="VARCHAR" />
|
|
|
</resultMap>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
|
|
|
delete from AQ_BASIC_FRAME_ORG
|
|
|
where ID = #{id,jdbcType=VARCHAR}
|
|
|
</delete>
|
|
|
- <insert id="insert" parameterType="com.xt.js.gkaq.frame.model.OrgModel" >
|
|
|
+ <insert id="insert" parameterType="com.xt.js.gkaq.frame.model.OrgModelDto" >
|
|
|
insert into AQ_BASIC_FRAME_ORG (ID, NAME, ORG_TYPE,
|
|
|
REMARK, PID, SORTNO,
|
|
|
CODE, SZD, SZD_NAME,
|
|
|
STATE, CREATE_TIME, UPDATE_TIME,
|
|
|
- XZQH, LEVEL,CREATE_USER,UPDATE_USER)
|
|
|
+ XZQH, "LEVEL",CREATE_USER,UPDATE_USER)
|
|
|
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{orgType,jdbcType=VARCHAR},
|
|
|
#{remark,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR}, #{sortno,jdbcType=DECIMAL},
|
|
|
#{code,jdbcType=VARCHAR}, #{szd,jdbcType=VARCHAR}, #{szdName,jdbcType=VARCHAR},
|
|
|
#{state,jdbcType=CHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
|
|
|
#{xzqh,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR},#{createUser,jdbcType=VARCHAR},#{updateUser,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
- <update id="updateByPrimaryKey" parameterType="com.xt.js.gkaq.frame.model.OrgModel" >
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.xt.js.gkaq.frame.model.OrgModelDto" >
|
|
|
update AQ_BASIC_FRAME_ORG
|
|
|
set NAME = #{name,jdbcType=VARCHAR},
|
|
|
ORG_TYPE = #{orgType,jdbcType=VARCHAR},
|
|
@@ -49,20 +51,36 @@
|
|
|
CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
|
|
|
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
XZQH = #{xzqh,jdbcType=VARCHAR},
|
|
|
- LEVEL = #{level,jdbcType=VARCHAR},
|
|
|
+ "LEVEL" = #{level,jdbcType=VARCHAR},
|
|
|
CREATE_USER= #{createUser,jdbcType=VARCHAR},
|
|
|
UPDATE_USER= #{updateUser,jdbcType=VARCHAR}
|
|
|
where ID = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
|
select ID, NAME, ORG_TYPE, REMARK, PID, SORTNO, CODE, SZD, SZD_NAME, STATE, CREATE_TIME,
|
|
|
- UPDATE_TIME, XZQH, LEVEL, CREATE_USER, UPDATE_USER
|
|
|
+ UPDATE_TIME, XZQH, "LEVEL", CREATE_USER, UPDATE_USER
|
|
|
from AQ_BASIC_FRAME_ORG
|
|
|
where ID = #{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
<select id="selectAll" resultMap="BaseResultMap" >
|
|
|
select ID, NAME, ORG_TYPE, REMARK, PID, SORTNO, CODE, SZD, SZD_NAME, STATE, CREATE_TIME,
|
|
|
- UPDATE_TIME, XZQH, LEVEL, CREATE_USER, UPDATE_USER
|
|
|
+ UPDATE_TIME, XZQH, "LEVEL", CREATE_USER, UPDATE_USER
|
|
|
from AQ_BASIC_FRAME_ORG
|
|
|
</select>
|
|
|
+ <select id="selectAllByCond" resultMap="BaseResultMap" parameterType="com.xt.js.gkaq.frame.model.OrgModelDto" >
|
|
|
+ select C.ID, C.CODE, C.NAME, P.ID PID, P.CODE PCODE, P.NAME PNAME, C.ORG_TYPE, C.SZD, C.SZD_NAME, C.XZQH, C."LEVEL", C.REMARK, C.SORTNO
|
|
|
+ from AQ_BASIC_FRAME_ORG C left join AQ_BASIC_FRAME_ORG P on C.PID = P.ID
|
|
|
+ <where>
|
|
|
+ <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="name != null and name != ''">
|
|
|
+ and C.NAME like #{name,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ order by P.CODE, C.CODE, C.SORTNO
|
|
|
+ </select>
|
|
|
</mapper>
|