Sfoglia il codice sorgente

账号排期 任务列表新增功能

lqc 4 anni fa
parent
commit
2930ff4433

+ 117 - 0
src/main/java/com/mokamrp/privates/controller/pangu/FosterwxCashAccountScheduleController.java

@@ -0,0 +1,117 @@
+package com.mokamrp.privates.controller.pangu;
+
+import com.mokamrp.privates.constant.HttpStatus;
+import com.mokamrp.privates.controller.BaseController;
+import com.mokamrp.privates.entity.ResHandle;
+import com.mokamrp.privates.entity.VoltaHandle;
+import com.mokamrp.privates.entity.pangu.FosterwxCashAccountScheduleHandle;
+import com.mokamrp.privates.help.AjaxResult;
+import com.mokamrp.privates.help.Analysis;
+import com.mokamrp.privates.interceptor.AuthUser;
+import com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashAccountSchedule;
+import com.mokamrp.privates.mapper.pojo.User;
+import com.mokamrp.privates.service.pangu.FosterwxCashAccountScheduleService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.util.*;
+
+
+/**
+ * <p>
+ * 盘古微信变现任务列表 前端控制器
+ * </p>
+ *
+ * @author leon
+ * @since 2021-10-08
+ */
+@RestController
+@RequestMapping("/fosterwxCashAccountSchedule")
+public class FosterwxCashAccountScheduleController extends BaseController<FosterwxCashAccountSchedule> {
+
+    public static final String REGEX = ",";
+    @Autowired
+    public FosterwxCashAccountScheduleService fosterwxCashAccountScheduleService;
+
+    /*
+     * @fast
+     * 默认生成的控制器所继承的父类中有index/add/edit/del四个基础方法,均为post json请求
+     * 如果需要定制化,需要将BaseController中对应的方法复制到当前控制器,然后进行修改
+     */
+
+    @PostMapping("/list")
+    public Object list(@Valid @RequestBody FosterwxCashAccountScheduleHandle handle, BindingResult bindingResult) {
+        if (bindingResult.hasErrors()) {
+            return AjaxResult.error(HttpStatus.ERROR, bindingResult.getFieldError().getDefaultMessage());
+        }
+        ResHandle<List<FosterwxCashAccountSchedule>> res = fosterwxCashAccountScheduleService.getList(handle);
+        return AjaxResult.success(res);
+    }
+
+    @PostMapping("/addPro")
+    @Transactional(rollbackFor = Exception.class)
+    public Object addPro(@RequestBody FosterwxCashAccountSchedule fosterwxCashAccountSchedule, @AuthUser User user) {
+        this.onInsert(fosterwxCashAccountSchedule);
+
+        fosterwxCashAccountSchedule.setCreateUid(user.getId());
+        fosterwxCashAccountSchedule.setCreateUser(user.getName());
+        fosterwxCashAccountSchedule.setUpdateUid(user.getId());
+
+        // 待创建
+        fosterwxCashAccountSchedule.setStatus(2);
+        fosterwxCashAccountScheduleService.save(fosterwxCashAccountSchedule);
+
+        return AjaxResult.success("新建成功");
+    }
+
+    @PostMapping("/importSchedule")
+    @Transactional(rollbackFor = Exception.class)
+    public Object importSchedule(@RequestBody MultipartFile file, @AuthUser User user) {
+        Map<String, Object> map = new HashMap<>(16);
+        Map<Integer, String> feild = new HashMap<>(5);
+        feild.put(0, "scheduleDate");
+        feild.put(1, "groupId");
+        feild.put(2, "templateId");
+        List<Map<String, String>> row = new ArrayList<>();
+        VoltaHandle<ArrayList<Map<String, String>>> voltaRes = Analysis.analysis(file, feild);
+        if (voltaRes.getErr() != null) {
+            return AjaxResult.error(voltaRes.getErr());
+        }
+        row = voltaRes.getData();
+
+        for (Map<String, String> detail : row) {
+            FosterwxCashAccountSchedule fosterwxCashAccountSchedule = new FosterwxCashAccountSchedule();
+            fosterwxCashAccountSchedule.setScheduleDate(LocalDate.parse(detail.get("scheduleDate")));
+            fosterwxCashAccountSchedule.setGroupId(Integer.valueOf(detail.get("groupId")));
+            fosterwxCashAccountSchedule.setTemplateId(Integer.valueOf(detail.get("templateId")));
+            fosterwxCashAccountSchedule.setStatus(2);
+            fosterwxCashAccountSchedule.setCreateUid(user.getId());
+            fosterwxCashAccountSchedule.setCreateUser(user.getName());
+            fosterwxCashAccountSchedule.setUpdateUid(user.getId());
+            fosterwxCashAccountSchedule.setCreateAt(LocalDateTime.now());
+            fosterwxCashAccountSchedule.setUpdateAt(LocalDateTime.now());
+
+            fosterwxCashAccountScheduleService.save(fosterwxCashAccountSchedule);
+        }
+
+        return AjaxResult.success("导入排期成功");
+    }
+
+    @PostMapping("/immediateCreate")
+    @Transactional(rollbackFor = Exception.class)
+    public Object immediateCreate(FosterwxCashAccountScheduleHandle handle) {
+        Arrays.asList(handle.getIds().split(REGEX)).forEach(id -> fosterwxCashAccountScheduleService.createTask(Integer.valueOf(id)));
+
+        return AjaxResult.success("立即生成成功");
+    }
+}
+

