Kaynağa Gözat

bugfix-自测

Aslee 2 yıl önce
ebeveyn
işleme
f91cdf3e8c
28 değiştirilmiş dosya ile 94 ekleme ve 200 silme
  1. 1 0
      src/main/java/com/caimei/annotation/CurrentUserResolver.java
  2. 1 1
      src/main/java/com/caimei/controller/admin/auth/AuthProductApi.java
  3. 3 9
      src/main/java/com/caimei/controller/admin/auth/ShopApi.java
  4. 2 0
      src/main/java/com/caimei/controller/wechat/RegisterApi.java
  5. 4 13
      src/main/java/com/caimei/controller/wechat/WxAuthApi.java
  6. 1 1
      src/main/java/com/caimei/mapper/cmMapper/ShopMapper.java
  7. 0 2
      src/main/java/com/caimei/model/po/ProductParamPo.java
  8. 3 0
      src/main/java/com/caimei/model/vo/ArticleListVo.java
  9. 3 19
      src/main/java/com/caimei/model/vo/AuthProductVo.java
  10. 5 0
      src/main/java/com/caimei/model/vo/AuthVo.java
  11. 3 0
      src/main/java/com/caimei/model/vo/DoctorListVo.java
  12. 3 0
      src/main/java/com/caimei/model/vo/FileListVo.java
  13. 3 0
      src/main/java/com/caimei/model/vo/ImageListVo.java
  14. 5 0
      src/main/java/com/caimei/model/vo/ProductListVo.java
  15. 3 0
      src/main/java/com/caimei/model/vo/VideoListVo.java
  16. 1 3
      src/main/java/com/caimei/service/auth/ShopService.java
  17. 1 2
      src/main/java/com/caimei/service/auth/impl/AuthClubServiceImpl.java
  18. 28 121
      src/main/java/com/caimei/service/auth/impl/AuthProductServiceImpl.java
  19. 1 1
      src/main/java/com/caimei/service/auth/impl/AuthServiceImpl.java
  20. 2 10
      src/main/java/com/caimei/service/auth/impl/ShopServiceImpl.java
  21. 1 1
      src/main/resources/mapper/ArticleMapper.xml
  22. 1 1
      src/main/resources/mapper/AuthMapper.xml
  23. 12 11
      src/main/resources/mapper/AuthProductMapper.xml
  24. 1 1
      src/main/resources/mapper/DoctorMapper.xml
  25. 1 1
      src/main/resources/mapper/FileMapper.xml
  26. 1 1
      src/main/resources/mapper/ImageMapper.xml
  27. 3 1
      src/main/resources/mapper/ShopMapper.xml
  28. 1 1
      src/main/resources/mapper/VideoMapper.xml

+ 1 - 0
src/main/java/com/caimei/annotation/CurrentUserResolver.java

@@ -58,6 +58,7 @@ public class CurrentUserResolver implements HandlerMethodArgumentResolver {
                 return systemMapper.getUser(authUserId);
             }
         }
+//        return systemMapper.getUser(17);
         return null;
     }
 }

+ 1 - 1
src/main/java/com/caimei/controller/admin/auth/AuthProductApi.java

@@ -185,7 +185,7 @@ public class AuthProductApi {
     }
 
     @ApiOperation("添加/编辑设备分类")
-    @ApiImplicitParam(name = "params", value = "productTypeId:设备分类id;name:设备分类名称;image:图片;createBy:创建人用户id;", required = true)
+    @ApiImplicitParam(name = "params", value = "productTypeId:设备分类id;infoId:品牌信息id;name:设备分类名称;image:图片;createBy:创建人用户id;paramList:参数列表;", required = true)
     @PostMapping("/type/save")
     public ResponseJson saveProductType(@CurrentUser SysUser sysUser, @RequestBody String params) throws IOException {
         if (null == sysUser) {

+ 3 - 9
src/main/java/com/caimei/controller/admin/auth/ShopApi.java

@@ -1,6 +1,5 @@
 package com.caimei.controller.admin.auth;
 
-import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.caimei.annotation.CurrentUser;
 import com.caimei.components.RedisService;
@@ -22,7 +21,6 @@ import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
@@ -255,17 +253,13 @@ public class ShopApi {
     /**
      * 品牌列表
      *
-     * @param type 1品牌方可用品牌列表,2代理商可用品牌列表,3供应商可用品牌列表
      * @return AuthVo
      */
     @ApiOperation("品牌信息列表")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "type", value = "1品牌方品牌列表,2代理商品牌列表,3供应商可用品牌列表", required = true),
-            @ApiImplicitParam(name = "authUserId", value = "供应商用户id", required = false)
-    })
+    @ApiImplicitParam(name = "authUserId", value = "供应商用户id", required = false)
     @GetMapping("/info/list")
