zhijiezhao 3 years ago
parent
commit
19c5eb8d49

+ 2 - 2
src/main/java/com/caimei365/commodity/model/dto/SecondDto.java

@@ -52,7 +52,7 @@ public class SecondDto implements Serializable {
      * 二手仪器分类的类型,1轻光电、2重光电、3耗材配件(仅适用于二手仪器分类多个用英文逗号分分隔)
      */
     @ApiModelProperty("二手仪器分类的类型,1轻光电、2重光电、3耗材配件")
-    private String instrumentType;
+    private Integer instrumentType;
     /**
      * 品牌Id
      */
@@ -127,7 +127,7 @@ public class SecondDto implements Serializable {
      * 设备类型:1医美、2非医美
      */
     @ApiModelProperty("设备类型:1医美、2非医美")
-    private String secondProductType;
+    private Integer secondProductType;
     /**
      * 商品详情信息(补充信息)
      */

+ 2 - 2
src/main/java/com/caimei365/commodity/model/po/ProductSecondPo.java

@@ -26,7 +26,7 @@ public class ProductSecondPo implements Serializable {
     /**
      * 二手仪器分类的类型,1轻光电、2重光电、3耗材配件(仅适用于二手仪器分类多个用英文逗号分分隔)
      */
-    private String instrumentType;
+    private Integer instrumentType;
     /**
      * 品牌Id
      */
@@ -86,7 +86,7 @@ public class ProductSecondPo implements Serializable {
     /**
      * 设备类型:1医美、2非医美
      */
-    private String secondProductType;
+    private Integer secondProductType;
     /**
      * 商品详情信息(补充信息)
      */

+ 11 - 3
src/main/java/com/caimei365/commodity/model/vo/SecondDetailVo.java

@@ -15,6 +15,14 @@ import java.util.List;
 @Data
 public class SecondDetailVo implements Serializable {
     private static final long serialVersionUID = 1L;
+    /**
+     * 公司名称
+     */
+    private String companyName;
+    /**
+     * 发布者身份
+     */
+    private Integer publishIdentity;
     /**
      * 商品productID
      */
@@ -76,15 +84,15 @@ public class SecondDetailVo implements Serializable {
     /**
      * 商品类型:0其它类型(默认),1妆字号,2械字号
      */
-    private String productType;
+    private Integer productType;
     /**
      * 二手商品分类,1二手仪1器,2临期产品,3其他
      */
-    private String secondHandType;
+    private Integer secondHandType;
     /**
      * 二手仪器分类的类型,1轻光电、2重光电、3耗材配件(仅适用于二手仪器分类多个用英文逗号分分隔)
      */
-    private String instrumentType;
+    private Integer instrumentType;
     /**
      * 商品类型(二手仪器-重光电)
      */

+ 7 - 7
src/main/java/com/caimei365/commodity/service/impl/SecondHandServiceImpl.java

@@ -162,17 +162,17 @@ public class SecondHandServiceImpl implements SecondHandService {
         second.setImageList(images);
         // 初始商品分类
         String typeStr = "";
-        String secondHandType = second.getSecondHandType();
-        if ("1".equals(secondHandType)) {
+        Integer secondHandType = second.getSecondHandType();
+        if (1 == secondHandType){
             typeStr += "二手仪器";
-        } else if ("2".equals(secondHandType)) {
+        } else if (2 == secondHandType) {
             typeStr += "临期产品";
         } else {
             typeStr += "其他";
         }
         // 二手仪器分类
-        String instrumentType = second.getInstrumentType();
-        if ("1".equals(instrumentType)) {
+        Integer instrumentType = second.getInstrumentType();
+        if (1 == instrumentType) {
             typeStr += "-美容仪器";
         }
         second.setTypeStr(typeStr);
@@ -257,7 +257,7 @@ public class SecondHandServiceImpl implements SecondHandService {
         }
         // 验证传入参数
         String secondHandType = secondDto.getSecondHandType();
-        String instrumentType = secondDto.getInstrumentType();
+        Integer instrumentType = secondDto.getInstrumentType();
         Integer brandId = secondDto.getBrandId();
         String name = secondDto.getName();
         Double price = secondDto.getPrice();
@@ -287,7 +287,7 @@ public class SecondHandServiceImpl implements SecondHandService {
         if (StringUtils.isEmpty(secondHandType)) {
             return ResponseJson.error("参数异常:请选择分类");
         } else if (StringUtils.equals("1", secondHandType)) {
-            if (StringUtils.isEmpty(instrumentType)) {
+            if (null==instrumentType) {
                 return ResponseJson.error("参数异常:请完善仪器分类");
             }
         } else if (StringUtils.equals("2", secondHandType)) {

+ 6 - 3
src/main/resources/mapper/SecondHandMapper.xml

@@ -7,13 +7,14 @@
 			originalPrice, contactName, contactMobile, dockingPeopleName, dockingPeopleMobile, secondProductType,
 			townId, brandName, provinceCityDistrict, address, productQuality, productDetails, viewingNum, payStatus,
 			payAmount, payFormData, payType, payDate, submitDate, reviewedDate, onLineDate, source, publisher, authenticationImage,
-			fileName, ossName, commitmentImage
+			fileName, ossName, commitmentImage,publishIdentity,licenseImage,authenticationBackImage
 		) values (
 			#{productId}, #{sold}, #{secondHandType}, #{instrumentType}, #{fixedYears}, #{maturityYears}, #{companyName},
 			#{detailTalkFlag}, #{originalPrice}, #{contactName}, #{contactMobile}, #{dockingPeopleName}, #{dockingPeopleMobile},
 			#{secondProductType}, #{townId}, #{brandName}, #{provinceCityDistrict}, #{address}, #{productQuality}, #{productDetails},
 			#{viewingNum}, #{payStatus}, #{payAmount}, #{payFormData}, #{payType}, #{payDate}, #{submitDate}, #{reviewedDate},
-			#{onLineDate}, #{source}, #{publisher}, #{authenticationImage}, #{fileName}, #{ossName}, #{commitmentImage}
+			#{onLineDate}, #{source}, #{publisher}, #{authenticationImage}, #{fileName}, #{ossName}, #{commitmentImage},#{publishIdentity},
+			#{licenseImage},#{authenticationBackImage}
 		)
     </insert>
     <insert id="insertProductImage" parameterType="com.caimei365.commodity.model.po.ProductImagePo">
@@ -111,7 +112,9 @@
             cshd.contactMobile,
             cshd.contactName,
             cshd.fixedYears,
-            cshd.maturityYears
+            cshd.maturityYears,
+            cshd.publishIdentity,
+            cshd.companyName
         from product p
         left join cm_second_hand_detail cshd on p.productID = cshd.productID
         left join cm_brand cb on cb.id = p.brandID