|
@ -3,13 +3,14 @@ |
|
|
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.DcBaseAssetTarget" id="DcBaseAssetTargetResult"> |
|
|
<result property="id" column="id" /> |
|
|
<result property="id" column="id" /> |
|
|
<result property="assetId" column="asset_id" /> |
|
|
|
|
|
<result property="assetCode" column="asset_code" /> |
|
|
<result property="assetCode" column="asset_code" /> |
|
|
|
|
|
<result property="assetId" column="asset_id" /> |
|
|
<result property="targetModelCode" column="target_model_code" /> |
|
|
<result property="targetModelCode" column="target_model_code" /> |
|
|
<result property="targetName" column="target_name" /> |
|
|
<result property="targetName" column="target_name" /> |
|
|
|
|
|
<result property="targetNameAlias" column="target_name_alias" /> |
|
|
<result property="targetCode" column="target_code" /> |
|
|
<result property="targetCode" column="target_code" /> |
|
|
<result property="targetField" column="target_field" /> |
|
|
<result property="targetField" column="target_field" /> |
|
|
<result property="limitUp" column="limit_up" /> |
|
|
<result property="limitUp" column="limit_up" /> |
|
@ -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" /> |
|
@ -27,19 +27,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<result property="updatedTime" column="updated_time" /> |
|
|
<result property="updatedTime" column="updated_time" /> |
|
|
<result property="deleteBy" column="delete_by" /> |
|
|
<result property="deleteBy" column="delete_by" /> |
|
|
<result property="deleteTime" column="delete_time" /> |
|
|
<result property="deleteTime" column="delete_time" /> |
|
|
|
|
|
<result property="sort" column="sort" /> |
|
|
<result property="targetFieldName" column="target_field_name" /> |
|
|
<result property="targetFieldName" column="target_field_name" /> |
|
|
<result property="fieldUnit" column="field_unit" /> |
|
|
|
|
|
<result property="columnType" column="column_type" /> |
|
|
<result property="columnType" column="column_type" /> |
|
|
|
|
|
<result property="fieldUnit" column="field_unit" /> |
|
|
</resultMap> |
|
|
</resultMap> |
|
|
|
|
|
|
|
|
<sql id="selectDcBaseAssetTargetVo"> |
|
|
<sql id="selectDcBaseAssetTargetVo"> |
|
|
select id, asset_id,asset_code, target_model_code, target_name, target_code, target_field, limit_up, limit_down, value_base, flag_avg, flag_sum, flag_compute, sort, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time,target_field_name |
|
|
select id, asset_code, asset_id, target_model_code, target_name, target_name_alias, target_code, target_field, limit_up, limit_down, value_base, flag_avg, flag_sum, flag_compute, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, sort, target_field_name, column_type, field_unit from dc_base_asset_target |
|
|
value_type, |
|
|
|
|
|
field_unit |
|
|
|
|
|
from dc_base_asset_target |
|
|
|
|
|
</sql> |
|
|
</sql> |
|
|
|
|
|
|
|
|
<select id="selectDcBaseAssetTargetDaoList" parameterType="DcBaseAssetTargetDao" resultMap="DcBaseAssetTargetResult"> |
|
|
<select id="selectDcBaseAssetTargetList" parameterType="DcBaseAssetTarget" resultMap="DcBaseAssetTargetResult"> |
|
|
<include refid="selectDcBaseAssetTargetVo"/> |
|
|
<include refid="selectDcBaseAssetTargetVo"/> |
|
|
<where> |
|
|
<where> |
|
|
<if test="assetId != null "> and asset_id = #{assetId}</if> |
|
|
<if test="assetId != null "> and asset_id = #{assetId}</if> |
|
@ -53,17 +51,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectDcBaseAssetTargetDaoById" parameterType="Long" resultMap="DcBaseAssetTargetResult"> |
|
|
<select id="selectDcBaseAssetTargetById" parameterType="Long" resultMap="DcBaseAssetTargetResult"> |
|
|
<include refid="selectDcBaseAssetTargetVo"/> |
|
|
<include refid="selectDcBaseAssetTargetVo"/> |
|
|
where id = #{id} |
|
|
where id = #{id} |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<insert id="insertDcBaseAssetTargetDao" parameterType="DcBaseAssetTargetDao" useGeneratedKeys="true" keyProperty="id"> |
|
|
<insert id="insertDcBaseAssetTarget" parameterType="DcBaseAssetTarget" 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> |
|
|
|
|
|
<if test="targetNameAlias != null">target_name_alias,</if> |
|
|
<if test="targetCode != null">target_code,</if> |
|
|
<if test="targetCode != null">target_code,</if> |
|
|
<if test="targetField != null">target_field,</if> |
|
|
<if test="targetField != null">target_field,</if> |
|
|
<if test="limitUp != null">limit_up,</if> |
|
|
<if test="limitUp != null">limit_up,</if> |
|
@ -72,7 +72,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> |
|
@ -81,11 +80,17 @@ 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> |
|
|
<if test="sort != null">sort,</if> |
|
|
|
|
|
<if test="targetFieldName != null">target_field_name,</if> |
|
|
|
|
|
<if test="columnType != null">column_type,</if> |
|
|
|
|
|
<if test="fieldUnit != null">field_unit,</if> |
|
|
|
|
|
</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> |
|
|
|
|
|
<if test="targetNameAlias != null">#{targetNameAlias},</if> |
|
|
<if test="targetCode != null">#{targetCode},</if> |
|
|
<if test="targetCode != null">#{targetCode},</if> |
|
|
<if test="targetField != null">#{targetField},</if> |
|
|
<if test="targetField != null">#{targetField},</if> |
|
|
<if test="limitUp != null">#{limitUp},</if> |
|
|
<if test="limitUp != null">#{limitUp},</if> |
|
@ -94,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> |
|
@ -103,15 +107,21 @@ 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> |
|
|
<if test="sort != null">#{sort},</if> |
|
|
|
|
|
<if test="targetFieldName != null">#{targetFieldName},</if> |
|
|
|
|
|
<if test="columnType != null">#{columnType},</if> |
|
|
|
|
|
<if test="fieldUnit != null">#{fieldUnit},</if> |
|
|
|
|
|
</trim> |
|
|
</insert> |
|
|
</insert> |
|
|
|
|
|
|
|
|
<update id="updateDcBaseAssetTargetDao" parameterType="DcBaseAssetTargetDao"> |
|
|
<update id="updateDcBaseAssetTarget" parameterType="DcBaseAssetTarget"> |
|
|
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> |
|
|
|
|
|
<if test="targetNameAlias != null">target_name_alias = #{targetNameAlias},</if> |
|
|
<if test="targetCode != null">target_code = #{targetCode},</if> |
|
|
<if test="targetCode != null">target_code = #{targetCode},</if> |
|
|
<if test="targetField != null">target_field = #{targetField},</if> |
|
|
<if test="targetField != null">target_field = #{targetField},</if> |
|
|
<if test="limitUp != null">limit_up = #{limitUp},</if> |
|
|
<if test="limitUp != null">limit_up = #{limitUp},</if> |
|
@ -120,7 +130,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> |
|
@ -129,15 +138,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<if test="updatedTime != null">updated_time = #{updatedTime},</if> |
|
|
<if test="updatedTime != null">updated_time = #{updatedTime},</if> |
|
|
<if test="deleteBy != null">delete_by = #{deleteBy},</if> |
|
|
<if test="deleteBy != null">delete_by = #{deleteBy},</if> |
|
|
<if test="deleteTime != null">delete_time = #{deleteTime},</if> |
|
|
<if test="deleteTime != null">delete_time = #{deleteTime},</if> |
|
|
|
|
|
<if test="sort != null">sort = #{sort},</if> |
|
|
|
|
|
<if test="targetFieldName != null">target_field_name = #{targetFieldName},</if> |
|
|
|
|
|
<if test="columnType != null">column_type = #{columnType},</if> |
|
|
|
|
|
<if test="fieldUnit != null">field_unit = #{fieldUnit},</if> |
|
|
</trim> |
|
|
</trim> |
|
|
where id = #{id} |
|
|
where id = #{id} |
|
|
</update> |
|
|
</update> |
|
|
|
|
|
|
|
|
<delete id="deleteDcBaseAssetTargetDaoById" parameterType="Long"> |
|
|
<delete id="deleteDcBaseAssetTargetById" parameterType="Long"> |
|
|
delete from dc_base_asset_target where id = #{id} |
|
|
delete from dc_base_asset_target where id = #{id} |
|
|
</delete> |
|
|
</delete> |
|
|
|
|
|
|
|
|
<delete id="deleteDcBaseAssetTargetDaoByIds" parameterType="String"> |
|
|
<delete id="deleteDcBaseAssetTargetByIds" 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} |
|
|