+ 55 - 0
src/main/java/com/mokamrp/privates/controller/pangu/FosterwxCashScheduleTaskListController.java

@@ -0,0 +1,55 @@
+package com.mokamrp.privates.controller.pangu;
+
+import com.mokamrp.privates.constant.HttpStatus;
+import com.mokamrp.privates.entity.PostBasePageHandle;
+import com.mokamrp.privates.help.AjaxResult;
+import com.mokamrp.privates.entity.ResHandle;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.mokamrp.privates.service.pangu.FosterwxCashScheduleTaskListService;
+import com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashScheduleTaskList;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.mokamrp.privates.controller.BaseController;
+import javax.validation.Valid;
+import java.util.Map;
+import java.util.List;
+
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * <p>
+ * 盘古微信变现排期任务列表 前端控制器
+ * </p>
+ *
+ * @author leon
+ * @since 2021-10-08
+ */
+@RestController
+@RequestMapping("/fosterwxCashScheduleTaskList")
+public class FosterwxCashScheduleTaskListController extends BaseController<FosterwxCashScheduleTaskList> {
+
+    @Autowired
+    public FosterwxCashScheduleTaskListService fosterwxCashScheduleTaskListService;
+
+    /*
+     * @fast
+     * 默认生成的控制器所继承的父类中有index/add/edit/del四个基础方法,均为post json请求
+     * 如果需要定制化,需要将BaseController中对应的方法复制到当前控制器,然后进行修改
+     */
+
+    @PostMapping("/list")
+    public Object list(@Valid @RequestBody PostBasePageHandle postBasePageHandle, BindingResult bindingResult){
+        if (bindingResult.hasErrors()) {
+            return AjaxResult.error(HttpStatus.ERROR, bindingResult.getFieldError().getDefaultMessage());
+        }
+        ResHandle<List<FosterwxCashScheduleTaskList>> res = fosterwxCashScheduleTaskListService.getList(postBasePageHandle);
+        return AjaxResult.success(res);
+    }
+
+
+}
+

+ 24 - 0
src/main/java/com/mokamrp/privates/entity/pangu/FosterwxCashAccountScheduleHandle.java

@@ -0,0 +1,24 @@
+package com.mokamrp.privates.entity.pangu;
+
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+
+/**
+ * <p>
+ * 盘古微信变现任务列表
+ * </p>
+ *
+ * @author luqc
+ * @since 2021-10-08
+ */
+@Data
+public class FosterwxCashAccountScheduleHandle extends Model<FosterwxCashAccountScheduleHandle> {
+    private Integer page;
+    private Integer pageSize;
+    private Integer id;
+    private Integer groupId;
+    private Integer templateId;
+    private Integer createUid;
+    private String createUser;
+    private String ids;
+}

