|
|
@@ -0,0 +1,141 @@
|
|
|
+<?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.admin.mapper.AdminProductMapper">
|
|
|
+
|
|
|
+ <resultMap type="com.fs.admin.vo.AdminProductVO" id="AdminProductVOResult">
|
|
|
+ <id 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="storeId" column="store_id" />
|
|
|
+ <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="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="returnAddress" column="return_address" />
|
|
|
+ <result property="brand" column="brand" />
|
|
|
+ <result property="foodProductionLicenseCode" column="food_production_license_code"/>
|
|
|
+ <result property="originPlace" column="origin_place" />
|
|
|
+ <result property="netContent" column="net_content" />
|
|
|
+ <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="selectAdminProductVo">
|
|
|
+ SELECT p.product_id, p.video, p.image, 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.agent_price, p.postage, p.unit_name, p.sort,
|
|
|
+ p.sales, p.stock, p.is_show, 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.store_id, 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.return_address, p.brand,
|
|
|
+ p.food_production_license_code, p.origin_place,
|
|
|
+ p.net_content, p.shelf_life, p.domestic_imported,
|
|
|
+ p.app_ids, p.purchase_limit
|
|
|
+ FROM fs_store_product_scrm p
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectProductList" resultMap="AdminProductVOResult">
|
|
|
+ <include refid="selectAdminProductVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="productName != null and productName != ''">
|
|
|
+ AND p.product_name LIKE CONCAT('%', #{productName}, '%')
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ORDER BY p.create_time DESC
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectProductListByStatus" resultMap="AdminProductVOResult">
|
|
|
+ <include refid="selectAdminProductVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="productName != null and productName != ''">
|
|
|
+ AND p.product_name LIKE CONCAT('%', #{productName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="status != null and status != ''">
|
|
|
+ AND p.is_audit = #{status}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ORDER BY p.create_time DESC
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectProductById" resultMap="AdminProductVOResult">
|
|
|
+ <include refid="selectAdminProductVo"/>
|
|
|
+ WHERE p.product_id = #{productId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <update id="updateAuditStatus">
|
|
|
+ UPDATE fs_store_product_scrm
|
|
|
+ SET is_audit = #{status}, update_time = NOW()
|
|
|
+ WHERE product_id = #{productId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+</mapper>
|