Browse Source

废弃字段相关代码整理

Aslee 2 years ago
parent
commit
57be840a42
32 changed files with 228 additions and 732 deletions
  1. 4 6
      src/main/java/com/caimei/controller/admin/auth/AuthProductApi.java
  2. 44 36
      src/main/java/com/caimei/controller/admin/auth/ShopApi.java
  3. 4 7
      src/main/java/com/caimei/controller/wechat/WxAuthApi.java
  4. 0 4
      src/main/java/com/caimei/mapper/cmMapper/AuthProductMapper.java
  5. 4 15
      src/main/java/com/caimei/mapper/cmMapper/ShopMapper.java
  6. 0 2
      src/main/java/com/caimei/mapper/cmMapper/SystemMapper.java
  7. 2 12
      src/main/java/com/caimei/model/dto/ProductSaveDto.java
  8. 1 1
      src/main/java/com/caimei/model/dto/ShopInfoDto.java
  9. 0 122
      src/main/java/com/caimei/model/dto/ShopSaveDto.java
  10. 0 45
      src/main/java/com/caimei/model/po/CmBrandAuthFilePo.java
  11. 2 17
      src/main/java/com/caimei/model/po/ProductPo.java
  12. 2 2
      src/main/java/com/caimei/model/po/ProductTypePo.java
  13. 2 22
      src/main/java/com/caimei/model/vo/AuthProductVo.java
  14. 0 20
      src/main/java/com/caimei/model/vo/BrandVo.java
  15. 2 17
      src/main/java/com/caimei/model/vo/ProductFormVo.java
  16. 2 2
      src/main/java/com/caimei/model/vo/ShopFormVo.java
  17. 0 49
      src/main/java/com/caimei/model/vo/ShopInfoVo.java
  18. 3 36
      src/main/java/com/caimei/model/vo/ShopListVo.java
  19. 0 15
      src/main/java/com/caimei/model/vo/StatementFileVo.java
  20. 3 3
      src/main/java/com/caimei/model/vo/UserLoginVo.java
  21. 1 1
      src/main/java/com/caimei/service/auth/AuthProductService.java
  22. 18 36
      src/main/java/com/caimei/service/auth/ShopService.java
  23. 10 23
      src/main/java/com/caimei/service/auth/impl/AuthProductServiceImpl.java
  24. 45 98
      src/main/java/com/caimei/service/auth/impl/ShopServiceImpl.java
  25. 9 8
      src/main/resources/mapper/AuthMapper.xml
  26. 36 45
      src/main/resources/mapper/AuthProductMapper.xml
  27. 3 3
      src/main/resources/mapper/ClubMapper.xml
  28. 11 8
      src/main/resources/mapper/FileMapper.xml
  29. 1 1
      src/main/resources/mapper/LoginMapper.xml
  30. 17 67
      src/main/resources/mapper/ShopMapper.xml
  31. 0 3
      src/main/resources/mapper/SystemMapper.xml
  32. 2 6
      src/main/resources/mapper/UserMapper.xml

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

@@ -114,8 +114,6 @@ public class AuthProductApi {
      *                   snCode                 商品SN码
      *                   snCode                 商品SN码
      *                   productImage           商品图片
      *                   productImage           商品图片
      *                   certificateImage       授权牌照
      *                   certificateImage       授权牌照
-     *                   addQrCodeFlag          是否生成二维码授权牌:0否,1是
-     *                   addTemplateType        生成二维码授权牌模板:1左下,2右边,3左边
      *                   purchaseWay            购买渠道
      *                   purchaseWay            购买渠道
      *                   invoiceImage           发票图片
      *                   invoiceImage           发票图片
      *                   status                 上线状态:0已下线,1已上线,2待上线
      *                   status                 上线状态:0已下线,1已上线,2待上线
@@ -201,14 +199,14 @@ public class AuthProductApi {
         }
         }
         JSONObject paramsMap = JSONObject.parseObject(params);
         JSONObject paramsMap = JSONObject.parseObject(params);
         Integer productTypeId = paramsMap.getInteger("productTypeId");
         Integer productTypeId = paramsMap.getInteger("productTypeId");
-        Integer brandId = paramsMap.getInteger("brandId");
+        Integer infoId = paramsMap.getInteger("infoId");
         String name = paramsMap.getString("name");
         String name = paramsMap.getString("name");
         String image = paramsMap.getString("image");
         String image = paramsMap.getString("image");
         Integer createBy = paramsMap.getInteger("createBy");
         Integer createBy = paramsMap.getInteger("createBy");
         String paramListStr = paramsMap.getString("paramList");
         String paramListStr = paramsMap.getString("paramList");
         List<ProductParamPo> paramList = JSONArray.parseArray(paramListStr, ProductParamPo.class);
         List<ProductParamPo> paramList = JSONArray.parseArray(paramListStr, ProductParamPo.class);
-        if (null == brandId) {
-            return ResponseJson.error("参数异常,品牌id不能为空");
+        if (null == infoId) {
+            return ResponseJson.error("参数异常,品牌信息id不能为空");
         }
         }
         if (StringUtils.isEmpty(name)) {
         if (StringUtils.isEmpty(name)) {
             return ResponseJson.error("参数异常,设备分类名称不能为空");
             return ResponseJson.error("参数异常,设备分类名称不能为空");
@@ -219,7 +217,7 @@ public class AuthProductApi {
         if (null == paramList || paramList.size() <= 0) {
         if (null == paramList || paramList.size() <= 0) {
             return ResponseJson.error("参数异常,参数列表不能为空", null);
             return ResponseJson.error("参数异常,参数列表不能为空", null);
         }
         }
-        return authProductService.saveProductType(productTypeId, authUserId, brandId, name, image, createBy, paramList, 1);
+        return authProductService.saveProductType(productTypeId, authUserId, infoId, name, image, createBy, paramList, 1);
     }
     }
 
 
     @ApiOperation("删除设备分类")
     @ApiOperation("删除设备分类")

+ 44 - 36
src/main/java/com/caimei/controller/admin/auth/ShopApi.java

@@ -66,7 +66,7 @@ public class ShopApi {
             @ApiImplicitParam(name = "shopName", required = false, value = "供应商名称"),
             @ApiImplicitParam(name = "shopName", required = false, value = "供应商名称"),
             @ApiImplicitParam(name = "loginAccount", required = false, value = "登录账号"),
             @ApiImplicitParam(name = "loginAccount", required = false, value = "登录账号"),
             @ApiImplicitParam(name = "shopType", required = false, value = "供应商类型:1品牌方,2代理商"),
             @ApiImplicitParam(name = "shopType", required = false, value = "供应商类型:1品牌方,2代理商"),
-            @ApiImplicitParam(name = "brandId", required = false, value = "所属品牌id"),
+            @ApiImplicitParam(name = "infoId", required = false, value = "品牌信息id"),
             @ApiImplicitParam(name = "mobile", required = false, value = "手机号"),
             @ApiImplicitParam(name = "mobile", required = false, value = "手机号"),
             @ApiImplicitParam(name = "linkMan", required = false, value = "联系人"),
             @ApiImplicitParam(name = "linkMan", required = false, value = "联系人"),
             @ApiImplicitParam(name = "lowerAuditStatus", required = false, value = "下级审核状态,0未完成审核,1已完成审核"),
             @ApiImplicitParam(name = "lowerAuditStatus", required = false, value = "下级审核状态,0未完成审核,1已完成审核"),
@@ -75,10 +75,10 @@ public class ShopApi {
             @ApiImplicitParam(name = "pageSize", required = false, value = "一页多少条")
             @ApiImplicitParam(name = "pageSize", required = false, value = "一页多少条")
     })
     })
     @GetMapping("/list")
     @GetMapping("/list")
-    public ResponseJson<PageInfo<ShopListVo>> getShopList(Integer listType, String shopName,String loginAccount, Integer shopType, Integer brandId, String mobile, String linkMan, Integer lowerAuditStatus, Integer sendStatus,
+    public ResponseJson<PageInfo<ShopListVo>> getShopList(Integer listType, String shopName,String loginAccount, Integer shopType, Integer infoId, String mobile, String linkMan, Integer lowerAuditStatus, Integer sendStatus,
                                                           @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                                                           @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                                                           @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
                                                           @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
-        return shopService.getShopList(listType, shopName, loginAccount, shopType, brandId, mobile, linkMan, lowerAuditStatus, sendStatus, pageNum, pageSize);
+        return shopService.getShopList(listType, shopName, loginAccount, shopType, infoId, mobile, linkMan, lowerAuditStatus, sendStatus, pageNum, pageSize);
     }
     }
 
 
     /**
     /**
@@ -121,15 +121,11 @@ public class ShopApi {
      *                    createBy           创建人用户id
      *                    createBy           创建人用户id
      *                    shopInfo  [
      *                    shopInfo  [
      *                                  {
      *                                  {
-     *                                      brandId            品牌id
-     *                                      countryId          产地国家id
-     *                                      brandAuthLogo      品牌授权logo
-     *                                      securityLink       官网认证链接
-     *                                      statementType      代理声明类型:1弹窗 2链接 3图片 4文件(.doc .ppt .pdf)
-     *                                      statementContent   声明弹窗内容
-     *                                      statementLink      声明链接
-     *                                      statementImage     声明图片
-     *                                      statementFileId    声明文件id
+     *                                      infoId                  品牌信息id
+     *                                      brandName               品牌名称
+     *                                      brandLogo               品牌logo
+     *                                      producePlace            产地
+     *                                      manufacturer            制造商
      *                                  }
      *                                  }
      *                              ]
      *                              ]
      *                    }
      *                    }
@@ -256,40 +252,20 @@ public class ShopApi {
         return shopService.resetShopPassword(authUserId);
         return shopService.resetShopPassword(authUserId);
     }
     }
 
 
-
-    /**
-     * 代理声明文件上传
-     *
-     * @param authUserId:供应商用户id
-     * @param brandId:品牌id
-     * @param file:代理声明文件
-     * @return Integer
-     */
-    @ApiOperation("代理声明文件上传")
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "authUserId", required = false, value = "供应商用户id"),
-            @ApiImplicitParam(name = "brandId", required = false, value = "品牌id"),
-            @ApiImplicitParam(name = "file", required = false, value = "代理声明文件"),
-    })
-    @PostMapping("/upload/file")
-    public ResponseJson<AuthFileVo> uploadFile(Integer authUserId, Integer brandId, MultipartFile file) {
-        return shopService.uploadFile(authUserId, brandId, file);
-    }
-
     /**
     /**
      * 品牌列表
      * 品牌列表
      *
      *
      * @param type 1品牌方可用品牌列表,2代理商可用品牌列表,3供应商可用品牌列表
      * @param type 1品牌方可用品牌列表,2代理商可用品牌列表,3供应商可用品牌列表
      * @return AuthVo
      * @return AuthVo
      */
      */
-    @ApiOperation("品牌列表")
+    @ApiOperation("品牌信息列表")
     @ApiImplicitParams({
     @ApiImplicitParams({
             @ApiImplicitParam(name = "type", value = "1品牌方品牌列表,2代理商品牌列表,3供应商可用品牌列表", required = true),
             @ApiImplicitParam(name = "type", value = "1品牌方品牌列表,2代理商品牌列表,3供应商可用品牌列表", required = true),
             @ApiImplicitParam(name = "authUserId", value = "供应商用户id", required = false)
             @ApiImplicitParam(name = "authUserId", value = "供应商用户id", required = false)
     })
     })