+ 21 - 0
src/main/java/com/mokamrp/privates/mapper/pangu/FosterwxCashAccountScheduleMapper.java

@@ -0,0 +1,21 @@
+package com.mokamrp.privates.mapper.pangu;
+
+import com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashAccountSchedule;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.springframework.stereotype.Component;
+import org.apache.ibatis.annotations.Param;
+import java.util.List;
+
+/**
+ * <p>
+ * 盘古微信变现任务列表 Mapper 接口
+ * </p>
+ *
+ * @author leon
+ * @since 2021-10-08
+ */
+@Component
+public interface FosterwxCashAccountScheduleMapper extends BaseMapper<FosterwxCashAccountSchedule> {
+    public List<FosterwxCashAccountSchedule> getList(Page<FosterwxCashAccountSchedule> pageObj);
+}

+ 51 - 0
src/main/java/com/mokamrp/privates/mapper/pangu/FosterwxCashAccountScheduleMapper.xml

@@ -0,0 +1,51 @@
+<?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="com.mokamrp.privates.mapper.pangu.FosterwxCashAccountScheduleMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashAccountSchedule">
+        <id column="id" property="id" />
+        <result column="schedule_date" property="scheduleDate" />
+        <result column="group_id" property="groupId" />
+        <result column="template_id" property="templateId" />
+        <result column="status" property="status" />
+        <result column="create_uid" property="createUid" />
+        <result column="create_user" property="createUser" />
+        <result column="update_uid" property="updateUid" />
+        <result column="create_at" property="createAt" />
+        <result column="update_at" property="updateAt" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, schedule_date, group_id, template_id, status, create_uid, update_uid, create_at, update_at
+    </sql>
+    <select id="getList" resultType="com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashAccountSchedule">
+        SELECT
+            account_schedule.id,
+            mobile_group.group_name,
+            task_template.template_name,
+            account_schedule.create_user,
+            (
+                SELECT
+                    count( id )
+                FROM
+                    pan_fosterwx_cash_schedule_task_list
+                WHERE
+                    schedule_id = account_schedule.id
+                  AND STATUS IN ( '2', '4', '5', '6' )) AS created_count,
+            (
+                SELECT
+                    count( id )
+                FROM
+                    pan_fosterwx_cash_schedule_task_list
+                WHERE
+                    schedule_id = account_schedule.id
+                  AND STATUS IN ( '5' )) AS sended_count,
+            ( SELECT count( id ) FROM pan_fosterwx_cash_schedule_task_list WHERE schedule_id = account_schedule.id ) AS total_count
+        FROM
+            pan_fosterwx_cash_account_schedule account_schedule
+        LEFT JOIN pan_fosterwx_cash_task_template task_template ON account_schedule.template_id = task_template.id
+        LEFT JOIN pan_fosterwx_cash_mobile_group mobile_group ON account_schedule.group_id = mobile_group.id
+    </select>
+</mapper>

+ 21 - 0
src/main/java/com/mokamrp/privates/mapper/pangu/FosterwxCashScheduleTaskListMapper.java

@@ -0,0 +1,21 @@
+package com.mokamrp.privates.mapper.pangu;
+
+import com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashScheduleTaskList;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.springframework.stereotype.Component;
+import org.apache.ibatis.annotations.Param;
+import java.util.List;
+
+/**
+ * <p>
+ * 盘古微信变现排期任务列表 Mapper 接口
+ * </p>
+ *
+ * @author leon
+ * @since 2021-10-08
+ */
+@Component
+public interface FosterwxCashScheduleTaskListMapper extends BaseMapper<FosterwxCashScheduleTaskList> {
+    public List<FosterwxCashScheduleTaskList> getList(Page<FosterwxCashScheduleTaskList> pageObj);
+}

