| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?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.sckw.mine.mapper.MineralAggregateMapper">
- <sql id="Base_Column_List">
- id,
- tenant_id,
- `code`,
- `name`,
- type,
- unit,
- size,
- weight,
- `status`,
- create_by,
- update_by,
- create_time,
- update_time,
- del_flag
- </sql>
- <update id="aggreDelete">
- update kw_business_mineral_aggregate set del_flag = 1 where id = #{id}
- </update>
- <select id="mineAggregatePageList"
- resultType="com.sckw.mine.entity.res.MineralAggregateListRes">
- select <include refid="Base_Column_List" /> from kw_business_mineral_aggregate
- <where>
- del_flag = 0
- <if test="param.name != '' and param.name != null">
- and code like concat('%',#{param.name},'%')
- </if>
- <if test="param.code != '' and param.code != null">
- and code like concat('%',#{param.code},'%')
- </if>
- <if test="param.tenantId != '' and param.tenantId != null">
- and tenant_id = #{param.tenantId}
- </if>
- <if test="param.status != null">
- and `status` = #{param.status}
- </if>
- </where>
- order by create_time desc
- </select>
- <select id="load" resultType="com.sckw.mine.entity.res.KwBusinessMineralAggregateDetailRes">
- select <include refid="Base_Column_List" /> from kw_business_mineral_aggregate where id = #{id}
- </select>
- <update id="aggreUpdate" parameterType="com.sckw.mine.entity.req.MineralAggregateUpdateParam">
- UPDATE kw_business_mineral_aggregate
- <set>
- <trim suffixOverrides=",">
- <if test="null != param.name and '' != param.name">`name` = #{param.name},</if>
- <if test="null != param.type">type = #{param.type},</if>
- <if test="null != param.unit">unit = #{param.unit},</if>
- <if test="null != param.size and '' != param.size">size = #{param.size},</if>
- <if test="null != param.weight">weight = #{param.weight},</if>
- <if test="null != param.status">`status` = #{param.status}</if>
- </trim>
- </set>
- WHERE id = #{param.id}
- </update>
- </mapper>
|