-    public ResponseJson<List<ShopInfoVo>> getShopInfoList(Integer type, Integer authUserId) {
-        return shopService.getShopInfoList(type, authUserId);
+    public ResponseJson<List<ShopInfoVo>> getShopInfoList(Integer authUserId) {
+        return shopService.getShopInfoList(authUserId);
     }
 
     /**

+ 2 - 0
src/main/java/com/caimei/controller/wechat/RegisterApi.java

@@ -1,6 +1,7 @@
 package com.caimei.controller.wechat;
 
 import com.alibaba.fastjson.JSONObject;
+import com.caimei.annotation.Idempotent;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.vo.ProductFormVo;
 import com.caimei.model.vo.WxClubUserVo;
@@ -64,6 +65,7 @@ public class RegisterApi {
             "clubUserInfo:机构用户数据;" +
             "authInfo:机构数据;" +
             "productInfo:设备数据", required = true)
+    @Idempotent(prefix = "idempotent_club_user", keys = {"#params"}, expire = 5)
     @PostMapping("/all")
     public ResponseJson allRegister(@RequestBody String params) {
         JSONObject parseObject = JSONObject.parseObject(params);

+ 4 - 13
src/main/java/com/caimei/controller/wechat/WxAuthApi.java

@@ -112,7 +112,7 @@ public class WxAuthApi {
 
     @ApiOperation("认证商品列表")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "listType", required = false, value = "列表类型:1供应商设备分类已上线设备列表 2设备认证列表"),
+            @ApiImplicitParam(name = "listType", required = false, value = "列表类型:1已上线设备列表 2设备认证记录列表"),
             @ApiImplicitParam(name = "authId", required = false, value = "机构id"),
             @ApiImplicitParam(name = "authParty", required = false, value = "机构名称"),
             @ApiImplicitParam(name = "productTypeId", required = false, value = "设备分类id"),
@@ -141,17 +141,13 @@ public class WxAuthApi {
     /**
      * 品牌列表
      *
-     * @param type 1品牌方可用品牌列表,2代理商可用品牌列表,3供应商可用品牌列表
      * @return AuthVo
      */
     @ApiOperation("品牌列表")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "type", value = "1品牌方品牌列表,2代理商品牌列表,3供应商可用品牌列表", required = true),
-            @ApiImplicitParam(name = "authUserId", value = "供应商用户id", required = false)
-    })
+    @ApiImplicitParam(name = "authUserId", value = "供应商用户id", required = false)
     @GetMapping("/shop/info/list")
