2024-09-27 15:38:58 +08:00
|
|
|
<?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.bonus.material.purchase.mapper.PurchaseMacodeInfoMapper">
|
|
|
|
|
<resultMap type="com.bonus.material.purchase.domain.PurchaseMacodeInfo" id="PurchaseMacodeInfoResult">
|
|
|
|
|
<result property="id" column="id" />
|
|
|
|
|
<result property="taskId" column="task_id" />
|
|
|
|
|
<result property="typeId" column="type_id" />
|
|
|
|
|
<result property="maCode" column="ma_code" />
|
|
|
|
|
<result property="qrCode" column="qr_code" />
|
|
|
|
|
<result property="fixCode" column="fix_code" />
|
|
|
|
|
<result property="codeType" column="code_type" />
|
|
|
|
|
<result property="status" column="status" />
|
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
|
<result property="remark" column="remark" />
|
|
|
|
|
<result property="companyId" column="company_id" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectPurchaseMacodeInfoVo">
|
2024-10-23 13:46:01 +08:00
|
|
|
select id, task_id, type_id, ma_code, qr_code, fix_code, code_type, status,
|
|
|
|
|
create_by, create_time, update_by, update_time, remark, company_id
|
|
|
|
|
from purchase_macode_info
|
2024-09-27 15:38:58 +08:00
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectPurchaseMacodeInfoList" parameterType="com.bonus.material.purchase.domain.PurchaseMacodeInfo" resultMap="PurchaseMacodeInfoResult">
|
|
|
|
|
<include refid="selectPurchaseMacodeInfoVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="taskId != null "> and task_id = #{taskId}</if>
|
|
|
|
|
<if test="typeId != null "> and type_id = #{typeId}</if>
|
|
|
|
|
<if test="maCode != null and maCode != ''"> and ma_code = #{maCode}</if>
|
|
|
|
|
<if test="qrCode != null and qrCode != ''"> and qr_code = #{qrCode}</if>
|
|
|
|
|
<if test="fixCode != null and fixCode != ''"> and fix_code = #{fixCode}</if>
|
|
|
|
|
<if test="codeType != null and codeType != ''"> and code_type = #{codeType}</if>
|
|
|
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
|
|
<if test="companyId != null "> and company_id = #{companyId}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectPurchaseMacodeInfoById" parameterType="Long" resultMap="PurchaseMacodeInfoResult">
|
|
|
|
|
<include refid="selectPurchaseMacodeInfoVo"/>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertPurchaseMacodeInfo" parameterType="com.bonus.material.purchase.domain.PurchaseMacodeInfo" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
|
insert into purchase_macode_info
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="taskId != null">task_id,</if>
|
|
|
|
|
<if test="typeId != null">type_id,</if>
|
|
|
|
|
<if test="maCode != null">ma_code,</if>
|
|
|
|
|
<if test="qrCode != null">qr_code,</if>
|
|
|
|
|
<if test="fixCode != null">fix_code,</if>
|
|
|
|
|
<if test="codeType != null">code_type,</if>
|
|
|
|
|
<if test="status != null">status,</if>
|
|
|
|
|
<if test="createBy != null">create_by,</if>
|
|
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
|
<if test="remark != null">remark,</if>
|
|
|
|
|
<if test="companyId != null">company_id,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="taskId != null">#{taskId},</if>
|
|
|
|
|
<if test="typeId != null">#{typeId},</if>
|
|
|
|
|
<if test="maCode != null">#{maCode},</if>
|
|
|
|
|
<if test="qrCode != null">#{qrCode},</if>
|
|
|
|
|
<if test="fixCode != null">#{fixCode},</if>
|
|
|
|
|
<if test="codeType != null">#{codeType},</if>
|
|
|
|
|
<if test="status != null">#{status},</if>
|
|
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
|
|
<if test="companyId != null">#{companyId},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<update id="updatePurchaseMacodeInfo" parameterType="com.bonus.material.purchase.domain.PurchaseMacodeInfo">
|
|
|
|
|
update purchase_macode_info
|
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
<if test="taskId != null">task_id = #{taskId},</if>
|
|
|
|
|
<if test="typeId != null">type_id = #{typeId},</if>
|
|
|
|
|
<if test="maCode != null">ma_code = #{maCode},</if>
|
|
|
|
|
<if test="qrCode != null">qr_code = #{qrCode},</if>
|
|
|
|
|
<if test="fixCode != null">fix_code = #{fixCode},</if>
|
|
|
|
|
<if test="codeType != null">code_type = #{codeType},</if>
|
|
|
|
|
<if test="status != null">status = #{status},</if>
|
|
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
|
|
<if test="companyId != null">company_id = #{companyId},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deletePurchaseMacodeInfoById" parameterType="Long">
|
|
|
|
|
delete from purchase_macode_info where id = #{id}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deletePurchaseMacodeInfoByIds" parameterType="String">
|
|
|
|
|
delete from purchase_macode_info where id in
|
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
|
|
|
|
</mapper>
|