<?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.changhong.epc.tenant.mapper.tenant.system.ErrSystemMsgMapper">
|
<resultMap type="com.changhong.epc.bean.tenant.system.ErrSystemMsg" id="errSystemMsgTYPE">
|
<result property="mdName" column="md_name"/>
|
<result property="errType" column="err_type"/>
|
</resultMap>
|
|
<resultMap type="com.changhong.epc.bean.tenant.system.ErrSystemMsg" id="errSystemPageSql">
|
<result property="id" column="id"/>
|
<result property="mdName" column="md_name"/>
|
<result property="mdCode" column="md_code"/>
|
<result property="viewMsg" column="view_msg"/>
|
<result property="errType" column="err_type"/>
|
<result property="errFlag" column="err_flag"/>
|
<result property="mvVal" column="mv_val"/>
|
<result property="Def1" column="def1"/>
|
<result property="Def2" column="def2"/>
|
<result property="Def3" column="def3"/>
|
<result property="Def4" column="def4"/>
|
<result property="Def5" column="def5"/>
|
<result property="insP" column="ins_p"/>
|
<result property="insT" column="ins_t"/>
|
<result property="updP" column="upd_p"/>
|
<result property="updT" column="upd_t"/>
|
<result property="dataStart" column="data_start"/>
|
<result property="orderCode" column="orderCode"/>
|
<result property="formId" column="formId"/>
|
<result property="dataRowNum" column="dataRowNum"/>
|
<result property="formName" column="formName"/>
|
</resultMap>
|
<sql id="errSystemMsgSql">
|
id,md_name,md_code,
|
view_msg,err_type,err_flag,
|
mv_val,def1,def2,
|
def3,def4,def5,
|
ins_p,ins_t,upd_p,
|
upd_t,data_start
|
</sql>
|
<select id="selectType" resultMap="errSystemMsgTYPE">
|
SELECT
|
md_name,
|
err_type
|
FROM
|
epc_err_system_msg_{rule}
|
WHERE
|
epc_err_system_msg_{rule} .md_name != 'null'
|
AND epc_err_system_msg_{rule} .err_type != 'null'
|
GROUP BY
|
md_name,
|
err_type
|
</select>
|
|
<select id="selectByTypePage" resultMap="errSystemPageSql">
|
SELECT
|
id,md_name,md_code,
|
view_msg,err_type,err_flag,
|
mv_val,def1,def2,
|
def3,def4,def5,
|
ins_p,ins_t,upd_p,
|
upd_t,data_start,orderCode,dataRowNum,formId,
|
(select f_name from epc_cost_from_mapping_{rule} where f_id = formId LIMIT 1) formName
|
FROM
|
epc_err_system_msg_{rule}
|
<trim prefix="WHERE" prefixOverrides="AND | OR">
|
<if test="err.errType!=null">
|
AND err_type = #{err.errType}
|
</if>
|
<if test="err.errFlag!=null" >
|
AND err_flag = #{err.errFlag}
|
</if>
|
|
</trim>
|
ORDER BY ins_t desc,formId DESC
|
</select>
|
|
<update id="updateFlag">
|
update epc_err_system_msg_{rule} SET err_flag=10
|
WHERE id=#{id}
|
</update>
|
|
</mapper>
|