-    @GetMapping("/brand/list")
-    public ResponseJson<List<BrandVo>> getBrandList(Integer type, Integer authUserId) {
-        return shopService.getBrandList(type, authUserId);
+    @GetMapping("/info/list")
+    public ResponseJson<List<ShopInfoVo>> getShopInfoList(Integer type, Integer authUserId) {
+        return shopService.getShopInfoList(type, authUserId);
     }
     }
 
 
     /**
     /**
@@ -426,6 +402,38 @@ public class ShopApi {
         return shopService.bindLoginAccount(authUserId, mobile, verifyCode, loginAccount);
         return shopService.bindLoginAccount(authUserId, mobile, verifyCode, loginAccount);
     }
     }
 
 
+    @ApiOperation("保存供应商品牌信息")
+    @ApiImplicitParam(name = "shopInfo", value = "品牌信息", required = true)
+    @PostMapping("/info/save")
+    public ResponseJson saveShopInfo(@CurrentUser SysUser sysUser, @RequestBody ShopInfoDto shopInfo) {
+        if (null == sysUser) {
+            return ResponseJson.error("用户信息异常", null);
+        }
+        // 获取供应商用户id
+        Integer userIdentity = sysUser.getUserIdentity();
+        Integer authUserId = 2 == userIdentity ? sysUser.getId() : 3 == userIdentity ? sysUser.getParentId() : null;
+        if (null == authUserId) {
+            return ResponseJson.error("供应商用户id不能为空", null);
+        }
+        return shopService.saveShopInfo(authUserId, shopInfo);
+    }
+
+    @ApiOperation("删除供应商品牌信息")
+    @ApiImplicitParam(name = "infoId", value = "品牌信息id", required = true)
+    @PostMapping("/info/delete")
+    public ResponseJson saveShopInfo(@CurrentUser SysUser sysUser, @RequestBody Integer infoId) {
+        if (null == sysUser) {
+            return ResponseJson.error("用户信息异常", null);
+        }
+        // 获取供应商用户id
+        Integer userIdentity = sysUser.getUserIdentity();
+        Integer authUserId = 2 == userIdentity ? sysUser.getId() : 3 == userIdentity ? sysUser.getParentId() : null;
+        if (null == authUserId) {
+            return ResponseJson.error("供应商用户id不能为空", null);
+        }
+        return shopService.deleteShopInfo(authUserId, infoId);
+    }
+
     @ApiOperation("一键更新机构授权牌")
     @ApiOperation("一键更新机构授权牌")
     @PostMapping("/authImage/update/all")
     @PostMapping("/authImage/update/all")
     public ResponseJson updateAllAuthImage(@CurrentUser SysUser sysUser){
     public ResponseJson updateAllAuthImage(@CurrentUser SysUser sysUser){

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

@@ -139,9 +139,9 @@ public class WxAuthApi {
             @ApiImplicitParam(name = "type", value = "1品牌方品牌列表,2代理商品牌列表,3供应商可用品牌列表", required = true),
             @ApiImplicitParam(name = "type", value = "1品牌方品牌列表,2代理商品牌列表,3供应商可用品牌列表", required = true),
             @ApiImplicitParam(name = "authUserId", value = "供应商用户id", required = false)
             @ApiImplicitParam(name = "authUserId", value = "供应商用户id", required = false)
     })
     })
-    @GetMapping("/brand/list")
-    public ResponseJson<List<BrandVo>> getBrandList(Integer type, Integer authUserId) {
-        return shopService.getBrandList(type, authUserId);
+    @GetMapping("/shop/info/list")
+    public ResponseJson<List<ShopInfoVo>> getShopInfoList(Integer type, Integer authUserId) {
+        return shopService.getShopInfoList(type, authUserId);
     }
     }
 
 
     /**
     /**
@@ -149,13 +149,10 @@ public class WxAuthApi {
      * @param productSaveDto {
      * @param productSaveDto {
      *                   productId              授权商品id
      *                   productId              授权商品id
      *                   authId                 授权id
      *                   authId                 授权id
-     *                   brandId                品牌id
+     *                   info                   品牌信息id
      *                   productTypeId          设备分类id
      *                   productTypeId          设备分类id
      *                   snCode                 商品SN码
      *                   snCode                 商品SN码
      *                   productImage           商品图片
      *                   productImage           商品图片
-     *                   certificateImage       授权牌照
-     *                   addQrCodeFlag          是否生成二维码授权牌:0否,1是
-     *                   addTemplateType        生成二维码授权牌模板:1左下,2右边,3左边
      *                   purchaseWay            购买渠道
      *                   purchaseWay            购买渠道
      *                   invoiceImage           发票图片
      *                   invoiceImage           发票图片
      *                   status                 上线状态:0已下线,1已上线,2待上线
      *                   status                 上线状态:0已下线,1已上线,2待上线

+ 0 - 4
src/main/java/com/caimei/mapper/cmMapper/AuthProductMapper.java

@@ -49,16 +49,12 @@ public interface AuthProductMapper {
 
 
     List<WxProductListVo> getWxProductList(@Param("listType") Integer listType, @Param("authId") Integer authId, @Param("authParty") String authParty, @Param("productTypeId") Integer productTypeId, @Param("snCode") String snCode);
     List<WxProductListVo> getWxProductList(@Param("listType") Integer listType, @Param("authId") Integer authId, @Param("authParty") String authParty, @Param("productTypeId") Integer productTypeId, @Param("snCode") String snCode);
 
 
-    Integer getBrandIdByBrandName(String brand);
-
     List<ProductFormVo> getAuthProductList(Integer authId);
     List<ProductFormVo> getAuthProductList(Integer authId);
 
 
     void updateCertificateImage(ProductPo product);
     void updateCertificateImage(ProductPo product);
 
 
     AuthProductVo getAuthProductByProductId(Integer productId);
     AuthProductVo getAuthProductByProductId(Integer productId);
 
 
-    StatementFileVo getStatementFile(Integer authUserId, Integer brandId);
-
     List<ProductParamPo> getAuthProductParams(Integer productId);
     List<ProductParamPo> getAuthProductParams(Integer productId);
 
 
     List<WxProductListVo> getClubProductList(Integer authId);
     List<WxProductListVo> getClubProductList(Integer authId);

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

@@ -1,7 +1,6 @@
 package com.caimei.mapper.cmMapper;
 package com.caimei.mapper.cmMapper;
 
 
 import com.caimei.model.dto.ShopInfoDto;
 import com.caimei.model.dto.ShopInfoDto;
-import com.caimei.model.po.CmBrandAuthFilePo;
 import com.caimei.model.po.UserPo;
 import com.caimei.model.po.UserPo;
 import com.caimei.model.vo.*;
 import com.caimei.model.vo.*;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Mapper;
@@ -18,39 +17,29 @@ import java.util.List;
 @Mapper
 @Mapper
 public interface ShopMapper {
 public interface ShopMapper {
 
 
-    List<ShopListVo> getShopList(@Param("listType") Integer listType, @Param("shopName") String shopName, @Param("loginAccount") String loginAccount, @Param("shopType") Integer shopType, @Param("brandId") Integer brandId, @Param("mobile") String mobile, @Param("linkMan") String linkMan, @Param("lowerAuditStatus") Integer lowerAuditStatus, @Param("sendStatus") Integer sendStatus);
+    List<ShopListVo> getShopList(@Param("listType") Integer listType, @Param("shopName") String shopName, @Param("loginAccount") String loginAccount, @Param("shopType") Integer shopType, @Param("infoId") Integer infoId, @Param("mobile") String mobile, @Param("linkMan") String linkMan, @Param("lowerAuditStatus") Integer lowerAuditStatus, @Param("sendStatus") Integer sendStatus);
 
 
     void updateShopStatusByUserId(@Param("authUserId") Integer authUserId, @Param("status") Integer status);
     void updateShopStatusByUserId(@Param("authUserId") Integer authUserId, @Param("status") Integer status);
 
 
     String getShopMobileByUserId(Integer authUserId);
     String getShopMobileByUserId(Integer authUserId);
 
 
-    CmBrandAuthFilePo getStatementFile(CmBrandAuthFilePo searchFile);
-
-    void insertStatementFile(CmBrandAuthFilePo cmBrandAuthFile);
-
     Integer getFileNumByMd5Hex(String md5Hex);
     Integer getFileNumByMd5Hex(String md5Hex);
 
 
-    void deleteStatementFile(Integer id);
-
     void insertShop(UserPo shop);
     void insertShop(UserPo shop);
 
 
-    void updateBrandAuthLogo(@Param("brandId") Integer brandId, @Param("brandAuthLogo") String brandAuthLogo);
-
-    void updateFileUserId(@Param("statementFileId") Integer statementFileId,@Param("authUserId") Integer authUserId);
-
     void insertShopInfo(ShopInfoDto shopInfo);
     void insertShopInfo(ShopInfoDto shopInfo);
 
 
     void updateShopByUserId(UserPo shop);
     void updateShopByUserId(UserPo shop);
 
 
     ShopFormVo getShopByUserId(Integer authUserId);
     ShopFormVo getShopByUserId(Integer authUserId);
 
 
-    List<BrandVo> getBrandList(@Param("type") Integer type,@Param("authUserId") Integer authUserId);
+    List<ShopInfoVo> getShopInfoList(@Param("type") Integer type, @Param("authUserId") Integer authUserId);
 
 
     List<CountryVo> getCountryList();
     List<CountryVo> getCountryList();
 
 
     Integer getUserIdByMobile(String mobile);
     Integer getUserIdByMobile(String mobile);
 
 
-    List<ShopBrandVo> getDbInfoBrandList(Integer authUserId);
+    List<ShopInfoVo> getDbInfoList(Integer authUserId);
 
 
     void deleteShopInfoById(Integer infoId);
     void deleteShopInfoById(Integer infoId);
 
 
@@ -64,7 +53,7 @@ public interface ShopMapper {
 
 
     Integer getProductWaitAuditNum(Integer authUserId);
     Integer getProductWaitAuditNum(Integer authUserId);
 
 
-    Integer getProductCount(@Param("authUserId") Integer authUserId, @Param("brandId") Integer brandId);
+    Integer getProductCount(@Param("authUserId") Integer authUserId, @Param("infoId") Integer infoId);
 
 
     List<FeedbackVo> getFeedbackList(@Param("authUserId") Integer authUserId, @Param("clubName") String clubName, @Param("mobile") String mobile, @Param("handleStatus") Integer handleStatus);
     List<FeedbackVo> getFeedbackList(@Param("authUserId") Integer authUserId, @Param("clubName") String clubName, @Param("mobile") String mobile, @Param("handleStatus") Integer handleStatus);
 
 

+ 0 - 2
src/main/java/com/caimei/mapper/cmMapper/SystemMapper.java

@@ -214,8 +214,6 @@ public interface SystemMapper {
 
 
     List<SysRole> getShopRoleList(Integer authUserId);
     List<SysRole> getShopRoleList(Integer authUserId);
 
 
-    void deleteVipRelation(Integer roleId);
-
     /**
     /**
      * 获取基础菜单列表
      * 获取基础菜单列表
      * @param roleId
      * @param roleId

+ 2 - 12
src/main/java/com/caimei/model/dto/ProductSaveDto.java

@@ -37,9 +37,9 @@ public class ProductSaveDto {
     private Integer authType;
     private Integer authType;
 
 
     /**
     /**
-     * 品牌id
+     * 品牌信息id
      */
      */
-    private Integer brandId;
+    private Integer infoId;
 
 
     /**
     /**
      * 设备分类id
      * 设备分类id
@@ -71,16 +71,6 @@ public class ProductSaveDto {
      */
      */
     private Integer certificateImageType;
     private Integer certificateImageType;
 
 
-    /**
-     * 是否生成二维码授权牌:0否,1是
-     */
-    private Integer addQrCodeFlag;
-
-    /**
-     * 生成二维码授权牌模板:1左下,2右边,3左边
-     */
-    private Integer addTemplateType;
-
     /**
     /**
      * 购买渠道
      * 购买渠道
      */
      */

+ 1 - 1
src/main/java/com/caimei/model/dto/ShopInfoDto.java

