Просмотр исходного кода

审核逻辑更改-无需管理员审核

Aslee 2 лет назад
Родитель
Сommit
e3e9409275

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

@@ -80,7 +80,7 @@ public interface AuthMapper {
 
     AuthVo getAuthById(Integer authId);
 
-    void updateAuthShopAuditStatus(@Param("authId") Integer authId, @Param("shopAuditStatus") Integer auditStatus, @Param("shopInvalidReason") String invalidReason, @Param("shopAuditBy") Integer auditBy, @Param("shopAuditTime") Date auditTime);
+    void updateAuthShopAuditStatus(@Param("authId") Integer authId, @Param("status") Integer status, @Param("shopAuditStatus") Integer auditStatus, @Param("shopInvalidReason") String invalidReason, @Param("shopAuditBy") Integer auditBy, @Param("shopAuditTime") Date auditTime);
 
     List<String> getTownNames();
 
@@ -97,4 +97,6 @@ public interface AuthMapper {
     String getTownNameById(Integer townId);
 
     void updateSendStatus(Integer authId);
+
+    Integer getAdminUserId();
 }

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

@@ -86,7 +86,7 @@ public interface AuthProductMapper {
 
     Integer getProductCountByTypeId(Integer productTypeId);
 
-    void updateProductShopAuditStatus(@Param("productId") Integer productId, @Param("shopAuditStatus") Integer auditStatus, @Param("shopInvalidReason") String invalidReason, @Param("shopAuditBy") Integer auditBy, @Param("shopAuditTime") Date auditTime);
+    void updateProductShopAuditStatus(@Param("productId") Integer productId, @Param("productTypeId") Integer productTypeId, @Param("status") Integer status, @Param("shopAuditStatus") Integer auditStatus, @Param("shopInvalidReason") String invalidReason, @Param("shopAuditBy") Integer auditBy, @Param("shopAuditTime") Date auditTime);
 
     ProductPo getProductPo(Integer productId);
 

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

@@ -128,4 +128,14 @@ public class ProductPo {
      * 创建来源:1供应商添加,2机构用户添加
      */
     private Integer createSource;
+
+    /**
+     * 管理员审核人id,对应cm_brand_auth_user
+     */
+    private Integer auditBy;
+
+    /**
+     * 审核时间
+     */
+    private Date auditTime;
 }

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

@@ -66,4 +66,14 @@ public class ProductTypePo {
      * 创建人Id
      */
     private Integer createSource;
+
+    /**
+     * 管理员审核人id,对应cm_brand_auth_user
+     */
+    private Integer auditBy;
+
+    /**
+     * 审核时间
+     */
+    private Date auditTime;
 }

+ 11 - 2
src/main/java/com/caimei/service/auth/impl/ArticleServiceImpl.java

@@ -1,6 +1,7 @@
 package com.caimei.service.auth.impl;
 
 import com.caimei.mapper.cmMapper.ArticleMapper;
+import com.caimei.mapper.cmMapper.AuthMapper;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.po.ArticlePo;
 import com.caimei.model.vo.ArticleFormVo;
@@ -30,6 +31,9 @@ public class ArticleServiceImpl implements ArticleService {
     @Resource
     private ArticleMapper articleMapper;
 
+    @Resource
+    private AuthMapper authMapper;
+
     @Override
     public ResponseJson<PageInfo<ArticleListVo>> getArticleList(Integer listType, Integer authUserId, String articleTitle, Integer auditStatus, Integer status, Integer pageNum, Integer pageSize) {
         if (null == authUserId) {
@@ -66,8 +70,13 @@ public class ArticleServiceImpl implements ArticleService {
         article.setImage(articleImage);
         article.setContent(articleContent);
         // 上线状态默认为“待上线”,审核状态为“待审核”
-        article.setStatus(2);
-        article.setAuditStatus(2);
+//        article.setStatus(2);
+//        article.setAuditStatus(2);
+        article.setStatus(1);
+        article.setAuditStatus(1);
+        Integer adminUserId = authMapper.getAdminUserId();
+        article.setAuditBy(adminUserId);
+        article.setAuditTime(new Date());
         if (null == articleId) {
             article.setAuthUserId(authUserId);
             article.setCreateTime(new Date());

+ 42 - 5
src/main/java/com/caimei/service/auth/impl/AuthProductServiceImpl.java

@@ -202,8 +202,14 @@ public class AuthProductServiceImpl implements AuthProductService {
         // 发票图片
         product.setInvoiceImage(invoiceImage);
         // 商品信息保存后,上线状态默认为“待上线”,审核状态为“待审核”
-        product.setStatus(2);
-        product.setAuditStatus(2);
+        /*product.setStatus(2);
+        product.setAuditStatus(2);*/
+        // 供应商保存,直接上线;机构保存,需要供应商审核通过后才上线
+        product.setStatus(1 == source ? 1 : 2);
+        product.setAuditStatus(1 == source ? 1 : 2);
+        Integer adminUserId = authMapper.getAdminUserId();
+        product.setAuditBy(adminUserId);
+        product.setAuditTime(new Date());
         product.setShopAuditStatus(1 == source ? 1 : 2);
         if (insertFlag) {
             // 原授权牌照
@@ -453,7 +459,32 @@ public class AuthProductServiceImpl implements AuthProductService {
             authProductMapper.updateProductAuditStatus(productId, productTypeId, status, auditStatus, invalidReason, auditBy, auditTime);
         }
         if (2 == source) {
-            authProductMapper.updateProductShopAuditStatus(productId, auditStatus, invalidReason, auditBy, auditTime);
+            // 获取设备信息
+            ProductPo product = authProductMapper.getProductPo(productId);
+            Integer productTypeId = product.getProductTypeId();
+            if (1 == auditStatus && null == productTypeId && StringUtils.isNotEmpty(product.getName()) && StringUtils.isNotEmpty(product.getImage())) {
+                // 新增设备分类
+                Integer authUserId = authProductMapper.getAuthUserIdByProductId(productId);
+                // 查询设备分类是否已存在
+                ProductTypePo productType = authProductMapper.getProductType(null, product.getName(), authUserId);
+                if (null == productType) {
+                    try {
+                        ResponseJson<ProductTypePo> result = saveProductType(null, authUserId, product.getName(), product.getImage(), product.getCreateBy(), 2);
+                        int code = result.getCode();
+                        if (0 == code) {
+                            productType = result.getData();
+                            productTypeId = productType.getProductTypeId();
+                            // 设备分类直接审核通过
+                            auditProductType(productTypeId, 1, null, auditBy);
+                        }
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                } else {
+                    productTypeId = productType.getProductTypeId();
+                }
+            }
+            authProductMapper.updateProductShopAuditStatus(productId, productTypeId, status, auditStatus, invalidReason, auditBy, auditTime);
         }
         return ResponseJson.success("审核商品成功");
     }
@@ -506,8 +537,14 @@ public class AuthProductServiceImpl implements AuthProductService {
         productType.setCreateBy(createBy);
         productType.setCreateTime(new Date());
         // 上线状态默认为“待上线”,审核状态为“待审核”
-        productType.setStatus(2);
-        productType.setAuditStatus(2);
+        /*productType.setStatus(2);
+        productType.setAuditStatus(2);*/
+        // 供应商保存,直接上线;机构保存,需要供应商审核通过后才上线
+        productType.setStatus(1 == createSource ? 1 : 2);
+        productType.setAuditStatus(1 == createSource ? 1 : 2);
+        Integer adminUserId = authMapper.getAdminUserId();
+        productType.setAuditBy(adminUserId);
+        productType.setAuditTime(new Date());
         productType.setCreateSource(createSource);
         if (insertFlag) {
             // 创建人id

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

@@ -246,8 +246,14 @@ public class AuthServiceImpl implements AuthService {
             }
         }
         // 保存品牌授权信息,上线状态默认为“待上线”,审核状态为“待审核”
-        auth.setStatus(2);
-        auth.setAuditStatus(2);
+        /*auth.setStatus(2);
+        auth.setAuditStatus(2);*/
+        // 供应商保存,直接上线;机构保存,需要供应商审核通过后才上线
+        auth.setStatus(1 == source ? 1 : 2);
+        auth.setAuditStatus(1 == source ? 1 : 2);
+        Integer adminUserId = authMapper.getAdminUserId();
+        auth.setAuditBy(adminUserId);
+        auth.setAuditTime(new Date());
         auth.setDelFlag(0);
         auth.setShopAuditStatus(1 == source ? 1 : 2);
         /*
@@ -297,7 +303,7 @@ public class AuthServiceImpl implements AuthService {
             authMapper.updateAuthAuditStatus(authId, status, auditStatus, invalidReason, auditBy, auditTime);
         }
         if (2 == source) {
-            authMapper.updateAuthShopAuditStatus(authId, auditStatus, invalidReason, auditBy, auditTime);
+            authMapper.updateAuthShopAuditStatus(authId, status, auditStatus, invalidReason, auditBy, auditTime);
         }
         return ResponseJson.success("审核品牌授权成功");
     }
@@ -719,7 +725,6 @@ public class AuthServiceImpl implements AuthService {
             }
             authPartySheet.setColumnWidth(0, (columnWidth + 4) * 256);
             List<String> sheetNameList = new ArrayList<>();
-
             // 创建每个机构对应的商品表
             authPartyList.forEach(authParty -> {
                 // 授权机构名称作为表名
@@ -730,6 +735,7 @@ public class AuthServiceImpl implements AuthService {
                 int k = 1;
                 while (sheetNameList.contains(productSheetName)) {
                     productSheetName = productSheetName.replace("(" + (k-1) + ")", "") + "(" + k + ")";
+                    k++;
                 }
                 sheetNameList.add(productSheetName);
                 HSSFSheet productSheet = workbook.createSheet(productSheetName);

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

@@ -1,5 +1,6 @@
 package com.caimei.service.auth.impl;
 
+import com.aliyuncs.utils.StringUtils;
 import com.caimei.mapper.cmMapper.FileMapper;
 import com.caimei.model.en.QrCodeSize;
 import com.caimei.model.po.ProductImagePo;
@@ -72,7 +73,9 @@ public class DownloadServiceImpl implements DownloadService {
                 UploadFilePo file = new UploadFilePo();
                 file.setFileUrl(productImage.getCertificateImage());
                 file.setFileName(productImage.getAuthParty() + "-" + productImage.getSnCode());
-                fileList.add(file);
+                if (StringUtils.isNotEmpty(file.getFileUrl())) {
+                    fileList.add(file);
+                }
             });
         } else if (2 == type) {
             productImageList.forEach(productImage -> {
@@ -87,11 +90,18 @@ public class DownloadServiceImpl implements DownloadService {
                 fileList.add(file);
             });
         } else {
+            List<String> fileNameList = new ArrayList<>();
             authImageList.forEach(authImage -> {
                 String qrCodeLink = wwwServer + "/" + authUserId + "/app/approve/club/detail?id=" + authImage.getAuthId();
                 // 生成二维码
                 BufferedImage qrCodeImage = ImageUtils.createQrCode(qrCodeLink, QrCodeSize.LARGE);
                 String fileName = authImage.getAuthParty();
+                int k = 1;
+                while (fileNameList.contains(fileName)) {
+                    fileName = fileName.replace("(" + (k-1) + ")", "") + "(" + k + ")";
+                    k++;
+                }
+                fileNameList.add(fileName);
                 String imagePath = createBufferedImageFile(qrCodeImage, fileName, "png");
                 UploadFilePo file = new UploadFilePo();
                 file.setFileUrl(imagePath);

+ 11 - 2
src/main/java/com/caimei/service/data/impl/FileServiceImpl.java

@@ -1,5 +1,6 @@
 package com.caimei.service.data.impl;
 
+import com.caimei.mapper.cmMapper.AuthMapper;
 import com.caimei.mapper.cmMapper.FileMapper;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.po.CourseFilePo;
@@ -53,6 +54,9 @@ public class FileServiceImpl implements FileService {
     @Value("${spring.profiles.active}")
     private String active;
 
+    @Resource
+    private AuthMapper authMapper;
+
     @Override
     public ResponseJson<PageInfo<FileListVo>> getFileList(Integer listType, Integer authUserId, Integer fileType, String fileTitle, Integer auditStatus, Integer status, Integer pageNum, Integer pageSize) {
         listType = null == listType ? 1 : listType;
@@ -90,8 +94,13 @@ public class FileServiceImpl implements FileService {
         dataFile.setDownloadUrl(fileDownloadUrl);
         dataFile.setName(fileName);
         // 上线状态默认为“待上线”,审核状态为“待审核”
-        dataFile.setStatus(2);
-        dataFile.setAuditStatus(2);
+//        dataFile.setStatus(2);
+//        dataFile.setAuditStatus(2);
+        dataFile.setStatus(1);
+        dataFile.setAuditStatus(1);
+        Integer adminUserId = authMapper.getAdminUserId();
+        dataFile.setAuditBy(adminUserId);
+        dataFile.setAuditTime(new Date());
         if (null != fileId) {
             /*
                 更新文件

+ 11 - 2
src/main/java/com/caimei/service/data/impl/ImageServiceImpl.java

@@ -1,6 +1,7 @@
 package com.caimei.service.data.impl;
 
 import com.alibaba.fastjson.JSONArray;
+import com.caimei.mapper.cmMapper.AuthMapper;
 import com.caimei.mapper.cmMapper.ImageMapper;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.po.ImagePo;
@@ -35,6 +36,9 @@ public class ImageServiceImpl implements ImageService {
 
     private UploadService uploadService;
 
+    @Resource
+    private AuthMapper authMapper;
+
     @Autowired
     public void setUploadService(UploadService uploadService) {
         this.uploadService = uploadService;
@@ -70,8 +74,13 @@ public class ImageServiceImpl implements ImageService {
         ImagePo image = new ImagePo();
         image.setTitle(imageTitle);
         // 上线状态默认为“待上线”,审核状态为“待审核”
-        image.setStatus(2);
-        image.setAuditStatus(2);
+//        image.setStatus(2);
+//        image.setAuditStatus(2);
+        image.setStatus(1);
+        image.setAuditStatus(1);
+        Integer adminUserId = authMapper.getAdminUserId();
+        image.setAuditBy(adminUserId);
+        image.setAuditTime(new Date());
         String imageZipUrl = uploadService.saveImageZip(imageArr);
         System.out.println("【图片上传】>>>>>>>>>>>>>>>>图片压缩包上传成功:"+imageZipUrl);
         image.setZipUrl(imageZipUrl);

+ 11 - 2
src/main/java/com/caimei/service/data/impl/VideoServiceImpl.java

@@ -1,5 +1,6 @@
 package com.caimei.service.data.impl;
 
+import com.caimei.mapper.cmMapper.AuthMapper;
 import com.caimei.mapper.cmMapper.VideoMapper;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.po.VideoPo;
@@ -46,6 +47,9 @@ public class VideoServiceImpl implements VideoService {
     @Value("${spring.profiles.active}")
     private String active;
 
+    @Resource
+    private AuthMapper authMapper;
+
     @Override
     public ResponseJson<PageInfo<VideoListVo>> getVideoList(Integer listType, Integer authUserId, String videoTitle, Integer auditStatus, Integer status, Integer pageNum, Integer pageSize) {
         if (null == authUserId) {
@@ -81,8 +85,13 @@ public class VideoServiceImpl implements VideoService {
         video.setPreviewUrl(videoPreviewUrl);
         video.setDownloadUrl(videoDownloadUrl);
         // 上线状态默认为“待上线”,审核状态为“待审核”
-        video.setStatus(2);
-        video.setAuditStatus(2);
+//        video.setStatus(2);
+//        video.setAuditStatus(2);
+        video.setStatus(1);
+        video.setAuditStatus(1);
+        Integer adminUserId = authMapper.getAdminUserId();
+        video.setAuditBy(adminUserId);
+        video.setAuditTime(new Date());
         if (null != videoId) {
             /*
                 更新视频

+ 2 - 2
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">
 <mapper namespace="com.caimei.mapper.cmMapper.ArticleMapper">
     <insert id="insertArticle">
-        insert into cm_brand_article(authUserId, title, image, content, auditStatus, status, createTime)
-        values (#{authUserId}, #{title}, #{image}, #{content}, #{auditStatus}, #{status}, #{createTime})
+        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>
     <update id="updateArticleByArticleId">
         update cm_brand_article

+ 12 - 7
src/main/resources/mapper/AuthMapper.xml

@@ -66,13 +66,12 @@
     </update>
     <update id="updateAuthShopAuditStatus">
         update cm_brand_auth
-        set shopAuditStatus = #{shopAuditStatus},
-        <if test="0 == shopAuditStatus">
-            auditStatus = #{shopAuditStatus},
-        </if>
-        shopInvalidReason = #{shopInvalidReason},
-        shopAuditBy = #{shopAuditBy},
-        shopAuditTime = #{shopAuditTime}
+        set shopAuditStatus   = #{shopAuditStatus},
+            status            = #{status},
+            auditStatus       = #{shopAuditStatus},
+            shopInvalidReason = #{shopInvalidReason},
+            shopAuditBy       = #{shopAuditBy},
+            shopAuditTime     = #{shopAuditTime}
         where id = #{authId}
     </update>
     <update id="updateSendStatus">
@@ -326,4 +325,10 @@
         where authParty like concat('%',#{authParty},'%') and address like concat('%',#{address},'%')
         and delFlag = 0
     </select>
+    <select id="getAdminUserId" resultType="java.lang.Integer">
+        select authUserId
+        from cm_brand_auth_user
+        where userIdentity = 1
+        limit 1
+    </select>
 </mapper>

+ 16 - 7
src/main/resources/mapper/AuthProductMapper.xml

@@ -5,12 +5,12 @@
         insert into cm_brand_auth_product(`authId`, `brandId`, `productTypeId`, `snCode`, name, image,
                                           `originalCertificateImage`, `certificateImage`, `pcCertificateImage`,
                                           `appletsCertificateImage`, `addQrCodeFlag`, `addTemplateType`,
-                                          purchaseWay, invoiceImage, `status`,
+                                          purchaseWay, invoiceImage, `status`, auditBy, auditTime,
                                           `auditStatus`, shopAuditStatus, `createTime`, `createBy`, createSource)
         values (#{authId}, #{brandId}, #{productTypeId}, #{snCode}, #{name}, #{image},
                 #{originalCertificateImage}, #{certificateImage}, #{pcCertificateImage},
                 #{appletsCertificateImage}, #{addQrCodeFlag}, #{addTemplateType},
-                #{purchaseWay}, #{invoiceImage}, #{status},
+                #{purchaseWay}, #{invoiceImage}, #{status}, #{auditBy}, #{auditTime},
                 #{auditStatus}, #{shopAuditStatus}, #{createTime}, #{createBy}, #{createSource})
     </insert>
     <insert id="insertProductParam">
@@ -18,8 +18,8 @@
         values (#{productId}, #{paramName}, #{paramContent})
     </insert>
     <insert id="insertProductType" keyColumn="id" keyProperty="productTypeId" useGeneratedKeys="true" parameterType="com.caimei.model.po.ProductTypePo">
-        insert into cm_brand_product_type (authUserId, name, image, pcImage, appletsImage, status, auditStatus, createBy, createSource, createTime, delFlag)
-        values (#{authUserId}, #{name}, #{image}, #{pcImage}, #{appletsImage}, #{status}, #{auditStatus}, #{createBy}, #{createSource}, #{createTime}, 0)
+        insert into cm_brand_product_type (authUserId, name, image, pcImage, appletsImage, status, auditStatus, auditBy, auditTime, createBy, createSource, createTime, delFlag)
+        values (#{authUserId}, #{name}, #{image}, #{pcImage}, #{appletsImage}, #{status}, #{auditStatus}, #{auditBy}, #{auditTime}, #{createBy}, #{createSource}, #{createTime}, 0)
     </insert>
 
     <update id="updateProductStatusByProductId">
@@ -49,6 +49,11 @@
                 name = #{name},
                 image = #{image},
             </if>
+            <if test="productTypeId != null">
+                productTypeId = #{productTypeId},
+                name = null,
+                image = null,
+            </if>
             purchaseWay        = #{purchaseWay},
             invoiceImage       = #{invoiceImage},
             `status`           = #{status},
@@ -126,10 +131,14 @@
     <update id="updateProductShopAuditStatus">
         update cm_brand_auth_product
         set shopAuditStatus = #{shopAuditStatus},
-        <if test="0 == shopAuditStatus">
-            auditStatus = #{shopAuditStatus},
-        </if>
+        status = #{status},
+        auditStatus = #{shopAuditStatus},
         shopInvalidReason = #{shopInvalidReason},
+        <if test="productTypeId != null">
+            productTypeId = #{productTypeId},
+            name = null,
+            image = null,
+        </if>
         shopAuditBy = #{shopAuditBy},
         shopAuditTime = #{shopAuditTime}
         where id = #{productId}

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

@@ -2,9 +2,10 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.caimei.mapper.cmMapper.FileMapper">
     <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, createTime)
+        insert into cm_brand_file(authUserId, fileType, title, name, previewUrl, downloadUrl, auditStatus, status,
+                                  createTime, auditBy, auditTime)
         values (#{authUserId}, #{fileType}, #{title}, #{name}, #{previewUrl}, #{downloadUrl}, #{auditStatus}, #{status},
-                #{createTime})
+                #{createTime}, #{auditBy}, #{auditTime})
     </insert>
     <insert id="insertCourseFile">
         insert into cm_brand_course_file (title, name, ossName, type, module, createTime)

+ 2 - 2
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">
 <mapper namespace="com.caimei.mapper.cmMapper.ImageMapper">
     <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)
-        values (#{authUserId}, #{title}, #{zipUrl}, #{auditStatus}, #{status}, #{createTime})
+        insert into cm_brand_image(authUserId, title, zipUrl, auditStatus, status, createTime, auditBy, auditTime)
+        values (#{authUserId}, #{title}, #{zipUrl}, #{auditStatus}, #{status}, #{createTime}, #{auditBy}, #{auditTime})
     </insert>
     <insert id="insertImageDetail">
         insert into cm_brand_image_detail(imageId, image)

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

@@ -2,9 +2,10 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.caimei.mapper.cmMapper.VideoMapper">
     <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)
         values (#{authUserId}, #{title}, #{name}, #{previewUrl}, #{downloadUrl}, #{auditStatus}, #{status},
-                #{createTime})
+                #{createTime}, #{auditBy}, #{auditTime})
     </insert>
     <update id="updateVideoByVideoId">
         update cm_brand_video