|
|
@@ -0,0 +1,594 @@
|
|
|
+<?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.fs.hisStore.mapper.IFsPlatformProductScrmMapper">
|
|
|
+
|
|
|
+ <resultMap type="FsPlatformProductScrm" id="FsPlatFormProductResult">
|
|
|
+ <result property="productId" column="product_id" />
|
|
|
+ <result property="video" column="video" />
|
|
|
+ <result property="image" column="image" />
|
|
|
+ <result property="sliderImage" column="slider_image" />
|
|
|
+ <result property="productName" column="product_name" />
|
|
|
+ <result property="productInfo" column="product_info" />
|
|
|
+ <result property="keyword" column="keyword" />
|
|
|
+ <result property="barCode" column="bar_code" />
|
|
|
+ <result property="cateId" column="cate_id" />
|
|
|
+ <result property="price" column="price" />
|
|
|
+ <result property="vipPrice" column="vip_price" />
|
|
|
+ <result property="otPrice" column="ot_price" />
|
|
|
+ <result property="agentPrice" column="agent_price" />
|
|
|
+ <result property="postage" column="postage" />
|
|
|
+ <result property="unitName" column="unit_name" />
|
|
|
+ <result property="sort" column="sort" />
|
|
|
+ <result property="sales" column="sales" />
|
|
|
+ <result property="stock" column="stock" />
|
|
|
+ <result property="isShow" column="is_show" />
|
|
|
+ <result property="isHot" column="is_hot" />
|
|
|
+ <result property="isBenefit" column="is_benefit" />
|
|
|
+ <result property="isBest" column="is_best" />
|
|
|
+ <result property="isNew" column="is_new" />
|
|
|
+ <result property="description" column="description" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ <result property="isPostage" column="is_postage" />
|
|
|
+ <result property="isDel" column="is_del" />
|
|
|
+ <result property="giveIntegral" column="give_integral" />
|
|
|
+ <result property="cost" column="cost" />
|
|
|
+ <result property="isGood" column="is_good" />
|
|
|
+ <result property="browse" column="browse" />
|
|
|
+ <result property="codePath" column="code_path" />
|
|
|
+ <result property="tempId" column="temp_id" />
|
|
|
+ <result property="specType" column="spec_type" />
|
|
|
+ <result property="isIntegral" column="is_integral" />
|
|
|
+ <result property="integral" column="integral" />
|
|
|
+ <result property="productType" column="product_type" />
|
|
|
+ <result property="prescribeCode" column="prescribe_code" />
|
|
|
+ <result property="prescribeSpec" column="prescribe_spec" />
|
|
|
+ <result property="prescribeFactory" column="prescribe_factory" />
|
|
|
+ <result property="prescribeName" column="prescribe_name" />
|
|
|
+ <result property="isDisplay" column="is_display" />
|
|
|
+ <result property="tuiCateId" column="tui_cate_id" />
|
|
|
+ <result property="companyIds" column="company_ids" />
|
|
|
+ <result property="isDrug" column="is_drug"/>
|
|
|
+ <result property="drugImage" column="drug_image"/>
|
|
|
+ <result property="drugRegCertNo" column="drug_reg_cert_no"/>
|
|
|
+ <result property="commonName" column="common_name"/>
|
|
|
+ <result property="dosageForm" column="dosage_form"/>
|
|
|
+ <result property="unitPrice" column="unit_price"/>
|
|
|
+ <result property="batchNumber" column="batch_number"/>
|
|
|
+ <result property="mah" column="mah"/>
|
|
|
+ <result property="mahAddress" column="mah_address"/>
|
|
|
+ <result property="manufacturer" column="manufacturer"/>
|
|
|
+ <result property="manufacturerAddress" column="manufacturer_address"/>
|
|
|
+ <result property="indications" column="indications"/>
|
|
|
+ <result property="ingredient" column="ingredient"/>
|
|
|
+ <result property="dosage" column="dosage"/>
|
|
|
+ <result property="adverseReactions" column="adverse_reactions"/>
|
|
|
+ <result property="contraindications" column="contraindications"/>
|
|
|
+ <result property="precautions" column="precautions"/>
|
|
|
+ <result property="isAudit" column="is_audit"/>
|
|
|
+ <result property="storeId" column="store_id"/>
|
|
|
+ <result property="instructionManual" column="instruction_manual"/>
|
|
|
+ <result property="business" column="business"/>
|
|
|
+ <result property="businessStart" column="business_start"/>
|
|
|
+ <result property="businessEnd" column="business_end"/>
|
|
|
+ <result property="license" column="license"/>
|
|
|
+ <result property="licenseStart" column="license_start"/>
|
|
|
+ <result property="licenseEnd" column="license_end"/>
|
|
|
+ <result property="certificate" column="certificate"/>
|
|
|
+ <result property="certificateStart" column="certificate_start"/>
|
|
|
+ <result property="certificateEnd" column="certificate_end"/>
|
|
|
+ <result property="voucher" column="voucher"/>
|
|
|
+ <result property="voucherStart" column="voucher_start"/>
|
|
|
+ <result property="voucherEnd" column="voucher_end"/>
|
|
|
+ <result property="gmpAuth" column="gmp_auth"/>
|
|
|
+ <result property="gmpAuthStart" column="gmp_auth_start"/>
|
|
|
+ <result property="gmpAuthEnd" column="gmp_auth_end"/>
|
|
|
+ <result property="businessLink" column="business_link"/>
|
|
|
+ <result property="medicalDeviceCode" column="medical_device_code"/>
|
|
|
+ <result property="isBusinessPermanent" column="is_business_permanent"/>
|
|
|
+ <result property="isLicensePermanent" column="is_license_permanent"/>
|
|
|
+ <result property="isCertificatePermanent" column="is_certificate_permanent"/>
|
|
|
+ <result property="isGmpAuthPermanent" column="is_gmp_auth_permanent"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectFsPlatFormProductVo">
|
|
|
+ select product_id, image,video, slider_image, product_name, product_info, keyword, bar_code,
|
|
|
+ cate_id, price, vip_price, ot_price, postage, unit_name, sort, sales, stock, is_show,
|
|
|
+ is_hot, is_benefit, is_best, is_new, description, create_time, update_time, is_postage,
|
|
|
+ is_del, give_integral, cost, is_good, browse, code_path, temp_id, spec_type, is_integral,
|
|
|
+ integral, product_type, prescribe_code, prescribe_spec, prescribe_factory, prescribe_name,
|
|
|
+ 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,ingredient,dosage,
|
|
|
+ adverse_reactions,contraindications,precautions,is_audit,store_id,instruction_manual,review_audit,qualification_certificate,qualification_certificate_start,qualification_certificate_end,
|
|
|
+ business, business_start, business_end,
|
|
|
+ license, license_start, license_end,
|
|
|
+ certificate, certificate_start, certificate_end,
|
|
|
+ voucher, voucher_start, voucher_end,
|
|
|
+ gmp_auth, gmp_auth_start, gmp_auth_end,business_link,medical_device_code,
|
|
|
+ is_business_permanent,is_license_permanent,is_certificate_permanent,is_gmp_auth_permanent
|
|
|
+ from fs_platform_product_scrm
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <sql id="baseSql">
|
|
|
+ DISTINCT p.product_id, p.image,p.video, p.slider_image, p.product_name, p.product_info, p.keyword, p.bar_code,
|
|
|
+ p.cate_id, p.price, p.vip_price, p.ot_price, p.postage, p.unit_name, p.sort, p.stock,p.sales,
|
|
|
+ p.is_hot, p.is_benefit, p.is_best, p.is_new, p.description, p.create_time, p.update_time, p.is_postage,
|
|
|
+ p.is_del, p.give_integral, p.cost, p.is_good, p.browse, p.code_path, p.temp_id, p.spec_type, p.is_integral,
|
|
|
+ p.integral, p.product_type, p.prescribe_code, p.prescribe_spec, p.prescribe_factory, p.prescribe_name,
|
|
|
+ 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.ingredient,p.dosage,
|
|
|
+ p.adverse_reactions,p.contraindications,p.precautions,p.is_audit,p.store_id,
|
|
|
+ p.is_business_permanent,p.is_license_permanent,p.is_certificate_permanent,p.is_gmp_auth_permanent
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectList" resultType="com.fs.hisStore.vo.FsPlatformProductListVO">
|
|
|
+ SELECT
|
|
|
+ <include refid="baseSql"/>,
|
|
|
+ case
|
|
|
+ when p.is_show = 1 and p.is_audit = 1 then 1
|
|
|
+ when p.is_show = 0 and p.is_audit = 0 then 0
|
|
|
+ when p.is_show = 1 and p.is_audit = 0 then 3
|
|
|
+ when p.is_show = 0 and p.is_audit = 2 then 4
|
|
|
+ end AS is_show,
|
|
|
+ pc.cate_name
|
|
|
+ FROM
|
|
|
+ fs_platform_product_scrm p
|
|
|
+ LEFT JOIN
|
|
|
+ fs_store_product_category_scrm pc ON p.cate_id = pc.cate_id
|
|
|
+ WHERE 1=1
|
|
|
+ and p.is_del = 0 and p.is_drug = 1
|
|
|
+ <if test="maps.isAudit == null and maps.isShow != null">
|
|
|
+ <if test="maps.isShow == 1">
|
|
|
+ AND p.is_audit = 1
|
|
|
+ AND p.is_show = 1
|
|
|
+ </if>
|
|
|
+ <if test="maps.isShow == 0">
|
|
|
+ AND p.is_audit != 1
|
|
|
+ AND p.is_show = #{maps.isShow}
|
|
|
+ </if>
|
|
|
+ <if test="maps.isShow == -1">
|
|
|
+ </if>
|
|
|
+ <if test="maps.isShow == 3">
|
|
|
+ AND p.is_audit = 0
|
|
|
+ AND p.is_show = 1
|
|
|
+ </if>
|
|
|
+ <if test="maps.isShow == 4">
|
|
|
+ AND p.is_audit = 2
|
|
|
+ AND p.is_show = 0
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="maps.isAudit != null">
|
|
|
+ AND p.is_audit = #{maps.isAudit}
|
|
|
+ </if>
|
|
|
+ <if test="maps.productName != null and maps.productName.trim() != ''">
|
|
|
+ AND p.product_name LIKE CONCAT('%', #{maps.productName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="maps.cateId != null">
|
|
|
+ AND (pc.cate_id = #{maps.cateId} OR pc.pid = #{maps.cateId})
|
|
|
+ </if>
|
|
|
+ <if test="maps.productType != null">
|
|
|
+ AND p.product_type = #{maps.productType}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="maps.companyIds != null and maps.companyIds.trim() != ''">
|
|
|
+ AND p.company_ids REGEXP REPLACE(#{maps.companyIds}, ',', '|')
|
|
|
+ </if>
|
|
|
+ <if test="maps.storeId != null and maps.storeId != ''">
|
|
|
+ AND p.store_id = #{maps.storeId}
|
|
|
+ </if>
|
|
|
+ <if test="maps.storeIds != null">
|
|
|
+ AND p.store_id IN
|
|
|
+ <foreach collection="maps.storeIds" item="item" index="index" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="maps.drugRegCertNo != null and maps.drugRegCertNo.trim() != ''">
|
|
|
+ AND drug_reg_cert_no LIKE CONCAT('%', #{maps.drugRegCertNo}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="maps.commonName != null and maps.commonName.trim() != ''">
|
|
|
+ AND common_name LIKE CONCAT('%', #{maps.commonName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="maps.dosageForm != null and maps.dosageForm.trim() != ''">
|
|
|
+ AND dosage_form LIKE CONCAT('%', #{maps.dosageForm}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="maps.unitPrice != null and maps.unitPrice.trim() != ''">
|
|
|
+ AND unit_price = #{maps.unitPrice}
|
|
|
+ </if>
|
|
|
+ <if test="maps.batchNumber != null and maps.batchNumber.trim() != ''">
|
|
|
+ AND batch_number LIKE CONCAT('%', #{maps.batchNumber}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="maps.mah != null and maps.mah.trim() != ''">
|
|
|
+ AND mah LIKE CONCAT('%', #{maps.mah}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="maps.mahAddress != null and maps.mahAddress.trim() != ''">
|
|
|
+ AND mah_address LIKE CONCAT('%', #{maps.mahAddress}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="maps.manufacturer != null and maps.manufacturer.trim() != ''">
|
|
|
+ AND manufacturer LIKE CONCAT('%', #{maps.manufacturer}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="maps.manufacturerAddress != null and maps.manufacturerAddress.trim() != ''">
|
|
|
+ AND manufacturer_address LIKE CONCAT('%', #{maps.manufacturerAddress}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="maps.indications != null and maps.indications.trim() != ''">
|
|
|
+ AND indications LIKE CONCAT('%', #{maps.indications}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="maps.dosage != null and maps.dosage.trim() != ''">
|
|
|
+ AND dosage LIKE CONCAT('%', #{maps.dosage}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="maps.adverseReactions != null and maps.adverseReactions.trim() != ''">
|
|
|
+ AND adverse_reactions LIKE CONCAT('%', #{maps.adverseReactions}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="maps.contraindications != null and maps.contraindications.trim() != ''">
|
|
|
+ AND contraindications LIKE CONCAT('%', #{maps.contraindications}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="maps.precautions != null and maps.precautions.trim() != ''">
|
|
|
+ AND precautions LIKE CONCAT('%', #{maps.precautions}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="maps.prescribeSpec != null and maps.prescribeSpec.trim() != ''">
|
|
|
+ AND p.prescribe_spec LIKE CONCAT('%', #{maps.prescribeSpec}, '%')
|
|
|
+ </if>
|
|
|
+ ORDER BY
|
|
|
+ p.product_id DESC
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getProductNoticeInfo" resultType="java.lang.String">
|
|
|
+ SELECT
|
|
|
+ CONCAT(
|
|
|
+ product_name,
|
|
|
+ '商品的',
|
|
|
+ '生产企业营业执照',
|
|
|
+ CASE
|
|
|
+ WHEN business_end < CURDATE() THEN '已过期'
|
|
|
+ ELSE '即将1个月内过期'
|
|
|
+ END
|
|
|
+ ) AS status_text
|
|
|
+ FROM fs_platform_product_scrm
|
|
|
+ WHERE business_end IS NOT NULL
|
|
|
+ AND business_end <= DATE_ADD(CURDATE(), INTERVAL 1 MONTH)
|
|
|
+ AND is_business_permanent != 1
|
|
|
+ and is_show = 1 and is_audit = 1 and is_drug = 1
|
|
|
+ <if test="storeId != null">AND store_id = #{storeId}</if>
|
|
|
+ UNION ALL
|
|
|
+ SELECT
|
|
|
+ CONCAT(
|
|
|
+ product_name,
|
|
|
+ '商品的',
|
|
|
+ '生产企业的生产许可证/备案凭证',
|
|
|
+ CASE
|
|
|
+ WHEN license_end < CURDATE() THEN '已过期'
|
|
|
+ ELSE '即将1个月内过期'
|
|
|
+ END
|
|
|
+ ) AS status_text
|
|
|
+ FROM fs_platform_product_scrm
|
|
|
+ WHERE license_end IS NOT NULL
|
|
|
+ AND license_end <= DATE_ADD(CURDATE(), INTERVAL 1 MONTH)
|
|
|
+ AND is_license_permanent != 1
|
|
|
+ and is_show = 1 and is_audit = 1 and is_drug = 1
|
|
|
+ <if test="storeId != null">AND store_id = #{storeId}</if>
|
|
|
+ UNION ALL
|
|
|
+ SELECT
|
|
|
+ CONCAT(
|
|
|
+ product_name,
|
|
|
+ '商品的',
|
|
|
+ '商品注册证/备案凭证',
|
|
|
+ CASE
|
|
|
+ WHEN certificate_end < CURDATE() THEN '已过期'
|
|
|
+ ELSE '即将1个月内过期'
|
|
|
+ END
|
|
|
+ ) AS status_text
|
|
|
+ FROM fs_platform_product_scrm
|
|
|
+ WHERE certificate_end IS NOT NULL
|
|
|
+ AND certificate_end <= DATE_ADD(CURDATE(), INTERVAL 1 MONTH)
|
|
|
+ AND is_certificate_permanent != 1
|
|
|
+ and is_show = 1 and is_audit = 1 and is_drug = 1
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectFsPlatformProductById" parameterType="Long" resultMap="FsPlatFormProductResult">
|
|
|
+ <include refid="selectFsPlatFormProductVo"/>
|
|
|
+ where product_id = #{productId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getBaseProductInfo" resultMap="FsPlatFormProductResult">
|
|
|
+ SELECT
|
|
|
+ p.product_id,
|
|
|
+ p.product_name
|
|
|
+ FROM
|
|
|
+ fs_platform_product_scrm p
|
|
|
+ WHERE p.product_id IN <foreach collection="ids" index="index" item="item" open="(" separator="," close=")">#{item}</foreach>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <delete id="deleteFsPlatFormProductByIds">
|
|
|
+ delete from fs_platform_product_scrm where product_id in
|
|
|
+ <foreach item="productId" collection="array" open="(" separator="," close=")">
|
|
|
+ #{productId}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <insert id="insertFsPlatformProduct" parameterType="FsPlatformProductScrm" useGeneratedKeys="false" keyProperty="productId">
|
|
|
+ insert into fs_platform_product_scrm
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="productId != null and productId != ''">product_id,</if>
|
|
|
+ <if test="image != null and image != ''">image,</if>
|
|
|
+ <if test="video != null and video != ''">video,</if>
|
|
|
+ <if test="sliderImage != null and sliderImage != ''">slider_image,</if>
|
|
|
+ <if test="productName != null and productName != ''">product_name,</if>
|
|
|
+ <if test="productInfo != null and productInfo != ''">product_info,</if>
|
|
|
+ <if test="keyword != null and keyword != ''">keyword,</if>
|
|
|
+ <if test="barCode != null">bar_code,</if>
|
|
|
+ <if test="cateId != null">cate_id,</if>
|
|
|
+ <if test="price != null">price,</if>
|
|
|
+ <if test="vipPrice != null">vip_price,</if>
|
|
|
+ <if test="otPrice != null">ot_price,</if>
|
|
|
+ <if test="agentPrice != null">agent_price,</if>
|
|
|
+ <if test="postage != null">postage,</if>
|
|
|
+ <if test="unitName != null">unit_name,</if>
|
|
|
+ <if test="sort != null">sort,</if>
|
|
|
+ <if test="sales != null">sales,</if>
|
|
|
+ <if test="stock != null">stock,</if>
|
|
|
+ <if test="isShow != null">is_show,</if>
|
|
|
+ <if test="isHot != null">is_hot,</if>
|
|
|
+ <if test="isBenefit != null">is_benefit,</if>
|
|
|
+ <if test="isBest != null">is_best,</if>
|
|
|
+ <if test="isNew != null">is_new,</if>
|
|
|
+ <if test="description != null">description,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ <if test="isPostage != null">is_postage,</if>
|
|
|
+ <if test="isDel != null">is_del,</if>
|
|
|
+ <if test="giveIntegral != null">give_integral,</if>
|
|
|
+ <if test="cost != null">cost,</if>
|
|
|
+ <if test="isGood != null">is_good,</if>
|
|
|
+ <if test="browse != null">browse,</if>
|
|
|
+ <if test="codePath != null and codePath != ''">code_path,</if>
|
|
|
+ <if test="tempId != null">temp_id,</if>
|
|
|
+ <if test="specType != null">spec_type,</if>
|
|
|
+ <if test="isIntegral != null">is_integral,</if>
|
|
|
+ <if test="integral != null">integral,</if>
|
|
|
+ <if test="productType != null">product_type,</if>
|
|
|
+ <if test="prescribeCode != null">prescribe_code,</if>
|
|
|
+ <if test="prescribeSpec != null">prescribe_spec,</if>
|
|
|
+ <if test="prescribeFactory != null">prescribe_factory,</if>
|
|
|
+ <if test="prescribeName != null">prescribe_name,</if>
|
|
|
+ <if test="isDisplay != null">is_display,</if>
|
|
|
+ <if test="tuiCateId != null">tui_cate_id,</if>
|
|
|
+ <if test="companyIds != null and companyIds != ''">company_ids,</if>
|
|
|
+ <if test="isDrug!= null and isDrug != ''">is_drug,</if>
|
|
|
+ <if test="drugImage != null and drugImage != ''">drug_image ,</if>
|
|
|
+ <if test="drugRegCertNo != null and drugRegCertNo != ''">drug_reg_cert_no ,</if>
|
|
|
+ <if test="commonName != null and commonName != ''">common_name ,</if>
|
|
|
+ <if test="dosageForm != null and dosageForm != ''">dosage_form ,</if>
|
|
|
+ <if test="unitPrice != null and unitPrice != ''">unit_price ,</if>
|
|
|
+ <if test="batchNumber != null and batchNumber != ''">batch_number ,</if>
|
|
|
+ <if test="mah != null and mah != ''">mah ,</if>
|
|
|
+ <if test="mahAddress != null and mahAddress != ''">mah_address ,</if>
|
|
|
+ <if test="manufacturer != null and manufacturer != ''">manufacturer ,</if>
|
|
|
+ <if test="manufacturerAddress != null and manufacturerAddress != ''">manufacturer_address,</if>
|
|
|
+ <if test="indications != null and indications != ''">indications ,</if>
|
|
|
+ <if test="ingredient != null and ingredient != ''">ingredient ,</if>
|
|
|
+ <if test="dosage != null and dosage != ''">dosage ,</if>
|
|
|
+ <if test="adverseReactions != null and adverseReactions != ''">adverse_reactions ,</if>
|
|
|
+ <if test="contraindications != null and contraindications != ''">contraindications ,</if>
|
|
|
+ <if test="precautions != null and precautions != ''">precautions ,</if>
|
|
|
+ <if test="isAudit != null and isAudit != ''">is_audit ,</if>
|
|
|
+ <if test="storeId != null and storeId != ''">store_id ,</if>
|
|
|
+ <if test="instructionManual != null and instructionManual != ''">instruction_manual ,</if>
|
|
|
+ <if test="reviewAudit != null and reviewAudit != ''">review_audit ,</if>
|
|
|
+ <if test="qualificationCertificate != null and qualificationCertificate != ''">qualification_certificate ,</if>
|
|
|
+ <if test="qualificationCertificateStart != null">qualification_certificate_start ,</if>
|
|
|
+ <if test="qualificationCertificateEnd != null">qualification_certificate_end ,</if>
|
|
|
+ <if test="business != null and business != ''">business ,</if>
|
|
|
+ <if test="businessStart != null">business_start ,</if>
|
|
|
+ <if test="businessEnd != null">business_end ,</if>
|
|
|
+ <if test="license != null and license != ''">license ,</if>
|
|
|
+ <if test="licenseStart != null">license_start ,</if>
|
|
|
+ <if test="licenseEnd != null">license_end ,</if>
|
|
|
+ <if test="certificate != null and certificate != ''">certificate ,</if>
|
|
|
+ <if test="certificateStart != null">certificate_start ,</if>
|
|
|
+ <if test="certificateEnd != null">certificate_end ,</if>
|
|
|
+ <if test="voucher != null and voucher != ''">voucher ,</if>
|
|
|
+ <if test="voucherStart != null">voucher_start ,</if>
|
|
|
+ <if test="voucherEnd != null">voucher_end ,</if>
|
|
|
+ <if test="gmpAuth != null and gmpAuth != ''">gmp_auth ,</if>
|
|
|
+ <if test="gmpAuthStart != null">gmp_auth_start ,</if>
|
|
|
+ <if test="gmpAuthEnd != null">gmp_auth_end ,</if>
|
|
|
+ <if test="businessLink != null">business_link ,</if>
|
|
|
+ <if test="medicalDeviceCode != null">medical_device_code ,</if>
|
|
|
+ <if test="isBusinessPermanent != null">is_business_permanent ,</if>
|
|
|
+ <if test="isLicensePermanent != null">is_license_permanent ,</if>
|
|
|
+ <if test="isCertificatePermanent != null">is_certificate_permanent ,</if>
|
|
|
+ <if test="isGmpAuthPermanent != null">is_gmp_auth_permanent ,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="productId != null and productId != ''">#{productId},</if>
|
|
|
+ <if test="image != null and image != ''">#{image},</if>
|
|
|
+ <if test="video != null and video != ''">#{video},</if>
|
|
|
+ <if test="sliderImage != null and sliderImage != ''">#{sliderImage},</if>
|
|
|
+ <if test="productName != null and productName != ''">#{productName},</if>
|
|
|
+ <if test="productInfo != null and productInfo != ''">#{productInfo},</if>
|
|
|
+ <if test="keyword != null and keyword != ''">#{keyword},</if>
|
|
|
+ <if test="barCode != null">#{barCode},</if>
|
|
|
+ <if test="cateId != null">#{cateId},</if>
|
|
|
+ <if test="price != null">#{price},</if>
|
|
|
+ <if test="vipPrice != null">#{vipPrice},</if>
|
|
|
+ <if test="otPrice != null">#{otPrice},</if>
|
|
|
+ <if test="agentPrice != null">#{agentPrice},</if>
|
|
|
+ <if test="postage != null">#{postage},</if>
|
|
|
+ <if test="unitName != null">#{unitName},</if>
|
|
|
+ <if test="sort != null">#{sort},</if>
|
|
|
+ <if test="sales != null">#{sales},</if>
|
|
|
+ <if test="stock != null">#{stock},</if>
|
|
|
+ <if test="isShow != null">#{isShow},</if>
|
|
|
+ <if test="isHot != null">#{isHot},</if>
|
|
|
+ <if test="isBenefit != null">#{isBenefit},</if>
|
|
|
+ <if test="isBest != null">#{isBest},</if>
|
|
|
+ <if test="isNew != null">#{isNew},</if>
|
|
|
+ <if test="description != null">#{description},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="isPostage != null">#{isPostage},</if>
|
|
|
+ <if test="isDel != null">#{isDel},</if>
|
|
|
+ <if test="giveIntegral != null">#{giveIntegral},</if>
|
|
|
+ <if test="cost != null">#{cost},</if>
|
|
|
+ <if test="isGood != null">#{isGood},</if>
|
|
|
+ <if test="browse != null">#{browse},</if>
|
|
|
+ <if test="codePath != null and codePath != ''">#{codePath},</if>
|
|
|
+ <if test="tempId != null">#{tempId},</if>
|
|
|
+ <if test="specType != null">#{specType},</if>
|
|
|
+ <if test="isIntegral != null">#{isIntegral},</if>
|
|
|
+ <if test="integral != null">#{integral},</if>
|
|
|
+ <if test="productType != null">#{productType},</if>
|
|
|
+ <if test="prescribeCode != null">#{prescribeCode},</if>
|
|
|
+ <if test="prescribeSpec != null">#{prescribeSpec},</if>
|
|
|
+ <if test="prescribeFactory != null">#{prescribeFactory},</if>
|
|
|
+ <if test="prescribeName != null">#{prescribeName},</if>
|
|
|
+ <if test="isDisplay != null">#{isDisplay},</if>
|
|
|
+ <if test="tuiCateId != null">#{tuiCateId},</if>
|
|
|
+ <if test="companyIds != null and companyIds != ''">#{companyIds},</if>
|
|
|
+ <if test="isDrug!= null and isDrug!= ''">#{isDrug} ,</if>
|
|
|
+ <if test="drugImage != null and drugImage != ''">#{drugImage} ,</if>
|
|
|
+ <if test="drugRegCertNo != null and drugRegCertNo != ''">#{drugRegCertNo} ,</if>
|
|
|
+ <if test="commonName != null and commonName != ''">#{commonName} ,</if>
|
|
|
+ <if test="dosageForm != null and dosageForm != ''">#{dosageForm} ,</if>
|
|
|
+ <if test="unitPrice != null and unitPrice != ''">#{unitPrice} ,</if>
|
|
|
+ <if test="batchNumber != null and batchNumber != ''">#{batchNumber} ,</if>
|
|
|
+ <if test="mah != null and mah != ''">#{mah} ,</if>
|
|
|
+ <if test="mahAddress != null and mahAddress != ''">#{mahAddress} ,</if>
|
|
|
+ <if test="manufacturer != null and manufacturer != ''">#{manufacturer} ,</if>
|
|
|
+ <if test="manufacturerAddress != null and manufacturerAddress != ''">#{manufacturerAddress} ,</if>
|
|
|
+ <if test="indications != null and indications != ''">#{indications} ,</if>
|
|
|
+ <if test="ingredient != null and ingredient != ''">#{ingredient} ,</if>
|
|
|
+ <if test="dosage != null and dosage != ''">#{dosage} ,</if>
|
|
|
+ <if test="adverseReactions != null and adverseReactions != ''">#{adverseReactions} ,</if>
|
|
|
+ <if test="contraindications != null and contraindications != ''">#{contraindications} ,</if>
|
|
|
+ <if test="precautions != null and precautions != ''">#{precautions} ,</if>
|
|
|
+ <if test="isAudit != null and isAudit != ''">#{isAudit} ,</if>
|
|
|
+ <if test="storeId != null and storeId != ''">#{storeId} ,</if>
|
|
|
+ <if test="instructionManual != null and instructionManual != ''">#{instructionManual} ,</if>
|
|
|
+ <if test="reviewAudit != null and reviewAudit != ''">#{reviewAudit} ,</if>
|
|
|
+ <if test="qualificationCertificate != null and qualificationCertificate != ''">#{qualificationCertificate} ,</if>
|
|
|
+ <if test="qualificationCertificateStart != null">#{qualificationCertificateStart} ,</if>
|
|
|
+ <if test="qualificationCertificateEnd != null ">#{qualificationCertificateEnd} ,</if>
|
|
|
+ <if test="business != null and business != ''">#{business} ,</if>
|
|
|
+ <if test="businessStart != null">#{businessStart} ,</if>
|
|
|
+ <if test="businessEnd != null">#{businessEnd} ,</if>
|
|
|
+ <if test="license != null and license != ''">#{license} ,</if>
|
|
|
+ <if test="licenseStart != null">#{licenseStart} ,</if>
|
|
|
+ <if test="licenseEnd != null">#{licenseEnd} ,</if>
|
|
|
+ <if test="certificate != null and certificate != ''">#{certificate} ,</if>
|
|
|
+ <if test="certificateStart != null">#{certificateStart} ,</if>
|
|
|
+ <if test="certificateEnd != null">#{certificateEnd} ,</if>
|
|
|
+ <if test="voucher != null and voucher != ''">#{voucher} ,</if>
|
|
|
+ <if test="voucherStart != null">#{voucherStart} ,</if>
|
|
|
+ <if test="voucherEnd != null">#{voucherEnd} ,</if>
|
|
|
+ <if test="gmpAuth != null and gmpAuth != ''">#{gmpAuth} ,</if>
|
|
|
+ <if test="gmpAuthStart != null">#{gmpAuthStart} ,</if>
|
|
|
+ <if test="gmpAuthEnd != null">#{gmpAuthEnd} ,</if>
|
|
|
+ <if test="businessLink != null">#{businessLink} ,</if>
|
|
|
+ <if test="medicalDeviceCode != null">#{medicalDeviceCode},</if>
|
|
|
+ <if test="isBusinessPermanent != null">#{isBusinessPermanent} ,</if>
|
|
|
+ <if test="isLicensePermanent != null">#{isLicensePermanent} ,</if>
|
|
|
+ <if test="isCertificatePermanent != null">#{isCertificatePermanent} ,</if>
|
|
|
+ <if test="isGmpAuthPermanent != null">#{isGmpAuthPermanent} ,</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateFsPlatformProduct" parameterType="FsPlatformProductScrm">
|
|
|
+ update fs_platform_product_scrm
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="image != null and image != ''">image = #{image},</if>
|
|
|
+ <if test="video != null and video != ''">video = #{video},</if>
|
|
|
+ <if test="sliderImage != null and sliderImage != ''">slider_image = #{sliderImage},</if>
|
|
|
+ <if test="productName != null and productName != ''">product_name = #{productName},</if>
|
|
|
+ <if test="productInfo != null and productInfo != ''">product_info = #{productInfo},</if>
|
|
|
+ <if test="keyword != null and keyword != ''">keyword = #{keyword},</if>
|
|
|
+ <if test="barCode != null">bar_code = #{barCode},</if>
|
|
|
+ <if test="cateId != null">cate_id = #{cateId},</if>
|
|
|
+ <if test="price != null">price = #{price},</if>
|
|
|
+ <if test="vipPrice != null">vip_price = #{vipPrice},</if>
|
|
|
+ <if test="otPrice != null">ot_price = #{otPrice},</if>
|
|
|
+ <if test="agentPrice != null">agent_price = #{agentPrice},</if>
|
|
|
+ <if test="postage != null">postage = #{postage},</if>
|
|
|
+ <if test="unitName != null">unit_name = #{unitName},</if>
|
|
|
+ <if test="sort != null">sort = #{sort},</if>
|
|
|
+ <if test="sales != null">sales = #{sales},</if>
|
|
|
+ <if test="stock != null">stock = #{stock},</if>
|
|
|
+ <if test="isShow != null">is_show = #{isShow},</if>
|
|
|
+ <if test="isHot != null">is_hot = #{isHot},</if>
|
|
|
+ <if test="isBenefit != null">is_benefit = #{isBenefit},</if>
|
|
|
+ <if test="isBest != null">is_best = #{isBest},</if>
|
|
|
+ <if test="isNew != null">is_new = #{isNew},</if>
|
|
|
+ <if test="description != null">description = #{description},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ <if test="isPostage != null">is_postage = #{isPostage},</if>
|
|
|
+ <if test="isDel != null">is_del = #{isDel},</if>
|
|
|
+ <if test="giveIntegral != null">give_integral = #{giveIntegral},</if>
|
|
|
+ <if test="cost != null">cost = #{cost},</if>
|
|
|
+ <if test="isGood != null">is_good = #{isGood},</if>
|
|
|
+ <if test="browse != null">browse = #{browse},</if>
|
|
|
+ <if test="codePath != null and codePath != ''">code_path = #{codePath},</if>
|
|
|
+ <if test="tempId != null">temp_id = #{tempId},</if>
|
|
|
+ <if test="specType != null">spec_type = #{specType},</if>
|
|
|
+ <if test="isIntegral != null">is_integral = #{isIntegral},</if>
|
|
|
+ <if test="integral != null">integral = #{integral},</if>
|
|
|
+ <if test="productType != null">product_type = #{productType},</if>
|
|
|
+ <if test="prescribeCode != null">prescribe_code = #{prescribeCode},</if>
|
|
|
+ <if test="prescribeSpec != null">prescribe_spec = #{prescribeSpec},</if>
|
|
|
+ <if test="prescribeFactory != null">prescribe_factory = #{prescribeFactory},</if>
|
|
|
+ <if test="prescribeName != null">prescribe_name = #{prescribeName},</if>
|
|
|
+ <if test="isDisplay != null">is_display = #{isDisplay},</if>
|
|
|
+ <if test="tuiCateId != null">tui_cate_id = #{tuiCateId},</if>
|
|
|
+ <if test="companyIds != null and companyIds != ''">company_ids = #{companyIds},</if>
|
|
|
+ <if test="isDrug != null and isDrug != ''">is_drug = #{isDrug} ,</if>
|
|
|
+ <if test="drugImage != null and drugImage != ''">drug_image = #{drugImage} ,</if>
|
|
|
+ <if test="drugRegCertNo != null and drugRegCertNo != ''">drug_reg_cert_no = #{drugRegCertNo} ,</if>
|
|
|
+ <if test="commonName != null and commonName != ''">common_name = #{commonName} ,</if>
|
|
|
+ <if test="dosageForm != null and dosageForm != ''">dosage_form = #{dosageForm} ,</if>
|
|
|
+ <if test="unitPrice != null and unitPrice != ''">unit_price = #{unitPrice} ,</if>
|
|
|
+ <if test="batchNumber != null and batchNumber != ''">batch_number = #{batchNumber} ,</if>
|
|
|
+ <if test="mah != null and mah != ''">mah = #{mah} ,</if>
|
|
|
+ <if test="mahAddress != null and mahAddress != ''">mah_address = #{mahAddress} ,</if>
|
|
|
+ <if test="manufacturer != null and manufacturer != ''">manufacturer = #{manufacturer} ,</if>
|
|
|
+ <if test="manufacturerAddress != null and manufacturerAddress != ''">manufacturer_address= #{manufacturerAddress} ,</if>
|
|
|
+ <if test="indications != null and indications != ''">indications = #{indications} ,</if>
|
|
|
+ <if test="ingredient != null and ingredient != ''">ingredient = #{ingredient} ,</if>
|
|
|
+ <if test="dosage != null and dosage != ''">dosage = #{dosage} ,</if>
|
|
|
+ <if test="adverseReactions != null and adverseReactions != ''">adverse_reactions = #{adverseReactions} ,</if>
|
|
|
+ <if test="contraindications != null and contraindications != ''">contraindications = #{contraindications} ,</if>
|
|
|
+ <if test="precautions != null and precautions != ''">precautions = #{precautions} ,</if>
|
|
|
+ <if test="isAudit != null and isAudit != ''">is_audit = #{isAudit} ,</if>
|
|
|
+ <if test="storeId != null and storeId != ''">store_id = #{storeId} ,</if>
|
|
|
+ <if test="instructionManual != null and instructionManual != ''">instruction_manual = #{instructionManual} ,</if>
|
|
|
+ <if test="reviewAudit != null and reviewAudit != ''">review_audit = #{reviewAudit} ,</if>
|
|
|
+ <if test="qualificationCertificate != null and qualificationCertificate != ''">qualification_certificate = #{qualificationCertificate} ,</if>
|
|
|
+ <if test="qualificationCertificateStart != null ">qualification_certificate_start = #{qualificationCertificateStart} ,</if>
|
|
|
+ <if test="qualificationCertificateEnd != null ">qualification_certificate_end = #{qualificationCertificateEnd} ,</if>
|
|
|
+ <if test="business != null and business != ''">business = #{business} ,</if>
|
|
|
+ <if test="businessStart != null">business_start = #{businessStart} ,</if>
|
|
|
+ <if test="businessEnd != null">business_end = #{businessEnd} ,</if>
|
|
|
+ <if test="license != null and license != ''">license = #{license} ,</if>
|
|
|
+ <if test="licenseStart != null">license_start = #{licenseStart} ,</if>
|
|
|
+ <if test="licenseEnd != null">license_end = #{licenseEnd} ,</if>
|
|
|
+ <if test="certificate != null and certificate != ''">certificate = #{certificate} ,</if>
|
|
|
+ <if test="certificateStart != null">certificate_start = #{certificateStart} ,</if>
|
|
|
+ <if test="certificateEnd != null">certificate_end = #{certificateEnd} ,</if>
|
|
|
+ <if test="voucher != null and voucher != ''">voucher = #{voucher} ,</if>
|
|
|
+ <if test="voucherStart != null">voucher_start = #{voucherStart} ,</if>
|
|
|
+ <if test="voucherEnd != null">voucher_end = #{voucherEnd} ,</if>
|
|
|
+ <if test="gmpAuth != null and gmpAuth != ''">gmp_auth = #{gmpAuth} ,</if>
|
|
|
+ <if test="gmpAuthStart != null">gmp_auth_start = #{gmpAuthStart} ,</if>
|
|
|
+ <if test="gmpAuthEnd != null">gmp_auth_end = #{gmpAuthEnd} ,</if>
|
|
|
+ <if test="businessLink != null">business_link = #{businessLink} ,</if>
|
|
|
+ <if test="medicalDeviceCode != null">medical_device_code =#{medicalDeviceCode},</if>
|
|
|
+ <if test="isBusinessPermanent != null">is_business_permanent = #{isBusinessPermanent} ,</if>
|
|
|
+ <if test="isLicensePermanent != null">is_license_permanent = #{isLicensePermanent} ,</if>
|
|
|
+ <if test="isCertificatePermanent != null">is_certificate_permanent = #{isCertificatePermanent} ,</if>
|
|
|
+ <if test="isGmpAuthPermanent != null">is_gmp_auth_permanent = #{isGmpAuthPermanent} ,</if>
|
|
|
+ </trim>
|
|
|
+ where product_id = #{productId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+</mapper>
|