@@ -16,7 +16,7 @@ public class ShopInfoDto {
     private Integer authUserId;
     private Integer authUserId;
 
 
     /**
     /**
-     * 所属品牌Id
+     * 品牌名称
      */
      */
     private String brandName;
     private String brandName;
 
 

+ 0 - 122
src/main/java/com/caimei/model/dto/ShopSaveDto.java

@@ -1,122 +0,0 @@
-package com.caimei.model.dto;
-
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.validation.constraints.NotNull;
-
-
-/**
- * Description
- *
- * @author : Aslee
- * @date : 2021/5/11
- */
-@Data
-public class ShopSaveDto {
-    /**
-     * 供应商id
-     */
-    @ApiModelProperty("供应商id")
-    private Integer authUserId;
-
-    /**
-     * 供应商类型:1代理商,2品牌方
-     */
-    @NotNull(message = "供应商类型不能为空")
-    @ApiModelProperty("供应商类型:1代理商,2品牌方")
-    private Integer shopType;
-
-    /**
-     * 品牌id
-     */
-    @NotNull(message = "品牌id不能为空")
-    @ApiModelProperty("品牌id")
-    private Integer brandId;
-
-    /**
-     * 供应商名称
-     */
-    @NotNull(message = "供应商名称不能为空")
-    @ApiModelProperty("供应商名称")
-    private String shopName;
-
-    /**
-     * 手机号
-     */
-    @NotNull(message = "手机号不能为空")
-    @ApiModelProperty("手机号")
-    private String mobile;
-
-    /**
-     * 联系人
-     */
-    @NotNull(message = "联系人不能为空")
-    @ApiModelProperty("联系人")
-    private String linkMan;
-
-    /**
-     * 产地国家id
-     */
-    @NotNull(message = "产地不能为空")
-    @ApiModelProperty("产地国家id")
-    private Integer countryId;
-
-    /**
-     * 品牌授权logo
-     */
-    @NotNull(message = "品牌logo不能为空")
-    @ApiModelProperty("品牌授权logo")
-    private String brandAuthLogo;
-
-    /**
-     * 供应商状态:0停用 1启用
-     */
-    @NotNull(message = "供应商状态不能为空")
-    @ApiModelProperty("供应商状态:0停用 1启用")
-    private Integer shopStatus;
-
-    /**
-     * 官网认证链接
-     */
-    @ApiModelProperty("官网认证链接")
-    private String securityLink;
-
-    /**
-     * 代理声明类型:1弹窗 2链接 3图片 4文件(.doc .ppt .pdf)
-     */
-    @ApiModelProperty("代理声明类型:1弹窗 2链接 3图片 4文件(.doc .ppt .pdf)")
-    private Integer statementType;
-
-    /**
-     * 声明弹窗内容
-     */
-    @ApiModelProperty("声明弹窗内容")
-    private String statementContent;
-
-    /**
-     * 声明链接
-     */
-    @ApiModelProperty("声明链接")
-    private String statementLink;
-
-    /**
-     * 声明图片
-     */
-    @ApiModelProperty("声明图片")
-    private String statementImage;
-
-    /**
-     * 声明文件id
-     */
-    @ApiModelProperty("声明文件id")
-    private Integer statementFileId;
-
-    /**
-     * 创建人用户id
-     */
-    @ApiModelProperty("创建人用户id")
-    private Integer createBy;
-}

+ 0 - 45
src/main/java/com/caimei/model/po/CmBrandAuthFilePo.java

@@ -1,45 +0,0 @@
-package com.caimei.model.po;
-
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * Description
- *
- * @author : Aslee
- * @date : 2021/05/13
- */
-@Data
-public class CmBrandAuthFilePo {
-    private Integer id;
-    /**
-     * 供应商用户id
-     */
-    private Integer authUserId;
-
-    /**
-     * 品牌id
-     */
-    private Integer brandId;
-
-    /**
-     * 声明文件名称
-     */
-    private String name;
-
-    /**
-     * oss存储名
-     */
-    private String ossName;
-
-    /**
-     * 文件唯一标识
-     */
-    private String md5Hex;
-
-    /**
-     * 上传时间
-     */
-    private Date uploadTime;
-}

+ 2 - 17
src/main/java/com/caimei/model/po/ProductPo.java

@@ -25,9 +25,9 @@ public class ProductPo {
     private Integer authId;
     private Integer authId;
 
 
     /**
     /**
-     * 品牌Id
+     * 品牌信息Id
      */
      */
-    private Integer brandId;
+    private Integer infoId;
 
 
     /**
     /**
      * 设备分类id
      * 设备分类id
@@ -59,11 +59,6 @@ public class ProductPo {
      */
      */
     private String appletsImage;
     private String appletsImage;
 
 
-    /**
-     * 原授权牌照(废弃)
-     */
-    private String originalCertificateImage;
-
     /**
     /**
      * 授权牌照
      * 授权牌照
      */
      */
@@ -84,16 +79,6 @@ public class ProductPo {
      */
      */
     private String appletsCertificateImage;
     private String appletsCertificateImage;
 
 
-    /**
-     * 是否生成二维码授权牌:0否,1是(废弃)
-     */
-    private Integer addQrCodeFlag;
-
-    /**
-     * 生成二维码授权牌模板:1左下,2右边,3左边(废弃)
-     */
-    private Integer addTemplateType;
-
     /**
     /**
      * 购买渠道
      * 购买渠道
      */
      */

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

@@ -24,9 +24,9 @@ public class ProductTypePo {
     private Integer authUserId;
     private Integer authUserId;
 
 
     /**
     /**
-     * 品牌id
+     * 品牌信息id
      */
      */
-    private Integer brandId;
+    private Integer infoId;
 
 
     /**
     /**
      * 品牌名称
      * 品牌名称

+ 2 - 22
src/main/java/com/caimei/model/vo/AuthProductVo.java

@@ -39,9 +39,9 @@ public class AuthProductVo {
      */
      */
     private String authLogo;
     private String authLogo;
     /**
     /**
-     * 品牌Id
+     * 品牌信息Id
      */
      */
-    private Integer brandId;
+    private Integer infoId;
     /**
     /**
      * 品牌名称
      * 品牌名称
      */
      */
@@ -70,26 +70,6 @@ public class AuthProductVo {
      * 供应商用户id
      * 供应商用户id
      */
      */
     private Integer authUserId;
     private Integer authUserId;
-    /**
-     * 声明类型:1弹窗声明,2链接声明(废弃)
-     */
-    private Integer statementType;
-    /**
-     * 声明弹窗内容(废弃)
-     */
-    private String statementContent;
-    /**
-     * 声明链接(废弃)
-     */
-    private String statementLink;
-    /**
-     * 声明图片(废弃)
-     */
-    private String statementImage;
-    /**
-     * 声明文件(废弃)
-     */
-    private StatementFileVo statementFile;
     /**
     /**
      * 被授权方
      * 被授权方
      */
      */

+ 0 - 20
src/main/java/com/caimei/model/vo/BrandVo.java

@@ -1,20 +0,0 @@
-package com.caimei.model.vo;
-
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-/**
- * @author Aslee
- * @date 2021/5/17
- */
-@Data
-public class BrandVo {
-    @ApiModelProperty("品牌id")
-    private Integer id;
-
-    @ApiModelProperty("品牌名称")
-    private String name;
-
-    @ApiModelProperty("品牌logo")
-    private String authLogo;
-}

+ 2 - 17
src/main/java/com/caimei/model/vo/ProductFormVo.java

@@ -35,9 +35,9 @@ public class ProductFormVo {
     private Integer authType;
     private Integer authType;
 
 
     /**
     /**
-     * 品牌id
+     * 品牌信息id
      */
      */
-    private Integer brandId;
+    private Integer infoId;
 
 
     /**
     /**
      * 品牌名称
      * 品牌名称
@@ -74,21 +74,6 @@ public class ProductFormVo {
      */
      */
     private String certificateImage;
     private String certificateImage;
 
 
-    /**
-     * 原授权牌照(废弃)
-     */
-    private String originalCertificateImage;
-
-    /**
-     * 是否生成二维码授权牌:0否,1是(废弃)
-     */
-    private Integer addQrCodeFlag;
-
-    /**
-     * 生成二维码授权牌模板:1左下,2右边,3左边(废弃)
-     */
-    private Integer addTemplateType;
-
     /**
     /**
      * 购买渠道
      * 购买渠道
      */
      */

+ 2 - 2
src/main/java/com/caimei/model/vo/ShopFormVo.java

@@ -86,9 +86,9 @@ public class ShopFormVo implements Serializable {
     private List<ShopInfoVo> shopInfo;
     private List<ShopInfoVo> shopInfo;
 
 
     /**
     /**
-     * 已存在商品的品牌id,以,隔开
+     * 已存在商品的品牌信息id,以,隔开
      */
      */
-    private String existProductBrandIds;
+    private String existProductInfoIds;
 
 
     /**
     /**
      * 会员状态:0已过期,1生效中,2待生效,3非会员
      * 会员状态:0已过期,1生效中,2待生效,3非会员

+ 0 - 49
src/main/java/com/caimei/model/vo/ShopInfoVo.java

@@ -9,10 +9,6 @@ import lombok.Data;
  */
  */
 @Data
 @Data
 public class ShopInfoVo {
 public class ShopInfoVo {
-    /**
-     * 所属品牌Id(废弃)
-     */
-    private Integer brandId;
 
 
     /**
     /**
      * 供应商信息id
      * 供应商信息id
@@ -38,49 +34,4 @@ public class ShopInfoVo {
      * 制造商
      * 制造商
      */
      */
     private String manufacturer;
     private String manufacturer;
-
-    /**
-     * 品牌授权logo(废弃)
-     */
-    private String brandAuthLogo;
-
-    /**
-     * 产地国家id(废弃)
-     */
-    private Integer countryId;
-
-    /**
-     * 官网认证链接(废弃)
-     */
-    private String securityLink;
-
-    /**
-     * 代理声明类型:1弹窗,2链接,3图片,4文件(废弃)
-     */
-    private Integer statementType;
-
-    /**
-     * 声明弹窗内容(废弃)
-     */
-    private String statementContent;
-
-    /**
-     * 声明链接(废弃)
-     */
-    private String statementLink;
-
-    /**
-     * 声明图片(废弃)
-     */
-    private String statementImage;
-
-    /**
-     * 声明文件Id(废弃)
-     */
-    private Integer statementFileId;
-
-    /**
-     * 声明文件名称(废弃)
-     */
-    private String statementFileName;
 }
 }

+ 3 - 36
src/main/java/com/caimei/model/vo/ShopListVo.java

@@ -16,69 +16,36 @@ import java.util.List;
  */
  */
 @Data
 @Data
 public class ShopListVo implements Serializable {
 public class ShopListVo implements Serializable {
-    /**
-     * 供应商用户id
-     */
     @ApiModelProperty("供应商用户id")
     @ApiModelProperty("供应商用户id")
     private Integer authUserId;
     private Integer authUserId;
 
 
-    /**
-     * 供应商名称
-     */
     @ApiModelProperty("供应商名称")
     @ApiModelProperty("供应商名称")
     private String name;
     private String name;
 
 
-    /**
-     * 登录账号
-     */
     @ApiModelProperty("登录账号")
     @ApiModelProperty("登录账号")
     private String loginAccount;
     private String loginAccount;
 
 
-    /**
-     * 供应商类型:1代理商 2品牌方
-     */
     @ApiModelProperty("供应商类型")
     @ApiModelProperty("供应商类型")
     private Integer shopType;
     private Integer shopType;
 
 
-    /**
-     * 所属品牌
-     */
-    @ApiModelProperty("所属品牌")
+    @ApiModelProperty("品牌名称")
     private String brandName;
     private String brandName;
 
 
-    /**
-     * 品牌id
-     */
-    @ApiModelProperty("所属品牌")
-    private String brandId;
+    @ApiModelProperty("品牌信息id")
+    private String infoId;
 
 
-    /**
-     * 手机号
-     */
     @ApiModelProperty("手机号")
     @ApiModelProperty("手机号")
     private String mobile;
     private String mobile;
 
 
-    /**
-     * 联系人
-     */
     @ApiModelProperty("联系人")
     @ApiModelProperty("联系人")
     private String linkMan;
     private String linkMan;
 
 
-    /**
-     * 供应商状态:0停用 1启用
-     */
     @ApiModelProperty("供应商状态:0停用 1启用")
     @ApiModelProperty("供应商状态:0停用 1启用")
     private Integer shopStatus;
     private Integer shopStatus;
 
 
-    /**
-     * 创建时间
-     */
     @ApiModelProperty("创建时间")
     @ApiModelProperty("创建时间")
     private Date createTime;
     private Date createTime;
 
 
-    /**
-     * 创建人
-     */
     @ApiModelProperty("创建人")
     @ApiModelProperty("创建人")
     private String createBy;
     private String createBy;
 
 

+ 0 - 15
src/main/java/com/caimei/model/vo/StatementFileVo.java

@@ -1,15 +0,0 @@
-package com.caimei.model.vo;
-
-import com.caimei.model.po.CmBrandAuthFilePo;
-import lombok.Data;
-
-/**
- * @author Aslee
- */
-@Data
-public class StatementFileVo extends CmBrandAuthFilePo {
-    /**
-     * 访问声明文件链接
-     */
-    private String url;
-}

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

@@ -53,10 +53,10 @@ public class UserLoginVo implements Serializable {
     @ApiModelProperty("供应商类型:1品牌方 2代理商")
     @ApiModelProperty("供应商类型:1品牌方 2代理商")
     private Integer shopType;
     private Integer shopType;
     /**
     /**
-     * 品牌id
+     * 品牌信息id
      */
      */
-    @ApiModelProperty("品牌id")
-    private Integer brandId;
+    @ApiModelProperty("品牌信息id")
+    private Integer infoId;
     /**
     /**
      * 用户身份: 1管理员 2供应商
      * 用户身份: 1管理员 2供应商
      */
      */

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

@@ -125,7 +125,7 @@ public interface AuthProductService {
     /**
     /**
      * 保存设备分类
      * 保存设备分类
      */
      */
-    ResponseJson<ProductTypePo> saveProductType(Integer productTypeId, Integer authUserId, Integer brandId, String name, String image, Integer createBy, List<ProductParamPo> paramList, Integer createSource) throws IOException;
+    ResponseJson<ProductTypePo> saveProductType(Integer productTypeId, Integer authUserId, Integer infoId, String name, String image, Integer createBy, List<ProductParamPo> paramList, Integer createSource) throws IOException;
 
 
     /**
     /**
      * 删除设备分类
      * 删除设备分类

+ 18 - 36
src/main/java/com/caimei/service/auth/ShopService.java

@@ -18,13 +18,11 @@ import java.util.List;
 public interface ShopService {
 public interface ShopService {
     /**
     /**
      * 供应商列表数据
      * 供应商列表数据
-     *
-     *
      * @param listType  列表类型:1供应商列表,2审核列表
      * @param listType  列表类型:1供应商列表,2审核列表
      * @param shopName  供应商名称
      * @param shopName  供应商名称
      * @param loginAccount
      * @param loginAccount
      * @param shopType  供应商类型:1品牌方,2代理商
      * @param shopType  供应商类型:1品牌方,2代理商
-     * @param brandId   所属品牌Id
+     * @param infoId    品牌信息Id
      * @param mobile    手机号
      * @param mobile    手机号
      * @param linkMan   联系人
      * @param linkMan   联系人
      * @param lowerAuditStatus  下级审核状态,0未完成审核,1已完成审核
      * @param lowerAuditStatus  下级审核状态,0未完成审核,1已完成审核
@@ -32,7 +30,7 @@ public interface ShopService {
      * @param pageSize  一页多少条
      * @param pageSize  一页多少条
      * @return PageInfo<ShopVo>
      * @return PageInfo<ShopVo>
      */
      */
-    ResponseJson<PageInfo<ShopListVo>> getShopList(Integer listType, String shopName, String loginAccount, Integer shopType, Integer brandId, String mobile, String linkMan, Integer lowerAuditStatus, Integer sendStatus, Integer pageNum, Integer pageSize);
+    ResponseJson<PageInfo<ShopListVo>> getShopList(Integer listType, String shopName, String loginAccount, Integer shopType, Integer infoId, String mobile, String linkMan, Integer lowerAuditStatus, Integer sendStatus, Integer pageNum, Integer pageSize);
 
 
     /**
     /**
      * 更新供应商状态
      * 更新供应商状态
@@ -49,40 +47,16 @@ public interface ShopService {
      */
      */
     ResponseJson resetShopPassword(Integer authUserId);
     ResponseJson resetShopPassword(Integer authUserId);
 
 
-    /**
-     * 上传文件
-     *
-     * @param authUserId 供应商用户id
-     * @param brandId :品牌id
-     * @param file       上传文件
-     * @return
-     */
-    ResponseJson<AuthFileVo> uploadFile(Integer authUserId, Integer brandId, MultipartFile file);
-
     /**
     /**
      * 添加供应商
      * 添加供应商
-     * @param shopSaveDto {
+     * @param shop {
      *                    shopType           供应商类型:1代理商,2品牌方
      *                    shopType           供应商类型:1代理商,2品牌方
-     *                    brandId            品牌id
      *                    shopName           供应商名称
      *                    shopName           供应商名称
      *                    mobile             手机号
      *                    mobile             手机号
      *                    linkMan            联系人
      *                    linkMan            联系人
-     *                    countryId          产地国家id
-     *                    brandAuthLogo      品牌授权logo
      *                    shopStatus         供应商状态:0停用 1启用
      *                    shopStatus         供应商状态:0停用 1启用
-     *                    securityLink       官网认证链接
-     *                    statementType      代理声明类型:1弹窗 2链接 3图片 4文件(.doc .ppt .pdf)
-     *                    statementContent   声明弹窗内容
-     *                    statementLink      声明链接
-     *                    statementImage     声明图片
-     *                    statementFileId    声明文件id
      *                    createBy           创建人用户id
      *                    createBy           创建人用户id
      *                    }
      *                    }
-     * @param logo
-     * @param qrCodeImage
-     * @param wxAccountType
-     * @param appId
-     * @param appSecret
      * @param shopInfoList
      * @param shopInfoList
      */
      */
     ResponseJson saveShop(UserPo shop, List<ShopInfoDto> shopInfoList);
     ResponseJson saveShop(UserPo shop, List<ShopInfoDto> shopInfoList);
@@ -95,17 +69,12 @@ public interface ShopService {
     ResponseJson<ShopFormVo> getShopFormData(Integer authUserId);
     ResponseJson<ShopFormVo> getShopFormData(Integer authUserId);
 
 
     /**
     /**
-     * 根据供应商用户id删除代理声明文件
-     */
-    void deleteFile(Integer authUserId,Integer brandId);
-
-    /**
-     * 品牌列表
+     * 品牌信息列表
      * @param type 1品牌方品牌列表,2代理商品牌列表
      * @param type 1品牌方品牌列表,2代理商品牌列表
      * @param authUserId    供应商用户id
      * @param authUserId    供应商用户id
      * @return AuthVo
      * @return AuthVo
      */
      */
-    ResponseJson<List<BrandVo>> getBrandList(Integer type, Integer authUserId);
+    ResponseJson<List<ShopInfoVo>> getShopInfoList(Integer type, Integer authUserId);
 
 
     /**
     /**
      * 产地国家列表
      * 产地国家列表
@@ -180,4 +149,17 @@ public interface ShopService {
      * 更改logo
      * 更改logo
      */
      */
     ResponseJson changeLogo(Integer authUserId, String logo);
     ResponseJson changeLogo(Integer authUserId, String logo);
+
+    /**
+     * 保存供应商品牌信息
+     * @param authUserId
+     * @param shopInfo
+     * @return
+     */
+    ResponseJson saveShopInfo(Integer authUserId, ShopInfoDto shopInfo);
+
+    /**
+     * 删除供应商品牌信息
+     */
+    ResponseJson deleteShopInfo(Integer authUserId, Integer infoId);
 }
 }

+ 10 - 23
src/main/java/com/caimei/service/auth/impl/AuthProductServiceImpl.java

@@ -1,7 +1,5 @@
 package com.caimei.service.auth.impl;
 package com.caimei.service.auth.impl;
 
 
-import com.aliyun.oss.OSS;
-import com.aliyun.oss.OSSClientBuilder;
 import com.caimei.config.FastDfsClient;
 import com.caimei.config.FastDfsClient;
 import com.caimei.mapper.cmMapper.AuthMapper;
 import com.caimei.mapper.cmMapper.AuthMapper;
 import com.caimei.mapper.cmMapper.AuthProductMapper;
 import com.caimei.mapper.cmMapper.AuthProductMapper;
@@ -147,7 +145,7 @@ public class AuthProductServiceImpl implements AuthProductService {
         Integer authType = productSaveDto.getAuthType();
         Integer authType = productSaveDto.getAuthType();
         Integer productId = productSaveDto.getProductId();
         Integer productId = productSaveDto.getProductId();
         Integer authId = productSaveDto.getAuthId();
         Integer authId = productSaveDto.getAuthId();
-        Integer brandId = productSaveDto.getBrandId();
+        Integer infoId = productSaveDto.getInfoId();
         Integer productTypeId = productSaveDto.getProductTypeId();
         Integer productTypeId = productSaveDto.getProductTypeId();
         String productName = productSaveDto.getProductName();
         String productName = productSaveDto.getProductName();
         String productImage = productSaveDto.getProductImage();
         String productImage = productSaveDto.getProductImage();
@@ -164,9 +162,9 @@ public class AuthProductServiceImpl implements AuthProductService {
         }
         }
         AuthVo auth = authMapper.getAuthById(authId);
         AuthVo auth = authMapper.getAuthById(authId);
         if (null == productTypeId) {
         if (null == productTypeId) {
-            // 新增设备分类,需要传入设备名称,品牌id,参数列表
-            if (null == brandId) {
-                return ResponseJson.error("参数异常,请输入品牌id", null);
+            // 新增设备分类,需要传入设备名称,品牌信息id,参数列表
+            if (null == infoId) {
+                return ResponseJson.error("参数异常,请输入品牌信息id", null);
             }
             }
             if (StringUtils.isEmpty(productName)) {
             if (StringUtils.isEmpty(productName)) {
                 return ResponseJson.error("参数异常,请输入设备分类id或设备名称", null);
                 return ResponseJson.error("参数异常,请输入设备分类id或设备名称", null);
@@ -210,8 +208,8 @@ public class AuthProductServiceImpl implements AuthProductService {
         ProductPo product = new ProductPo();
         ProductPo product = new ProductPo();
         // 设备id
         // 设备id
         product.setProductId(productId);
         product.setProductId(productId);
-        // 品牌id
-        product.setBrandId(brandId);
+        // 品牌信息id
+        product.setInfoId(infoId);
         // 设备分类id
         // 设备分类id
         product.setProductTypeId(productTypeId);
         product.setProductTypeId(productTypeId);
         if (null == productTypeId) {
         if (null == productTypeId) {
@@ -625,7 +623,7 @@ public class AuthProductServiceImpl implements AuthProductService {
                 if (null == productType) {
                 if (null == productType) {
                     List<ProductParamPo> paramList = authProductMapper.getParamsByProductId(productId);
                     List<ProductParamPo> paramList = authProductMapper.getParamsByProductId(productId);
                     try {
                     try {
-                        ResponseJson<ProductTypePo> result = saveProductType(null, authUserId, product.getBrandId(), product.getName(), product.getImage(), product.getCreateBy(), paramList, 2);
+                        ResponseJson<ProductTypePo> result = saveProductType(null, authUserId, product.getInfoId(), product.getName(), product.getImage(), product.getCreateBy(), paramList, 2);
                         int code = result.getCode();
                         int code = result.getCode();
                         if (0 == code) {
                         if (0 == code) {
                             productType = result.getData();
                             productType = result.getData();
@@ -654,7 +652,7 @@ public class AuthProductServiceImpl implements AuthProductService {
                 if (null == productType) {
                 if (null == productType) {
                     List<ProductParamPo> paramList = authProductMapper.getParamsByProductId(productId);
                     List<ProductParamPo> paramList = authProductMapper.getParamsByProductId(productId);
                     try {
                     try {
-                        ResponseJson<ProductTypePo> result = saveProductType(null, authUserId, product.getBrandId(), product.getName(), product.getImage(), product.getCreateBy(), paramList, 2);
+                        ResponseJson<ProductTypePo> result = saveProductType(null, authUserId, product.getInfoId(), product.getName(), product.getImage(), product.getCreateBy(), paramList, 2);
                         int code = result.getCode();
                         int code = result.getCode();
                         if (0 == code) {
                         if (0 == code) {
                             productType = result.getData();
                             productType = result.getData();
@@ -692,24 +690,13 @@ public class AuthProductServiceImpl implements AuthProductService {
         if (null == authProduct) {
         if (null == authProduct) {
             return ResponseJson.error("商品不存在", null);
             return ResponseJson.error("商品不存在", null);
         }
         }
-        // 代理声明文件
-        if (null != authProduct.getStatementType() && authProduct.getStatementType() == 4) {
-            StatementFileVo statementFile = authProductMapper.getStatementFile(authProduct.getAuthUserId(), authProduct.getBrandId());
-            OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
-            // 设置URL过期时间为1个小时
-            Date expiration = new Date(System.currentTimeMillis() + 3600L * 1000);
-            String url = ossClient.generatePresignedUrl(bucketName, active + "/authFile/" + statementFile.getOssName(), expiration).toString();
-            statementFile.setUrl(url);
-            ossClient.shutdown();
-            authProduct.setStatementFile(statementFile);
-        }
         // 商品参数
         // 商品参数
         authProduct.setParamList(authProductMapper.getAuthProductParams(productId));
         authProduct.setParamList(authProductMapper.getAuthProductParams(productId));
         return ResponseJson.success(authProduct);
         return ResponseJson.success(authProduct);
     }
     }
 
 
     @Override
     @Override
-    public ResponseJson<ProductTypePo> saveProductType(Integer productTypeId, Integer authUserId, Integer brandId, String name, String image, Integer createBy, List<ProductParamPo> paramList, Integer createSource) throws IOException {
+    public ResponseJson<ProductTypePo> saveProductType(Integer productTypeId, Integer authUserId, Integer infoId, String name, String image, Integer createBy, List<ProductParamPo> paramList, Integer createSource) throws IOException {
         // 是否为添加操作
         // 是否为添加操作
         boolean insertFlag = null == productTypeId;
         boolean insertFlag = null == productTypeId;
         /*
         /*
@@ -717,7 +704,7 @@ public class AuthProductServiceImpl implements AuthProductService {
          */
          */
         ProductTypePo productType = new ProductTypePo();
         ProductTypePo productType = new ProductTypePo();
         productType.setAuthUserId(authUserId);
         productType.setAuthUserId(authUserId);
-        productType.setBrandId(brandId);
+        productType.setInfoId(infoId);
         productType.setName(name);
         productType.setName(name);
         productType.setImage(image);
         productType.setImage(image);
         productType.setCreateBy(createBy);
         productType.setCreateBy(createBy);

+ 45 - 98
src/main/java/com/caimei/service/auth/impl/ShopServiceImpl.java

@@ -6,7 +6,6 @@ import com.caimei.mapper.cmMapper.ShopMapper;
 import com.caimei.mapper.cmMapper.UserMapper;
 import com.caimei.mapper.cmMapper.UserMapper;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.dto.ShopInfoDto;
 import com.caimei.model.dto.ShopInfoDto;
-import com.caimei.model.po.CmBrandAuthFilePo;
 import com.caimei.model.po.CmBrandAuthPo;
 import com.caimei.model.po.CmBrandAuthPo;
 import com.caimei.model.po.UserPo;
 import com.caimei.model.po.UserPo;
 import com.caimei.model.vo.*;
 import com.caimei.model.vo.*;
@@ -60,10 +59,10 @@ public class ShopServiceImpl implements ShopService {
     private String active;
     private String active;
 
 
     @Override
     @Override
-    public ResponseJson<PageInfo<ShopListVo>> getShopList(Integer listType, String shopName, String loginAccount, Integer shopType, Integer brandId, String mobile, String linkMan, Integer lowerAuditStatus, Integer sendStatus, Integer pageNum, Integer pageSize) {
+    public ResponseJson<PageInfo<ShopListVo>> getShopList(Integer listType, String shopName, String loginAccount, Integer shopType, Integer infoId, String mobile, String linkMan, Integer lowerAuditStatus, Integer sendStatus, Integer pageNum, Integer pageSize) {
         listType = null == listType ? 1 : listType;
         listType = null == listType ? 1 : listType;
         PageHelper.startPage(pageNum, pageSize);
         PageHelper.startPage(pageNum, pageSize);
-        List<ShopListVo> shopList = shopMapper.getShopList(listType, shopName, loginAccount, shopType, brandId, mobile, linkMan, lowerAuditStatus, sendStatus);
+        List<ShopListVo> shopList = shopMapper.getShopList(listType, shopName, loginAccount, shopType, infoId, mobile, linkMan, lowerAuditStatus, sendStatus);
         ListIterator<ShopListVo> iterator = shopList.listIterator();
         ListIterator<ShopListVo> iterator = shopList.listIterator();
         while (iterator.hasNext()) {
         while (iterator.hasNext()) {
             // 根据是否完成商品信息审核筛选项,设置下级审核状态
             // 根据是否完成商品信息审核筛选项,设置下级审核状态
@@ -125,87 +124,6 @@ public class ShopServiceImpl implements ShopService {
         return ResponseJson.success("密码重置成功");
         return ResponseJson.success("密码重置成功");
     }
     }
 
 
-    @Override
-    public ResponseJson<AuthFileVo> uploadFile(Integer authUserId, Integer brandId, MultipartFile file) {
-        authUserId = (null != authUserId && authUserId > 0) ? authUserId : null;
-        String fileAllName = file.getOriginalFilename();
-        String fileType = fileAllName.substring(fileAllName.lastIndexOf(".") + 1);
-        String fileName = file.getResource().getFilename();
-        String uuid = UUID.randomUUID().toString().replaceAll("-", "");
-        String filePath = uuid + "." + fileType;
-        String contentType = OSSUtils.getContentType(fileAllName);
-        log.info(">>>>>>>>>>>>>上传文件,用户id:" + authUserId);
-        try {
-            //保存本地
-            File uploadFile = OSSUtils.ossUpload(file);
-            //判断文件的唯一性,转换成16进制md5值
-            String md5Hex = DigestUtils.md5Hex(new FileInputStream(uploadFile));
-            CmBrandAuthFilePo cmBrandAuthFile = null;
-            if (null != authUserId) {
-                // 查找该供应商下是否已存在相同文件
-                CmBrandAuthFilePo searchFile = new CmBrandAuthFilePo();
-                searchFile.setAuthUserId(authUserId);
-                searchFile.setBrandId(brandId);
-                searchFile.setMd5Hex(md5Hex);
-                cmBrandAuthFile = shopMapper.getStatementFile(searchFile);
-            }
-            if (cmBrandAuthFile == null) {
-                log.info("默认路径>>>" + uploadFile.getAbsolutePath());
-                // 修改情况下,如果原来已经选择了文件代理声明,并且旧文件与新文件不同,需要将旧文件删除
-                if (null != authUserId) {
-                    deleteFile(authUserId, brandId);
-                }
-                // 查找oss中是否已存在该文件,若存在则不需要重新上传
-                CmBrandAuthFilePo searchFile = new CmBrandAuthFilePo();
-                searchFile.setMd5Hex(md5Hex);
-                CmBrandAuthFilePo sameFile = shopMapper.getStatementFile(searchFile);
-                if (null == sameFile) {
-                    //将新文件上传oss
-                    OSSUtils.ossUpload(filePath, uploadFile, contentType, null);
-                }
-                //删除本地文件
-                OSSUtils.deleteFile(uploadFile);
-                //保存关联关系
-                cmBrandAuthFile = new CmBrandAuthFilePo();
-                cmBrandAuthFile.setAuthUserId(authUserId);
-                cmBrandAuthFile.setBrandId(brandId);
-                cmBrandAuthFile.setName(fileName);
-                cmBrandAuthFile.setOssName(null == sameFile ? filePath : sameFile.getOssName());
-                cmBrandAuthFile.setMd5Hex(md5Hex);
-                cmBrandAuthFile.setUploadTime(new Date());
-                shopMapper.insertStatementFile(cmBrandAuthFile);
-            } else {
-                //删除本地文件
-                OSSUtils.deleteFile(uploadFile);
-            }
-            AuthFileVo fileVo = new AuthFileVo();
-            fileVo.setFileId(cmBrandAuthFile.getId());
-            fileVo.setFileName(cmBrandAuthFile.getName());
-            return ResponseJson.success("文件上传成功", fileVo);
-        } catch (Exception e) {
-            log.error("<<<<< 文件上传异常 >>>>>");
-            return ResponseJson.error("文件上传失败", null);
-        }
-    }
-
-    @Override
-    public void deleteFile(Integer authUserId, Integer brandId) {
-        CmBrandAuthFilePo searchFile = new CmBrandAuthFilePo();
-        searchFile.setAuthUserId(authUserId);
-        searchFile.setBrandId(brandId);
-        CmBrandAuthFilePo oldFile = shopMapper.getStatementFile(searchFile);
-        if (oldFile != null) {
-            Integer num = shopMapper.getFileNumByMd5Hex(oldFile.getMd5Hex());
-            log.info(">>>>>>>>>>>>>>>文件使用数:" + num);
-            if (num == 1) {
-                log.info(">>>>>>>>>>>>>>>删除文件:" + oldFile.getOssName());
-                // 如果这个文件只有这个供应商在使用,删除oss服务器上的文件
-                OSSUtils.deleteSingleFile(oldFile.getOssName());
-            }
-            shopMapper.deleteStatementFile(oldFile.getId());
-        }
-    }
-
     @Override
     @Override
     @Transactional(rollbackFor = Exception.class)
     @Transactional(rollbackFor = Exception.class)
     public ResponseJson saveShop(UserPo shop, List<ShopInfoDto> shopInfoList) {
     public ResponseJson saveShop(UserPo shop, List<ShopInfoDto> shopInfoList) {
@@ -274,20 +192,20 @@ public class ShopServiceImpl implements ShopService {
             });
             });
         } else {
         } else {
             // 数据库中品牌列表数据
             // 数据库中品牌列表数据
-            List<ShopBrandVo> dbBrandList = shopMapper.getDbInfoBrandList(shop.getAuthUserId());
-            // 原品牌列表编辑后剩余的品牌id列表
-            List<Integer> newBrandList = shopInfoList.stream().filter(shopInfo -> shopInfo.getInfoId() != null).map(ShopInfoDto::getInfoId).collect(Collectors.toList());
-            for (ShopBrandVo dbBrand : dbBrandList) {
-                if (!newBrandList.contains(dbBrand.getId())) {
+            List<ShopInfoVo> dbInfoList = shopMapper.getDbInfoList(shop.getAuthUserId());
+            // 原品牌列表编辑后剩余的品牌信息id列表
+            List<Integer> newInfoIdList = shopInfoList.stream().filter(shopInfo -> shopInfo.getInfoId() != null).map(ShopInfoDto::getInfoId).collect(Collectors.toList());
+            for (ShopInfoVo dbInfo : dbInfoList) {
+                if (!newInfoIdList.contains(dbInfo.getInfoId())) {
                     // 判断被删除的品牌下是否还有未删除的商品,若存在,提示供应商需要删除后才能删除品牌
                     // 判断被删除的品牌下是否还有未删除的商品,若存在,提示供应商需要删除后才能删除品牌
-                    Integer productCount = shopMapper.getProductCount(shop.getAuthUserId(), dbBrand.getId());
+                    Integer productCount = shopMapper.getProductCount(shop.getAuthUserId(), dbInfo.getInfoId());
                     if (null != productCount && productCount > 0) {
                     if (null != productCount && productCount > 0) {
                         // 设置手动回滚事务
                         // 设置手动回滚事务
                         TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                         TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                         return ResponseJson.error("对不起,该品牌已绑定设备认证,暂时无法删除");
                         return ResponseJson.error("对不起,该品牌已绑定设备认证,暂时无法删除");
                     } else {
                     } else {
                         // 删除品牌
                         // 删除品牌
-                        shopMapper.deleteShopInfoById(dbBrand.getId());
+                        shopMapper.deleteShopInfoById(dbInfo.getInfoId());
                     }
                     }
                 }
                 }
             }
             }
@@ -317,26 +235,26 @@ public class ShopServiceImpl implements ShopService {
         }
         }
         List<ShopInfoVo> shopInfoList = shopMapper.getShopInfoByUserId(authUserId);
         List<ShopInfoVo> shopInfoList = shopMapper.getShopInfoByUserId(authUserId);
         shopForm.setShopInfo(shopInfoList);
         shopForm.setShopInfo(shopInfoList);
-        String existProductBrandIds = "";
+        String existProductInfoIds = "";
         for (ShopInfoVo shopInfo : shopInfoList) {
         for (ShopInfoVo shopInfo : shopInfoList) {
-            if (null != shopInfo.getBrandId()) {
-                Integer productCount = shopMapper.getProductCount(authUserId, shopInfo.getBrandId());
+            if (null != shopInfo.getInfoId()) {
+                Integer productCount = shopMapper.getProductCount(authUserId, shopInfo.getInfoId());
                 if (null != productCount && productCount > 0) {
                 if (null != productCount && productCount > 0) {
-                    existProductBrandIds += shopInfo.getBrandId() + ",";
+                    existProductInfoIds += shopInfo.getInfoId() + ",";
                 }
                 }
             }
             }
         }
         }
-        shopForm.setExistProductBrandIds(existProductBrandIds);
+        shopForm.setExistProductInfoIds(existProductInfoIds);
         return ResponseJson.success(shopForm);
         return ResponseJson.success(shopForm);
     }
     }
 
 
     @Override
     @Override
-    public ResponseJson<List<BrandVo>> getBrandList(Integer type, Integer authUserId) {
+    public ResponseJson<List<ShopInfoVo>> getShopInfoList(Integer type, Integer authUserId) {
         type = null == type ? 2 : type;
         type = null == type ? 2 : type;
         if (3 == type && null == authUserId) {
         if (3 == type && null == authUserId) {
             return ResponseJson.error("参数异常,请输入供应商用户id", null);
             return ResponseJson.error("参数异常,请输入供应商用户id", null);
         }
         }
-        List<BrandVo> brandList = shopMapper.getBrandList(type, authUserId);
+        List<ShopInfoVo> brandList = shopMapper.getShopInfoList(type, authUserId);
         return ResponseJson.success(brandList);
         return ResponseJson.success(brandList);
     }
     }
 
 
@@ -493,4 +411,33 @@ public class ShopServiceImpl implements ShopService {
         return ResponseJson.success();
         return ResponseJson.success();
     }
     }
 
 
+    @Override
+    public ResponseJson saveShopInfo(Integer authUserId, ShopInfoDto shopInfo) {
+        boolean insertFlag = null == shopInfo.getInfoId();
+        if (insertFlag) {
+            shopInfo.setAuthUserId(authUserId);
+            // 插入供应商信息
+            shopMapper.insertShopInfo(shopInfo);
+        } else {
+            // 更新
+            shopMapper.updateShopInfo(shopInfo);
+        }
+        return ResponseJson.success("保存成功");
+    }
+
+    @Override
+    public ResponseJson deleteShopInfo(Integer authUserId, Integer infoId) {
+        // 判断被删除的品牌下是否还有未删除的商品,若存在,提示供应商需要删除后才能删除品牌
+        Integer productCount = shopMapper.getProductCount(authUserId, infoId);
+        if (null != productCount && productCount > 0) {
+            // 设置手动回滚事务
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            return ResponseJson.error("对不起,该品牌已绑定设备认证,暂时无法删除");
+        } else {
+            // 删除品牌
+            shopMapper.deleteShopInfoById(infoId);
+        }
+        return ResponseJson.success("删除成功");
+    }
+
 }
 }

+ 9 - 8
src/main/resources/mapper/AuthMapper.xml

@@ -123,11 +123,12 @@
         left join cm_brand_auth_user au on a.auditBy = au.authUserId
         left join cm_brand_auth_user au on a.auditBy = au.authUserId
         left join cm_brand_auth_user au1 on a.shopAuditBy = au1.authUserId
         left join cm_brand_auth_user au1 on a.shopAuditBy = au1.authUserId
         left join cm_brand_club_user cbcu2 on a.id = cbcu2.authId and cbcu2.delFlag = 0
         left join cm_brand_club_user cbcu2 on a.id = cbcu2.authId and cbcu2.delFlag = 0
-        left join (select authId,count(*) as waitAuditNum from cm_brand_auth_product where auditStatus = 2 and
-        shopAuditStatus = 1 group by
-        authId) ap on a.id = ap.authId
-        left join (select authId,count(*) as waitAuditNum from cm_brand_auth_product where shopAuditStatus = 2 group by
-        authId) bp on a.id = bp.authId
+        left join (select r.authId,count(*) as waitAuditNum from cm_brand_auth_product p
+            left join cm_brand_product_relation r on p.id = r.productId
+            where auditStatus = 2 and shopAuditStatus = 1 group by r.authId) ap on a.id = ap.authId
+        left join (select r.authId,count(*) as waitAuditNum from cm_brand_auth_product p
+            left join cm_brand_product_relation r on p.id = r.productId
+            where shopAuditStatus = 2 group by r.authId) bp on a.id = bp.authId
         where a.authUserId = #{authUserId} and a.delFlag = 0
         where a.authUserId = #{authUserId} and a.delFlag = 0
         <if test="authParty != null and authParty != ''">
         <if test="authParty != null and authParty != ''">
             and a.authParty like CONCAT('%',#{authParty},'%')
             and a.authParty like CONCAT('%',#{authParty},'%')
@@ -185,9 +186,9 @@
     </select>
     </select>
     <select id="getProductWaitAuditNum" resultType="java.lang.Integer">
     <select id="getProductWaitAuditNum" resultType="java.lang.Integer">
         select count(*)
         select count(*)
-        from cm_brand_auth_product
-        where authId = #{authId}
-          and auditStatus = 2
+        from cm_brand_auth_product p left join cm_brand_product_relation r on p.id = r.productId
+        where r.authId = #{authId}
+          and p.auditStatus = 2
     </select>
     </select>
     <select id="getClubStatus" resultType="java.lang.Integer">
     <select id="getClubStatus" resultType="java.lang.Integer">
         select status
         select status

+ 36 - 45
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">
 <!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">
 <mapper namespace="com.caimei.mapper.cmMapper.AuthProductMapper">
     <insert id="insertProduct" keyColumn="id" keyProperty="productId" useGeneratedKeys="true" parameterType="com.caimei.model.po.ProductPo">
     <insert id="insertProduct" keyColumn="id" keyProperty="productId" useGeneratedKeys="true" parameterType="com.caimei.model.po.ProductPo">
-        insert into cm_brand_auth_product(`brandId`, `productTypeId`, `snCode`, name, image,
+        insert into cm_brand_auth_product(`infoId`, `productTypeId`, `snCode`, name, image,
                                           `certificateImage`, `pcCertificateImage`,
                                           `certificateImage`, `pcCertificateImage`,
                                           `appletsCertificateImage`,
                                           `appletsCertificateImage`,
                                           purchaseWay, invoiceImage, `status`, auditBy, auditTime,
                                           purchaseWay, invoiceImage, `status`, auditBy, auditTime,
                                           `auditStatus`, shopAuditStatus, checkFlag, `createTime`, `createBy`,
                                           `auditStatus`, shopAuditStatus, checkFlag, `createTime`, `createBy`,
                                           createSource)
                                           createSource)
-        values (#{brandId}, #{productTypeId}, #{snCode}, #{name}, #{image},
+        values (#{infoId}, #{productTypeId}, #{snCode}, #{name}, #{image},
                 #{certificateImage}, #{pcCertificateImage},
                 #{certificateImage}, #{pcCertificateImage},
                 #{appletsCertificateImage},
                 #{appletsCertificateImage},
                 #{purchaseWay}, #{invoiceImage}, #{status}, #{auditBy}, #{auditTime},
                 #{purchaseWay}, #{invoiceImage}, #{status}, #{auditBy}, #{auditTime},
@@ -19,8 +19,8 @@
         values (#{productId}, #{paramName}, #{paramContent})
         values (#{productId}, #{paramName}, #{paramContent})
     </insert>
     </insert>
     <insert id="insertProductType" keyColumn="id" keyProperty="productTypeId" useGeneratedKeys="true" parameterType="com.caimei.model.po.ProductTypePo">
     <insert id="insertProductType" keyColumn="id" keyProperty="productTypeId" useGeneratedKeys="true" parameterType="com.caimei.model.po.ProductTypePo">
-        insert into cm_brand_product_type (authUserId, brandId, name, image, pcImage, appletsImage, status, auditStatus, auditBy, auditTime, createBy, createSource, createTime, delFlag)
-        values (#{authUserId}, #{brandId}, #{name}, #{image}, #{pcImage}, #{appletsImage}, #{status}, #{auditStatus}, #{auditBy}, #{auditTime}, #{createBy}, #{createSource}, #{createTime}, 0)
+        insert into cm_brand_product_type (authUserId, infoId, name, image, pcImage, appletsImage, status, auditStatus, auditBy, auditTime, createBy, createSource, createTime, delFlag)
+        values (#{authUserId}, #{infoId}, #{name}, #{image}, #{pcImage}, #{appletsImage}, #{status}, #{auditStatus}, #{auditBy}, #{auditTime}, #{createBy}, #{createSource}, #{createTime}, 0)
     </insert>
     </insert>
     <insert id="insertProductTypeParam">
     <insert id="insertProductTypeParam">
         insert into cm_brand_product_type_param (productTypeId, name, content)
         insert into cm_brand_product_type_param (productTypeId, name, content)
@@ -39,7 +39,7 @@
     <update id="updateProductByProductId">
     <update id="updateProductByProductId">
         update cm_brand_auth_product
         update cm_brand_auth_product
         set
         set
-            `brandId`          = #{brandId},
+            `infoId`           = #{infoId},
             `productTypeId`    = #{productTypeId},
             `productTypeId`    = #{productTypeId},
             `snCode`           = #{snCode},
             `snCode`           = #{snCode},
             `certificateImage` = #{certificateImage},
             `certificateImage` = #{certificateImage},
@@ -97,17 +97,17 @@
     </update>
     </update>
     <update id="updateProductType">
     <update id="updateProductType">
         update cm_brand_product_type
         update cm_brand_product_type
-        set name  = #{name},
-            brandId = #{brandId},
-            <if test="pcImage != null and pcImage != ''">
-                pcImage = #{pcImage},
-            </if>
-            <if test="appletsImage != null and appletsImage != ''">
-                appletsImage = #{appletsImage},
-            </if>
-            image = #{image},
-            status = #{status},
-            auditStatus = #{auditStatus}
+        set name = #{name},
+        infoId = #{infoId},
+        <if test="pcImage != null and pcImage != ''">
+            pcImage = #{pcImage},
+        </if>
+        <if test="appletsImage != null and appletsImage != ''">
+            appletsImage = #{appletsImage},
+        </if>
+        image = #{image},
+        status = #{status},
+        auditStatus = #{auditStatus}
         where id = #{productTypeId}
         where id = #{productTypeId}
     </update>
     </update>
     <update id="updateProductTypeStatus">
     <update id="updateProductTypeStatus">
@@ -216,7 +216,7 @@
     <select id="getProductFormData" resultType="com.caimei.model.vo.ProductFormVo">
     <select id="getProductFormData" resultType="com.caimei.model.vo.ProductFormVo">
         select p.`id`                                                      as productId,
         select p.`id`                                                      as productId,
                r.authId,
                r.authId,
-               if(p.productTypeId is null, cb1.name, cb2.name)             as brandName,
+               if(p.productTypeId is null, i1.brandName, i2.brandName)     as brandName,
                p.productTypeId,
                p.productTypeId,
                if(p.productTypeId is null, p.name, t.name)                 as productName,
                if(p.productTypeId is null, p.name, t.name)                 as productName,
                `snCode`,
                `snCode`,
@@ -229,13 +229,13 @@
                p.auditStatus,
                p.auditStatus,
                p.createTime,
                p.createTime,
                if(shopAuditStatus = 0, shopInvalidReason, p.invalidReason) as invalidReason,
                if(shopAuditStatus = 0, shopInvalidReason, p.invalidReason) as invalidReason,
-               r.id as relationId,
+               r.id                                                        as relationId,
                r.authType
                r.authType
         from cm_brand_auth_product p
         from cm_brand_auth_product p
                  left join cm_brand_product_relation r on p.id = r.productId
                  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
                  left join cm_brand_product_type t on p.productTypeId = t.id and t.delFlag = 0
-                 left join cm_brand cb1 on p.brandId = cb1.id
-                 left join cm_brand cb2 on t.brandId = cb2.id
+                 left join cm_brand_auth_shop_info i1 on p.infoId = i1.id
+                 left join cm_brand_auth_shop_info i2 on t.infoId = i2.id
         where r.id = #{relationId}
         where r.id = #{relationId}
     </select>
     </select>
     <select id="getParamsByProductId" resultType="com.caimei.model.po.ProductParamPo">
     <select id="getParamsByProductId" resultType="com.caimei.model.po.ProductParamPo">
@@ -295,21 +295,19 @@
         </where>
         </where>
         order by p.createTime desc
         order by p.createTime desc
     </select>
     </select>
-    <select id="getBrandIdByBrandName" resultType="java.lang.Integer">
-        select id from cm_brand where name = #{brand}
-    </select>
     <select id="getAuthProductList" resultType="com.caimei.model.vo.ProductFormVo">
     <select id="getAuthProductList" resultType="com.caimei.model.vo.ProductFormVo">
-        select p.id                                          as productId,
+        select p.id                                                    as productId,
                p.purchaseWay,
                p.purchaseWay,
-               if(p.productTypeId is null, p.name, t.name)   as productName,
+               if(p.productTypeId is null, p.name, t.name)             as productName,
                snCode,
                snCode,
-               cb.name                                       as brandName,
-               if(p.productTypeId is null, p.image, t.image) as productImage,
+               if(p.productTypeId is null, i1.brandName, i2.brandName) as brandName,
+               if(p.productTypeId is null, p.image, t.image)           as productImage,
                certificateImage
                certificateImage
         from cm_brand_auth_product p
         from cm_brand_auth_product p
                  left join cm_brand_product_relation r on p.id = r.productId
                  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
                  left join cm_brand_product_type t on p.productTypeId = t.id and t.delFlag = 0
-                 left join cm_brand cb on p.brandId = cb.id
+                 left join cm_brand_auth_shop_info i1 on p.infoId = i1.id
+                 left join cm_brand_auth_shop_info i2 on t.infoId = i2.id
         where r.authId = #{authId}
         where r.authId = #{authId}
         order by p.createTime desc
         order by p.createTime desc
     </select>
     </select>
@@ -320,24 +318,24 @@
                t.image            as appletsImage,
                t.image            as appletsImage,
                p.certificateImage as pcCertificateImage,
                p.certificateImage as pcCertificateImage,
                p.certificateImage as appletsCertificateImage,
                p.certificateImage as appletsCertificateImage,
-               p.brandId,
-               i.brandLogo        as authLogo,
+               i.id               as infoId,
+               i.brandLogo        as brandLogo,
                i.brandName        as brandName,
                i.brandName        as brandName,
-               i.producePlace     as productionPlace,
+               i.producePlace     as producePlace,
+               i.manufacturer     as manufacturer,
                a.id               as authId,
                a.id               as authId,
                a.authParty,
                a.authParty,
                a.logo             as clubLogo,
                a.logo             as clubLogo,
                u.authUserId       as authUserId,
                u.authUserId       as authUserId,
                u.name             as shopName,
                u.name             as shopName,
                u.shopType,
                u.shopType,
-               u.qrCodeImage,
-               i.manufacturer
+               u.qrCodeImage
         from cm_brand_auth_product p
         from cm_brand_auth_product p
                  left join cm_brand_product_relation r on p.id = r.productId
                  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
                  left join cm_brand_product_type t on p.productTypeId = t.id and t.delFlag = 0
                  left join cm_brand_auth a on r.authId = a.id
                  left join cm_brand_auth a on r.authId = a.id
                  left join cm_brand_auth_user u on a.authUserId = u.authUserId
                  left join cm_brand_auth_user u on a.authUserId = u.authUserId
-                 left join cm_brand_auth_shop_info i on p.brandId = i.id
+                 left join cm_brand_auth_shop_info i on t.infoId = i.id
         where p.id = #{productId}
         where p.id = #{productId}
           and u.status = 1
           and u.status = 1
           and a.status = 1
           and a.status = 1
@@ -347,13 +345,6 @@
           and t.status = 1
           and t.status = 1
           and t.auditStatus = 1
           and t.auditStatus = 1
     </select>
     </select>
-    <select id="getStatementFile" resultType="com.caimei.model.vo.StatementFileVo">
-        select name,ossName,md5Hex,uploadTime
-        from cm_brand_auth_file
-        where authUserId = #{authUserId}
-          and brandId = #{brandId}
-        limit 1
-    </select>
     <select id="getAuthProductParams" resultType="com.caimei.model.po.ProductParamPo">
     <select id="getAuthProductParams" resultType="com.caimei.model.po.ProductParamPo">
         select p.name as paramName, p.content as paramContent
         select p.name as paramName, p.content as paramContent
         from cm_brand_product_type_param p left join cm_brand_auth_product ap on p.productTypeId = ap.productTypeId
         from cm_brand_product_type_param p left join cm_brand_auth_product ap on p.productTypeId = ap.productTypeId
@@ -407,8 +398,8 @@
         order by t.id desc
         order by t.id desc
     </select>
     </select>
     <select id="getProductType" resultType="com.caimei.model.po.ProductTypePo">
     <select id="getProductType" resultType="com.caimei.model.po.ProductTypePo">
-        select t.id as productTypeId, brandId, b.name as brandName, t.name, image, pcImage, appletsImage, authUserId, createBy
-        from cm_brand_product_type t left join cm_brand b on t.brandId = b.id
+        select t.id as productTypeId, infoId, i.brandName, t.name, image, pcImage, appletsImage, t.authUserId, createBy
+        from cm_brand_product_type t left join cm_brand_auth_shop_info i on t.infoId = i.id
         <where>
         <where>
             <if test="productTypeId != null">
             <if test="productTypeId != null">
                 and t.id = #{productTypeId}
                 and t.id = #{productTypeId}
@@ -417,7 +408,7 @@
                 and t.name = #{productName}
                 and t.name = #{productName}
             </if>
             </if>
             <if test="authUserId != null">
             <if test="authUserId != null">
-                and authUserId = #{authUserId}
+                and t.authUserId = #{authUserId}
             </if>
             </if>
         </where>
         </where>
         limit 1
         limit 1
@@ -426,7 +417,7 @@
         select count(*) from cm_brand_auth_product where productTypeId = #{productTypeId}
         select count(*) from cm_brand_auth_product where productTypeId = #{productTypeId}
     </select>
     </select>
     <select id="getProductPo" resultType="com.caimei.model.po.ProductPo">
     <select id="getProductPo" resultType="com.caimei.model.po.ProductPo">
-        select id as productId, brandId, productTypeId, name, image, createBy
+        select id as productId, infoId, productTypeId, name, image, createBy
         from cm_brand_auth_product
         from cm_brand_auth_product
         where id = #{productId}
         where id = #{productId}
     </select>
     </select>

+ 3 - 3
src/main/resources/mapper/ClubMapper.xml

@@ -82,9 +82,9 @@
         left join province p on a.provinceId = p.provinceID
         left join province p on a.provinceId = p.provinceID
         left join city c on a.cityId = c.cityID
         left join city c on a.cityId = c.cityID
         left join town t on a.townId = t.townID
         left join town t on a.townId = t.townID
-        left join (select cbap.authId as authId, count(*) as productCount
-        from cm_brand_auth_product cbap where cbap.status = 1
-        group by cbap.authId) pc on a.id = pc.authId
+        left join (select r.authId as authId, count(*) as productCount
+        from cm_brand_auth_product p left join cm_brand_product_relation r on p.id = r.productId
+        where p.status = 1 group by r.authId) pc on a.id = pc.authId
         where au.authUserId = #{authUserId}
         where au.authUserId = #{authUserId}
         and a.status = 1
         and a.status = 1
         and a.auditStatus = 1
         and a.auditStatus = 1

+ 11 - 8
src/main/resources/mapper/FileMapper.xml

@@ -129,21 +129,24 @@
         order by createTime desc
         order by createTime desc
     </select>
     </select>
     <select id="getAuthImageData" resultType="com.caimei.model.po.ProductImagePo">
     <select id="getAuthImageData" resultType="com.caimei.model.po.ProductImagePo">
-        SELECT certificateImage as authImage,a.authParty,p.snCode
+        SELECT certificateImage as authImage, a.authParty, p.snCode
         FROM cm_brand_auth_product p
         FROM cm_brand_auth_product p
-                 left join cm_brand_auth a on p.authId = a.id
-                 left join cm_brand_auth_user u on a.authUserId = u.authUserId where u.authUserId = 4;
+                 left join cm_brand_product_relation r on p.id = r.productId
+                 left join cm_brand_auth a on r.authId = a.id
+                 left join cm_brand_auth_user u on a.authUserId = u.authUserId
+        where u.authUserId = 4;
     </select>
     </select>
     <select id="getProductImageList" resultType="com.caimei.model.po.ProductImagePo">
     <select id="getProductImageList" resultType="com.caimei.model.po.ProductImagePo">
         SELECT p.id as productId, certificateImage, a.authParty, p.snCode,
         SELECT p.id as productId, certificateImage, a.authParty, p.snCode,
-               if(p.productTypeId is null,p.name,t.name) as productName
+        if(p.productTypeId is null,p.name,t.name) as productName
         FROM cm_brand_auth_product p
         FROM cm_brand_auth_product p
-                 left join cm_brand_auth a on p.authId = a.id
-                 left join cm_brand_auth_user u on a.authUserId = u.authUserId
-                 left join cm_brand_product_type t on p.productTypeId = t.id
+        left join cm_brand_product_relation r on p.id = r.productId
+        left join cm_brand_auth a on r.authId = a.id
+        left join cm_brand_auth_user u on a.authUserId = u.authUserId
+        left join cm_brand_product_type t on p.productTypeId = t.id
         where a.delFlag = 0
         where a.delFlag = 0
         <if test="authId != null">
         <if test="authId != null">
-            and p.authId = #{authId}
+            and a.id = #{authId}
         </if>
         </if>
     </select>
     </select>
     <select id="getAuthImageList" resultType="com.caimei.model.vo.AuthVo">
     <select id="getAuthImageList" resultType="com.caimei.model.vo.AuthVo">

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

@@ -6,7 +6,7 @@
         set mobile   = #{mobile},
         set mobile   = #{mobile},
             openId   = #{openId},
             openId   = #{openId},
             nickName = #{nickName},
             nickName = #{nickName},
-            bindTime = NOW()
+            addTime  = NOW()
         where mobile = #{mobile};
         where mobile = #{mobile};
     </update>
     </update>
 
 

+ 17 - 67
src/main/resources/mapper/ShopMapper.xml

@@ -1,10 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <?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">
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.caimei.mapper.cmMapper.ShopMapper">
 <mapper namespace="com.caimei.mapper.cmMapper.ShopMapper">
-    <insert id="insertStatementFile" keyColumn="id" keyProperty="id" useGeneratedKeys="true" parameterType="com.caimei.model.po.CmBrandAuthFilePo">
-        insert into cm_brand_auth_file (`authUserId`, `brandId`, `name`, `ossName`, `md5Hex`, `uploadTime`)
-        values (#{authUserId}, #{brandId}, #{name}, #{ossName}, #{md5Hex}, #{uploadTime})
-    </insert>
     <insert id="insertShop"  keyColumn="authUserId" keyProperty="authUserId" useGeneratedKeys="true" parameterType="com.caimei.model.po.UserPo">
     <insert id="insertShop"  keyColumn="authUserId" keyProperty="authUserId" useGeneratedKeys="true" parameterType="com.caimei.model.po.UserPo">
         insert into cm_brand_auth_user (`name`, cmShopId, `mobile`, `password`, `linkMan`, `userIdentity`, `shopType`, `logo`, `qrCodeImage`, `wxAccountType`, `appId`, `appSecret`, `createTime`,
         insert into cm_brand_auth_user (`name`, cmShopId, `mobile`, `password`, `linkMan`, `userIdentity`, `shopType`, `logo`, `qrCodeImage`, `wxAccountType`, `appId`, `appSecret`, `createTime`,
                                         `createBy`,`status`)
                                         `createBy`,`status`)
@@ -19,16 +15,6 @@
         set status = #{status}
         set status = #{status}
         where authUserId = #{authUserId};
         where authUserId = #{authUserId};
     </update>
     </update>
-    <update id="updateBrandAuthLogo">
-        update cm_brand
-        set authLogo = #{brandAuthLogo}
-        where id = #{brandId}
-    </update>
-    <update id="updateFileUserId">
-        update cm_brand_auth_file
-        set authUserId =#{authUserId}
-        where id = #{statementFileId};
-    </update>
     <update id="updateShopByUserId">
     <update id="updateShopByUserId">
         update cm_brand_auth_user
         update cm_brand_auth_user
         set cmShopId        = #{cmShopId},
         set cmShopId        = #{cmShopId},
@@ -79,14 +65,11 @@
         set logo = #{logo}
         set logo = #{logo}
         where authUserId = #{authUserId}
         where authUserId = #{authUserId}
     </update>
     </update>
-    <delete id="deleteStatementFile">
-        delete from cm_brand_auth_file where id = #{id}
-    </delete>
     <delete id="deleteShopInfoById">
     <delete id="deleteShopInfoById">
         delete from cm_brand_auth_shop_info where id = #{infoId}
         delete from cm_brand_auth_shop_info where id = #{infoId}
     </delete>
     </delete>
     <select id="getShopList" resultType="com.caimei.model.vo.ShopListVo">
     <select id="getShopList" resultType="com.caimei.model.vo.ShopListVo">
-        select u.authUserId,u.name,u.loginAccount,u.shopType,group_concat(cb.name) as brandName,group_concat(cb.id) as brandId,
+        select u.authUserId,u.name,u.loginAccount,u.shopType,group_concat(s.brandName) as brandName,group_concat(s.id) as infoId,
         u.mobile,u.linkMan,u.status as shopStatus,u.createTime,
         u.mobile,u.linkMan,u.status as shopStatus,u.createTime,
         (select au.name from cm_brand_auth_user au where au.authUserId = u.createBy) as createBy,
         (select au.name from cm_brand_auth_user au where au.authUserId = u.createBy) as createBy,
         (ifnull(aw.authWaitNum,0)+ifnull(pw.productWaitNum,0)) as waitAuditNum,
         (ifnull(aw.authWaitNum,0)+ifnull(pw.productWaitNum,0)) as waitAuditNum,
@@ -99,9 +82,8 @@
         ifnull(tw.productTypeWaitNum,0) as productTypeWaitNum
         ifnull(tw.productTypeWaitNum,0) as productTypeWaitNum
         from cm_brand_auth_user u
         from cm_brand_auth_user u
         left join cm_brand_auth_shop_info s on u.authUserId = s.authUserId
         left join cm_brand_auth_shop_info s on u.authUserId = s.authUserId
-        left join cm_brand cb on cb.id = s.brandId
         left join (select authUserId, count(*) as authWaitNum from cm_brand_auth where auditStatus = 2 and shopAuditStatus = 1 group by authUserId) aw on u.authUserId = aw.authUserId
         left join (select authUserId, count(*) as authWaitNum from cm_brand_auth where auditStatus = 2 and shopAuditStatus = 1 group by authUserId) aw on u.authUserId = aw.authUserId
-        left join (select a.authUserId, count(*) as productWaitNum from cm_brand_auth_product p left join cm_brand_auth a on p.authId = a.id
+        left join (select a.authUserId, count(*) as productWaitNum from cm_brand_auth_product p left join cm_brand_product_relation r on p.id = r.productId left join cm_brand_auth a on a.id = r.authId
         where p.auditStatus = 2 and p.shopAuditStatus = 1 group by a.authUserId) pw on u.authUserId = pw.authUserId
         where p.auditStatus = 2 and p.shopAuditStatus = 1 group by a.authUserId) pw on u.authUserId = pw.authUserId
         left join (select authUserId, count(*) as articleWaitNum from cm_brand_article where auditStatus = 2 group by authUserId) arw on u.authUserId = arw.authUserId
         left join (select authUserId, count(*) as articleWaitNum from cm_brand_article where auditStatus = 2 group by authUserId) arw on u.authUserId = arw.authUserId
         left join (select authUserId, count(*) as imageWaitNum from cm_brand_image where auditStatus = 2 group by authUserId) iw on u.authUserId = iw.authUserId
         left join (select authUserId, count(*) as imageWaitNum from cm_brand_image where auditStatus = 2 group by authUserId) iw on u.authUserId = iw.authUserId
@@ -124,8 +106,8 @@
         <if test="shopType != null ">
         <if test="shopType != null ">
             AND u.shopType = #{shopType}
             AND u.shopType = #{shopType}
         </if>
         </if>
-        <if test="brandId != null">
-            AND s.brandId = #{brandId}
+        <if test="infoId != null">
+            AND s.id = #{infoId}
         </if>
         </if>
         <if test="mobile != null and mobile !=''">
         <if test="mobile != null and mobile !=''">
             AND u.mobile like CONCAT('%',#{mobile},'%')
             AND u.mobile like CONCAT('%',#{mobile},'%')
@@ -193,25 +175,6 @@
     <select id="getShopMobileByUserId" resultType="java.lang.String">
     <select id="getShopMobileByUserId" resultType="java.lang.String">
         select mobile from cm_brand_auth_user where authUserId = #{authUserId}
         select mobile from cm_brand_auth_user where authUserId = #{authUserId}
     </select>
     </select>
-    <select id="getStatementFile" resultType="com.caimei.model.po.CmBrandAuthFilePo">
-        select id, authUserId, name, ossName, md5Hex, uploadTime
-        from cm_brand_auth_file
-        <where>
-            <if test="id != null">
-                and id = #{id}
-            </if>
-            <if test="authUserId != null">
-                and authUserId = #{authUserId}
-            </if>
-            <if test="brandId != null">
-                and brandId = #{brandId}
-            </if>
-            <if test="md5Hex != null and md5Hex != ''">
-                and md5Hex = #{md5Hex}
-            </if>
-        </where>
-        limit 1
-    </select>
     <select id="getFileNumByMd5Hex" resultType="java.lang.Integer">
     <select id="getFileNumByMd5Hex" resultType="java.lang.Integer">
         select count(*) from cm_brand_auth_file where md5Hex = #{md5Hex}
         select count(*) from cm_brand_auth_file where md5Hex = #{md5Hex}
     </select>
     </select>
@@ -223,21 +186,9 @@
                  left join auth_vip_user avu on u.authUserId = avu.authUserId
                  left join auth_vip_user avu on u.authUserId = avu.authUserId
         where u.authUserId = #{authUserId};
         where u.authUserId = #{authUserId};
     </select>
     </select>
-    <select id="getBrandList" resultType="com.caimei.model.vo.BrandVo">
-        select id,name,authLogo from cm_brand
-        <where>
-            <if test="type == 1">
-                id not in (select brandId
-                from cm_brand_auth_shop_info i
-                left join cm_brand_auth_user u on i.authUserId= u.authUserId
-                where u.shopType = 1 and i.brandId is not null);
-            </if>
-            <if test="type == 3">
-                id in (select brandId
-                from cm_brand_auth_shop_info
-                where authUserId = #{authUserId})
-            </if>
-        </where>
+    <select id="getShopInfoList" resultType="com.caimei.model.vo.ShopInfoVo">
+        select id as infoId,brandName,brandLogo from cm_brand_auth_shop_info
+        where authUserId = #{authUserId}
     </select>
     </select>
     <select id="getCountryList" resultType="com.caimei.model.vo.CountryVo">
     <select id="getCountryList" resultType="com.caimei.model.vo.CountryVo">
         select countryId, name as countryName
         select countryId, name as countryName
@@ -247,8 +198,8 @@
     <select id="getUserIdByMobile" resultType="java.lang.Integer">
     <select id="getUserIdByMobile" resultType="java.lang.Integer">
         select authUserId from cm_brand_auth_user where mobile = #{mobile} and userIdentity = 2 limit 1
         select authUserId from cm_brand_auth_user where mobile = #{mobile} and userIdentity = 2 limit 1
     </select>
     </select>
-    <select id="getDbInfoBrandList" resultType="com.caimei.model.vo.ShopBrandVo">
-        select id, brandName
+    <select id="getDbInfoList" resultType="com.caimei.model.vo.ShopInfoVo">
+        select id as infoId, brandName
         from cm_brand_auth_shop_info
         from cm_brand_auth_shop_info
         where authUserId = #{authUserId}
         where authUserId = #{authUserId}
     </select>
     </select>
@@ -269,15 +220,17 @@
     <select id="getProductWaitAuditNum" resultType="java.lang.Integer">
     <select id="getProductWaitAuditNum" resultType="java.lang.Integer">
         select count(*)
         select count(*)
         from cm_brand_auth_product p
         from cm_brand_auth_product p
-                 left join cm_brand_auth a on p.authId = a.id
+                 left join cm_brand_product_relation r on p.id = r.productId
+                 left join cm_brand_auth a on r.authId = a.id
         where a.authUserId = #{authUserId}
         where a.authUserId = #{authUserId}
           and p.auditStatus = 2
           and p.auditStatus = 2
     </select>
     </select>
     <select id="getProductCount" resultType="java.lang.Integer">
     <select id="getProductCount" resultType="java.lang.Integer">
         select count(*)
         select count(*)
-        from cm_brand_auth a
-                 left join cm_brand_auth_product p on p.authId = a.id
-        where a.authUserId = #{authUserId} and p.brandId = #{brandId}
+        from cm_brand_auth_product p
+                 left join cm_brand_product_relation r on p.id = r.productId
+                 left join cm_brand_auth a on r.authId = a.id
+        where a.authUserId = #{authUserId} and p.infoId = #{infoId}
     </select>
     </select>
     <select id="getFeedbackList" resultType="com.caimei.model.vo.FeedbackVo">
     <select id="getFeedbackList" resultType="com.caimei.model.vo.FeedbackVo">
         select cf.id as feedbackId, a.authParty as clubName, cu.mobile, content, commitTime, handleStatus, handleResult,
         select cf.id as feedbackId, a.authParty as clubName, cu.mobile, content, commitTime, handleStatus, handleResult,
@@ -322,16 +275,13 @@
         select name from cm_brand_auth_user where appId = #{appId} and status = 1
         select name from cm_brand_auth_user where appId = #{appId} and status = 1
     </select>
     </select>
     <select id="getShopBrands" resultType="java.lang.String">
     <select id="getShopBrands" resultType="java.lang.String">
-        select b.name
+        select i.brandName
         from cm_brand_auth_shop_info i
         from cm_brand_auth_shop_info i
-                 left join cm_brand b on i.brandId = b.id
         where i.authUserId = #{authUserId}
         where i.authUserId = #{authUserId}
     </select>
     </select>
     <select id="getWxShopInfo" resultType="com.caimei.model.vo.WxShopVo">
     <select id="getWxShopInfo" resultType="com.caimei.model.vo.WxShopVo">
-        select au.authUserId, au.appId, au.name as shopName, if(au.shopType = 1, cb.authLogo, au.logo) as logo
+        select au.authUserId, au.appId, au.name as shopName, au.logo as logo
         from cm_brand_auth_user au
         from cm_brand_auth_user au
-                 left join cm_brand_auth_shop_info si on au.authUserId = si.authUserId
-                 left join cm_brand cb on si.brandId = cb.id
         where au.authUserId = #{authUserId}
         where au.authUserId = #{authUserId}
         and au.status = 1
         and au.status = 1
         limit 1
         limit 1

+ 0 - 3
src/main/resources/mapper/SystemMapper.xml

@@ -355,9 +355,6 @@
     <delete id="deleteMenuRoleRelation">
     <delete id="deleteMenuRoleRelation">
         delete from auth_role_menu where menu_id = #{menuId}
         delete from auth_role_menu where menu_id = #{menuId}
     </delete>
     </delete>
-    <delete id="deleteVipRelation">
-        delete
-    </delete>
     <insert id="insertPermission" keyProperty="id" keyColumn="id" useGeneratedKeys="true">
     <insert id="insertPermission" keyProperty="id" keyColumn="id" useGeneratedKeys="true">
         INSERT INTO auth_permission(title, name, menu_id)
         INSERT INTO auth_permission(title, name, menu_id)
         VALUES (#{title}, #{name}, #{menuId})
         VALUES (#{title}, #{name}, #{menuId})

+ 2 - 6
src/main/resources/mapper/UserMapper.xml

@@ -22,10 +22,8 @@
                u.status as shopStatus,
                u.status as shopStatus,
                shopType,
                shopType,
                u.mobile,
                u.mobile,
-               if(u.shopType = 1, b.id, null) as brandId
+               null as infoId
         from cm_brand_auth_user u
         from cm_brand_auth_user u
-                 left join cm_brand_auth_shop_info i on u.authUserId = i.authUserId
-                 left join cm_brand b on i.brandId = b.id
         where mobile = #{mobile} and u.status = 1
         where mobile = #{mobile} and u.status = 1
         limit 1;
         limit 1;
     </select>
     </select>
@@ -43,10 +41,8 @@
                u.status as shopStatus,
                u.status as shopStatus,
                shopType,
                shopType,
                u.mobile,
                u.mobile,
-               if(u.shopType = 1, b.id, null) as brandId
+               null as infoId
         from cm_brand_auth_user u
         from cm_brand_auth_user u
-                 left join cm_brand_auth_shop_info i on u.authUserId = i.authUserId
-                 left join cm_brand b on i.brandId = b.id
         where loginAccount = #{account} and u.status = 1
         where loginAccount = #{account} and u.status = 1
         limit 1;
         limit 1;
     </select>
     </select>