Commit cba82979 by kk

16832-简易视频任务导+刷数据

parent 4b3d0e65
...@@ -103,6 +103,11 @@ ...@@ -103,6 +103,11 @@
<artifactId>commons-lang3</artifactId> <artifactId>commons-lang3</artifactId>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>27.0-jre</version>
</dependency>
</dependencies> </dependencies>
......
package cn.kk.spring_simple_operation.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 各部门分组表 前端控制器
* </p>
*
* @author guokunkun
* @since 2025-05-26
*/
@RestController
@RequestMapping("/spring_simple_operation/dept-group")
public class DeptGroupController {
}
package cn.kk.spring_simple_operation.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
/**
* <p>
* 各部门分组表
* </p>
*
* @author guokunkun
* @since 2025-05-26
*/
@Getter
@Setter
@Accessors(chain = true)
@TableName("dept_group")
@ApiModel(value = "DeptGroup对象", description = "各部门分组表")
public class DeptGroup implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("id")
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty("父组Id")
@TableField("parent_id")
private Integer parentId;
@ApiModelProperty("归属的顶级部门如:开发、摄影等")
@TableField("module")
private String module;
@ApiModelProperty("部门/组名称")
@TableField("group_name")
private String groupName;
@ApiModelProperty("部门/组简称(代表组路径)")
@TableField("group_num")
private String groupNum;
@ApiModelProperty("部门/组职位")
@TableField("position")
private String position;
@ApiModelProperty("是否是叶子节点")
@TableField("is_leaf")
private Integer isLeaf;
@ApiModelProperty("节点全路径")
@TableField("node_path")
private String nodePath;
@ApiModelProperty("路径全名")
@TableField("full_name")
private String fullName;
}
...@@ -135,5 +135,7 @@ public class PhotoProgressPerson implements Serializable { ...@@ -135,5 +135,7 @@ public class PhotoProgressPerson implements Serializable {
@TableField("video_tort_reason") @TableField("video_tort_reason")
private String videoTortReason; private String videoTortReason;
@ApiModelProperty(value = "是否改变了简易视频拍摄状态:0-否,1-是")
private Integer isChangeSimpleVideoStatus;
} }
package cn.kk.spring_simple_operation.entity; package cn.kk.spring_simple_operation.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
...@@ -28,7 +29,7 @@ public class VisualDesignLog implements Serializable { ...@@ -28,7 +29,7 @@ public class VisualDesignLog implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty("id") @ApiModelProperty("id")
@TableId("id") @TableId(value = "id", type = IdType.INPUT)
private Long id; private Long id;
@ApiModelProperty("操作") @ApiModelProperty("操作")
......
package cn.kk.spring_simple_operation.enums;
import java.util.Arrays;
/**
* @description: 视觉操作 进度枚举
* @author: Devin
* @date: 2022-09-19
*/
public enum StatusEnum {
/** 状态,0-未完成,1-进行中,2-完成,3-不需要处理 */
UNFINISHED(0, "未完成"),
IN_PROGRESS(1, "进行中"),
FINISH(2, "完成"),
NO_NEED_HANDLE(3, "不需要处理"),// 这个状态,目前废弃了,不要用了
DEVELOPER_NO_NEED_HANDLE(4, "开发选择不需要处理"),
PHOTOGRAPHY_NO_NEED_HANDLE(5, "摄影选择不需要处理"),
SALE_NO_NEED_HANDLE(6, "不在建议拍摄类目中"),
;
private final Integer code;
private final String message;
StatusEnum(Integer code, String message) {
this.code = code;
this.message = message;
}
public Integer getCode() {
return code;
}
public String getMessage() {
return message;
}
public static String get(Integer code){
StatusEnum statusEnum = Arrays.stream(StatusEnum.values()).filter(e -> code.equals(e.getCode())).findAny().orElse(null);
if(statusEnum != null){
return statusEnum.getMessage();
}
return "";
}
}
package cn.kk.spring_simple_operation.mapper;
import cn.kk.spring_simple_operation.entity.DeptGroup;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* <p>
* 各部门分组表 Mapper 接口
* </p>
*
* @author guokunkun
* @since 2025-05-26
*/
@Mapper
public interface DeptGroupMapper extends BaseMapper<DeptGroup> {
List<String> getDeveloperNumByNodePathList(@Param("module") String module, @Param("nodePathList") List<String> nodePathList);
}
...@@ -21,7 +21,7 @@ public interface PhotoProgressMapper extends BaseMapper<PhotoProgress> { ...@@ -21,7 +21,7 @@ public interface PhotoProgressMapper extends BaseMapper<PhotoProgress> {
List<PhotoProgress> getListBySku(@Param("skuList") List<String> collect); List<PhotoProgress> getListBySku(@Param("skuList") List<String> collect);
List<PhotoSkuInfo> getSkuInfo(); List<PhotoSkuInfo> getSkuInfo(@Param("developerNumList") List<String> developerNumList);
List<PhotoSkuInfo> getSkuInfo2(); List<PhotoSkuInfo> getSkuInfo2();
} }
...@@ -9,6 +9,7 @@ import lombok.Data; ...@@ -9,6 +9,7 @@ import lombok.Data;
@Data @Data
public class PhotoSkuInfo { public class PhotoSkuInfo {
private Long id;
private String sku; private String sku;
......
package cn.kk.spring_simple_operation.service;
import cn.kk.spring_simple_operation.entity.DeptGroup;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* <p>
* 各部门分组表 服务类
* </p>
*
* @author guokunkun
* @since 2025-05-26
*/
public interface DeptGroupService extends IService<DeptGroup> {
List<String> getDeveloperNumByNodePathList(String module, List<String> nodePathList);
}
...@@ -19,4 +19,6 @@ public interface PhotoProgressService extends IService<PhotoProgress> { ...@@ -19,4 +19,6 @@ public interface PhotoProgressService extends IService<PhotoProgress> {
void setUploadStatusIsDeleted(List<SkuSiteDTO> list); void setUploadStatusIsDeleted(List<SkuSiteDTO> list);
void getVideoSkuArea(); void getVideoSkuArea();
void brushSimpleVideoData();
} }
package cn.kk.spring_simple_operation.service.impl;
import cn.kk.spring_simple_operation.entity.DeptGroup;
import cn.kk.spring_simple_operation.mapper.DeptGroupMapper;
import cn.kk.spring_simple_operation.service.DeptGroupService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.Collections;
import java.util.List;
/**
* <p>
* 各部门分组表 服务实现类
* </p>
*
* @author guokunkun
* @since 2025-05-26
*/
@Service
public class DeptGroupServiceImpl extends ServiceImpl<DeptGroupMapper, DeptGroup> implements DeptGroupService {
@Override
public List<String> getDeveloperNumByNodePathList(String module, List<String> nodePathList) {
if (CollectionUtils.isEmpty(nodePathList)) {
return Collections.emptyList();
}
return baseMapper.getDeveloperNumByNodePathList(module, nodePathList);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.kk.spring_simple_operation.mapper.DeptGroupMapper">
<select id="getDeveloperNumByNodePathList" resultType="java.lang.String">
SELECT
distinct sd.developer_num
FROM
dept_group dg
LEFT JOIN sync_developer sd on sd.group = dg.group_num
WHERE
dg.module = #{module} AND sd.developer_num > ''
AND (
<foreach collection="nodePathList" separator="or" item="nodePath">
dg.node_path like concat(#{nodePath}, '%')
</foreach>
)
</select>
</mapper>
...@@ -33,9 +33,16 @@ ...@@ -33,9 +33,16 @@
WHERE WHERE
vp.id IS NULL vp.id IS NULL
AND pp.sku > '' AND pp.sku > ''
AND ppp.simple_video_status != 2 AND ppp.simple_video_status not in (0, 1, 2)
AND ppp.is_change_simple_video_status = 1
AND spp.sale_time > 1716048000 AND spp.sale_time > 1716048000
<if test="developerNumList != null and developerNumList.size() > 0">
AND spa.developer_num not in
<foreach collection="developerNumList" item="developerNum" open="(" close=")" separator=",">
#{developerNum}
</foreach>
</if>
GROUP BY pp.sku GROUP BY pp.sku
</select> </select>
......
...@@ -51,7 +51,13 @@ public class ApplicationTest { ...@@ -51,7 +51,13 @@ public class ApplicationTest {
//updateBrandTransparencyPlan(); //updateBrandTransparencyPlan();
getVideoSkuArea(); //getVideoSkuArea();
brushSimpleVideoData();
}
private void brushSimpleVideoData() {
photoProgressService.brushSimpleVideoData();
} }
//private void setUploadStatusIsDeleted() throws Exception { //private void setUploadStatusIsDeleted() throws Exception {
...@@ -90,10 +96,10 @@ public class ApplicationTest { ...@@ -90,10 +96,10 @@ public class ApplicationTest {
//} //}
private void getVideoSkuArea() { //private void getVideoSkuArea() {
//
photoProgressService.getVideoSkuArea(); // photoProgressService.getVideoSkuArea();
} //}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment