You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
2.1 KiB
XML
67 lines
2.1 KiB
XML
3 years ago
|
<?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.glxp.api.admin.dao.purchase.PurPlanDetailDao">
|
||
|
|
||
|
<select id="queryPageList" parameterType="com.glxp.api.admin.req.purchase.PurPlanDetailRequest"
|
||
|
resultType="com.glxp.api.admin.entity.purchase.PurPlanDetailEntity">
|
||
|
select *
|
||
|
FROM pur_plan_detail
|
||
|
<where>
|
||
|
<if test="orderIdFk != '' and orderIdFk != null">
|
||
|
AND orderIdFk = #{orderIdFk}
|
||
|
</if>
|
||
|
<if test="productId != null">
|
||
|
AND productId = #{productId}
|
||
|
</if>
|
||
|
<if test="supId != '' and supId != null">
|
||
|
AND supId = #{supId}
|
||
|
</if>
|
||
|
</where>
|
||
|
|
||
|
</select>
|
||
|
|
||
|
<insert id="insert" keyProperty="id"
|
||
|
parameterType="com.glxp.api.admin.req.purchase.PurPlanDetailRequest">
|
||
|
replace
|
||
|
INTO pur_plan_detail
|
||
|
(
|
||
|
orderIdFk,productId,productName,`count`,supId
|
||
|
)
|
||
|
values (
|
||
|
#{orderIdFk},
|
||
|
#{productId},
|
||
|
#{productName},
|
||
|
#{count},
|
||
|
#{supId}
|
||
|
)
|
||
|
</insert>
|
||
|
|
||
|
|
||
|
<delete id="deleteByIds" parameterType="java.util.List">
|
||
|
DELETE FROM pur_plan_detail WHERE id in
|
||
|
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||
|
#{item}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
|
||
|
|
||
|
<delete id="deleteById" parameterType="Map">
|
||
|
DELETE
|
||
|
FROM pur_plan_detail
|
||
|
WHERE id = #{id}
|
||
|
</delete>
|
||
|
|
||
|
<update id="update" parameterType="com.glxp.api.admin.req.purchase.PurPlanDetailRequest">
|
||
|
UPDATE pur_plan_detail
|
||
|
<trim prefix="set" suffixOverrides=",">
|
||
|
<if test="orderIdFk != null">orderIdFk=#{orderIdFk},</if>
|
||
|
<if test="productId != null">productId=#{productId},</if>
|
||
|
<if test="productName != null">productName=#{productName},</if>
|
||
|
<if test="count != null">`count`=#{count},</if>
|
||
|
<if test="supId != null">supId=#{supId},</if>
|
||
|
</trim>
|
||
|
WHERE id = #{id}
|
||
|
</update>
|
||
|
|
||
|
</mapper>
|