Browse Source

1.7.1-事后审核逻辑更新

Aslee 2 years ago
parent
commit
1e48e77b7e
45 changed files with 435 additions and 96 deletions
  1. 11 4
      src/main/java/com/caimei/controller/admin/auth/AuthApi.java
  2. 7 0
      src/main/java/com/caimei/controller/admin/auth/AuthProductApi.java
  3. 7 0
      src/main/java/com/caimei/controller/admin/auth/DoctorApi.java
  4. 7 0
      src/main/java/com/caimei/controller/admin/data/ArticleApi.java
  5. 7 0
      src/main/java/com/caimei/controller/admin/data/FileApi.java
  6. 7 0
      src/main/java/com/caimei/controller/admin/data/ImageApi.java
  7. 7 0
      src/main/java/com/caimei/controller/admin/data/VideoApi.java
  8. 2 0
      src/main/java/com/caimei/mapper/cmMapper/ArticleMapper.java
  9. 2 0
      src/main/java/com/caimei/mapper/cmMapper/AuthMapper.java
  10. 2 0
      src/main/java/com/caimei/mapper/cmMapper/AuthProductMapper.java
  11. 2 0
      src/main/java/com/caimei/mapper/cmMapper/DoctorMapper.java
  12. 5 4
      src/main/java/com/caimei/mapper/cmMapper/FileMapper.java
  13. 2 0
      src/main/java/com/caimei/mapper/cmMapper/ImageMapper.java
  14. 4 0
      src/main/java/com/caimei/mapper/cmMapper/VideoMapper.java
  15. 5 0
      src/main/java/com/caimei/model/po/ArticlePo.java
  16. 5 0
      src/main/java/com/caimei/model/po/CmBrandAuthPo.java
  17. 16 0
      src/main/java/com/caimei/model/po/CmBrandDoctorPo.java
  18. 5 0
      src/main/java/com/caimei/model/po/FilePo.java
  19. 5 0
      src/main/java/com/caimei/model/po/ImagePo.java
  20. 5 0
      src/main/java/com/caimei/model/po/ProductPo.java
  21. 5 0
      src/main/java/com/caimei/model/po/VideoPo.java
  22. 3 0
      src/main/java/com/caimei/model/vo/ArticleFormVo.java
  23. 5 0
      src/main/java/com/caimei/model/vo/AuthVo.java
  24. 5 0
      src/main/java/com/caimei/model/vo/ImageFormVo.java
  25. 7 0
      src/main/java/com/caimei/service/auth/ArticleService.java
  26. 6 0
      src/main/java/com/caimei/service/auth/AuthProductService.java
  27. 7 0
      src/main/java/com/caimei/service/auth/AuthService.java
  28. 7 0
      src/main/java/com/caimei/service/auth/DoctorService.java
  29. 22 8
      src/main/java/com/caimei/service/auth/impl/ArticleServiceImpl.java
  30. 25 11
      src/main/java/com/caimei/service/auth/impl/AuthProductServiceImpl.java
  31. 21 10
      src/main/java/com/caimei/service/auth/impl/AuthServiceImpl.java
  32. 28 3
      src/main/java/com/caimei/service/auth/impl/DoctorServiceImpl.java
  33. 7 0
      src/main/java/com/caimei/service/data/FileService.java
  34. 7 0
      src/main/java/com/caimei/service/data/ImageService.java
  35. 7 0
      src/main/java/com/caimei/service/data/VideoService.java
  36. 29 12
      src/main/java/com/caimei/service/data/impl/FileServiceImpl.java
  37. 23 6
      src/main/java/com/caimei/service/data/impl/ImageServiceImpl.java
  38. 29 10
      src/main/java/com/caimei/service/data/impl/VideoServiceImpl.java
  39. 8 3
      src/main/resources/mapper/ArticleMapper.xml
  40. 19 11
      src/main/resources/mapper/AuthMapper.xml
  41. 6 2
      src/main/resources/mapper/AuthProductMapper.xml
  42. 10 4
      src/main/resources/mapper/DoctorMapper.xml
  43. 13 2
      src/main/resources/mapper/FileMapper.xml
  44. 10 4
      src/main/resources/mapper/ImageMapper.xml
  45. 13 2
      src/main/resources/mapper/VideoMapper.xml

+ 11 - 4
src/main/java/com/caimei/controller/admin/auth/AuthApi.java

@@ -79,7 +79,7 @@ public class AuthApi {
     @ApiOperation("更新授权状态")
     @ApiOperation("更新授权状态")
     @ApiImplicitParam(name = "params", value = "authId:授权id;status:授权状态:0停用 1启用;", required = true)
     @ApiImplicitParam(name = "params", value = "authId:授权id;status:授权状态:0停用 1启用;", required = true)
     @PostMapping("/update/status")
     @PostMapping("/update/status")
-    public ResponseJson updateAuthStatus(@RequestBody Map<String,Integer> params) {
+    public ResponseJson updateAuthStatus(@RequestBody Map<String, Integer> params) {
         Integer authId = params.get("authId");
         Integer authId = params.get("authId");
         Integer status = params.get("status");
         Integer status = params.get("status");
         return authService.updateAuthStatus(authId, status);
         return authService.updateAuthStatus(authId, status);
@@ -91,7 +91,7 @@ public class AuthApi {
     @ApiOperation("删除授权")
     @ApiOperation("删除授权")
     @ApiImplicitParam(name = "params", value = "authId:授权id", required = true)
     @ApiImplicitParam(name = "params", value = "authId:授权id", required = true)
     @PostMapping("/delete")
     @PostMapping("/delete")
-    public ResponseJson deleteAuth(@RequestBody Map<String,Integer> params) {
+    public ResponseJson deleteAuth(@RequestBody Map<String, Integer> params) {
         Integer authId = params.get("authId");
         Integer authId = params.get("authId");
         return authService.deleteAuth(authId);
         return authService.deleteAuth(authId);
     }
     }
@@ -114,7 +114,7 @@ public class AuthApi {
             "townId;address;lngAndLat;mobile;userMobile:对应机构用户手机号;" +
             "townId;address;lngAndLat;mobile;userMobile:对应机构用户手机号;" +
             "firstClubType:一级分类为医美=1,生美=2,项目公司=3,个人=4,其他=5;" +
             "firstClubType:一级分类为医美=1,生美=2,项目公司=3,个人=4,其他=5;" +
             "secondClubType:医美的二级分类为诊所=1、门诊=2、医院=3,其他=4。生美二级分类,美容院=5,养生馆=6,其他=7;" +
             "secondClubType:医美的二级分类为诊所=1、门诊=2、医院=3,其他=4。生美二级分类,美容院=5,养生馆=6,其他=7;" +
-            "medicalLicenseImage:医疗许可证图;empNum:员工人数;"+
+            "medicalLicenseImage:医疗许可证图;empNum:员工人数;" +
             "logo;customFlag:是否需要自定义属性:0否,1是;remarks:店铺备注;createBy:创建人id;source:1供应商保存,2机构保存", required = true)
             "logo;customFlag:是否需要自定义属性:0否,1是;remarks:店铺备注;createBy:创建人id;source:1供应商保存,2机构保存", required = true)
     @PostMapping("/save")
     @PostMapping("/save")
     public ResponseJson saveAuth(@RequestBody String params) {
     public ResponseJson saveAuth(@RequestBody String params) {
@@ -234,7 +234,14 @@ public class AuthApi {
     @ApiOperation("ldm门店图/备注导入")
     @ApiOperation("ldm门店图/备注导入")
     @ApiImplicitParam(name = "authUserId", required = true, value = "供应商用户id")
     @ApiImplicitParam(name = "authUserId", required = true, value = "供应商用户id")
     @GetMapping("/ldm/image/import")
     @GetMapping("/ldm/image/import")
-    public ResponseJson importLdmImage(Integer authUserId){
+    public ResponseJson importLdmImage(Integer authUserId) {
         return authService.importLdmImage(authUserId);
         return authService.importLdmImage(authUserId);
     }
     }
+
+    @ApiOperation("更改查看标记")
+    @ApiImplicitParam(name = "authId", required = true, value = "授权机构id")
+    @PostMapping("/check")
+    public ResponseJson checkAuth(Integer authId) {
+        return authService.checkAuth(authId);
+    }
 }
 }

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

@@ -250,4 +250,11 @@ public class AuthProductApi {
         }
         }
         return authProductService.auditProductType(productTypeId, auditStatus, invalidReason, auditBy);
         return authProductService.auditProductType(productTypeId, auditStatus, invalidReason, auditBy);
     }
     }
+
+    @ApiOperation("更改查看标记")
+    @ApiImplicitParam(name = "authId", required = true, value = "productId")
+    @PostMapping("/check")
+    public ResponseJson checkAuthProduct(Integer productId) {
+        return authProductService.checkAuthProduct(productId);
+    }
 }
 }

+ 7 - 0
src/main/java/com/caimei/controller/admin/auth/DoctorApi.java

@@ -141,4 +141,11 @@ public class DoctorApi {
         Integer auditBy = paramsMap.getInteger("auditBy");
         Integer auditBy = paramsMap.getInteger("auditBy");
         return doctorService.auditDoctor(doctorId, auditStatus, invalidReason, auditBy);
         return doctorService.auditDoctor(doctorId, auditStatus, invalidReason, auditBy);
     }
     }
