|
@@ -50,6 +50,30 @@
|
|
|
<if test="productCode != null and productCode != ''">
|
|
|
productCode,
|
|
|
</if>
|
|
|
+ <if test="searchKey != null and searchKey != ''">
|
|
|
+ searchKey,
|
|
|
+ </if>
|
|
|
+ <if test="allAreaFlag != null and allAreaFlag != ''">
|
|
|
+ allAreaFlag,
|
|
|
+ </if>
|
|
|
+ <if test="step != null and step != ''">
|
|
|
+ step,
|
|
|
+ </if>
|
|
|
+ <if test="costPrice != null and costPrice != ''">
|
|
|
+ costPrice,
|
|
|
+ </if>
|
|
|
+ <if test="provinceIds != null and provinceIds != ''">
|
|
|
+ provinceIds,
|
|
|
+ </if>
|
|
|
+ <if test="machineType != null and machineType != ''">
|
|
|
+ machineType,
|
|
|
+ </if>
|
|
|
+ <if test="qualificationImg != null and qualificationImg != ''">
|
|
|
+ qualificationImg,
|
|
|
+ </if>
|
|
|
+ <if test="invoiceType != null and invoiceType != ''">
|
|
|
+ invoiceType,
|
|
|
+ </if>
|
|
|
updateTime, validFlag
|
|
|
) values (
|
|
|
#{shopId}, #{name}, #{aliasName}, #{commodityType}, #{bigTypeId}, #{smallTypeId}, #{tinyTypeId}, #{mainImage},
|
|
@@ -98,6 +122,30 @@
|
|
|
</if>
|
|
|
<if test="productCode != null and productCode != ''">
|
|
|
#{productCode},
|
|
|
+ </if>
|
|
|
+ <if test="searchKey != null and searchKey != ''">
|
|
|
+ #{searchKey},
|
|
|
+ </if>
|
|
|
+ <if test="allAreaFlag != null and allAreaFlag != ''">
|
|
|
+ #{allAreaFlag},
|
|
|
+ </if>
|
|
|
+ <if test="step != null and step != ''">
|
|
|
+ #{step},
|
|
|
+ </if>
|
|
|
+ <if test="costPrice != null and costPrice != ''">
|
|
|
+ #{costPrice},
|
|
|
+ </if>
|
|
|
+ <if test="provinceIds != null and provinceIds != ''">
|
|
|
+ #{provinceIds},
|
|
|
+ </if>
|
|
|
+ <if test="machineType != null and machineType != ''">
|
|
|
+ #{machineType},
|
|
|
+ </if>
|
|
|
+ <if test="qualificationImg != null and qualificationImg != ''">
|
|
|
+ #{qualificationImg},
|
|
|
+ </if>
|
|
|
+ <if test="invoiceType != null and invoiceType != ''">
|
|
|
+ #{invoiceType},
|
|
|
</if>
|
|
|
#{updateTime}, #{validFlag}
|
|
|
)
|
|
@@ -153,6 +201,30 @@
|
|
|
<if test="productCode != null and productCode != ''">
|
|
|
productCode = #{productCode},
|
|
|
</if>
|
|
|
+ <if test="searchKey != null and searchKey != ''">
|
|
|
+ searchKey = #{searchKey},
|
|
|
+ </if>
|
|
|
+ <if test="allAreaFlag != null and allAreaFlag != ''">
|
|
|
+ allAreaFlag = #{allAreaFlag},
|
|
|
+ </if>
|
|
|
+ <if test="step != null and step != ''">
|
|
|
+ step = #{step},
|
|
|
+ </if>
|
|
|
+ <if test="costPrice != null and costPrice != ''">
|
|
|
+ costPrice = #{costPrice},
|
|
|
+ </if>
|
|
|
+ <if test="provinceIds != null and provinceIds != ''">
|
|
|
+ provinceIds = #{provinceIds},
|
|
|
+ </if>
|
|
|
+ <if test="machineType != null and machineType != ''">
|
|
|
+ machineType = #{machineType},
|
|
|
+ </if>
|
|
|
+ <if test="qualificationImg != null and qualificationImg != ''">
|
|
|
+ qualificationImg = #{qualificationImg},
|
|
|
+ </if>
|
|
|
+ <if test="invoiceType != null and invoiceType != ''">
|
|
|
+ invoiceType = #{invoiceType},
|
|
|
+ </if>
|
|
|
updateTime = #{updateTime}, validFlag = #{validFlag}
|
|
|
where productID = #{productId}
|
|
|
</update>
|
|
@@ -299,15 +371,12 @@
|
|
|
order by mainFlag DESC
|
|
|
</select>
|
|
|
<select id="getProductForm" resultType="com.caimei365.commodity.model.vo.ProductFormVo">
|
|
|
- select productID as productId, shopID as shopId, name as name, aliasName as aliasName, commodityType as commodityType,
|
|
|
- bigTypeId as bigTypeId, smallTypeId as smallTypeId, tinyTypeId as tinyTypeId, mainImage as mainImage,
|
|
|
- brandId as brandId, productType as productType, tags as tags, unit as unit, normalPrice as normalPrice,
|
|
|
- price1 as price, includedTax as includedTax, minBuyNumber as minBuyNumber, stock as stock,
|
|
|
- productCategory as productCategory, serviceNumber as serviceNumber, supplierTaxPoint as supplierTaxPoint,
|
|
|
- addTime as addTime, hasSkuFlag as hasSkuFlag, sellNumber as sellNumber, sortIndex as sortIndex,
|
|
|
- featuredFlag as featuredFlag, costCheckFlag as costCheckFlag, recommendType as recommendType,
|
|
|
- price1TextFlag as priceFlag, actFlag as actFlag, ladderPriceFlag as ladderPriceFlag, visibility as visibility,
|
|
|
- productCode as productCode, updateTime as updateTime, validFlag as validFlag
|
|
|
+ select productID as productId, shopID as shopId, name, aliasName, commodityType, mainImage, stock, invoiceType,
|
|
|
+ bigTypeID as bigTypeId, smallTypeID as smallTypeId, tinyTypeID as tinyTypeId, searchKey, visibility,
|
|
|
+ brandID as brandId, productType, tags, unit, normalPrice, price1 as price, includedTax, minBuyNumber,
|
|
|
+ productCategory, serviceNumber, supplierTaxPoint, price1TextFlag as priceFlag, actFlag, ladderPriceFlag,
|
|
|
+ addTime, hasSkuFlag, sellNumber, sortIndex, featuredFlag, costCheckFlag, recommendType, machineType,
|
|
|
+ productCode, updateTime, validFlag, searchKey, allAreaFlag, step, costPrice, provinceIds, qualificationImg
|
|
|
from product
|
|
|
where productID = #{productId}
|
|
|
</select>
|
|
@@ -330,4 +399,22 @@
|
|
|
from productdetailinfo
|
|
|
where productId = #{productId}
|
|
|
</select>
|
|
|
+ <select id="getProductShopById" resultType="com.caimei365.commodity.model.vo.ShopVo">
|
|
|
+ select userID as userId, shopID as shopId, name, sname as shortName, linkMan, contractMobile,
|
|
|
+ contractEmail1 as contractEmail, contractEmail1 as email, provinceID as proviceId, cityID as cityId, townID as townId,
|
|
|
+ address, socialCreditCode, businessLicenseImage as businessLicense, firstShopType, secondShopType,
|
|
|
+ mainpro as mainProduct, productDesc as mainProductDesc,legalPerson,registeredCapital,fax as faxNumber,
|
|
|
+ nature as companyNature, turnover, medicalPracticeLicenseImg1 as medicalPracticeLicense, info as shopDesc,
|
|
|
+ businessScope, logo, addTime, status, contractPhone, validFlag, website, wxOfficialAccount, wxApplets
|
|
|
+ from shop where shopID = #{shopId}
|
|
|
+ </select>
|
|
|
+ <select id="getProductNumById" resultType="java.lang.Integer">
|
|
|
+ select COUNT(*) as normalNum from product p
|
|
|
+ where p.shopID = #{shopId} and p.validFlag = 2
|
|
|
+ group by p.shopID
|
|
|
+ </select>
|
|
|
+ <select id="getUserIdentityById" resultType="java.lang.Integer">
|
|
|
+ select userIdentity from user
|
|
|
+ where userID = #{userId}
|
|
|
+ </select>
|
|
|
</mapper>
|