|
@ -1,11 +1,12 @@ |
|
|
<?xml version="1.0" encoding="UTF-8" ?> |
|
|
<?xml version="1.0" encoding="UTF-8" ?> |
|
|
<!DOCTYPE mapper |
|
|
<!DOCTYPE mapper |
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
|
<mapper namespace="com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper"> |
|
|
<mapper namespace="com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper"> |
|
|
|
|
|
|
|
|
<resultMap type="com.lzbi.targetFolder.domain.DcBaseAssetTargetDao" id="DcBaseAssetTargetResult"> |
|
|
<resultMap type="com.lzbi.targetFolder.domain.DcBaseAssetTargetDao" id="DcBaseAssetTargetResult"> |
|
|
<result property="id" column="id" /> |
|
|
<result property="id" column="id" /> |
|
|
|
|
|
<result property="assetCode" column="asset_code" /> |
|
|
<result property="assetId" column="asset_id" /> |
|
|
<result property="assetId" column="asset_id" /> |
|
|
<result property="assetCode" column="asset_code" /> |
|
|
<result property="assetCode" column="asset_code" /> |
|
|
<result property="targetModelCode" column="target_model_code" /> |
|
|
<result property="targetModelCode" column="target_model_code" /> |
|
@ -18,7 +19,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<result property="flagAvg" column="flag_avg" /> |
|
|
<result property="flagAvg" column="flag_avg" /> |
|
|
<result property="flagSum" column="flag_sum" /> |
|
|
<result property="flagSum" column="flag_sum" /> |
|
|
<result property="flagCompute" column="flag_compute" /> |
|
|
<result property="flagCompute" column="flag_compute" /> |
|
|
<result property="sort" column="sort" /> |
|
|
|
|
|
<result property="tenantId" column="tenant_id" /> |
|
|
<result property="tenantId" column="tenant_id" /> |
|
|
<result property="revision" column="revision" /> |
|
|
<result property="revision" column="revision" /> |
|
|
<result property="createdBy" column="created_by" /> |
|
|
<result property="createdBy" column="created_by" /> |
|
@ -35,17 +35,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
|
|
|
|
|
<select id="selectDcBaseAssetTargetDaoList" parameterType="DcBaseAssetTargetDao" resultMap="DcBaseAssetTargetResult"> |
|
|
<select id="selectDcBaseAssetTargetDaoList" parameterType="DcBaseAssetTargetDao" resultMap="DcBaseAssetTargetResult"> |
|
|
<include refid="selectDcBaseAssetTargetVo"/> |
|
|
<include refid="selectDcBaseAssetTargetVo"/> |
|
|
<where> |
|
|
<where> |
|
|
|
|
|
<if test="assetCode != null and assetCode != ''"> and asset_code = #{assetCode}</if> |
|
|
<if test="assetId != null "> and asset_id = #{assetId}</if> |
|
|
<if test="assetId != null "> and asset_id = #{assetId}</if> |
|
|
<if test="targetModelCode != null and targetModelCode != ''"> and target_model_code = #{targetModelCode}</if> |
|
|
<if test="targetModelCode != null and targetModelCode != ''"> and target_model_code = #{targetModelCode}</if> |
|
|
<if test="targetName != null and targetName != ''"> and target_name like concat('%', #{targetName}, '%')</if> |
|
|
<if test="targetName != null and targetName != ''"> and target_name like concat('%', #{targetName}, '%')</if> |
|
|
<if test="targetCode != null and targetCode != ''"> and target_code = #{targetCode}</if> |
|
|
<if test="targetCode != null and targetCode != ''"> and target_code = #{targetCode}</if> |
|
|
<if test="targetField != null and targetField != ''"> and target_field = #{targetField}</if> |
|
|
<if test="targetField != null and targetField != ''"> and target_field = #{targetField}</if> |
|
|
<if test="assetCode != null "> and asset_code = #{assetCode}</if> |
|
|
<if test="assetCode != null "> and asset_code = #{assetCode}</if> |
|
|
|
|
|
<if test="limitUp != null "> and limit_up = #{limitUp}</if> |
|
|
|
|
|
<if test="limitDown != null "> and limit_down = #{limitDown}</if> |
|
|
|
|
|
<if test="valueBase != null "> and value_base = #{valueBase}</if> |
|
|
|
|
|
<if test="flagAvg != null and flagAvg != ''"> and flag_avg = #{flagAvg}</if> |
|
|
|
|
|
<if test="flagSum != null and flagSum != ''"> and flag_sum = #{flagSum}</if> |
|
|
|
|
|
<if test="flagCompute != null and flagCompute != ''"> and flag_compute = #{flagCompute}</if> |
|
|
</where> |
|
|
</where> |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<select id="selectDcBaseAssetTargetDaoById" parameterType="Long" resultMap="DcBaseAssetTargetResult"> |
|
|
<select id="selectDcBaseAssetTargetDaoById" parameterType="Long" resultMap="DcBaseAssetTargetResult"> |
|
|
<include refid="selectDcBaseAssetTargetVo"/> |
|
|
<include refid="selectDcBaseAssetTargetVo"/> |
|
|
where id = #{id} |
|
|
where id = #{id} |
|
@ -55,10 +61,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<include refid="selectDcBaseAssetTargetVo"/> |
|
|
<include refid="selectDcBaseAssetTargetVo"/> |
|
|
where target_code = #{targetCode} and asset_code = #{assetCode} |
|
|
where target_code = #{targetCode} and asset_code = #{assetCode} |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<insert id="insertDcBaseAssetTargetDao" parameterType="DcBaseAssetTargetDao" useGeneratedKeys="true" keyProperty="id"> |
|
|
<insert id="insertDcBaseAssetTargetDao" parameterType="DcBaseAssetTargetDao" useGeneratedKeys="true" keyProperty="id"> |
|
|
insert into dc_base_asset_target |
|
|
insert into dc_base_asset_target |
|
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
|
|
|
|
<if test="assetCode != null">asset_code,</if> |
|
|
<if test="assetId != null">asset_id,</if> |
|
|
<if test="assetId != null">asset_id,</if> |
|
|
<if test="targetModelCode != null">target_model_code,</if> |
|
|
<if test="targetModelCode != null">target_model_code,</if> |
|
|
<if test="targetName != null">target_name,</if> |
|
|
<if test="targetName != null">target_name,</if> |
|
@ -70,7 +77,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<if test="flagAvg != null">flag_avg,</if> |
|
|
<if test="flagAvg != null">flag_avg,</if> |
|
|
<if test="flagSum != null">flag_sum,</if> |
|
|
<if test="flagSum != null">flag_sum,</if> |
|
|
<if test="flagCompute != null">flag_compute,</if> |
|
|
<if test="flagCompute != null">flag_compute,</if> |
|
|
<if test="sort != null">sort,</if> |
|
|
|
|
|
<if test="tenantId != null">tenant_id,</if> |
|
|
<if test="tenantId != null">tenant_id,</if> |
|
|
<if test="revision != null">revision,</if> |
|
|
<if test="revision != null">revision,</if> |
|
|
<if test="createdBy != null">created_by,</if> |
|
|
<if test="createdBy != null">created_by,</if> |
|
@ -79,8 +85,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<if test="updatedTime != null">updated_time,</if> |
|
|
<if test="updatedTime != null">updated_time,</if> |
|
|
<if test="deleteBy != null">delete_by,</if> |
|
|
<if test="deleteBy != null">delete_by,</if> |
|
|
<if test="deleteTime != null">delete_time,</if> |
|
|
<if test="deleteTime != null">delete_time,</if> |
|
|
</trim> |
|
|
</trim> |
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
|
|
|
<if test="assetCode != null">#{assetCode},</if> |
|
|
<if test="assetId != null">#{assetId},</if> |
|
|
<if test="assetId != null">#{assetId},</if> |
|
|
<if test="targetModelCode != null">#{targetModelCode},</if> |
|
|
<if test="targetModelCode != null">#{targetModelCode},</if> |
|
|
<if test="targetName != null">#{targetName},</if> |
|
|
<if test="targetName != null">#{targetName},</if> |
|
@ -92,7 +99,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<if test="flagAvg != null">#{flagAvg},</if> |
|
|
<if test="flagAvg != null">#{flagAvg},</if> |
|
|
<if test="flagSum != null">#{flagSum},</if> |
|
|
<if test="flagSum != null">#{flagSum},</if> |
|
|
<if test="flagCompute != null">#{flagCompute},</if> |
|
|
<if test="flagCompute != null">#{flagCompute},</if> |
|
|
<if test="sort != null">#{sort},</if> |
|
|
|
|
|
<if test="tenantId != null">#{tenantId},</if> |
|
|
<if test="tenantId != null">#{tenantId},</if> |
|
|
<if test="revision != null">#{revision},</if> |
|
|
<if test="revision != null">#{revision},</if> |
|
|
<if test="createdBy != null">#{createdBy},</if> |
|
|
<if test="createdBy != null">#{createdBy},</if> |
|
@ -101,12 +107,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<if test="updatedTime != null">#{updatedTime},</if> |
|
|
<if test="updatedTime != null">#{updatedTime},</if> |
|
|
<if test="deleteBy != null">#{deleteBy},</if> |
|
|
<if test="deleteBy != null">#{deleteBy},</if> |
|
|
<if test="deleteTime != null">#{deleteTime},</if> |
|
|
<if test="deleteTime != null">#{deleteTime},</if> |
|
|
</trim> |
|
|
</trim> |
|
|
</insert> |
|
|
</insert> |
|
|
|
|
|
|
|
|
<update id="updateDcBaseAssetTargetDao" parameterType="DcBaseAssetTargetDao"> |
|
|
<update id="updateDcBaseAssetTargetDao" parameterType="DcBaseAssetTargetDao"> |
|
|
update dc_base_asset_target |
|
|
update dc_base_asset_target |
|
|
<trim prefix="SET" suffixOverrides=","> |
|
|
<trim prefix="SET" suffixOverrides=","> |
|
|
|
|
|
<if test="assetCode != null">asset_code = #{assetCode},</if> |
|
|
<if test="assetId != null">asset_id = #{assetId},</if> |
|
|
<if test="assetId != null">asset_id = #{assetId},</if> |
|
|
<if test="targetModelCode != null">target_model_code = #{targetModelCode},</if> |
|
|
<if test="targetModelCode != null">target_model_code = #{targetModelCode},</if> |
|
|
<if test="targetName != null">target_name = #{targetName},</if> |
|
|
<if test="targetName != null">target_name = #{targetName},</if> |
|
@ -118,7 +125,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<if test="flagAvg != null">flag_avg = #{flagAvg},</if> |
|
|
<if test="flagAvg != null">flag_avg = #{flagAvg},</if> |
|
|
<if test="flagSum != null">flag_sum = #{flagSum},</if> |
|
|
<if test="flagSum != null">flag_sum = #{flagSum},</if> |
|
|
<if test="flagCompute != null">flag_compute = #{flagCompute},</if> |
|
|
<if test="flagCompute != null">flag_compute = #{flagCompute},</if> |
|
|
<if test="sort != null">sort = #{sort},</if> |
|
|
|
|
|
<if test="tenantId != null">tenant_id = #{tenantId},</if> |
|
|
<if test="tenantId != null">tenant_id = #{tenantId},</if> |
|
|
<if test="revision != null">revision = #{revision},</if> |
|
|
<if test="revision != null">revision = #{revision},</if> |
|
|
<if test="createdBy != null">created_by = #{createdBy},</if> |
|
|
<if test="createdBy != null">created_by = #{createdBy},</if> |
|
@ -136,7 +142,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
</delete> |
|
|
</delete> |
|
|
|
|
|
|
|
|
<delete id="deleteDcBaseAssetTargetDaoByIds" parameterType="String"> |
|
|
<delete id="deleteDcBaseAssetTargetDaoByIds" parameterType="String"> |
|
|
delete from dc_base_asset_target where id in |
|
|
delete from dc_base_asset_target where id in |
|
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
|
#{id} |
|
|
#{id} |
|
|
</foreach> |
|
|
</foreach> |
|
|