+
+    @ApiOperation("更改查看标记")
+    @ApiImplicitParam(name = "doctorId", required = true, value = "doctorId")
+    @PostMapping("/check")
+    public ResponseJson checkDoctor(Integer doctorId) {
+        return doctorService.checkDoctor(doctorId);
+    }
 }
 }

+ 7 - 0
src/main/java/com/caimei/controller/admin/data/ArticleApi.java

@@ -97,4 +97,11 @@ public class ArticleApi {
         Integer auditBy = paramsMap.getInteger("auditBy");
         Integer auditBy = paramsMap.getInteger("auditBy");
         return articleService.auditArticle(articleId, auditStatus, invalidReason, auditBy);
         return articleService.auditArticle(articleId, auditStatus, invalidReason, auditBy);
     }
     }
+
+    @ApiOperation("更改查看标记")
+    @ApiImplicitParam(name = "articleId", required = true, value = "文章id")
+    @PostMapping("/check")
+    public ResponseJson checkArticle(Integer articleId) {
+        return articleService.checkArticle(articleId);
+    }
 }
 }

+ 7 - 0
src/main/java/com/caimei/controller/admin/data/FileApi.java

@@ -140,4 +140,11 @@ public class FileApi {
         Integer fileId = params.get("fileId");
         Integer fileId = params.get("fileId");
         return fileService.deleteCourseFile(fileId);
         return fileService.deleteCourseFile(fileId);
     }
     }
+
+    @ApiOperation("更改查看标记")
+    @ApiImplicitParam(name = "fileId", required = true, value = "文件id")
+    @PostMapping("/check")
+    public ResponseJson checkFile(Integer fileId) {
+        return fileService.checkFile(fileId);
+    }
 }
 }

+ 7 - 0
src/main/java/com/caimei/controller/admin/data/ImageApi.java

@@ -97,4 +97,11 @@ public class ImageApi {
         Integer auditBy = paramsMap.getInteger("auditBy");
         Integer auditBy = paramsMap.getInteger("auditBy");
         return imageService.auditImage(imageId, auditStatus, invalidReason, auditBy);
         return imageService.auditImage(imageId, auditStatus, invalidReason, auditBy);
     }
     }
+
+    @ApiOperation("更改查看标记")
+    @ApiImplicitParam(name = "imageId", required = true, value = "图片id")
+    @PostMapping("/check")
+    public ResponseJson checkImage(Integer imageId) {
+        return imageService.checkImage(imageId);
+    }
 }
 }

+ 7 - 0
src/main/java/com/caimei/controller/admin/data/VideoApi.java

@@ -90,4 +90,11 @@ public class VideoApi {
         Integer auditBy = paramsMap.getInteger("auditBy");
         Integer auditBy = paramsMap.getInteger("auditBy");
         return videoService.auditVideo(videoId, auditStatus, invalidReason, auditBy);
         return videoService.auditVideo(videoId, auditStatus, invalidReason, auditBy);
     }
     }
+
+    @ApiOperation("更改查看标记")
+    @ApiImplicitParam(name = "videoId", required = true, value = "视频id")
+    @PostMapping("/check")
+    public ResponseJson checkVideo(Integer videoId) {
+        return videoService.checkVideo(videoId);
+    }
 }
 }

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

@@ -34,4 +34,6 @@ public interface ArticleMapper {
     ArticleFormVo getArticleForm(Integer articleId);
     ArticleFormVo getArticleForm(Integer articleId);
 
 
     List<WxArticleListVo> getWxArticleList(@Param("authUserId") Integer authUserId, @Param("articleTitle") String articleTitle);
     List<WxArticleListVo> getWxArticleList(@Param("authUserId") Integer authUserId, @Param("articleTitle") String articleTitle);
+
+    void checkArticle(Integer articleId);
 }
 }

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

@@ -99,4 +99,6 @@ public interface AuthMapper {
     void updateSendStatus(Integer authId);
     void updateSendStatus(Integer authId);
 
 
     Integer getAdminUserId();
     Integer getAdminUserId();
+
+    void checkAuth(Integer authId);
 }
 }

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

@@ -91,4 +91,6 @@ public interface AuthProductMapper {
     ProductPo getProductPo(Integer productId);
     ProductPo getProductPo(Integer productId);
 
 
     Integer getAuthUserIdByProductId(Integer productId);
     Integer getAuthUserIdByProductId(Integer productId);
+
+    void checkAuthProduct(Integer productId);
 }
 }

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

@@ -60,4 +60,6 @@ public interface DoctorMapper {
     List<String> getTagList(Integer doctorId);
     List<String> getTagList(Integer doctorId);
 
 
     List<ParamVo> getParamList(Integer doctorId);
     List<ParamVo> getParamList(Integer doctorId);
+
+    void checkDoctor(Integer doctorId);
 }
 }

+ 5 - 4
src/main/java/com/caimei/mapper/cmMapper/FileMapper.java

@@ -3,10 +3,7 @@ package com.caimei.mapper.cmMapper;
 import com.caimei.model.po.CourseFilePo;
 import com.caimei.model.po.CourseFilePo;
 import com.caimei.model.po.ProductImagePo;
 import com.caimei.model.po.ProductImagePo;
 import com.caimei.model.po.FilePo;
 import com.caimei.model.po.FilePo;
-import com.caimei.model.vo.AuthVo;
-import com.caimei.model.vo.CourseFileListVo;
-import com.caimei.model.vo.FileListVo;
-import com.caimei.model.vo.WxFileListVo;
+import com.caimei.model.vo.*;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
 
 
@@ -51,4 +48,8 @@ public interface FileMapper {
     List<ProductImagePo> getProductImageList(Integer authUserId);
     List<ProductImagePo> getProductImageList(Integer authUserId);
 
 
     List<AuthVo> getAuthImageList(Integer authUserId);
     List<AuthVo> getAuthImageList(Integer authUserId);
+
+    FilePo getFileForm(Integer fileId);
+
+    void checkFile(Integer fileId);
 }
 }

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

@@ -40,4 +40,6 @@ public interface ImageMapper {
     List<String> getImageListByImageId(Integer imageId);
     List<String> getImageListByImageId(Integer imageId);
 
 
     List<WxImageListVo> getWxImageList(Integer authUserId, String imageTitle);
     List<WxImageListVo> getWxImageList(Integer authUserId, String imageTitle);
+
+    void checkImage(Integer imageId);
 }
 }

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

@@ -33,4 +33,8 @@ public interface VideoMapper {
     void updateVideoSelective(VideoPo video);
     void updateVideoSelective(VideoPo video);
 
 
     List<WxVideoListVo> getWxVideoList(@Param("authUserId") Integer authUserId, @Param("videoTitle") String videoTitle);
     List<WxVideoListVo> getWxVideoList(@Param("authUserId") Integer authUserId, @Param("videoTitle") String videoTitle);
+
+    VideoPo getVideoForm(Integer videoId);
+
+    void checkVideo(Integer videoId);
 }
 }

+ 5 - 0
src/main/java/com/caimei/model/po/ArticlePo.java

@@ -64,4 +64,9 @@ public class ArticlePo {
      * 审核时间
      * 审核时间
      */
      */
     private Date auditTime;
     private Date auditTime;
+
+    /**
+     * 是否查看过:1是,0否
+     */
+    private Integer checkFlag;
 }
 }

+ 5 - 0
src/main/java/com/caimei/model/po/CmBrandAuthPo.java

@@ -167,4 +167,9 @@ public class CmBrandAuthPo {
      */
      */
     private Integer maxParamNum;
     private Integer maxParamNum;
 
 
+    /**
+     * 是否查看过:1是,0否
+     */
+    private Integer checkFlag;
+
 }
 }

+ 16 - 0
src/main/java/com/caimei/model/po/CmBrandDoctorPo.java

@@ -3,6 +3,7 @@ package com.caimei.model.po;
 import com.caimei.model.vo.ProductFormVo;
 import com.caimei.model.vo.ProductFormVo;
 import lombok.Data;
 import lombok.Data;
 
 
+import java.util.Date;
 import java.util.List;
 import java.util.List;
 
 
 /**
 /**
@@ -63,4 +64,19 @@ public class CmBrandDoctorPo {
      */
      */
     private Integer createBy;
     private Integer createBy;
 
 
+    /**
+     * 管理员审核人id,对应cm_brand_auth_user
+     */
+    private Integer auditBy;
+
+    /**
+     * 审核时间
+     */
+    private Date auditTime;
+
+    /**
+     * 是否查看过:1是,0否
+     */
+    private Integer checkFlag;
+
 }
 }

+ 5 - 0
src/main/java/com/caimei/model/po/FilePo.java

@@ -74,4 +74,9 @@ public class FilePo {
      * 审核时间
      * 审核时间
      */
      */
     private Date auditTime;
     private Date auditTime;
+
+    /**
+     * 是否查看过:1是,0否
+     */
+    private Integer checkFlag;
 }
 }

+ 5 - 0
src/main/java/com/caimei/model/po/ImagePo.java

@@ -59,4 +59,9 @@ public class ImagePo {
      * 审核时间
      * 审核时间
      */
      */
     private Date auditTime;
     private Date auditTime;
+
+    /**
+     * 是否查看过:1是,0否
+     */
+    private Integer checkFlag;
 }
 }