-    public ResponseJson<List<ShopInfoVo>> getShopInfoList(Integer type, Integer authUserId) {
-        return shopService.getShopInfoList(type, authUserId);
+    public ResponseJson<List<ShopInfoVo>> getShopInfoList(Integer authUserId) {
+        return shopService.getShopInfoList(authUserId);
     }
 
     /**
@@ -217,11 +213,6 @@ public class WxAuthApi {
         List<String> bannerList = (List<String>) paramsMap.get("bannerList");
         String authParty = paramsMap.getString("authParty");
         Integer createBy = paramsMap.getInteger("createBy");
-        Integer source = paramsMap.getInteger("source");
-        if (null == source) {
-            // 默认供应商保存
-            source = 1;
-        }
         /*
             组装授权数据
          */

+ 1 - 1
src/main/java/com/caimei/mapper/cmMapper/ShopMapper.java

@@ -33,7 +33,7 @@ public interface ShopMapper {
 
     ShopFormVo getShopByUserId(Integer authUserId);
 
-    List<ShopInfoVo> getShopInfoList(@Param("type") Integer type, @Param("authUserId") Integer authUserId);
+    List<ShopInfoVo> getShopInfoList(@Param("authUserId") Integer authUserId);
 
     List<CountryVo> getCountryList();
 

+ 0 - 2
src/main/java/com/caimei/model/po/ProductParamPo.java

@@ -13,11 +13,9 @@ public class ProductParamPo {
     /**
      * 商品参数名称
      */
-    @ApiModelProperty("商品参数名称")
     private String paramName;
     /**
      * 商品参数内容
      */
-    @ApiModelProperty("商品参数内容")
     private String paramContent;
 }

+ 3 - 0
src/main/java/com/caimei/model/vo/ArticleListVo.java

@@ -42,4 +42,7 @@ public class ArticleListVo {
 
     @ApiModelProperty("排序值")
     private Integer sort;
+
+    @ApiModelProperty("是否查看过:1是,0否")
+    private Integer checkFlag;
 }

+ 3 - 19
src/main/java/com/caimei/model/vo/AuthProductVo.java

@@ -31,13 +31,9 @@ public class AuthProductVo {
      */
     private String certificateImage;
     /**
-     * 品牌授权Id
+     * 品牌信息logo
      */
-    private Integer authId;
-    /**
-     * 品牌授权logo
-     */
-    private String authLogo;
+    private String brandLogo;
     /**
      * 品牌信息Id
      */
@@ -49,11 +45,7 @@ public class AuthProductVo {
     /**
      * 产地
      */
-    private String productionPlace;
-    /**
-     * 防伪链接
-     */
-    private String securityLink;
+    private String producePlace;
     /**
      * 制造商
      */
@@ -70,14 +62,6 @@ public class AuthProductVo {
      * 供应商用户id
      */
     private Integer authUserId;
-    /**
-     * 被授权方
-     */
-    private String authParty;
-    /**
-     * 机构logo
-     */
-    private String clubLogo;
     /**
      * 商品参数
      */

+ 5 - 0
src/main/java/com/caimei/model/vo/AuthVo.java

@@ -112,6 +112,11 @@ public class AuthVo {
      */
     private Integer checkFlag;
 
+    /**
+     * 明星机构标识:0不是,1是
+     */
+    private Integer starFlag;
+
     /**
      *  设备列表最大参数数量
      */

+ 3 - 0
src/main/java/com/caimei/model/vo/DoctorListVo.java

@@ -41,4 +41,7 @@ public class DoctorListVo {
 
     @ApiModelProperty("审核不通过原因")
     private String invalidReason;
+
+    @ApiModelProperty("是否查看过:1是,0否")
+    private Integer checkFlag;
 }

+ 3 - 0
src/main/java/com/caimei/model/vo/FileListVo.java

@@ -44,4 +44,7 @@ public class FileListVo {
 
     @ApiModelProperty("审核时间")
     private Date auditTime;
+
+    @ApiModelProperty("是否查看过:1是,0否")
+    private Integer checkFlag;
 }

+ 3 - 0
src/main/java/com/caimei/model/vo/ImageListVo.java

@@ -35,4 +35,7 @@ public class ImageListVo {
 
     @ApiModelProperty("审核时间")
     private Date auditTime;
+
+    @ApiModelProperty("是否查看过:1是,0否")
+    private Integer checkFlag;
 }

+ 5 - 0
src/main/java/com/caimei/model/vo/ProductListVo.java

@@ -80,4 +80,9 @@ public class ProductListVo {
      * 供应商审核时间
      */
     private Date shopAuditTime;
+
+    /**
+     * 是否查看过:1是,0否
+     */
+    private Integer checkFlag;
 }

+ 3 - 0
src/main/java/com/caimei/model/vo/VideoListVo.java

@@ -47,4 +47,7 @@ public class VideoListVo {
 
     @ApiModelProperty("审核时间")
     private Date auditTime;
+
+    @ApiModelProperty("是否查看过:1是,0否")
+    private Integer checkFlag;
 }

+ 1 - 3
src/main/java/com/caimei/service/auth/ShopService.java

@@ -5,7 +5,6 @@ import com.caimei.model.dto.ShopInfoDto;
 import com.caimei.model.po.UserPo;
 import com.caimei.model.vo.*;
 import com.github.pagehelper.PageInfo;
-import org.springframework.web.multipart.MultipartFile;
 
 import java.util.List;
 
@@ -70,11 +69,10 @@ public interface ShopService {
 
     /**
      * 品牌信息列表
-     * @param type 1品牌方品牌列表,2代理商品牌列表
      * @param authUserId    供应商用户id
      * @return AuthVo
      */
-    ResponseJson<List<ShopInfoVo>> getShopInfoList(Integer type, Integer authUserId);
+    ResponseJson<List<ShopInfoVo>> getShopInfoList(Integer authUserId);
 
     /**
      * 产地国家列表

+ 1 - 2
src/main/java/com/caimei/service/auth/impl/AuthClubServiceImpl.java

@@ -208,7 +208,6 @@ public class AuthClubServiceImpl implements AuthClubService {
             return ResponseJson.error("发送失败,请确认手机号无误");
         } else {
             log.info("机构用户重置密码发送成功,手机号:" + mobile);
-
         }
         return ResponseJson.success("密码重置成功");
     }
@@ -216,6 +215,6 @@ public class AuthClubServiceImpl implements AuthClubService {
     @Override
     public ResponseJson<List<WxClubListVo>> getWxStarClubList(Integer authUserId) {
         List<WxClubListVo> starClubList = clubMapper.getWxStarClubList(authUserId);
-        return null;
+        return ResponseJson.success(starClubList);
     }
 }

+ 28 - 121
src/main/java/com/caimei/service/auth/impl/AuthProductServiceImpl.java

@@ -22,6 +22,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.core.io.ClassPathResource;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.transaction.interceptor.TransactionAspectSupport;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
@@ -128,18 +130,19 @@ public class AuthProductServiceImpl implements AuthProductService {
     /**
      * 保存逻辑
      * relationId
-     *             null
-     *                 新设备:插入设备、插入关联信息
-     *                 关联设备:更新设备、插入关联信息
-     *             notNull
-     *                 数据库新设备
-     *                     新设备:更新设备、原设备无需更新关联关系
-     *                     关联设备:更新设备、更新关联信息(若原设备无机构关联,应删除该设备)
-     *                 数据库关联设备
-     *                     新设备:插入设备、更新关联信息
-     *                     关联设备:更新设备、更新关联信息
+     * null
+     * 新设备:插入设备、插入关联信息
+     * 关联设备:更新设备、插入关联信息
+     * notNull
+     * 数据库新设备
+     * 新设备:更新设备、原设备无需更新关联关系
+     * 关联设备:更新设备、更新关联信息(若原设备无机构关联,应删除该设备)
+     * 数据库关联设备
+     * 新设备:插入设备、更新关联信息
+     * 关联设备:更新设备、更新关联信息
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public ResponseJson saveProduct(ProductSaveDto productSaveDto) throws IOException {
         Integer relationId = productSaveDto.getRelationId();
         Integer authType = productSaveDto.getAuthType();
@@ -190,7 +193,7 @@ public class AuthProductServiceImpl implements AuthProductService {
             if (2 == certificateImageType && StringUtils.isEmpty(certificateImage)) {
                 return ResponseJson.error("授权牌不能为空");
             }
-        }else {
+        } else {
             // 机构添加默认模板库生成
             certificateImageType = 1;
         }
@@ -258,6 +261,8 @@ public class AuthProductServiceImpl implements AuthProductService {
                 // 检测机构是否已关联该设备
                 ProductRelationVo productRelation = authProductMapper.getProductRelation(null, productId, authId);
                 if (null != productRelation) {
+                    // 设置手动回滚事务
+                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                     return ResponseJson.error("不能重复关联同一台设备");
                 }
                 // 关联设备,更新设备
@@ -273,6 +278,8 @@ public class AuthProductServiceImpl implements AuthProductService {
                     // 检测机构是否已关联该设备
                     ProductRelationVo productRelation = authProductMapper.getProductRelation(null, productId, authId);
                     if (null != productRelation) {
+                        // 设置手动回滚事务
+                        TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                         return ResponseJson.error("不能重复关联同一台设备");
                     }
                     // 更新机构设备关联关系
@@ -292,7 +299,9 @@ public class AuthProductServiceImpl implements AuthProductService {
                     authProductMapper.updateProductByProductId(product);
                     // 检测机构是否已关联该设备
                     ProductRelationVo productRelation = authProductMapper.getProductRelation(null, productId, authId);
-                    if (null != productRelation) {
+                    if (null != productRelation && !productRelation.getRelationId().equals(relationId)) {
+                        // 设置手动回滚事务
+                        TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                         return ResponseJson.error("不能重复关联同一台设备");
                     }
                 }
@@ -391,7 +400,7 @@ public class AuthProductServiceImpl implements AuthProductService {
                 map.put("addWord2_style", Font.BOLD);
                 map.put("addWord2_size", (int) Math.round(90 * rate));
                 map.put("addWord2_x", (int) Math.round(2168 * rate));
-                map.put("addWord2_y", (int) Math.round(3165 * rate));
+                map.put("addWord2_y", (int) Math.round(3160 * rate));
             }
             // 添加认证日期信息
             if (null != product.getCreateTime()) {
@@ -419,112 +428,6 @@ public class AuthProductServiceImpl implements AuthProductService {
         return map;
     }
 
-    /*private void insertProduct(Integer createBy, Integer source, ProductPo product) throws IOException {
-        // 添加新设备
-        // 原授权牌照
-        product.setOriginalCertificateImage(product.getCertificateImage());
-        if (1 == source && StringUtils.isNotEmpty(product.getCertificateImage()) && (null == addQrCodeFlag || 0 == addQrCodeFlag)) {
-            //授权牌照不添加二维码,直接添加水印
-            product.setPcCertificateImage(addWaterMark(product.getCertificateImage(), 1));
-            product.setAppletsCertificateImage(addWaterMark(product.getCertificateImage(), 2));
-        }
-        if (1 == source && StringUtils.isNotEmpty(product.getCertificateImage()) && (null != addQrCodeFlag && 1 == addQrCodeFlag)) {
-            // 生成二维码授权牌
-            String addQrCodeImg = addQrCode(product.getCertificateImage(), product.getProductId(), addTemplateType);
-            product.setCertificateImage(addQrCodeImg);
-            //授权牌照添加水印
-            product.setPcCertificateImage(addWaterMark(addQrCodeImg, 1));
-            product.setAppletsCertificateImage(addWaterMark(addQrCodeImg, 2));
-            //更新授权牌照
-            authProductMapper.updateCertificateImage(product);
-        }
-    }*/
-
-    /*private void updateProduct(Integer productId, Integer addQrCodeFlag, Integer addTemplateType, Integer source, ProductPo product) throws IOException {
-        // 商品id
-        product.setProductId(productId);
-        if (1 == source) {
-            ProductPo dbProductImage = authProductMapper.getImageByProductId(productId);
-            // 数据库该商品授权牌是否添加二维码
-            Integer dbAddQrCodeFlag = dbProductImage.getAddQrCodeFlag();
-            // 数据库该商品授权牌添加二维码模板
-            Integer dbAddTemplateType = dbProductImage.getAddTemplateType();
-            // 授权牌照是否重新上传
-            boolean updateImageFlag = (StringUtils.isNotBlank(product.getCertificateImage()) && !product.getCertificateImage().equals(dbProductImage.getCertificateImage())) || (StringUtils.isEmpty(dbProductImage.getPcCertificateImage()) || StringUtils.isEmpty(dbProductImage.getAppletsCertificateImage()));
-            boolean addQrCodeSign = false;
-            boolean addWaterMarkSign = false;
-            if (StringUtils.isNotEmpty(product.getCertificateImage())) {
-                if (null != dbAddQrCodeFlag && 1 == dbAddQrCodeFlag) {
-                    if (0 == addQrCodeFlag) {
-                        // 原本是,现在否
-                        if (updateImageFlag) {
-                            // 新上传图片,将原图片替换为当前图片,生成水印图片
-                            product.setOriginalCertificateImage(product.getCertificateImage());
-                            addWaterMarkSign = true;
-                        } else {
-                            // 原图片,将当前授权牌替换为原图,生成水印图片
-                            product.setCertificateImage(dbProductImage.getOriginalCertificateImage());
-                            addWaterMarkSign = true;
-                        }
-                    } else if (1 == addQrCodeFlag) {
-                        // 原本是,现在是
-                        if (updateImageFlag) {
-                            // 新上传图片,将原图片替换为当前图片,生成二维码授权牌,生成水印图片
-                            product.setOriginalCertificateImage(product.getCertificateImage());
-                            addQrCodeSign = true;
-                            addWaterMarkSign = true;
-                        } else if (!addTemplateType.equals(dbAddTemplateType)) {
-                            // 原图片,更改模板,将当前授权牌替换为原图,生成二维码授权牌,生成水印图片
-                            product.setCertificateImage(dbProductImage.getOriginalCertificateImage());
-                            addQrCodeSign = true;
-                            addWaterMarkSign = true;
-                        }
-                        // else 原图片,不更改模板,不做更改
-                    }
-                } else {
-                    if (1 == addQrCodeFlag) {
-                        // 原本否,现在是
-                        if (updateImageFlag) {
-                            // 新上传图片,将原图片替换为当前图片,生成二维码授权牌,生成水印图片
-                            product.setOriginalCertificateImage(product.getCertificateImage());
-                            addQrCodeSign = true;
-                            addWaterMarkSign = true;
-                        } else {
-                            // 原图片,生成二维码授权牌,生成水印图片
-                            addQrCodeSign = true;
-                            addWaterMarkSign = true;
-                        }
-                    } else {
-                        // 原本否,现在否
-                        if (updateImageFlag) {
-                            // 新上传图片,将原图片替换为当前图片,生成二维码授权牌,生成水印图片
-                            product.setOriginalCertificateImage(product.getCertificateImage());
-                            addWaterMarkSign = true;
-                        }
-                        // 原图片,不做更改
-                    }
-                }
-            } else {
-                product.setPcCertificateImage(null);
-                product.setAppletsCertificateImage(null);
-            }
-            if (addQrCodeSign) {
-                // 生成二维码授权牌
-                String addQrCodeImg = addQrCode(product.getCertificateImage(), productId, addTemplateType);
-                product.setCertificateImage(addQrCodeImg);
-            }
-            if (addWaterMarkSign) {
-                //授权牌照添加水印
-                product.setPcCertificateImage(addWaterMark(product.getCertificateImage(), 1));
-                product.setAppletsCertificateImage(addWaterMark(product.getCertificateImage(), 2));
-            }
-        }
-        // 自动生成授权牌
-
-        // 更新授权商品
-        authProductMapper.updateProductByProductId(product);
-    }*/
-
     private String addWaterMark(String image,Integer type) throws IOException {
         //type:1pc,2applets
         ClassPathResource classPathResource = new ClassPathResource("/images/newPcWaterMark.png");
@@ -690,8 +593,12 @@ public class AuthProductServiceImpl implements AuthProductService {
     @Override
     public ResponseJson<PageInfo<WxProductListVo>> getWxProductList(Integer listType, Integer authId, String authParty, Integer productTypeId, String snCode, Integer pageNum, Integer pageSize) {
         listType = null == listType ? 1 : listType;
-        if (1 == listType && null == productTypeId) {
-            return ResponseJson.error("参数异常,请输入设备分类id", null);
+        if (1 == listType) {
+            if (null == productTypeId) {
+                return ResponseJson.error("参数异常,请输入设备分类id", null);
+            } else if (StringUtils.isEmpty(snCode) && StringUtils.isEmpty(authParty)) {
+                return ResponseJson.error("搜索条件不能为空", null);
+            }
         }
         PageHelper.startPage(pageNum, pageSize);
         List<WxProductListVo> productList = authProductMapper.getWxProductList(listType, authId, authParty, productTypeId, snCode);

+ 1 - 1
src/main/java/com/caimei/service/auth/impl/AuthServiceImpl.java

@@ -399,7 +399,7 @@ public class AuthServiceImpl implements AuthService {
                 map.put("addWord1_style", Font.BOLD);
                 map.put("addWord1_size", (int) Math.round(90 * rate));
                 map.put("addWord1_x", (int) Math.round(2168 * rate));
-                map.put("addWord1_y", (int) Math.round(3165 * rate));
+                map.put("addWord1_y", (int) Math.round(3160 * rate));
             }
             // 添加认证日期信息
             if (null != auth.getAuthDate()) {

+ 2 - 10
src/main/java/com/caimei/service/auth/impl/ShopServiceImpl.java

@@ -16,17 +16,13 @@ import com.caimei.utils.*;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
-import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
-import java.io.File;
-import java.io.FileInputStream;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -249,12 +245,8 @@ public class ShopServiceImpl implements ShopService {
     }
 
     @Override
-    public ResponseJson<List<ShopInfoVo>> getShopInfoList(Integer type, Integer authUserId) {
-        type = null == type ? 2 : type;
-        if (3 == type && null == authUserId) {
-            return ResponseJson.error("参数异常,请输入供应商用户id", null);
-        }
-        List<ShopInfoVo> brandList = shopMapper.getShopInfoList(type, authUserId);
+    public ResponseJson<List<ShopInfoVo>> getShopInfoList(Integer authUserId) {
+        List<ShopInfoVo> brandList = shopMapper.getShopInfoList(authUserId);
         return ResponseJson.success(brandList);
     }
 

+ 1 - 1
src/main/resources/mapper/ArticleMapper.xml

@@ -45,7 +45,7 @@
     <select id="getArticleList" resultType="com.caimei.model.vo.ArticleListVo">
         select a.id as articleId,a.title as articleTitle,a.image as articleImage,
         a.auditStatus,a.invalidReason,a.status,a.createTime,
-        au.name as auditBy,a.auditTime,a.sort
+        au.name as auditBy,a.auditTime,a.sort, a.checkFlag
         from cm_brand_article a
         left join cm_brand_auth_user au on a.auditBy = au.authUserId
         where a.authUserId = #{authUserId}

+ 1 - 1
src/main/resources/mapper/AuthMapper.xml

@@ -116,7 +116,7 @@
         ifnull(ap.waitAuditNum,0) as waitAuditNum,
         ifnull(bp.waitAuditNum,0) as shopWaitAuditNum,
         if(ifnull(ap.waitAuditNum,0)>0,0,1) as lowerAuditStatus,
-        a.checkFlag
+        a.checkFlag,a.starFlag
         from cm_brand_auth a
         left join cm_brand_auth_user cu on a.createBy = cu.authUserId
         left join cm_brand_club_user cbcu1 on a.createBy = cbcu1.id

+ 12 - 11
src/main/resources/mapper/AuthProductMapper.xml

@@ -2,13 +2,13 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.caimei.mapper.cmMapper.AuthProductMapper">
     <insert id="insertProduct" keyColumn="id" keyProperty="productId" useGeneratedKeys="true" parameterType="com.caimei.model.po.ProductPo">
-        insert into cm_brand_auth_product(`infoId`, `productTypeId`, `snCode`, name, image,
+        insert into cm_brand_auth_product(`infoId`, `productTypeId`, `snCode`, name, image, certificateImageType,
                                           `certificateImage`, `pcCertificateImage`,
                                           `appletsCertificateImage`,
                                           purchaseWay, invoiceImage, `status`, auditBy, auditTime,
                                           `auditStatus`, shopAuditStatus, checkFlag, `createTime`, `createBy`,
                                           createSource)
-        values (#{infoId}, #{productTypeId}, #{snCode}, #{name}, #{image},
+        values (#{infoId}, #{productTypeId}, #{snCode}, #{name}, #{image}, #{certificateImageType},
                 #{certificateImage}, #{pcCertificateImage},
                 #{appletsCertificateImage},
                 #{purchaseWay}, #{invoiceImage}, #{status}, #{auditBy}, #{auditTime},
@@ -42,6 +42,7 @@
             `infoId`           = #{infoId},
             `productTypeId`    = #{productTypeId},
             `snCode`           = #{snCode},
+            `certificateImageType` = #{certificateImageType},
             `certificateImage` = #{certificateImage},
             <if test="pcCertificateImage != null and pcCertificateImage != ''">
                 `pcCertificateImage`      = #{pcCertificateImage},
@@ -166,7 +167,7 @@
         snCode,p.status,p.auditStatus,p.shopAuditStatus, p.createTime,
         if(p.createSource = 1,cu.name,cbcu.mobile) as createBy,
         au.name as auditBy,p.auditTime,p.invalidReason, ifnull(au1.name,au1.mobile) as shopAuditBy,
-        p.shopAuditTime,r.id as relationId
+        p.shopAuditTime,r.id as relationId, p.checkFlag
         from cm_brand_auth_product p
         left join cm_brand_product_relation r on p.id = r.productId
         left join cm_brand_product_type t on p.productTypeId = t.id and t.delFlag = 0
@@ -281,22 +282,22 @@
                 and t.status = 1
                 and t.auditStatus = 1
                 <if test="snCode != null and snCode != ''">
-                    and p.snCode like concat('%',#{snCode},'%')
-                </if>
-                <if test="authId != null">
-                    and r.authId = #{authId}
+                    and p.snCode = #{snCode}
                 </if>
                 <if test="authParty != null and authParty != ''">
-                    and a.authParty like concat('%',#{authParty},'%')
+                    and a.authParty = #{authParty}
                 </if>
             </if>
             <if test="listType == 2">
                 and p.productTypeId = #{productTypeId}
                 <if test="snCode != null and snCode != ''">
-                    and p.snCode = #{snCode}
+                    and p.snCode like concat('%',#{snCode},'%')
+                </if>
+                <if test="authId != null">
+                    and r.authId = #{authId}
                 </if>
                 <if test="authParty != null and authParty != ''">
-                    and a.authParty = #{authParty}
+                    and a.authParty like concat('%',#{authParty},'%')
                 </if>
             </if>
         </where>
@@ -456,7 +457,7 @@
         where productId = #{productId}
     </select>
     <select id="getProductInfo" resultType="com.caimei.model.vo.ProductFormVo">
-        select p.id as productId,if(p.productTypeId is null,p.name,t.name) as productName,
+        select p.id as productId,p.snCode, if(p.productTypeId is null,p.name,t.name) as productName,
         certificateImageType,certificateImage,purchaseWay,invoiceImage,p.auditStatus
         from cm_brand_auth_product p
         left join cm_brand_product_type t on p.productTypeId = t.id and t.delFlag = 0

+ 1 - 1
src/main/resources/mapper/DoctorMapper.xml

@@ -71,7 +71,7 @@
         </delete>
     <select id="getDoctorList" resultType="com.caimei.model.vo.DoctorListVo">
         select id as doctorId, a.name as doctorName,a.certificateNo, a.status, a.auditStatus, a.createTime, cu.name as createBy,
-               au.name as auditBy,a.auditTime,a.invalidReason
+               au.name as auditBy,a.auditTime,a.invalidReason, a.checkFlag
         from cm_brand_doctor a
                  left join cm_brand_auth_user cu on a.createBy = cu.authUserId
                  left join cm_brand_auth_user au on a.auditBy = au.authUserId

+ 1 - 1
src/main/resources/mapper/FileMapper.xml

@@ -82,7 +82,7 @@
     <select id="getFileList" resultType="com.caimei.model.vo.FileListVo">
         select a.id as fileId,a.title as fileTitle,a.name as fileName,a.previewUrl as filePreviewUrl,
         a.downloadUrl as fileDownloadUrl, a.auditStatus,a.invalidReason,a.status,a.createTime,
-        au.name as auditBy,a.auditTime
+        au.name as auditBy,a.auditTime,a.checkFlag
         from cm_brand_file a
         left join cm_brand_auth_user au on a.auditBy = au.authUserId
         where a.authUserId = #{authUserId} and fileType = #{fileType}

+ 1 - 1
src/main/resources/mapper/ImageMapper.xml

@@ -46,7 +46,7 @@
     <select id="getImageList" resultType="com.caimei.model.vo.ImageListVo">
         select a.id as imageId,a.title as imageTitle,
         a.auditStatus,a.invalidReason,a.status,a.createTime,
-        au.name as auditBy,a.auditTime
+        au.name as auditBy,a.auditTime,a.checkFlag
         from cm_brand_image a
         left join cm_brand_auth_user au on a.auditBy = au.authUserId
         where a.authUserId = #{authUserId}

+ 3 - 1
src/main/resources/mapper/ShopMapper.xml

@@ -229,8 +229,10 @@
         select count(*)
         from cm_brand_auth_product p
                  left join cm_brand_product_relation r on p.id = r.productId
+                 left join cm_brand_product_type t on p.productTypeId = t.id
                  left join cm_brand_auth a on r.authId = a.id
-        where a.authUserId = #{authUserId} and p.infoId = #{infoId}
+        where a.authUserId = #{authUserId}
+          and if(p.productTypeId is not null, t.infoId, p.infoId) = #{infoId}
     </select>
     <select id="getFeedbackList" resultType="com.caimei.model.vo.FeedbackVo">
         select cf.id as feedbackId, a.authParty as authParty, cu.mobile, content, commitTime, handleStatus, handleResult,

+ 1 - 1
src/main/resources/mapper/VideoMapper.xml

@@ -67,7 +67,7 @@
     <select id="getVideoList" resultType="com.caimei.model.vo.VideoListVo">
         select a.id as videoId,a.title as videoTitle,a.image as videoImage, a.name as videoName, a.previewUrl as videoPreviewUrl, a.downloadUrl
         as videoDownloadUrl,a.auditStatus,a.invalidReason,a.status,a.createTime,
-        au.name as auditBy,a.auditTime
+        au.name as auditBy,a.auditTime,a.checkFlag
         from cm_brand_video a
         left join cm_brand_auth_user au on a.auditBy = au.authUserId
         where a.authUserId = #{authUserId}