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.

143 lines
9.5 KiB
XML

<?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.udidl.admin.dao.udplat.UdplatGoodsMapper">
<resultMap id="BaseResultMap" type="com.glxp.udidl.admin.entity.udplat.UdplatGoods">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="uuid" jdbcType="VARCHAR" property="uuid" />
<result column="deliveryGoodId" jdbcType="VARCHAR" property="deliveryGoodId" />
<result column="projectGoodsCode" jdbcType="VARCHAR" property="projectGoodsCode" />
<result column="deliveryGoodsCode" jdbcType="VARCHAR" property="deliveryGoodsCode" />
<result column="manufactureId" jdbcType="BIGINT" property="manufactureId" />
<result column="manufactureName" jdbcType="VARCHAR" property="manufactureName" />
<result column="distributorId" jdbcType="BIGINT" property="distributorId" />
<result column="distributorName" jdbcType="VARCHAR" property="distributorName" />
<result column="productName" jdbcType="VARCHAR" property="productName" />
<result column="compId" jdbcType="BIGINT" property="compId" />
<result column="model" jdbcType="VARCHAR" property="model" />
<result column="spec" jdbcType="VARCHAR" property="spec" />
<result column="prodMaterial" jdbcType="VARCHAR" property="prodMaterial" />
<result column="packMaterial" jdbcType="VARCHAR" property="packMaterial" />
<result column="regNum" jdbcType="VARCHAR" property="regNum" />
<result column="regName" jdbcType="VARCHAR" property="regName" />
<result column="regValidTo" jdbcType="VARCHAR" property="regValidTo" />
<result column="unionProjectId" jdbcType="BIGINT" property="unionProjectId" />
<result column="unionProjectName" jdbcType="VARCHAR" property="unionProjectName" />
<result column="salePrice" jdbcType="DECIMAL" property="salePrice" />
<result column="priceUnitText" jdbcType="VARCHAR" property="priceUnitText" />
<result column="topSalePrice" jdbcType="DECIMAL" property="topSalePrice" />
<result column="settlePayPrice" jdbcType="DECIMAL" property="settlePayPrice" />
<result column="goodsSource" jdbcType="INTEGER" property="goodsSource" />
<result column="stockStatus" jdbcType="INTEGER" property="stockStatus" />
<result column="changedContent" jdbcType="VARCHAR" property="changedContent" />
<result column="changedTime" jdbcType="TIMESTAMP" property="changedTime" />
<result column="proxyName" jdbcType="VARCHAR" property="proxyName" />
<result column="onlineStatus" jdbcType="INTEGER" property="onlineStatus" />
<result column="medicalCode" jdbcType="VARCHAR" property="medicalCode" />
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from udplat_goods
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.glxp.udidl.admin.entity.udplat.UdplatGoods">
insert into udplat_goods (id, uuid, deliveryGoodId,
projectGoodsCode, deliveryGoodsCode, manufactureId,
manufactureName, distributorId, distributorName,
productName, compId, model,
spec, prodMaterial, packMaterial,
regNum, regName, regValidTo,
unionProjectId, unionProjectName, salePrice,
priceUnitText, topSalePrice, settlePayPrice,
goodsSource, stockStatus, changedContent,
changedTime, proxyName, onlineStatus,
medicalCode, createTime
)
values (#{id,jdbcType=BIGINT}, #{uuid,jdbcType=VARCHAR}, #{deliveryGoodId,jdbcType=VARCHAR},
#{projectGoodsCode,jdbcType=VARCHAR}, #{deliveryGoodsCode,jdbcType=VARCHAR}, #{manufactureId,jdbcType=BIGINT},
#{manufactureName,jdbcType=VARCHAR}, #{distributorId,jdbcType=BIGINT}, #{distributorName,jdbcType=VARCHAR},
#{productName,jdbcType=VARCHAR}, #{compId,jdbcType=BIGINT}, #{model,jdbcType=VARCHAR},
#{spec,jdbcType=VARCHAR}, #{prodMaterial,jdbcType=VARCHAR}, #{packMaterial,jdbcType=VARCHAR},
#{regNum,jdbcType=VARCHAR}, #{regName,jdbcType=VARCHAR}, #{regValidTo,jdbcType=VARCHAR},
#{unionProjectId,jdbcType=BIGINT}, #{unionProjectName,jdbcType=VARCHAR}, #{salePrice,jdbcType=DECIMAL},
#{priceUnitText,jdbcType=VARCHAR}, #{topSalePrice,jdbcType=DECIMAL}, #{settlePayPrice,jdbcType=DECIMAL},
#{goodsSource,jdbcType=INTEGER}, #{stockStatus,jdbcType=VARCHAR}, #{changedContent,jdbcType=VARCHAR},
#{changedTime,jdbcType=TIMESTAMP}, #{proxyName,jdbcType=VARCHAR}, #{onlineStatus,jdbcType=INTEGER},
#{medicalCode,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
)
</insert>
<update id="update" parameterType="com.glxp.udidl.admin.entity.udplat.UdplatGoods">
update udplat_goods
set uuid = #{uuid,jdbcType=VARCHAR},
deliveryGoodId = #{deliveryGoodId,jdbcType=VARCHAR},
projectGoodsCode = #{projectGoodsCode,jdbcType=VARCHAR},
deliveryGoodsCode = #{deliveryGoodsCode,jdbcType=VARCHAR},
manufactureId = #{manufactureId,jdbcType=BIGINT},
manufactureName = #{manufactureName,jdbcType=VARCHAR},
distributorId = #{distributorId,jdbcType=BIGINT},
distributorName = #{distributorName,jdbcType=VARCHAR},
productName = #{productName,jdbcType=VARCHAR},
compId = #{compId,jdbcType=BIGINT},
model = #{model,jdbcType=VARCHAR},
spec = #{spec,jdbcType=VARCHAR},
prodMaterial = #{prodMaterial,jdbcType=VARCHAR},
packMaterial = #{packMaterial,jdbcType=VARCHAR},
regNum = #{regNum,jdbcType=VARCHAR},
regName = #{regName,jdbcType=VARCHAR},
regValidTo = #{regValidTo,jdbcType=VARCHAR},
unionProjectId = #{unionProjectId,jdbcType=BIGINT},
unionProjectName = #{unionProjectName,jdbcType=VARCHAR},
salePrice = #{salePrice,jdbcType=DECIMAL},
priceUnitText = #{priceUnitText,jdbcType=VARCHAR},
topSalePrice = #{topSalePrice,jdbcType=DECIMAL},
settlePayPrice = #{settlePayPrice,jdbcType=DECIMAL},
goodsSource = #{goodsSource,jdbcType=INTEGER},
stockStatus = #{stockStatus,jdbcType=VARCHAR},
changedContent = #{changedContent,jdbcType=VARCHAR},
changedTime = #{changedTime,jdbcType=TIMESTAMP},
proxyName = #{proxyName,jdbcType=VARCHAR},
onlineStatus = #{onlineStatus,jdbcType=INTEGER},
medicalCode = #{medicalCode,jdbcType=VARCHAR},
createTime = #{createTime,jdbcType=TIMESTAMP},
updateTime = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="selectByGoodId" parameterType="java.lang.String" resultMap="BaseResultMap">
select id, uuid, deliveryGoodId, projectGoodsCode, deliveryGoodsCode, manufactureId,
manufactureName, distributorId, distributorName, productName, compId, model, spec,
prodMaterial, packMaterial, regNum, regName, regValidTo, unionProjectId, unionProjectName,
salePrice, priceUnitText, topSalePrice, settlePayPrice, goodsSource, stockStatus,
changedContent, changedTime, proxyName, onlineStatus, medicalCode, createTime, updateTime
from udplat_goods
where deliveryGoodId = #{deliveryGoodId}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select id, uuid, deliveryGoodId, projectGoodsCode, deliveryGoodsCode, manufactureId,
manufactureName, distributorId, distributorName, productName, compId, model, spec,
prodMaterial, packMaterial, regNum, regName, regValidTo, unionProjectId, unionProjectName,
salePrice, priceUnitText, topSalePrice, settlePayPrice, goodsSource, stockStatus,
changedContent, changedTime, proxyName, onlineStatus, medicalCode, createTime, updateTime
from udplat_goods
</select>
<select id="list" resultMap="BaseResultMap" parameterType="com.glxp.udidl.admin.dto.udplat.BaseParam">
select id, uuid, deliveryGoodId, projectGoodsCode, deliveryGoodsCode, manufactureId,
manufactureName, distributorId, distributorName, productName, compId, model, spec,
prodMaterial, packMaterial, regNum, regName, regValidTo, unionProjectId, unionProjectName,
salePrice, priceUnitText, topSalePrice, settlePayPrice, goodsSource, stockStatus,
changedContent, changedTime, proxyName, onlineStatus, medicalCode, createTime, updateTime
from udplat_goods
<where>
<if test="name != '' and name != null">
and productName like concat('%',#{name},'%')
</if>
<if test="startDate != '' and startDate != null">
and createTime >= #{startDate}
</if>
<if test="endDate != '' and endDate != null">
and createTime &lt;= #{endDate}
</if>
</where>
order by if(ISNULL(updateTime),createTime,updateTime) DESC
</select>
</mapper>