+ 5 - 0
src/main/java/com/caimei/model/po/ProductPo.java

@@ -138,4 +138,9 @@ public class ProductPo {
      * 审核时间
      * 审核时间
      */
      */
     private Date auditTime;
     private Date auditTime;
+
+    /**
+     * 是否查看过:1是,0否
+     */
+    private Integer checkFlag;
 }
 }

+ 5 - 0
src/main/java/com/caimei/model/po/VideoPo.java

@@ -69,4 +69,9 @@ public class VideoPo {
      * 审核时间
      * 审核时间
      */
      */
     private Date auditTime;
     private Date auditTime;
+
+    /**
+     * 是否查看过:1是,0否
+     */
+    private Integer checkFlag;
 }
 }

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

@@ -26,4 +26,7 @@ public class ArticleFormVo {
 
 
     @ApiModelProperty("创建时间")
     @ApiModelProperty("创建时间")
     private Date createTime;
     private Date createTime;
+
+    @ApiModelProperty("审核状态:0审核未通过,1审核通过,2待审核")
+    private Integer auditStatus;
 }
 }

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

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

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

@@ -22,4 +22,9 @@ public class ImageFormVo {
 
 
     @ApiModelProperty("图片详情列表")
     @ApiModelProperty("图片详情列表")
     private List<String> imageList;
     private List<String> imageList;
+
+    /**
+     * 审核状态:0审核未通过,1审核通过,2待审核
+     */
+    private Integer auditStatus;
 }
 }

+ 7 - 0
src/main/java/com/caimei/service/auth/ArticleService.java

@@ -80,4 +80,11 @@ public interface ArticleService {
      * @return
      * @return
      */
      */
     ResponseJson<PageInfo<WxArticleListVo>> getWxArticleList(Integer authUserId, String articleTitle, Integer pageNum, Integer pageSize);
     ResponseJson<PageInfo<WxArticleListVo>> getWxArticleList(Integer authUserId, String articleTitle, Integer pageNum, Integer pageSize);
+
+    /**
+     * 更改查看标记
+     * @param articleId
+     * @return
+     */
+    ResponseJson checkArticle(Integer articleId);
 }
 }

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

@@ -157,6 +157,12 @@ public interface AuthProductService {
      */
      */
     ResponseJson<PageInfo<WxProductTypeListVo>> getWxProductTypeList(Integer authUserId, String appId, String name, Integer pageNum, Integer pageSize);
     ResponseJson<PageInfo<WxProductTypeListVo>> getWxProductTypeList(Integer authUserId, String appId, String name, Integer pageNum, Integer pageSize);
 
 
+    /**
+     * 更改查看标记
+     * @param productId
+     * @return
+     */
+    ResponseJson checkAuthProduct(Integer productId);
 }
 }
 
 
 
 

+ 7 - 0
src/main/java/com/caimei/service/auth/AuthService.java

@@ -117,4 +117,11 @@ public interface AuthService {
      * @return
      * @return
      */
      */
     ResponseJson importLdmImage(Integer authUserId);
     ResponseJson importLdmImage(Integer authUserId);
+
+    /**
+     * 更改查看标记
+     * @param authId
+     * @return
+     */
+    ResponseJson checkAuth(Integer authId);
 }
 }

+ 7 - 0
src/main/java/com/caimei/service/auth/DoctorService.java

@@ -98,4 +98,11 @@ public interface DoctorService {
      * @return
      * @return
      */
      */
     ResponseJson<DoctorFormVo> getAuthDoctorDetails(Integer doctorId);
     ResponseJson<DoctorFormVo> getAuthDoctorDetails(Integer doctorId);
+
+    /**
+     * 更改查看标记
+     * @param doctorId
+     * @return
+     */
+    ResponseJson checkDoctor(Integer doctorId);
 }
 }

+ 22 - 8
src/main/java/com/caimei/service/auth/impl/ArticleServiceImpl.java

@@ -60,8 +60,11 @@ public class ArticleServiceImpl implements ArticleService {
         if (StringUtils.isEmpty(articleContent)) {
         if (StringUtils.isEmpty(articleContent)) {
             return ResponseJson.error("参数异常,请输入文章内容");
             return ResponseJson.error("参数异常,请输入文章内容");
         }
         }
-        // 处理富文本内容
-
+        boolean insertFlag = null == articleId;
+        ArticleFormVo dbArticle = null;
+        if (!insertFlag) {
+            dbArticle = articleMapper.getArticleForm(articleId);
+        }
         /*
         /*
             组装文章数据
             组装文章数据
          */
          */
@@ -69,15 +72,20 @@ public class ArticleServiceImpl implements ArticleService {
         article.setTitle(articleTitle);
         article.setTitle(articleTitle);
         article.setImage(articleImage);
         article.setImage(articleImage);
         article.setContent(articleContent);
         article.setContent(articleContent);
-        // 上线状态默认为“待上线”,审核状态为“待审核”
-//        article.setStatus(2);
-//        article.setAuditStatus(2);
-        article.setStatus(1);
-        article.setAuditStatus(1);
+        // 供应商保存,直接上线;机构保存,需要供应商审核通过后才上线
+        if (null != dbArticle && 1 != dbArticle.getAuditStatus()) {
+            // 被驳回的数据,编辑后变为待审核状态
+            article.setStatus(2);
+            article.setAuditStatus(2);
+        } else {
+            article.setStatus(1);
+            article.setAuditStatus(1);
+        }
         Integer adminUserId = authMapper.getAdminUserId();
         Integer adminUserId = authMapper.getAdminUserId();
         article.setAuditBy(adminUserId);
         article.setAuditBy(adminUserId);
         article.setAuditTime(new Date());
         article.setAuditTime(new Date());
-        if (null == articleId) {
+        article.setCheckFlag(0);
+        if (insertFlag) {
             article.setAuthUserId(authUserId);
             article.setAuthUserId(authUserId);
             article.setCreateTime(new Date());
             article.setCreateTime(new Date());
             // 插入文章
             // 插入文章
@@ -166,4 +174,10 @@ public class ArticleServiceImpl implements ArticleService {
         PageInfo<WxArticleListVo> pageData = new PageInfo<>(articleList);
         PageInfo<WxArticleListVo> pageData = new PageInfo<>(articleList);
         return ResponseJson.success(pageData);
         return ResponseJson.success(pageData);
     }
     }
+
+    @Override
+    public ResponseJson checkArticle(Integer articleId) {
+        articleMapper.checkArticle(articleId);
+        return ResponseJson.success();
+    }
 }
 }

+ 25 - 11
src/main/java/com/caimei/service/auth/impl/AuthProductServiceImpl.java

@@ -175,6 +175,10 @@ public class AuthProductServiceImpl implements AuthProductService {
         }
         }
         // 是否为添加操作
         // 是否为添加操作
         boolean insertFlag = null == productId;
         boolean insertFlag = null == productId;
+        ProductFormVo dbProduct = null;
+        if (!insertFlag) {
+            dbProduct = authProductMapper.getProductFormByProductId(productId);
+        }
         /*
         /*
             组装商品数据
             组装商品数据
          */
          */
