| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262 |
- <?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.goldenwater.dcproj.dao.TacObjPblmstbHbDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.TacObjPblmstbHb" id="tacObjPblmstbHbResultMap">
- <result property="id" column="ID"/>
- <result property="spfsnlType" column="SPFSNL_TYPE"/>
- <result property="genus" column="GENUS"/>
- <result property="focPblm" column="FOC_PBLM"/>
- <result property="chkItem" column="CHK_ITEM"/>
- <result property="chkGist" column="CHK_GIST"/>
- <result property="chkFrp" column="CHK_FRP"/>
- <result property="pblmsDesc" column="PBLMS_DESC"/>
- <result property="pblmsCode" column="PBLMS_CODE"/>
- <result property="pblmsId" column="PBLMS_ID"/>
- <result property="ordr" column="ORDR"/>
- <result property="scale" column="SCALE"/>
- <result property="ptype" column="PTYPE"/>
- <result property="cate" column="CATE"/>
- <result property="stage" column="STAGE"/>
- <result property="persId" column="PERS_ID"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="class1Name" column="CLASS1_NAME"/>
- <result property="pblmPasi" column="PBLM_PASI"/>
- <result property="isPblm" column="IS_PBLM"/>
- <result property="pblmNt" column="PBLM_NT"/>
- <result property="nt" column="NT"/>
- <result property="subjectNames" column="SUBJECT_NAMES"/>
- <result property="pblmDesc" column="PBLM_DESC"/>
- <result property="pblmId" column="PBLM_ID"/>
- <result property="pblmMasteryLevel" column="PBLM_MASTERY_LEVEL"/>
- </resultMap>
- <sql id="table_columns">
- ID,
- SPFSNL_TYPE,
- GENUS,
- FOC_PBLM,
- CHK_ITEM,
- CHK_GIST,
- CHK_FRP,
- PBLMS_DESC,
- PBLMS_CODE,
- PBLMS_ID,
- ORDR,
- SCALE,
- PTYPE,
- CATE,
- STAGE,
- PERS_ID,
- INTM,
- UPTM,
- DATA_STAT,
- PBLM_MASTERY_LEVEL
- </sql>
- <sql id="entity_properties">
- #{id},
- #{spfsnlType},
- #{genus},
- #{focPblm},
- #{chkItem},
- #{chkGist},
- #{chkFrp},
- #{pblmsDesc},
- #{pblmsCode},
- #{pblmsId},
- #{ordr},
- #{scale},
- #{ptype},
- #{cate},
- #{stage},
- #{persId},
- #{intm},
- #{uptm},
- #{dataStat},
- #{pblmMasteryLevel}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="spfsnlType != null and spfsnlType != ''">and SPFSNL_TYPE = #{spfsnlType}</if>
- <if test="genus != null and genus != ''">and GENUS = #{genus}</if>
- <if test="focPblm != null and focPblm != ''">and FOC_PBLM = #{focPblm}</if>
- <if test="chkItem != null and chkItem != ''">and CHK_ITEM = #{chkItem}</if>
- <if test="chkGist != null and chkGist != ''">and CHK_GIST = #{chkGist}</if>
- <if test="chkFrp != null and chkFrp != ''">and CHK_FRP = #{chkFrp}</if>
- <if test="pblmsDesc != null and pblmsDesc != ''">and PBLMS_DESC = #{pblmsDesc}</if>
- <if test="pblmsCode != null and pblmsCode != ''">and PBLMS_CODE = #{pblmsCode}</if>
- <if test="pblmsId != null and pblmsId != ''">and PBLMS_ID = #{pblmsId}</if>
- <if test="ordr != null and ordr != ''">and ORDR = #{ordr}</if>
- <if test="scale != null and scale != ''">and SCALE = #{scale}</if>
- <if test="ptype != null and ptype != ''">and PTYPE = #{ptype}</if>
- <if test="cate != null and cate != ''">and CATE = #{cate}</if>
- <if test="stage != null and stage != ''">and STAGE = #{stage}</if>
- <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
- <if test="intm != null">and INTM = #{intm}</if>
- <if test="uptm != null">and UPTM = #{uptm}</if>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
- <if test="pblmMasteryLevel != null and pblmMasteryLevel != ''">and PBLM_MASTERY_LEVEL = #{pblmMasteryLevel}</if>
- </trim>
- </sql>
- <select id="get" resultMap="tacObjPblmstbHbResultMap" parameterType="String" >
- select <include refid="table_columns" /> from TAC_OBJ_PBLMSTB_HB where ID = #{id}
- </select>
- <!--<select id="getfile" resultMap="tacObjPblmstbHbResultMap" parameterType="String" >
- select <include refid="table_columns" /> from TAC_OBJ_PBLMSTB_HB where ID = #{id}
- </select>-->
- <select id="getBy" resultMap="tacObjPblmstbHbResultMap">
- select <include refid="table_columns" /> from TAC_OBJ_PBLMSTB_HB <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="tacObjPblmstbHbResultMap">
- select <include refid="table_columns" /> from TAC_OBJ_PBLMSTB_HB
- </select>
- <select id="findList" resultMap="tacObjPblmstbHbResultMap">
- select <include refid="table_columns" /> from TAC_OBJ_PBLMSTB_HB <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from TAC_OBJ_PBLMSTB_HB <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstbHb">
- insert into TAC_OBJ_PBLMSTB_HB( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <!--<insert id="insert2" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstbHb">
- insert into TAC_OBJ_PBLM_HB( <include refid="table_columns2" /> )
- values ( <include refid="entity_properties2" /> )
- </insert>-->
- <delete id="delete" parameterType="java.lang.String">
- update TAC_OBJ_PBLMSTB_HB set DATA_STAT='9' where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstbHb">
- delete from TAC_OBJ_PBLMSTB_HB <include refid="page_where" />
- </delete>
- <!--<update id="deleteInFlag" parameterType="java.lang.String">
- update TAC_OBJ_PBLMSTB_HB set flag_valid = 0 where ID = #{id}
- </update>-->
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstbHb">
- update TAC_OBJ_PBLMSTB_HB
- <trim prefix="set" suffixOverrides=",">
- <if test="spfsnlType != null and spfsnlType != ''">SPFSNL_TYPE = #{spfsnlType},</if>
- <if test="genus != null and genus != ''">GENUS = #{genus},</if>
- <if test="focPblm != null and focPblm != ''">FOC_PBLM = #{focPblm},</if>
- <if test="chkItem != null and chkItem != ''">CHK_ITEM = #{chkItem},</if>
- <if test="chkGist != null and chkGist != ''">CHK_GIST = #{chkGist},</if>
- <if test="chkFrp != null and chkFrp != ''">CHK_FRP = #{chkFrp},</if>
- <if test="pblmsDesc != null and pblmsDesc != ''">PBLMS_DESC = #{pblmsDesc},</if>
- <if test="pblmsCode != null and pblmsCode != ''">PBLMS_CODE = #{pblmsCode},</if>
- <if test="pblmsId != null and pblmsId != ''">PBLMS_ID = #{pblmsId},</if>
- <if test="ordr != null and ordr != ''">ORDR = #{ordr},</if>
- <if test="scale != null and scale != ''">SCALE = #{scale},</if>
- <if test="ptype != null and ptype != ''">PTYPE = #{ptype},</if>
- <if test="cate != null and cate != ''">CATE = #{cate},</if>
- <if test="stage != null and stage != ''">STAGE = #{stage},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <!--<if test="class1Name != null and class1Name != ''">CLASS1_NAME = #{class1Name},</if>
- <if test="pblmPasi != null and pblmPasi != ''">PBLM_PASI = #{pblmPasi},</if>
- <if test="subjectNames != null and subjectNames != ''">SUBJECT_NAMES = #{subjectNames},</if>
- <if test="pblmDesc != null and pblmDesc != ''">PBLM_DESC = #{pblmDesc},</if>-->
- <if test="pblmMasteryLevel != null and pblmMasteryLevel != ''">PBLM_MASTERY_LEVEL = #{pblmMasteryLevel},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <!--<update id="updateSecond" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstbHb">
- update TAC_OBJ_PBLM_HB set IS_PBLM = #{isPblm}
- <if test="pblmNt != null and pblmNt != ''">,PBLM_NT = #{pblmNt}</if>
- <if test="nt != null and nt != ''">,NT = #{nt}</if>
- <if test="pblmId != null and pblmId != ''">,PBLM_ID = #{pblmId}</if>
- where PBLMSTB_HB_ID = #{id}
- </update>-->
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstbHb">
- update TAC_OBJ_PBLMSTB_HB
- <trim prefix="set" suffixOverrides=",">
- <if test="spfsnlType != null and spfsnlType != ''">SPFSNL_TYPE = #{spfsnlType},</if>
- <if test="genus != null and genus != ''">GENUS = #{genus},</if>
- <if test="focPblm != null and focPblm != ''">FOC_PBLM = #{focPblm},</if>
- <if test="chkItem != null and chkItem != ''">CHK_ITEM = #{chkItem},</if>
- <if test="chkGist != null and chkGist != ''">CHK_GIST = #{chkGist},</if>
- <if test="chkFrp != null and chkFrp != ''">CHK_FRP = #{chkFrp},</if>
- <if test="pblmsDesc != null and pblmsDesc != ''">PBLMS_DESC = #{pblmsDesc},</if>
- <if test="pblmsCode != null and pblmsCode != ''">PBLMS_CODE = #{pblmsCode},</if>
- <if test="pblmsId != null and pblmsId != ''">PBLMS_ID = #{pblmsId},</if>
- <if test="ordr != null and ordr != ''">ORDR = #{ordr},</if>
- <if test="scale != null and scale != ''">SCALE = #{scale},</if>
- <if test="ptype != null and ptype != ''">PTYPE = #{ptype},</if>
- <if test="cate != null and cate != ''">CATE = #{cate},</if>
- <if test="stage != null and stage != ''">STAGE = #{stage},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="pblmMasteryLevel != null and pblmMasteryLevel != ''">PBLM_MASTERY_LEVEL = #{pblmMasteryLevel},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- <select id="findPblmstbHbList" resultMap="tacObjPblmstbHbResultMap">
- select A.*,B.CLASS1_NAME from TAC_OBJ_PBLMSTB_HB A LEFT JOIN TAC_OBJ_PBLMSTB B ON A.PBLMS_ID = B.ID
- where 1=1
- <if test="spfsnlType != null and spfsnlType != ''"> and A.SPFSNL_TYPE like concat(concat('%',#{spfsnlType}),'%')</if>
- <if test="genus != null and genus != ''"> and A.GENUS like concat(concat('%',#{genus}),'%')</if>
- <if test="scale != null and scale != ''"> and A.SCALE like concat(concat('%',#{scale}),'%')</if>
- <if test="ptype != null and ptype != ''"> and A.PTYPE like concat(concat('%',#{ptype}),'%')</if>
- <if test="cate != null and cate != ''"> and A.CATE like concat(concat('%',#{cate}),'%')</if>
- <if test="stage != null and stage != ''"> and A.STAGE like concat(concat('%',#{stage}),'%')</if>
- AND a.data_stat = '0' order by A.SPFSNL_TYPE,A.GENUS
- </select>
- <!--<select id="findPblmstbHbListGl" resultMap="tacObjPblmstbHbResultMap">
- select a.*,b.IS_PBLM,b.PBLM_NT,b.NT ,c.PBLM_PASI,c.SUBJECT_NAMES,c.PBLM_DESC,d.class1_name ,b.pblm_id ,e.group_id from TAC_OBJ_PBLMSTB_HB a
- left join TAC_OBJ_PBLM_HB b on a.id = b.PBLMSTB_HB_ID
- left join TAC_PBLM_INFO c on b.PBLM_ID = c.id
- left join TAC_OBJ_PBLMSTB d on a.PBLMS_ID = d.ID
- left join tac_pawp_rgstr e on b.OBJ_ID = e.OBJ_ID
- where 1=1
- <if test="spfsnlType != null and spfsnlType != ''"> and A.SPFSNL_TYPE like concat(concat('%',#{spfsnlType}),'%')</if>
- <if test="genus != null and genus != ''"> and A.GENUS like concat(concat('%',#{genus}),'%')</if>
- <if test="scale != null and scale != ''"> and A.SCALE like concat(concat('%',#{scale}),'%')</if>
- <if test="ptype != null and ptype != ''"> and A.PTYPE like concat(concat('%',#{ptype}),'%')</if>
- <if test="cate != null and cate != ''"> and A.CATE like concat(concat('%',#{cate}),'%')</if>
- <if test="stage != null and stage != ''"> and A.STAGE like concat(concat('%',#{stage}),'%')</if>
- AND a.data_stat = '0'
- </select>-->
- <select id="findPblmstbHbListGl" resultMap="tacObjPblmstbHbResultMap">
- select a.* from TAC_OBJ_PBLMSTB_HB a
- where 1=1
- <if test="spfsnlType != null and spfsnlType != ''"> and A.SPFSNL_TYPE like concat(concat('%',#{spfsnlType}),'%')</if>
- <if test="genus != null and genus != ''"> and A.GENUS like concat(concat('%',#{genus}),'%')</if>
- <if test="scale != null and scale != ''"> and A.SCALE like concat(concat('%',#{scale}),'%')</if>
- <if test="ptype != null and ptype != ''"> and A.PTYPE like concat(concat('%',#{ptype}),'%')</if>
- <if test="cate != null and cate != ''"> and A.CATE like concat(concat('%',#{cate}),'%')</if>
- <if test="stage != null and stage != ''"> and A.STAGE like concat(concat('%',#{stage}),'%')</if>
- AND a.data_stat = '0' order by A.SPFSNL_TYPE,A.GENUS
- </select>
- </mapper>
|