| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <?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`,
- `value`,
- 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 `name` 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>
- <if test="param.startTime != null">
- and create_time >= #{param.startTime}
- </if>
- <if test="param.endTime != null">
- and create_time < #{param.endTime}
- </if>
- <if test="param.createBy != '' and param.createBy != null">
- and create_by like concat('%',#{param.createBy},'%')
- </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>
- <select id="findList" resultType="com.sckw.mine.entity.res.MineralAggregateFindListRes">
- select <include refid="Base_Column_List" /> from kw_business_mineral_aggregate
- <where>
- del_flag = 0
- <if test="name != null and name != ''">
- and `name` like concat('%',#{name},'%')
- </if>
- <if test="tenantId != null and tenantId != ''">
- and tenant_id = #{tenantId}
- </if>
- </where>
- </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>
- <if test="null != param.value and '' != param.value">`value` = #{param.value}</if>
- </trim>
- </set>
- WHERE id = #{param.id}
- </update>
- <update id="statusAction">
- update kw_business_mineral_aggregate set status = #{status} where id = #{id}
- </update>
- </mapper>
|