@@ -201,15 +205,19 @@ public class AuthProductServiceImpl implements AuthProductService {
         product.setPurchaseWay(purchaseWay);
         product.setPurchaseWay(purchaseWay);
         // 发票图片
         // 发票图片
         product.setInvoiceImage(invoiceImage);
         product.setInvoiceImage(invoiceImage);
-        // 商品信息保存后,上线状态默认为“待上线”,审核状态为“待审核”
-        /*product.setStatus(2);
-        product.setAuditStatus(2);*/
         // 供应商保存,直接上线;机构保存,需要供应商审核通过后才上线
         // 供应商保存,直接上线;机构保存,需要供应商审核通过后才上线
-        product.setStatus(1 == source ? 1 : 2);
-        product.setAuditStatus(1 == source ? 1 : 2);
+        if (null != dbProduct && 1 != dbProduct.getAuditStatus()) {
+            // 被驳回的数据,编辑变为待审核状态
+            product.setStatus(2);
+            product.setAuditStatus(2);
+        } else {
+            product.setStatus(1 == source ? 1 : 2);
+            product.setAuditStatus(1 == source ? 1 : 2);
+        }
         Integer adminUserId = authMapper.getAdminUserId();
         Integer adminUserId = authMapper.getAdminUserId();
         product.setAuditBy(adminUserId);
         product.setAuditBy(adminUserId);
         product.setAuditTime(new Date());
         product.setAuditTime(new Date());
+        product.setCheckFlag(0);
         product.setShopAuditStatus(1 == source ? 1 : 2);
         product.setShopAuditStatus(1 == source ? 1 : 2);
         if (insertFlag) {
         if (insertFlag) {
             // 原授权牌照
             // 原授权牌照
@@ -243,13 +251,13 @@ public class AuthProductServiceImpl implements AuthProductService {
             // 商品id
             // 商品id
             product.setProductId(productId);
             product.setProductId(productId);
             if (1 == source) {
             if (1 == source) {
-                ProductPo dbProduct = authProductMapper.getImageByProductId(productId);
+                ProductPo dbProductImage = authProductMapper.getImageByProductId(productId);
                 // 数据库该商品授权牌是否添加二维码
                 // 数据库该商品授权牌是否添加二维码
-                Integer dbAddQrCodeFlag = dbProduct.getAddQrCodeFlag();
+                Integer dbAddQrCodeFlag = dbProductImage.getAddQrCodeFlag();
                 // 数据库该商品授权牌添加二维码模板
                 // 数据库该商品授权牌添加二维码模板
-                Integer dbAddTemplateType = dbProduct.getAddTemplateType();
+                Integer dbAddTemplateType = dbProductImage.getAddTemplateType();
                 // 授权牌照是否重新上传
                 // 授权牌照是否重新上传
-                boolean updateImageFlag = (StringUtils.isNotBlank(product.getCertificateImage()) && !product.getCertificateImage().equals(dbProduct.getCertificateImage())) || (StringUtils.isEmpty(dbProduct.getPcCertificateImage()) || StringUtils.isEmpty(dbProduct.getAppletsCertificateImage()));
+                boolean updateImageFlag = (StringUtils.isNotBlank(product.getCertificateImage()) && !product.getCertificateImage().equals(dbProductImage.getCertificateImage())) || (StringUtils.isEmpty(dbProductImage.getPcCertificateImage()) || StringUtils.isEmpty(dbProductImage.getAppletsCertificateImage()));
                 boolean addQrCodeSign = false;
                 boolean addQrCodeSign = false;
                 boolean addWaterMarkSign = false;
                 boolean addWaterMarkSign = false;
                 if (null != dbAddQrCodeFlag && 1 == dbAddQrCodeFlag) {
                 if (null != dbAddQrCodeFlag && 1 == dbAddQrCodeFlag) {
@@ -261,7 +269,7 @@ public class AuthProductServiceImpl implements AuthProductService {
                             addWaterMarkSign = true;
                             addWaterMarkSign = true;
                         } else {
                         } else {
                             // 原图片,将当前授权牌替换为原图,生成水印图片
                             // 原图片,将当前授权牌替换为原图,生成水印图片
-                            product.setCertificateImage(dbProduct.getOriginalCertificateImage());
+                            product.setCertificateImage(dbProductImage.getOriginalCertificateImage());
                             addWaterMarkSign = true;
                             addWaterMarkSign = true;
                         }
                         }
                     } else if (1 == addQrCodeFlag) {
                     } else if (1 == addQrCodeFlag) {
@@ -273,7 +281,7 @@ public class AuthProductServiceImpl implements AuthProductService {
                             addWaterMarkSign = true;
                             addWaterMarkSign = true;
                         } else if (!addTemplateType.equals(dbAddTemplateType)) {
                         } else if (!addTemplateType.equals(dbAddTemplateType)) {
                             // 原图片,更改模板,将当前授权牌替换为原图,生成二维码授权牌,生成水印图片
                             // 原图片,更改模板,将当前授权牌替换为原图,生成二维码授权牌,生成水印图片
-                            product.setCertificateImage(dbProduct.getOriginalCertificateImage());
+                            product.setCertificateImage(dbProductImage.getOriginalCertificateImage());
                             addQrCodeSign = true;
                             addQrCodeSign = true;
                             addWaterMarkSign = true;
                             addWaterMarkSign = true;
                         }
                         }
@@ -631,4 +639,10 @@ public class AuthProductServiceImpl implements AuthProductService {
         return ResponseJson.success(pageData);
         return ResponseJson.success(pageData);
     }
     }
 
 
+    @Override
+    public ResponseJson checkAuthProduct(Integer productId) {
+        authProductMapper.checkAuthProduct(productId);
+        return ResponseJson.success();
+    }
+
 }
 }

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

@@ -191,6 +191,12 @@ public class AuthServiceImpl implements AuthService {
         return ResponseJson.success();
         return ResponseJson.success();
     }
     }
 
 
+    @Override
+    public ResponseJson checkAuth(Integer authId) {
+        authMapper.checkAuth(authId);
+        return ResponseJson.success();
+    }
+
     private void insertBanner(String pic, Integer authId) {
     private void insertBanner(String pic, Integer authId) {
         if (StringUtils.isNotEmpty(pic)) {
         if (StringUtils.isNotEmpty(pic)) {
             String imagePath = "https://wangdian.skinovachina.com" + pic;
             String imagePath = "https://wangdian.skinovachina.com" + pic;
@@ -207,6 +213,11 @@ public class AuthServiceImpl implements AuthService {
     @Override
     @Override
     public ResponseJson saveAuth(CmBrandAuthPo auth, List<String> bannerList, boolean importFlag, Integer source) {
     public ResponseJson saveAuth(CmBrandAuthPo auth, List<String> bannerList, boolean importFlag, Integer source) {
         Integer authId = auth.getId();
         Integer authId = auth.getId();
+        boolean insertFlag = null == authId;
+        AuthVo dbAuth = null;
+        if (!insertFlag) {
+            dbAuth = authMapper.getAuthById(authId);
+        }
         Integer authUserId = auth.getAuthUserId();
         Integer authUserId = auth.getAuthUserId();
         String authParty = auth.getAuthParty();
         String authParty = auth.getAuthParty();
         if (null == authUserId) {
         if (null == authUserId) {
@@ -215,10 +226,6 @@ public class AuthServiceImpl implements AuthService {
         if (StringUtils.isBlank(authParty)) {
         if (StringUtils.isBlank(authParty)) {
             return ResponseJson.error("参数异常,请输入授权机构名称");
             return ResponseJson.error("参数异常,请输入授权机构名称");
         }
         }
-        /*Integer authIdByAuthParty = authMapper.getAuthIdByAuthParty(authParty, authUserId);
-        if (null != authIdByAuthParty && !authIdByAuthParty.equals(authId)) {
-            return ResponseJson.error("参数异常,该授权机构已存在,请重新输入");
-        }*/
         if (null == auth.getFirstClubType()) {
         if (null == auth.getFirstClubType()) {
             return ResponseJson.error("请勾选机构类型");
             return ResponseJson.error("请勾选机构类型");
         }
         }
@@ -245,21 +252,25 @@ public class AuthServiceImpl implements AuthService {
                 return ResponseJson.error("参数异常,请上传轮播图");
                 return ResponseJson.error("参数异常,请上传轮播图");
             }
             }
         }
         }
-        // 保存品牌授权信息,上线状态默认为“待上线”,审核状态为“待审核”
-        /*auth.setStatus(2);
-        auth.setAuditStatus(2);*/
         // 供应商保存,直接上线;机构保存,需要供应商审核通过后才上线
         // 供应商保存,直接上线;机构保存,需要供应商审核通过后才上线
-        auth.setStatus(1 == source ? 1 : 2);
-        auth.setAuditStatus(1 == source ? 1 : 2);
+        if (null != dbAuth && 1 != dbAuth.getAuditStatus()) {
+            // 被驳回的数据,编辑变为待审核状态
+            auth.setStatus(2);
+            auth.setAuditStatus(2);
+        } else {
+            auth.setStatus(1 == source ? 1 : 2);
+            auth.setAuditStatus(1 == source ? 1 : 2);
+        }
         Integer adminUserId = authMapper.getAdminUserId();
         Integer adminUserId = authMapper.getAdminUserId();
         auth.setAuditBy(adminUserId);
         auth.setAuditBy(adminUserId);
         auth.setAuditTime(new Date());
         auth.setAuditTime(new Date());
         auth.setDelFlag(0);
         auth.setDelFlag(0);
+        auth.setCheckFlag(0);
         auth.setShopAuditStatus(1 == source ? 1 : 2);
         auth.setShopAuditStatus(1 == source ? 1 : 2);
         /*
         /*
             保存授权
             保存授权
          */
          */
-        if (null == authId) {
+        if (insertFlag) {
             authMapper.insertAuth(auth);
             authMapper.insertAuth(auth);
         } else {
         } else {
             authMapper.updateAuthByAuthId(auth);
             authMapper.updateAuthByAuthId(auth);

+ 28 - 3
src/main/java/com/caimei/service/auth/impl/DoctorServiceImpl.java

@@ -1,5 +1,6 @@
 package com.caimei.service.auth.impl;
 package com.caimei.service.auth.impl;
 
 
+import com.caimei.mapper.cmMapper.AuthMapper;
 import com.caimei.mapper.cmMapper.DoctorMapper;
 import com.caimei.mapper.cmMapper.DoctorMapper;
 import com.caimei.mapper.cmMapper.ShopMapper;
 import com.caimei.mapper.cmMapper.ShopMapper;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.ResponseJson;
@@ -27,6 +28,9 @@ import java.util.*;
 @Service
 @Service
 public class DoctorServiceImpl implements DoctorService {
 public class DoctorServiceImpl implements DoctorService {
 
 
+    @Resource
+    private AuthMapper authMapper;
+
     @Resource
     @Resource
     private DoctorMapper doctorMapper;
     private DoctorMapper doctorMapper;
 
 
@@ -155,9 +159,24 @@ public class DoctorServiceImpl implements DoctorService {
         if (1 == doctor.getDoctorType() && (null == equipmentList || equipmentList.size() <= 0)) {
         if (1 == doctor.getDoctorType() && (null == equipmentList || equipmentList.size() <= 0)) {
             return ResponseJson.error("参数异常,请上传设备列表");
             return ResponseJson.error("参数异常,请上传设备列表");
         }
         }
-        // 保存医师信息,上线状态默认为“待上线”,审核状态为“待审核”
-        doctor.setStatus(2);
-        doctor.setAuditStatus(2);
+        boolean insertFlag = null == doctorId;
+        CmBrandDoctorPo dbDoctor = null;
+        if (!insertFlag) {
+            dbDoctor = doctorMapper.getDoctorById(doctorId);
+        }
+        // 供应商保存,直接上线;机构保存,需要供应商审核通过后才上线
+        if (null != dbDoctor && 1 != dbDoctor.getAuditStatus()) {
+            // 被驳回的数据,编辑变为待审核状态
+            doctor.setStatus(2);
+            doctor.setAuditStatus(2);
+        } else {
+            doctor.setStatus(1);
+            doctor.setAuditStatus(1);
+        }
+        Integer adminUserId = authMapper.getAdminUserId();
+        doctor.setAuditBy(adminUserId);
+        doctor.setAuditTime(new Date());
+        doctor.setCheckFlag(0);
         /*
         /*
             保存医师
             保存医师
          */
          */
@@ -251,4 +270,10 @@ public class DoctorServiceImpl implements DoctorService {
         doctor.setParamList(paramList);
         doctor.setParamList(paramList);
         return ResponseJson.success(doctor);
         return ResponseJson.success(doctor);
     }
     }
+
+    @Override
+    public ResponseJson checkDoctor(Integer doctorId) {
+        doctorMapper.checkDoctor(doctorId);
+        return ResponseJson.success();
+    }
 }
 }

+ 7 - 0
src/main/java/com/caimei/service/data/FileService.java

@@ -109,4 +109,11 @@ public interface FileService {
      * @return
      * @return
      */
      */
     ResponseJson deleteCourseFile(Integer fileId);
     ResponseJson deleteCourseFile(Integer fileId);
+
+    /**
+     * 更改查看标记
+     * @param fileId
+     * @return
+     */
+    ResponseJson checkFile(Integer fileId);
 }
 }

+ 7 - 0
src/main/java/com/caimei/service/data/ImageService.java

@@ -80,4 +80,11 @@ public interface ImageService {
      * @return
      * @return
      */
      */
     ResponseJson<PageInfo<WxImageListVo>> getWxImageList(Integer authUserId, String imageTitle, Integer pageNum, Integer pageSize);
     ResponseJson<PageInfo<WxImageListVo>> getWxImageList(Integer authUserId, String imageTitle, Integer pageNum, Integer pageSize);
+
+    /**
+     * 更改查看标记
+     * @param imageId
+     * @return
+     */
+    ResponseJson checkImage(Integer imageId);
 }
 }

+ 7 - 0
src/main/java/com/caimei/service/data/VideoService.java

@@ -73,4 +73,11 @@ public interface VideoService {
      * @return
      * @return
      */
      */
     ResponseJson<PageInfo<WxVideoListVo>> getWxVideoList(Integer authUserId, String videoTitle, Integer pageNum, Integer pageSize);
     ResponseJson<PageInfo<WxVideoListVo>> getWxVideoList(Integer authUserId, String videoTitle, Integer pageNum, Integer pageSize);
+
+    /**
+     * 更改查看标记
+     * @param videoId
+     * @return
+     */
+    ResponseJson checkVideo(Integer videoId);
 }
 }

+ 29 - 12
src/main/java/com/caimei/service/data/impl/FileServiceImpl.java

@@ -6,6 +6,7 @@ import com.caimei.model.ResponseJson;
 import com.caimei.model.po.CourseFilePo;
 import com.caimei.model.po.CourseFilePo;
 import com.caimei.model.po.ProductImagePo;
 import com.caimei.model.po.ProductImagePo;
 import com.caimei.model.po.FilePo;
 import com.caimei.model.po.FilePo;
+import com.caimei.model.vo.ArticleFormVo;
 import com.caimei.model.vo.CourseFileListVo;
 import com.caimei.model.vo.CourseFileListVo;
 import com.caimei.model.vo.FileListVo;
 import com.caimei.model.vo.FileListVo;
 import com.caimei.model.vo.WxFileListVo;
 import com.caimei.model.vo.WxFileListVo;
@@ -84,6 +85,11 @@ public class FileServiceImpl implements FileService {
         if (null == fileType) {
         if (null == fileType) {
             fileType = 1;
             fileType = 1;
         }
         }
+        boolean insertFlag = null == fileId;
+        FilePo dbFile = null;
+        if (!insertFlag) {
+            dbFile = fileMapper.getFileForm(fileId);
+        }
         /*
         /*
             组装文件数据
             组装文件数据
         */
         */
@@ -93,27 +99,32 @@ public class FileServiceImpl implements FileService {
         dataFile.setPreviewUrl(filePreviewUrl);
         dataFile.setPreviewUrl(filePreviewUrl);
         dataFile.setDownloadUrl(fileDownloadUrl);
         dataFile.setDownloadUrl(fileDownloadUrl);
         dataFile.setName(fileName);
         dataFile.setName(fileName);
-        // 上线状态默认为“待上线”,审核状态为“待审核”
-//        dataFile.setStatus(2);
-//        dataFile.setAuditStatus(2);
-        dataFile.setStatus(1);
-        dataFile.setAuditStatus(1);
+        // 供应商保存,直接上线;机构保存,需要供应商审核通过后才上线
+        if (null != dbFile && 1 != dbFile.getAuditStatus()) {
+            // 被驳回的数据,编辑后变为待审核状态
+            dataFile.setStatus(2);
+            dataFile.setAuditStatus(2);
+        } else {
+            dataFile.setStatus(1);
+            dataFile.setAuditStatus(1);
+        }
         Integer adminUserId = authMapper.getAdminUserId();
         Integer adminUserId = authMapper.getAdminUserId();
         dataFile.setAuditBy(adminUserId);
         dataFile.setAuditBy(adminUserId);
         dataFile.setAuditTime(new Date());
         dataFile.setAuditTime(new Date());
-        if (null != fileId) {
-            /*
-                更新文件
-             */
-            dataFile.setId(fileId);
-            fileMapper.updateFileSelective(dataFile);
-        } else {
+        dataFile.setCheckFlag(0);
+        if (insertFlag) {
             /*
             /*
                 新增文件
                 新增文件
              */
              */
             dataFile.setAuthUserId(authUserId);
             dataFile.setAuthUserId(authUserId);
             dataFile.setCreateTime(new Date());
             dataFile.setCreateTime(new Date());
             fileMapper.insertFile(dataFile);
             fileMapper.insertFile(dataFile);
+        } else {
+            /*
+                更新文件
+             */
+            dataFile.setId(fileId);
+            fileMapper.updateFileSelective(dataFile);
         }
         }
         return ResponseJson.success("保存文件成功");
         return ResponseJson.success("保存文件成功");
     }
     }
@@ -301,4 +312,10 @@ public class FileServiceImpl implements FileService {
         fileMapper.deleteCourseFileByFileId(fileId);
         fileMapper.deleteCourseFileByFileId(fileId);
         return ResponseJson.success("删除文件成功");
         return ResponseJson.success("删除文件成功");
     }
     }
+
+    @Override
+    public ResponseJson checkFile(Integer fileId) {
+        fileMapper.checkFile(fileId);
+        return ResponseJson.success();
+    }
 }
 }

+ 23 - 6
src/main/java/com/caimei/service/data/impl/ImageServiceImpl.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
 import com.caimei.mapper.cmMapper.AuthMapper;
 import com.caimei.mapper.cmMapper.AuthMapper;
 import com.caimei.mapper.cmMapper.ImageMapper;
 import com.caimei.mapper.cmMapper.ImageMapper;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.ResponseJson;
+import com.caimei.model.po.FilePo;
 import com.caimei.model.po.ImagePo;
 import com.caimei.model.po.ImagePo;
 import com.caimei.model.vo.ImageFormVo;
 import com.caimei.model.vo.ImageFormVo;
 import com.caimei.model.vo.ImageListVo;
 import com.caimei.model.vo.ImageListVo;
@@ -68,23 +69,33 @@ public class ImageServiceImpl implements ImageService {
         if (null == imageArr || imageArr.size() <= 0) {
         if (null == imageArr || imageArr.size() <= 0) {
             return ResponseJson.error("参数异常,请上传图片");
             return ResponseJson.error("参数异常,请上传图片");
         }
         }
+        boolean insertFlag = null == imageId;
+        ImageFormVo dbImage = null;
+        if (!insertFlag) {
+            dbImage = imageMapper.getImageForm(imageId);
+        }
         /*
         /*
             组装图片数据
             组装图片数据
          */
          */
         ImagePo image = new ImagePo();
         ImagePo image = new ImagePo();
         image.setTitle(imageTitle);
         image.setTitle(imageTitle);
-        // 上线状态默认为“待上线”,审核状态为“待审核”
-//        image.setStatus(2);
-//        image.setAuditStatus(2);
-        image.setStatus(1);
-        image.setAuditStatus(1);
+        // 供应商保存,直接上线;机构保存,需要供应商审核通过后才上线
+        if (null != dbImage && 1 != dbImage.getAuditStatus()) {
+            // 被驳回的数据,编辑后变为待审核状态
+            image.setStatus(2);
+            image.setAuditStatus(2);
+        } else {
+            image.setStatus(1);
+            image.setAuditStatus(1);
+        }
         Integer adminUserId = authMapper.getAdminUserId();
         Integer adminUserId = authMapper.getAdminUserId();
         image.setAuditBy(adminUserId);
         image.setAuditBy(adminUserId);
         image.setAuditTime(new Date());
         image.setAuditTime(new Date());
+        image.setCheckFlag(0);
         String imageZipUrl = uploadService.saveImageZip(imageArr);
         String imageZipUrl = uploadService.saveImageZip(imageArr);
         System.out.println("【图片上传】>>>>>>>>>>>>>>>>图片压缩包上传成功:"+imageZipUrl);
         System.out.println("【图片上传】>>>>>>>>>>>>>>>>图片压缩包上传成功:"+imageZipUrl);
         image.setZipUrl(imageZipUrl);
         image.setZipUrl(imageZipUrl);
-        if (null == imageId) {
+        if (insertFlag) {
             image.setAuthUserId(authUserId);
             image.setAuthUserId(authUserId);
             image.setCreateTime(new Date());
             image.setCreateTime(new Date());
             // 插入图片
             // 插入图片
@@ -187,4 +198,10 @@ public class ImageServiceImpl implements ImageService {
         PageInfo<WxImageListVo> pageData = new PageInfo<>(wxImageList);
         PageInfo<WxImageListVo> pageData = new PageInfo<>(wxImageList);
         return ResponseJson.success(pageData);
         return ResponseJson.success(pageData);
     }
     }
+
+    @Override
+    public ResponseJson checkImage(Integer imageId) {
+        imageMapper.checkImage(imageId);
+        return ResponseJson.success();
+    }
 }
 }

+ 29 - 10
src/main/java/com/caimei/service/data/impl/VideoServiceImpl.java

@@ -4,6 +4,7 @@ import com.caimei.mapper.cmMapper.AuthMapper;
 import com.caimei.mapper.cmMapper.VideoMapper;
 import com.caimei.mapper.cmMapper.VideoMapper;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.po.VideoPo;
 import com.caimei.model.po.VideoPo;
+import com.caimei.model.vo.ImageFormVo;
 import com.caimei.model.vo.VideoListVo;
 import com.caimei.model.vo.VideoListVo;
 import com.caimei.model.vo.WxVideoListVo;
 import com.caimei.model.vo.WxVideoListVo;
 import com.caimei.service.data.VideoService;
 import com.caimei.service.data.VideoService;
@@ -76,6 +77,11 @@ public class VideoServiceImpl implements VideoService {
         if (null == videoPreviewUrl || null == videoDownloadUrl) {
         if (null == videoPreviewUrl || null == videoDownloadUrl) {
             return ResponseJson.error("参数异常,请上传视频");
             return ResponseJson.error("参数异常,请上传视频");
         }
         }
+        boolean insertFlag = null == videoId;
+        VideoPo dbVedio = null;
+        if (!insertFlag) {
+            dbVedio = videoMapper.getVideoForm(videoId);
+        }
         /*
         /*
             组装视频数据
             组装视频数据
         */
         */
@@ -84,27 +90,34 @@ public class VideoServiceImpl implements VideoService {
         video.setName(videoName);
         video.setName(videoName);
         video.setPreviewUrl(videoPreviewUrl);
         video.setPreviewUrl(videoPreviewUrl);
         video.setDownloadUrl(videoDownloadUrl);
         video.setDownloadUrl(videoDownloadUrl);
-        // 上线状态默认为“待上线”,审核状态为“待审核”
-//        video.setStatus(2);
-//        video.setAuditStatus(2);
+        // 供应商保存,直接上线;机构保存,需要供应商审核通过后才上线
+        if (null != dbVedio && 1 != dbVedio.getAuditStatus()) {
+            // 被驳回的数据,编辑后变为待审核状态
+            video.setStatus(2);
+            video.setAuditStatus(2);
+        } else {
+            video.setStatus(1);
+            video.setAuditStatus(1);
+        }
         video.setStatus(1);
         video.setStatus(1);
         video.setAuditStatus(1);
         video.setAuditStatus(1);
         Integer adminUserId = authMapper.getAdminUserId();
         Integer adminUserId = authMapper.getAdminUserId();
         video.setAuditBy(adminUserId);
         video.setAuditBy(adminUserId);
         video.setAuditTime(new Date());
         video.setAuditTime(new Date());
-        if (null != videoId) {
-            /*
-                更新视频
-             */
-            video.setId(videoId);
-            videoMapper.updateVideoSelective(video);
-        } else {
+        video.setCheckFlag(0);
+        if (insertFlag) {
             /*
             /*
                 新增视频
                 新增视频
              */
              */
             video.setAuthUserId(authUserId);
             video.setAuthUserId(authUserId);
             video.setCreateTime(new Date());
             video.setCreateTime(new Date());
             videoMapper.insertVideo(video);
             videoMapper.insertVideo(video);
+        }else{
+            /*
+                更新视频
+             */
+            video.setId(videoId);
+            videoMapper.updateVideoSelective(video);
         }
         }
         return ResponseJson.success("保存视频成功");
         return ResponseJson.success("保存视频成功");
     }
     }
@@ -174,4 +187,10 @@ public class VideoServiceImpl implements VideoService {
         PageInfo<WxVideoListVo> pageData = new PageInfo<>(videoList);
         PageInfo<WxVideoListVo> pageData = new PageInfo<>(videoList);
         return ResponseJson.success(pageData);
         return ResponseJson.success(pageData);
     }
     }
+
+    @Override
+    public ResponseJson checkVideo(Integer videoId) {
+        videoMapper.checkVideo(videoId);
+        return ResponseJson.success();
+    }
 }
 }

+ 8 - 3
src/main/resources/mapper/ArticleMapper.xml

@@ -2,8 +2,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.ArticleMapper">
 <mapper namespace="com.caimei.mapper.cmMapper.ArticleMapper">
     <insert id="insertArticle">
     <insert id="insertArticle">
-        insert into cm_brand_article(authUserId, title, image, content, auditStatus, status, createTime, auditBy, auditTime)
-        values (#{authUserId}, #{title}, #{image}, #{content}, #{auditStatus}, #{status}, #{createTime}, #{auditBy}, #{auditTime})
+        insert into cm_brand_article(authUserId, title, image, content, auditStatus, status, createTime, auditBy, auditTime, checkFlag)
+        values (#{authUserId}, #{title}, #{image}, #{content}, #{auditStatus}, #{status}, #{createTime}, #{auditBy}, #{auditTime}, #{checkFlag})
     </insert>
     </insert>
     <update id="updateArticleByArticleId">
     <update id="updateArticleByArticleId">
         update cm_brand_article
         update cm_brand_article
@@ -28,6 +28,11 @@
             auditTime     = #{auditTime}
             auditTime     = #{auditTime}
         where id = #{articleId}
         where id = #{articleId}
     </update>
     </update>
+    <update id="checkArticle">
+        update cm_brand_article
+        set checkFlag = 1
+        where id = #{articleId}
+    </update>
     <delete id="deleteArticleByArticleId">
     <delete id="deleteArticleByArticleId">
         delete from cm_brand_article where id = #{articleId}
         delete from cm_brand_article where id = #{articleId}
     </delete>
     </delete>
@@ -57,7 +62,7 @@
         </choose>
         </choose>
     </select>
     </select>
     <select id="getArticleForm" resultType="com.caimei.model.vo.ArticleFormVo">
     <select id="getArticleForm" resultType="com.caimei.model.vo.ArticleFormVo">
-        select id as articleId, title as articleTitle, image as articleImage, content as articleContent, createTime
+        select id as articleId, title as articleTitle, image as articleImage, content as articleContent, createTime, auditStatus
         from cm_brand_article
         from cm_brand_article
         where id = #{articleId}
         where id = #{articleId}
     </select>
     </select>

+ 19 - 11
src/main/resources/mapper/AuthMapper.xml

@@ -5,11 +5,11 @@
         insert into cm_brand_auth (authUserId, authParty, provinceId, cityId, townId, address, lng, lat,
         insert into cm_brand_auth (authUserId, authParty, provinceId, cityId, townId, address, lng, lat,
                                    mobile, userMobile, firstClubType, secondClubType, medicalLicenseImage, empNum,
                                    mobile, userMobile, firstClubType, secondClubType, medicalLicenseImage, empNum,
                                    logo, customFlag, remarks, status, createTime, createBy, createSource, auditBy,
                                    logo, customFlag, remarks, status, createTime, createBy, createSource, auditBy,
-                                   auditTime, auditStatus, shopAuditBy, shopAuditTime, shopAuditStatus, delFlag)
+                                   auditTime, auditStatus, shopAuditBy, shopAuditTime, shopAuditStatus, checkFlag, delFlag)
         values (#{authUserId}, #{authParty}, #{provinceId}, #{cityId}, #{townId}, #{address}, #{lng}, #{lat},
         values (#{authUserId}, #{authParty}, #{provinceId}, #{cityId}, #{townId}, #{address}, #{lng}, #{lat},
                 #{mobile}, #{userMobile}, #{firstClubType}, #{secondClubType}, #{medicalLicenseImage}, #{empNum},
                 #{mobile}, #{userMobile}, #{firstClubType}, #{secondClubType}, #{medicalLicenseImage}, #{empNum},
                 #{logo}, #{customFlag}, #{remarks}, #{status}, NOW(), #{createBy}, #{createSource}, #{auditBy},
                 #{logo}, #{customFlag}, #{remarks}, #{status}, NOW(), #{createBy}, #{createSource}, #{auditBy},
-                #{auditTime}, #{auditStatus}, #{shopAuditBy}, #{shopAuditTime}, #{shopAuditStatus}, #{delFlag});
+                #{auditTime}, #{auditStatus}, #{shopAuditBy}, #{shopAuditTime}, #{shopAuditStatus}, #{checkFlag}, #{delFlag});
     </insert>
     </insert>
     <insert id="insertBanner">
     <insert id="insertBanner">
         insert into cm_brand_auth_banner (authId, banner)
         insert into cm_brand_auth_banner (authId, banner)
@@ -40,7 +40,8 @@
             remarks             = #{remarks},
             remarks             = #{remarks},
             status              = #{status},
             status              = #{status},
             auditStatus         = #{auditStatus},
             auditStatus         = #{auditStatus},
-            shopAuditStatus     = #{shopAuditStatus}
+            shopAuditStatus     = #{shopAuditStatus},
+            checkFlag           = #{checkFlag}
         where id = #{id}
         where id = #{id}
     </update>
     </update>
     <update id="updateAuthAuditStatus">
     <update id="updateAuthAuditStatus">
@@ -79,26 +80,33 @@
         set sendStatus = 1
         set sendStatus = 1
         where id = #{authId}
         where id = #{authId}
     </update>
     </update>
+    <update id="checkAuth">
+        update cm_brand_auth
+        set checkFlag = 1
+        where id = #{authId}
+    </update>
     <delete id="deleteBanner">
     <delete id="deleteBanner">
         delete from cm_brand_auth_banner where authId = #{authId}
         delete from cm_brand_auth_banner where authId = #{authId}
     </delete>
     </delete>
     <select id="getAuthList" resultType="com.caimei.model.vo.AuthVo">
     <select id="getAuthList" resultType="com.caimei.model.vo.AuthVo">
         select a.id as authId, authParty, cbcu2.mobile, a.status, a.auditStatus, a.shopAuditStatus, a.createTime,
         select a.id as authId, authParty, cbcu2.mobile, a.status, a.auditStatus, a.shopAuditStatus, a.createTime,
-               if(a.createSource = 1,cu.name,cbcu1.mobile) as createBy,au.name as auditBy,a.auditTime,a.invalidReason,
-               a.sendStatus, au1.name as shopAuditBy,a.shopAuditTime,
-            ifnull(ap.waitAuditNum,0) as waitAuditNum,
-            ifnull(bp.waitAuditNum,0) as shopWaitAuditNum,
-            if(ifnull(ap.waitAuditNum,0)>0,0,1) as lowerAuditStatus
+        if(a.createSource = 1,cu.name,cbcu1.mobile) as createBy,au.name as auditBy,a.auditTime,a.invalidReason,
+        a.sendStatus, au1.name as shopAuditBy,a.shopAuditTime,
+        ifnull(ap.waitAuditNum,0) as waitAuditNum,
+        ifnull(bp.waitAuditNum,0) as shopWaitAuditNum,
+        if(ifnull(ap.waitAuditNum,0)>0,0,1) as lowerAuditStatus,
+        a.checkFlag
         from cm_brand_auth a
         from cm_brand_auth a
         left join cm_brand_auth_user cu on a.createBy = cu.authUserId
         left join cm_brand_auth_user cu on a.createBy = cu.authUserId
         left join cm_brand_club_user cbcu1 on a.createBy = cbcu1.id
         left join cm_brand_club_user cbcu1 on a.createBy = cbcu1.id
         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 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
         left join (select authId,count(*) as waitAuditNum from cm_brand_auth_product where shopAuditStatus = 2 group by
-            authId) bp on a.id = bp.authId
+        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},'%')

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

@@ -6,12 +6,12 @@
                                           `originalCertificateImage`, `certificateImage`, `pcCertificateImage`,
                                           `originalCertificateImage`, `certificateImage`, `pcCertificateImage`,
                                           `appletsCertificateImage`, `addQrCodeFlag`, `addTemplateType`,
                                           `appletsCertificateImage`, `addQrCodeFlag`, `addTemplateType`,
                                           purchaseWay, invoiceImage, `status`, auditBy, auditTime,
                                           purchaseWay, invoiceImage, `status`, auditBy, auditTime,
-                                          `auditStatus`, shopAuditStatus, `createTime`, `createBy`, createSource)
+                                          `auditStatus`, shopAuditStatus, checkFlag, `createTime`, `createBy`, createSource)
         values (#{authId}, #{brandId}, #{productTypeId}, #{snCode}, #{name}, #{image},
         values (#{authId}, #{brandId}, #{productTypeId}, #{snCode}, #{name}, #{image},
                 #{originalCertificateImage}, #{certificateImage}, #{pcCertificateImage},
                 #{originalCertificateImage}, #{certificateImage}, #{pcCertificateImage},
                 #{appletsCertificateImage}, #{addQrCodeFlag}, #{addTemplateType},
                 #{appletsCertificateImage}, #{addQrCodeFlag}, #{addTemplateType},
                 #{purchaseWay}, #{invoiceImage}, #{status}, #{auditBy}, #{auditTime},
                 #{purchaseWay}, #{invoiceImage}, #{status}, #{auditBy}, #{auditTime},
-                #{auditStatus}, #{shopAuditStatus}, #{createTime}, #{createBy}, #{createSource})
+                #{auditStatus}, #{shopAuditStatus}, #{checkFlag}, #{createTime}, #{createBy}, #{createSource})
     </insert>
     </insert>
     <insert id="insertProductParam">
     <insert id="insertProductParam">
         insert into cm_brand_product_param (`productId`, `name`, `content`)
         insert into cm_brand_product_param (`productId`, `name`, `content`)
@@ -59,6 +59,7 @@
             `status`           = #{status},
             `status`           = #{status},
             `auditStatus`      = #{auditStatus},
             `auditStatus`      = #{auditStatus},
             `shopAuditStatus`  = #{shopAuditStatus},
             `shopAuditStatus`  = #{shopAuditStatus},
+            checkFlag          = #{checkFlag}
         </set>
         </set>
         where id = #{productId};
         where id = #{productId};
     </update>
     </update>
@@ -143,6 +144,9 @@
         shopAuditTime = #{shopAuditTime}
         shopAuditTime = #{shopAuditTime}
         where id = #{productId}
         where id = #{productId}
     </update>
     </update>
+    <update id="checkAuthProduct">
+        update cm_brand_auth_product set checkFlag = 1 where id = #{productId}
+    </update>
     <select id="getProductList" resultType="com.caimei.model.vo.ProductListVo">
     <select id="getProductList" resultType="com.caimei.model.vo.ProductListVo">
         select p.id as productId,if(p.productTypeId is null,p.name,t.name) as productName,
         select p.id as productId,if(p.productTypeId is null,p.name,t.name) as productName,
                snCode,p.status,p.auditStatus,p.shopAuditStatus, p.createTime,
                snCode,p.status,p.auditStatus,p.shopAuditStatus, p.createTime,

+ 10 - 4
src/main/resources/mapper/DoctorMapper.xml

@@ -2,9 +2,11 @@
 <!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.DoctorMapper">
 <mapper namespace="com.caimei.mapper.cmMapper.DoctorMapper">
     <insert id="insertDoctor" keyColumn="id" keyProperty="id" useGeneratedKeys="true" parameterType="com.caimei.model.po.CmBrandDoctorPo">
     <insert id="insertDoctor" keyColumn="id" keyProperty="id" useGeneratedKeys="true" parameterType="com.caimei.model.po.CmBrandDoctorPo">
-        insert into cm_brand_doctor (authUserId, authId, doctorType, name, certificateNo, clubName, image, status, createTime, createBy,
-                                     auditStatus)
-        values (#{authUserId}, #{authId}, #{doctorType}, #{name}, #{certificateNo}, #{clubName}, #{image}, #{status}, NOW(), #{createBy}, #{auditStatus})
+        insert into cm_brand_doctor (authUserId, authId, doctorType, name, certificateNo, clubName, image, status,
+                                     createTime, createBy,
+                                     auditStatus, auditBy, auditTime, checkFlag)
+        values (#{authUserId}, #{authId}, #{doctorType}, #{name}, #{certificateNo}, #{clubName}, #{image}, #{status},
+                NOW(), #{createBy}, #{auditStatus}, #{auditBy}, #{auditTime}, #{checkFlag})
     </insert>
     </insert>
     <insert id="insertBanner">
     <insert id="insertBanner">
         insert into cm_brand_doctor_banner (doctorId, banner)
         insert into cm_brand_doctor_banner (doctorId, banner)
@@ -36,7 +38,8 @@
             clubName      = #{clubName},
             clubName      = #{clubName},
             image         = #{image},
             image         = #{image},
             status        = #{status},
             status        = #{status},
-            auditStatus   = #{auditStatus}
+            auditStatus   = #{auditStatus},
+            checkFlag     = #{checkFlag}
         where id = #{id}
         where id = #{id}
     </update>
     </update>
     <update id="updateDoctorAuditStatus">
     <update id="updateDoctorAuditStatus">
@@ -48,6 +51,9 @@
             auditTime     = #{auditTime}
             auditTime     = #{auditTime}
         where id = #{doctorId}
         where id = #{doctorId}
     </update>
     </update>
+    <update id="checkDoctor">
+        update cm_brand_doctor set checkFlag = 1 where id = #{doctorId}
+    </update>
     <delete id="deleteDoctorByDoctorId">
     <delete id="deleteDoctorByDoctorId">
         delete from cm_brand_doctor where id = #{doctorId}
         delete from cm_brand_doctor where id = #{doctorId}
     </delete>
     </delete>

+ 13 - 2
src/main/resources/mapper/FileMapper.xml

@@ -3,9 +3,9 @@
 <mapper namespace="com.caimei.mapper.cmMapper.FileMapper">
 <mapper namespace="com.caimei.mapper.cmMapper.FileMapper">
     <insert id="insertFile" keyColumn="id" keyProperty="id" parameterType="com.caimei.model.po.FilePo" useGeneratedKeys="true">
     <insert id="insertFile" keyColumn="id" keyProperty="id" parameterType="com.caimei.model.po.FilePo" useGeneratedKeys="true">
         insert into cm_brand_file(authUserId, fileType, title, name, previewUrl, downloadUrl, auditStatus, status,
         insert into cm_brand_file(authUserId, fileType, title, name, previewUrl, downloadUrl, auditStatus, status,
-                                  createTime, auditBy, auditTime)
+                                  createTime, auditBy, auditTime, checkFlag)
         values (#{authUserId}, #{fileType}, #{title}, #{name}, #{previewUrl}, #{downloadUrl}, #{auditStatus}, #{status},
         values (#{authUserId}, #{fileType}, #{title}, #{name}, #{previewUrl}, #{downloadUrl}, #{auditStatus}, #{status},
-                #{createTime}, #{auditBy}, #{auditTime})
+                #{createTime}, #{auditBy}, #{auditTime}, #{checkFlag})
     </insert>
     </insert>
     <insert id="insertCourseFile">
     <insert id="insertCourseFile">
         insert into cm_brand_course_file (title, name, ossName, type, module, createTime)
         insert into cm_brand_course_file (title, name, ossName, type, module, createTime)
@@ -53,6 +53,9 @@
             <if test="auditStatus != null">
             <if test="auditStatus != null">
                 auditStatus = #{auditStatus},
                 auditStatus = #{auditStatus},
             </if>
             </if>
+            <if test="checkFlag != null">
+                checkFlag = #{checkFlag},
+            </if>
         </set>
         </set>
         where id = #{id}
         where id = #{id}
     </update>
     </update>
@@ -65,6 +68,11 @@
             module  = #{fileModule}
             module  = #{fileModule}
         where id = #{id}
         where id = #{id}
     </update>
     </update>
+    <update id="checkFile">
+        update cm_brand_file
+        set checkFlag = 1
+        where id = #{fileId}
+    </update>
     <delete id="deleteFileByFileId">
     <delete id="deleteFileByFileId">
         delete from cm_brand_file where id = #{fileId}
         delete from cm_brand_file where id = #{fileId}
     </delete>
     </delete>
@@ -138,4 +146,7 @@
             left join cm_brand_auth_user u on a.authUserId = u.authUserId
             left join cm_brand_auth_user u on a.authUserId = u.authUserId
         where u.authUserId = #{authUserId};
         where u.authUserId = #{authUserId};
     </select>
     </select>
+    <select id="getFileForm" resultType="com.caimei.model.po.FilePo">
+        select id,auditStatus from cm_brand_file where id = #{fileId}
+    </select>
 </mapper>
 </mapper>

+ 10 - 4
src/main/resources/mapper/ImageMapper.xml

@@ -2,8 +2,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.ImageMapper">
 <mapper namespace="com.caimei.mapper.cmMapper.ImageMapper">
     <insert id="insertImage" keyColumn="id" keyProperty="id" parameterType="com.caimei.model.po.ImagePo" useGeneratedKeys="true">
     <insert id="insertImage" keyColumn="id" keyProperty="id" parameterType="com.caimei.model.po.ImagePo" useGeneratedKeys="true">
-        insert into cm_brand_image(authUserId, title, zipUrl, auditStatus, status, createTime, auditBy, auditTime)
-        values (#{authUserId}, #{title}, #{zipUrl}, #{auditStatus}, #{status}, #{createTime}, #{auditBy}, #{auditTime})
+        insert into cm_brand_image(authUserId, title, zipUrl, auditStatus, status, createTime, auditBy, auditTime, checkFlag)
+        values (#{authUserId}, #{title}, #{zipUrl}, #{auditStatus}, #{status}, #{createTime}, #{auditBy}, #{auditTime}, #{checkFlag})
     </insert>
     </insert>
     <insert id="insertImageDetail">
     <insert id="insertImageDetail">
         insert into cm_brand_image_detail(imageId, image)
         insert into cm_brand_image_detail(imageId, image)
@@ -14,7 +14,8 @@
         set title       = #{title},
         set title       = #{title},
             zipUrl      = #{zipUrl},
             zipUrl      = #{zipUrl},
             status      = #{status},
             status      = #{status},
-            auditStatus = #{auditStatus}
+            auditStatus = #{auditStatus},
+            checkFlag   = #{checkFlag}
         where id = #{id}
         where id = #{id}
     </update>
     </update>
     <update id="updateImageStatusByImageId">
     <update id="updateImageStatusByImageId">
@@ -31,6 +32,11 @@
             auditTime     = #{auditTime}
             auditTime     = #{auditTime}
         where id = #{imageId}
         where id = #{imageId}
     </update>
     </update>
+    <update id="checkImage">
+        update cm_brand_image
+        set checkFlag = 1
+        where id = #{imageId}
+    </update>
     <delete id="deleteImageByImageId">
     <delete id="deleteImageByImageId">
         delete from cm_brand_image where id = #{imageId}
         delete from cm_brand_image where id = #{imageId}
     </delete>
     </delete>
@@ -63,7 +69,7 @@
         </choose>
         </choose>
     </select>
     </select>
     <select id="getImageForm" resultType="com.caimei.model.vo.ImageFormVo">
     <select id="getImageForm" resultType="com.caimei.model.vo.ImageFormVo">
-        select id as imageId,title as imageTitle from cm_brand_image where id = #{imageId}
+        select id as imageId,title as imageTitle, auditStatus from cm_brand_image where id = #{imageId}
     </select>
     </select>
     <select id="getImageListByImageId" resultType="java.lang.String">
     <select id="getImageListByImageId" resultType="java.lang.String">
         select image from cm_brand_image_detail where imageId = #{imageId}
         select image from cm_brand_image_detail where imageId = #{imageId}

+ 13 - 2
src/main/resources/mapper/VideoMapper.xml

@@ -3,9 +3,9 @@
 <mapper namespace="com.caimei.mapper.cmMapper.VideoMapper">
 <mapper namespace="com.caimei.mapper.cmMapper.VideoMapper">
     <insert id="insertVideo" keyColumn="id" keyProperty="id" parameterType="com.caimei.model.po.VideoPo" useGeneratedKeys="true">
     <insert id="insertVideo" keyColumn="id" keyProperty="id" parameterType="com.caimei.model.po.VideoPo" useGeneratedKeys="true">
         insert into cm_brand_video(authUserId, title, name, previewUrl, downloadUrl, auditStatus, status, createTime,
         insert into cm_brand_video(authUserId, title, name, previewUrl, downloadUrl, auditStatus, status, createTime,
-                                   auditBy, auditTime)
+                                   auditBy, auditTime, checkFlag)
         values (#{authUserId}, #{title}, #{name}, #{previewUrl}, #{downloadUrl}, #{auditStatus}, #{status},
         values (#{authUserId}, #{title}, #{name}, #{previewUrl}, #{downloadUrl}, #{auditStatus}, #{status},
-                #{createTime}, #{auditBy}, #{auditTime})
+                #{createTime}, #{auditBy}, #{auditTime}, #{checkFlag})
     </insert>
     </insert>
     <update id="updateVideoByVideoId">
     <update id="updateVideoByVideoId">
         update cm_brand_video
         update cm_brand_video
@@ -49,9 +49,15 @@
             <if test="auditStatus != null">
             <if test="auditStatus != null">
                 auditStatus = #{auditStatus},
                 auditStatus = #{auditStatus},
             </if>
             </if>
+            <if test="checkFlag != null">
+                checkFlag = #{checkFlag},
+            </if>
         </set>
         </set>
         where id = #{id}
         where id = #{id}
     </update>
     </update>
+    <update id="checkVideo">
+        update cm_brand_video set checkFlag = 1 where id = #{videoId}
+    </update>
     <delete id="deleteVideoByVideoId">
     <delete id="deleteVideoByVideoId">
         delete from cm_brand_video where id = #{videoId}
         delete from cm_brand_video where id = #{videoId}
     </delete>
     </delete>
@@ -91,4 +97,9 @@
         </if>
         </if>
         order by a.createTime desc
         order by a.createTime desc
     </select>
     </select>
+    <select id="getVideoForm" resultType="com.caimei.model.po.VideoPo">
+        select id, auditStatus
+        from cm_brand_video
+        where id = #{videoId}
+    </select>
 </mapper>
 </mapper>