<?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" >
|
<!-- Table:epc_app_stander_def_{rule} -->
|
<mapper namespace="com.changhong.epc.parsing.mapper.tenant.MasterValueMapper">
|
|
<select id="selectMasterValueList" parameterType="com.changhong.epc.bean.tenant.master.MasterValue" resultType="com.changhong.epc.bean.tenant.master.MasterValue">
|
select
|
ID id,
|
DEFINE_CODE defineCode,
|
ELE_CODE eleCode,
|
ELE_VALUE eleValue,
|
ROW_NO rowNo
|
from epc_master_value_{rule}
|
where DEFINE_CODE = #{defineCode}
|
and DEL_FLAG = 0
|
ORDER BY ROW_NO
|
</select>
|
|
<update id="updateMasterVal">
|
UPDATE epc_master_value_{rule}
|
SET ELE_VALUE = #{mv.eleValue}
|
WHERE
|
DEFINE_CODE = #{mv.defineCode}
|
AND ELE_CODE = #{mv.eleCode}
|
AND ROW_NO = #{mv.rowNo}
|
|
</update>
|
|
<delete id="delMasterValue" >
|
DELETE
|
FROM
|
epc_master_value_{rule}
|
WHERE
|
define_code = #{mv.defineCode}
|
and
|
row_no = #{mv.rowNo}
|
|
</delete>
|
|
<select id="selectByCode" resultType="int">
|
SELECT
|
COUNT(*)
|
FROM
|
epc_master_value_{rule}
|
WHERE
|
DEFINE_CODE = #{code} and ele_code = #{eleCode} and ROW_NO = #{rowNum}
|
</select>
|
|
</mapper>
|