Prechádzať zdrojové kódy

小程序改版-机构接口修改1

Aslee 4 rokov pred
rodič
commit
6b35c39e04

+ 1 - 1
base-module/src/main/java/com/caimei/module/base/entity/po/Product.java

@@ -230,7 +230,7 @@ public class Product implements Serializable {
     private String beforeValidFlag;
 
     /**
-     * 商品状态,见表c_productstatus或枚举ProductStatus,0逻辑删除 1待审核 2已上架 3已下架 8审核未通过 9已冻结
+     * 商品状态,见表c_productstatus或枚举ProductStatus,0逻辑删除 1待审核 2已上架 3已下架 8审核未通过 9已隐身 10已冻结
      */
     private String validFlag;
 

+ 5 - 0
base-module/src/main/java/com/caimei/module/base/entity/vo/ShopVo.java

@@ -82,4 +82,9 @@ public class ShopVo extends Shop {
      * 减免价格
      */
     private BigDecimal reducedPrice;
+
+    /**
+     * 店铺上架商品数量
+     */
+    private Integer normalNum;
 }

+ 20 - 14
product/src/main/resources/com-caimei-module-product/ProductModuleMapper.xml

@@ -44,18 +44,18 @@
         productImageID, productID, shopID, addTime, image, mainFlag, sortIndex
     </sql>
     <sql id="Shop_Column_List">
-        shopID, userID, `name`, sname, nameEn, site, ledgerNo, logo, rebateAmount, `level`,
-        score, productCount, legalPerson, businessLicense, businessLicenseImage, taxCertificate,
-        taxCertificateImage, provinceID, cityID, townID, address, registeredCapital, nature,
-        turnover, linkMan, contractPhone, contractMobile, fax, zipCode, linkMan1, duty1,
-        contractPhone1, contractMobile1, contractQQ1, wechat1, contractEmail1, linkMan2,
-        duty2, contractPhone2, contractMobile2, contractQQ2, wechat2, contractEmail2, `scope`,
-        info, productDesc, lng, lat, addTime, auditStatus, auditTime, auditNote, favoriteTimes,
-        validFlag, payFlag1, auditFlag1, payFlag2, auditFlag2, payFlag3, auditFlag3, note,
-        `status`, sortIndex, rate1, rate2, masterFlag, erpFlag, shopSecret, masterLogo, cooperateFlag,
-        bail, businessScope, socialCreditCode, mainpro, firstShopType, secondShopType, medicalPracticeLicenseImg1,
-        medicalPracticeLicenseImg2, medicalPracticeLicenseImg3, bankAccount, bankAccountName,
-        bankName, ableRebateAmount,authorizationCertificateImage
+        s.shopID, s.userID, s.`name`, s.sname, s.nameEn, s.site, s.ledgerNo, s.logo, s.rebateAmount, s.`level`,
+        s.score, s.productCount, s.legalPerson, s.businessLicense, s.businessLicenseImage, s.taxCertificate,
+        s.taxCertificateImage, s.provinceID, s.cityID, s.townID, s.address, s.registeredCapital, s.nature,
+        s.turnover, s.linkMan, s.contractPhone, s.contractMobile, s.fax, s.zipCode, s.linkMan1, s.duty1,
+        s.contractPhone1, s.contractMobile1, s.contractQQ1, s.wechat1, s.contractEmail1, s.linkMan2,
+        s.duty2, s.contractPhone2, s.contractMobile2, s.contractQQ2, s.wechat2, s.contractEmail2, s.`scope`,
+        s.info, s.productDesc, s.lng, s.lat, s.addTime, s.auditStatus, s.auditTime, s.auditNote, s.favoriteTimes,
+        s.validFlag, s.payFlag1, s.auditFlag1, s.payFlag2, s.auditFlag2, s.payFlag3, s.auditFlag3, s.note,
+        s.`status`, s.sortIndex, s.rate1, s.rate2, s.masterFlag, s.erpFlag, s.shopSecret, s.masterLogo, s.cooperateFlag,
+        s.bail, s.businessScope, s.socialCreditCode, s.mainpro, s.firstShopType, s.secondShopType, s.medicalPracticeLicenseImg1,
+        s.medicalPracticeLicenseImg2, s.medicalPracticeLicenseImg3, s.bankAccount, s.bankAccountName,
+        s.bankName, s.ableRebateAmount,s.authorizationCertificateImage
     </sql>
     <select id="getBigType" resultType="com.caimei.module.base.entity.vo.BigtypeVo">
         select
@@ -168,8 +168,11 @@
     <select id="findProductShopById" resultType="com.caimei.module.base.entity.vo.ShopVo">
         SELECT
         <include refid="Shop_Column_List" />
-        FROM shop
-        where shopID = #{shopID,jdbcType=INTEGER}
+        ,count(*) as normalNum
+        FROM shop s
+        left join product p on s.shopID = p.shopID and p.validFlag = 2
+        where s.shopID = #{shopID,jdbcType=INTEGER}
+        group by s.shopID
     </select>
     <!--新品上线(001) 优惠商品(010) 常用商品(100),三者同时存在111-->
     <select id="getProductsByPreferredFlag" resultType="com.caimei.module.base.entity.vo.ProductVo">
@@ -414,6 +417,9 @@
         WHERE
             p.productCategory = 2
         AND p.validFlag = 2
+        <if test="name != null and name != ''">
+            and p.name like CONCAT('%',#{name},'%')
+        </if>
         <if test="secondHandType != null and secondHandType != ''">
             and cshd.secondHandType = #{secondHandType}
         </if>