+ 31 - 0
src/main/java/com/mokamrp/privates/mapper/pangu/FosterwxCashScheduleTaskListMapper.xml

@@ -0,0 +1,31 @@
+<?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="com.mokamrp.privates.mapper.pangu.FosterwxCashScheduleTaskListMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashScheduleTaskList">
+        <id column="id" property="id" />
+        <result column="schedule_id" property="scheduleId" />
+        <result column="template_id" property="templateId" />
+        <result column="group_id" property="groupId" />
+        <result column="task_type" property="taskType" />
+        <result column="remark" property="remark" />
+        <result column="task_content" property="taskContent" />
+        <result column="status" property="status" />
+        <result column="err_info" property="errInfo" />
+        <result column="send_time" property="sendTime" />
+        <result column="create_uid" property="createUid" />
+        <result column="create_user" property="createUser" />
+        <result column="update_uid" property="updateUid" />
+        <result column="create_at" property="createAt" />
+        <result column="update_at" property="updateAt" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, schedule_id, template_id, group_id, task_type, remark, task_content, status, err_info, send_time, create_uid, update_uid, create_at, update_at
+    </sql>
+    <select id="getList" resultType="com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashScheduleTaskList">
+        SELECT * FROM pan_fosterwx_cash_schedule_task_list
+    </select>
+</mapper>

+ 176 - 0
src/main/java/com/mokamrp/privates/mapper/pangu/pojo/FosterwxCashAccountSchedule.java

@@ -0,0 +1,176 @@
+package com.mokamrp.privates.mapper.pangu.pojo;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import java.time.LocalDate;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 盘古微信变现任务列表
+ * </p>
+ *
+ * @author leon
+ * @since 2021-10-08
+ */
+@TableName("pan_fosterwx_cash_account_schedule")
+public class FosterwxCashAccountSchedule extends Model<FosterwxCashAccountSchedule> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+      @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 排期日期
+     */
+    private LocalDate scheduleDate;
+
+    /**
+     * 组别id
+     */
+    private Integer groupId;
+
+    /**
+     * 模板id
+     */
+    private Integer templateId;
+
+    /**
+     * 任务状态(1:正常 0:取消 2:待创建)
+     */
+    private Integer status;
+
+    /**
+     * 创建人
+     */
+    private Integer createUid;
+
+    /**
+     * 创建人名称
+     */
+    private String createUser;
+
+    /**
+     * 更新人
+     */
+    private Integer updateUid;
+
+    /**
+     * 创建时间
+     */
+    private LocalDateTime createAt;
+
+    /**
+     * 更新时间
+     */
+    private LocalDateTime updateAt;
+
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public LocalDate getScheduleDate() {
+        return scheduleDate;
+    }
+
+    public void setScheduleDate(LocalDate scheduleDate) {
+        this.scheduleDate = scheduleDate;
+    }
+
+    public Integer getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(Integer groupId) {
+        this.groupId = groupId;
+    }
+
+    public Integer getTemplateId() {
+        return templateId;
+    }
+
+    public void setTemplateId(Integer templateId) {
+        this.templateId = templateId;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public Integer getCreateUid() {
+        return createUid;
+    }
+
+    public void setCreateUid(Integer createUid) {
+        this.createUid = createUid;
+    }
+
+    public String getCreateUser() {
+        return createUser;
+    }
+
+    public void setCreateUser(String createUser) {
+        this.createUser = createUser;
+    }
+
+    public Integer getUpdateUid() {
+        return updateUid;
+    }
+
+    public void setUpdateUid(Integer updateUid) {
+        this.updateUid = updateUid;
+    }
+
+    public LocalDateTime getCreateAt() {
+        return createAt;
+    }
+
+    public void setCreateAt(LocalDateTime createAt) {
+        this.createAt = createAt;
+    }
+
+    public LocalDateTime getUpdateAt() {
+        return updateAt;
+    }
+
+    public void setUpdateAt(LocalDateTime updateAt) {
+        this.updateAt = updateAt;
+    }
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+    @Override
+    public String toString() {
+        return "FosterwxCashAccountSchedule{" +
+        "id=" + id +
+        ", scheduleDate=" + scheduleDate +
+        ", groupId=" + groupId +
+        ", templateId=" + templateId +
+        ", status=" + status +
+        ", createUid=" + createUid +
+        ", createUser=" + createUser +
+        ", updateUid=" + updateUid +
+        ", createAt=" + createAt +
+        ", updateAt=" + updateAt +
+        "}";
+    }
+}

