|
|
@@ -1,7 +1,7 @@
|
|
|
<?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">
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.fs.hisStore.mapper.FsStoreProductScrmMapper">
|
|
|
|
|
|
<resultMap type="FsStoreProductScrm" id="FsStoreProductResult">
|
|
|
@@ -76,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="shelfLife" column="shelf_life" />
|
|
|
<result property="domesticImported" column="domestic_imported" />
|
|
|
<result property="appIds" column="app_ids" />
|
|
|
+ <result property="purchaseLimit" column="purchase_limit" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectFsStoreProductVo">
|
|
|
@@ -87,8 +88,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
is_display,tui_cate_id,company_ids,is_drug,drug_image,drug_reg_cert_no,common_name,dosage_form,
|
|
|
unit_price,batch_number,mah,mah_address,manufacturer,manufacturer_address,indications,dosage,
|
|
|
adverse_reactions,contraindications,precautions,is_audit,store_id,return_address,brand,food_production_license_code,
|
|
|
- origin_place,net_content,shelf_life,domestic_imported,app_ids
|
|
|
- from fs_store_product_scrm
|
|
|
+ origin_place,net_content,shelf_life,domestic_imported,app_ids,purchase_limit
|
|
|
+ from fs_store_product_scrm
|
|
|
</sql>
|
|
|
|
|
|
<sql id="selectFsStoreProductPVo">
|
|
|
@@ -100,7 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
p.is_display,p.tui_cate_id,p.company_ids,p.is_drug,p.drug_image,p.drug_reg_cert_no,p.common_name,p.dosage_form,
|
|
|
p.unit_price,p.batch_number,p.mah,p.mah_address,p.manufacturer,p.manufacturer_address,p.indications,p.dosage,
|
|
|
p.adverse_reactions,p.contraindications,p.precautions,p.is_audit,p.store_id,p.return_address,p.brand,p.food_production_license_code,
|
|
|
- p.origin_place,p.net_content,p.shelf_life,p.domestic_imported,app_ids
|
|
|
+ p.origin_place,p.net_content,p.shelf_life,p.domestic_imported,app_ids,p.purchase_limit
|
|
|
from fs_store_product_scrm p
|
|
|
</sql>
|
|
|
|
|
|
@@ -278,7 +279,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="shelfLife != null">shelf_life,</if>
|
|
|
<if test="domesticImported != null and domesticImported != ''">domestic_imported,</if>
|
|
|
<if test="appIds != null and appIds != ''">app_ids, </if>
|
|
|
- </trim>
|
|
|
+ <if test="purchaseLimit != null">purchase_limit,</if>
|
|
|
+ </trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="image != null and image != ''">#{image},</if>
|
|
|
<if test="video != null and video != ''">#{video},</if>
|
|
|
@@ -350,7 +352,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="shelfLife != null">#{shelfLife},</if>
|
|
|
<if test="domesticImported != null and domesticImported != ''">#{domesticImported},</if>
|
|
|
<if test="appIds != null and appIds != ''">#{appIds}, </if>
|
|
|
- </trim>
|
|
|
+ <if test="purchaseLimit != null">#{purchaseLimit},</if>
|
|
|
+ </trim>
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateFsStoreProduct" parameterType="FsStoreProductScrm">
|
|
|
@@ -426,6 +429,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="shelfLife != null">shelf_life = #{shelfLife},</if>
|
|
|
<if test="domesticImported != null">domestic_imported = #{domesticImported},</if>
|
|
|
<if test="appIds != null and appIds != ''">app_ids = #{appIds}, </if>
|
|
|
+ <if test="purchaseLimit != null">purchase_limit = #{purchaseLimit},</if>
|
|
|
</trim>
|
|
|
where product_id = #{productId}
|
|
|
</update>
|
|
|
@@ -480,14 +484,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
inner join fs_store_scrm fs on fs.store_id = fsp.store_id
|
|
|
</if>
|
|
|
<if test='config.isAudit == "1" '>
|
|
|
- and fs.is_audit = '1'
|
|
|
+ and fs.is_audit = '1'
|
|
|
</if>
|
|
|
where fsp.is_del=0 and fsp.is_show=1
|
|
|
<if test='config.isAudit == "1" '>
|
|
|
- and fsp.is_audit = '1'
|
|
|
+ and fsp.is_audit = '1'
|
|
|
</if>
|
|
|
<if test = 'param.appId != null and param.appId != ""'>
|
|
|
- and ((FIND_IN_SET(#{param.appId}, fsp.app_ids) > 0))
|
|
|
+ and ((FIND_IN_SET(#{param.appId}, fsp.app_ids) > 0))
|
|
|
</if>
|
|
|
and fsp.is_best=1 and fsp.is_display=1 order by fsp.sort desc,fsp.product_id desc
|
|
|
</select>
|
|
|
@@ -521,11 +525,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<select id="selectFsStoreProductHotQuery" resultType="com.fs.hisStore.vo.FsStoreProductListQueryVO">
|
|
|
select p.* from fs_store_product_scrm p
|
|
|
<if test='config.isAudit == "1" '>
|
|
|
- inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1
|
|
|
+ inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1
|
|
|
</if>
|
|
|
where p.is_del=0 and p.is_show=1
|
|
|
<if test='config.isAudit == "1" '>
|
|
|
- and p.is_audit = '1'
|
|
|
+ and p.is_audit = '1'
|
|
|
</if>
|
|
|
<if test='appId != null and appId = "" '>
|
|
|
and ((FIND_IN_SET(#{appId}, p.app_ids) > 0))
|
|
|
@@ -535,14 +539,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<select id="selectFsStoreProductGoodListQuery" resultType="com.fs.hisStore.vo.FsStoreProductListQueryVO">
|
|
|
select p.* from fs_store_product_scrm p
|
|
|
<if test='config.isAudit == "1" '>
|
|
|
- inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1
|
|
|
+ inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1
|
|
|
</if>
|
|
|
where p.is_del=0 and p.is_show=1
|
|
|
<if test='config.isAudit == "1" '>
|
|
|
- and p.is_audit = '1'
|
|
|
+ and p.is_audit = '1'
|
|
|
</if>
|
|
|
<if test = 'param.appId != null and param.appId != ""'>
|
|
|
- and ((FIND_IN_SET(#{param.appId}, p.app_ids) > 0))
|
|
|
+ and ((FIND_IN_SET(#{param.appId}, p.app_ids) > 0))
|
|
|
</if>
|
|
|
and p.is_good=1 and p.is_display=1 order by p.sort desc
|
|
|
</select>
|