+ 245 - 0
src/main/java/com/mokamrp/privates/mapper/pangu/pojo/FosterwxCashScheduleTaskList.java

@@ -0,0 +1,245 @@
+package com.mokamrp.privates.mapper.pangu.pojo;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 盘古微信变现排期任务列表
+ * </p>
+ *
+ * @author leon
+ * @since 2021-10-08
+ */
+@TableName("pan_fosterwx_cash_schedule_task_list")
+public class FosterwxCashScheduleTaskList extends Model<FosterwxCashScheduleTaskList> {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+      @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 排期id
+     */
+    private Integer scheduleId;
+
+    /**
+     * 模板id
+     */
+    private Integer templateId;
+
+    /**
+     * 组别id
+     */
+    private Integer groupId;
+
+    /**
+     * 任务类型(1.发文-小程序卡片2.发文-图文3.小程序4.链接)
+     */
+    private Integer taskType;
+
+    /**
+     * 任务描述
+     */
+    private String remark;
+
+    /**
+     * 任务名称
+     */
+    private String taskContent;
+
+    /**
+     * 状态(1、待生成;2、已生成;3、生成失败;4、待发送;5、已发送;6、已取消)
+     */
+    private Integer status;
+
+    /**
+     * 失败原因
+     */
+    private String errInfo;
+
+    /**
+     * 发送时间
+     */
+    private LocalDateTime sendTime;
+
+    /**
+     * 创建人
+     */
+    private Integer createUid;
+
+    /**
+     * 创建人名称
+     */
+    private String createUser;
+
+    /**
+     * 更新人
+     */
+    private Integer updateUid;
+
+    /**
+     * 创建时间
+     */
+    private LocalDateTime createAt;
+
+    /**
+     * 更新时间
+     */
+    private LocalDateTime updateAt;
+
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getScheduleId() {
+        return scheduleId;
+    }
+
+    public void setScheduleId(Integer scheduleId) {
+        this.scheduleId = scheduleId;
+    }
+
+    public Integer getTemplateId() {
+        return templateId;
+    }
+
+    public void setTemplateId(Integer templateId) {
+        this.templateId = templateId;
+    }
+
+    public Integer getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(Integer groupId) {
+        this.groupId = groupId;
+    }
+
+    public Integer getTaskType() {
+        return taskType;
+    }
+
+    public void setTaskType(Integer taskType) {
+        this.taskType = taskType;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getTaskContent() {
+        return taskContent;
+    }
+
+    public void setTaskContent(String taskContent) {
+        this.taskContent = taskContent;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getErrInfo() {
+        return errInfo;
+    }
+
+    public void setErrInfo(String errInfo) {
+        this.errInfo = errInfo;
+    }
+
+    public LocalDateTime getSendTime() {
+        return sendTime;
+    }
+
+    public void setSendTime(LocalDateTime sendTime) {
+        this.sendTime = sendTime;
+    }
+
+    public Integer getCreateUid() {
+        return createUid;
+    }
+
+    public void setCreateUid(Integer createUid) {
+        this.createUid = createUid;
+    }
+
+    public String getCreateUser() {
+        return createUser;
+    }
+
+    public void setCreateUser(String createUser) {
+        this.createUser = createUser;
+    }
+
+    public Integer getUpdateUid() {
+        return updateUid;
+    }
+
+    public void setUpdateUid(Integer updateUid) {
+        this.updateUid = updateUid;
+    }
+
+    public LocalDateTime getCreateAt() {
+        return createAt;
+    }
+
+    public void setCreateAt(LocalDateTime createAt) {
+        this.createAt = createAt;
+    }
+
+    public LocalDateTime getUpdateAt() {
+        return updateAt;
+    }
+
+    public void setUpdateAt(LocalDateTime updateAt) {
+        this.updateAt = updateAt;
+    }
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+    @Override
+    public String toString() {
+        return "FosterwxCashScheduleTaskList{" +
+        "id=" + id +
+        ", scheduleId=" + scheduleId +
+        ", templateId=" + templateId +
+        ", groupId=" + groupId +
+        ", taskType=" + taskType +
+        ", remark=" + remark +
+        ", taskContent=" + taskContent +
+        ", status=" + status +
+        ", errInfo=" + errInfo +
+        ", sendTime=" + sendTime +
+        ", createUid=" + createUid +
+        ", createUser=" + createUser +
+        ", updateUid=" + updateUid +
+        ", createAt=" + createAt +
+        ", updateAt=" + updateAt +
+        "}";
+    }
+}

+ 27 - 0
src/main/java/com/mokamrp/privates/service/pangu/FosterwxCashAccountScheduleService.java

@@ -0,0 +1,27 @@
+package com.mokamrp.privates.service.pangu;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.mokamrp.privates.entity.ResHandle;
+import com.mokamrp.privates.entity.pangu.FosterwxCashAccountScheduleHandle;
+import com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashAccountSchedule;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 盘古微信变现任务列表 服务类
+ * </p>
+ *
+ * @author leon
+ * @since 2021-10-08
+ */
+public interface FosterwxCashAccountScheduleService extends IService<FosterwxCashAccountSchedule> {
+    //.@leon 获取数据列表
+    public ResHandle<List<FosterwxCashAccountSchedule>> getList(FosterwxCashAccountScheduleHandle handle);
+
+    /**
+     * 根据排期id 创建任务列表
+     * @param id
+     */
+    void createTask(Integer id);
+}

+ 20 - 0
src/main/java/com/mokamrp/privates/service/pangu/FosterwxCashScheduleTaskListService.java

@@ -0,0 +1,20 @@
+package com.mokamrp.privates.service.pangu;
+
+import com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashScheduleTaskList;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.mokamrp.privates.entity.PostBasePageHandle;
+import com.mokamrp.privates.entity.ResHandle;
+import java.util.List;
+import java.util.Map;
+/**
+ * <p>
+ * 盘古微信变现排期任务列表 服务类
+ * </p>
+ *
+ * @author leon
+ * @since 2021-10-08
+ */
+public interface FosterwxCashScheduleTaskListService extends IService<FosterwxCashScheduleTaskList> {
+    //.@leon 获取数据列表
+    public ResHandle<List<FosterwxCashScheduleTaskList>> getList(PostBasePageHandle handle);
+}

+ 57 - 0
src/main/java/com/mokamrp/privates/service/pangu/impl/FosterwxCashAccountScheduleServiceImpl.java

@@ -0,0 +1,57 @@
+package com.mokamrp.privates.service.pangu.impl;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.mokamrp.privates.entity.ResHandle;
+import com.mokamrp.privates.entity.pangu.FosterwxCashAccountScheduleHandle;
+import com.mokamrp.privates.mapper.pangu.FosterwxCashAccountScheduleMapper;
+import com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashAccountSchedule;
+import com.mokamrp.privates.service.pangu.FosterwxCashAccountScheduleService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 盘古微信变现任务列表 服务实现类
+ * </p>
+ *
+ * @author leon
+ * @since 2021-10-08
+ */
+@Service
+public class FosterwxCashAccountScheduleServiceImpl extends ServiceImpl<FosterwxCashAccountScheduleMapper, FosterwxCashAccountSchedule> implements FosterwxCashAccountScheduleService {
+
+    @Autowired
+    public FosterwxCashAccountScheduleMapper fosterwxCashAccountScheduleMapper;
+
+    /**
+     * 获取数据列表 支持分页
+     * @param handle
+     * @return
+     */
+    public ResHandle<List<FosterwxCashAccountSchedule>> getList(FosterwxCashAccountScheduleHandle handle) {
+        Integer pagesize = handle.getPageSize();
+        Integer page = handle.getPage();
+        Page<FosterwxCashAccountSchedule> pageObj = new Page<FosterwxCashAccountSchedule>(page, pagesize);
+        List<FosterwxCashAccountSchedule> list = fosterwxCashAccountScheduleMapper.getList(pageObj);
+        ResHandle<List<FosterwxCashAccountSchedule>> res = new ResHandle<>();
+        res.setList(list);
+        res.setTotal(pageObj.getTotal());
+        return res;
+    }
+
+    /**
+     * 根据id创建任务列表
+     * @param id
+     */
+    @Override
+    public void createTask(Integer id) {
+        FosterwxCashAccountSchedule fosterwxCashAccountSchedule = fosterwxCashAccountScheduleMapper.selectById(id);
+
+        if (null != fosterwxCashAccountSchedule) {
+            // 根据任务模板id获取任务模板详情
+        }
+    }
+}

+ 43 - 0
src/main/java/com/mokamrp/privates/service/pangu/impl/FosterwxCashScheduleTaskListServiceImpl.java

@@ -0,0 +1,43 @@
+package com.mokamrp.privates.service.pangu.impl;
+
+import com.mokamrp.privates.mapper.pangu.pojo.FosterwxCashScheduleTaskList;
+import com.mokamrp.privates.mapper.pangu.FosterwxCashScheduleTaskListMapper;
+import com.mokamrp.privates.service.pangu.FosterwxCashScheduleTaskListService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.mokamrp.privates.entity.PostBasePageHandle;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import com.mokamrp.privates.entity.ResHandle;
+import java.util.*;
+
+/**
+ * <p>
+ * 盘古微信变现排期任务列表 服务实现类
+ * </p>
+ *
+ * @author leon
+ * @since 2021-10-08
+ */
+@Service
+public class FosterwxCashScheduleTaskListServiceImpl extends ServiceImpl<FosterwxCashScheduleTaskListMapper, FosterwxCashScheduleTaskList> implements FosterwxCashScheduleTaskListService {
+
+    @Autowired
+    public FosterwxCashScheduleTaskListMapper fosterwxCashScheduleTaskListMapper;
+    /**
+     * 获取数据列表 支持分页
+     * @param handle
+     * @return
+     */
+    public ResHandle<List<FosterwxCashScheduleTaskList>> getList(PostBasePageHandle handle) {
+        Integer pagesize = handle.getPagesize();
+        Integer page = handle.getPage();
+        Page<FosterwxCashScheduleTaskList> pageObj = new Page<FosterwxCashScheduleTaskList>(page, pagesize);
+        List<FosterwxCashScheduleTaskList> list = fosterwxCashScheduleTaskListMapper.getList(pageObj);
+        ResHandle<List<FosterwxCashScheduleTaskList>> res = new ResHandle<>();
+        res.setList(list);
+        res.setTotal(pageObj.getTotal());
+        return res;
+    }
+}

+ 2 - 1
src/test/java/com/mokamrp/AutoMPPangu.java

@@ -48,7 +48,8 @@ public class AutoMPPangu {
 				.setColumnNaming(NamingStrategy.underline_to_camel)
 				.setNaming(NamingStrategy.underline_to_camel) // 数据库表映射到实体的命名策略,下划线转驼峰命名
 				.setTablePrefix("pan_") //表名前缀
-				.setInclude("pan_fosterwx_cash_task_list");  //生成的表
+				.setInclude("pan_fosterwx_cash_account_schedule")
+				.setInclude("pan_fosterwx_cash_schedule_task_list");  //生成的表
 
 		//4. 包名策略配置
 		PackageConfig pkConfig = new PackageConfig();