Merge remote-tracking branch 'origin/master' into dev-chenjiajian
This commit is contained in:
commit
9010154067
@ -53,6 +53,14 @@ public class AdminApiConfig {
|
|||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public GroupedOpenApi mpAdminApi() {
|
||||||
|
return GroupedOpenApi.builder()
|
||||||
|
.group("admin-mp")
|
||||||
|
.pathsToMatch("/mp/**")
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public GroupedOpenApi payAdminApi() {
|
public GroupedOpenApi payAdminApi() {
|
||||||
return GroupedOpenApi.builder()
|
return GroupedOpenApi.builder()
|
||||||
|
|||||||
@ -319,7 +319,24 @@ public enum ResultCodeEnum {
|
|||||||
RICH_TEXT_TEMPLATE_CONVERT_FAILED(1100419, "转换失败"),
|
RICH_TEXT_TEMPLATE_CONVERT_FAILED(1100419, "转换失败"),
|
||||||
|
|
||||||
|
|
||||||
AI_MODEL_NOT_FOUND(12000, "未找到模型");
|
AI_MODEL_NOT_FOUND(12000, "未找到模型"),
|
||||||
|
|
||||||
|
PARENT_ALREADY_SIGNED_UP(13000, "家长已报名参加该活动"),
|
||||||
|
RELATION_NOT_FOUND(13001, "关系记录不存在"),
|
||||||
|
PARENT_NOT_SIGNED_UP(13002, "家长未报名参加该活动"),
|
||||||
|
INVALID_ACTIVITY(13003, "活动不存在或已失效"),
|
||||||
|
INVALID_AGENT(13004, "代理商不存在或已失效"),
|
||||||
|
AGENT_STATUS_INVALID(13005, "代理商状态无效"),
|
||||||
|
AGENT_EMPLOYEE_ALREADY_EXISTS(130051, "代理商员工已存在"),
|
||||||
|
AGENT_CONTACT_INFO_INVALID(13006, "联系信息无效"),
|
||||||
|
AGENT_NON_PARTICIPANT_ACTIVE(130061, "代理商没有参与该活动"),
|
||||||
|
ACTIVITY_NOT_FOUND(13007, "活动不存在"),
|
||||||
|
ACTIVITY_ALREADY_EXISTS(13008, "活动已存在"),
|
||||||
|
ACTIVITY_NOT_ACTIVE(13009, "活动未开始或已结束"),
|
||||||
|
PARTICIPATION_FAILED(13010, "参与活动失败"),
|
||||||
|
PARENT_NOT_FOUND(13011, "家长不存在"),
|
||||||
|
INVALID_ACTIVITY_STATUS(13012, "无效的活动状态"),
|
||||||
|
PARENT_ALREADY_SIGN_UP(130121, "已经报名参加该活动");
|
||||||
|
|
||||||
private int code;
|
private int code;
|
||||||
private String msg;
|
private String msg;
|
||||||
|
|||||||
@ -17,27 +17,57 @@ public class PageConverterUtils {
|
|||||||
* 将MyBatis-Plus的IPage分页结果转换为目标分页Bean
|
* 将MyBatis-Plus的IPage分页结果转换为目标分页Bean
|
||||||
* 使用示例:
|
* 使用示例:
|
||||||
* <code>
|
* <code>
|
||||||
* IPage<GoodsEntity> iPage = goodsService.queryPageList(size, current, goods);
|
* IPage<GoodsEntity> iPage = goodsService.queryPageList(size, current, goods);
|
||||||
* PageListBean<GoodsResp> result = PageConverterUtils.convertPageListBean(iPage, GoodConverter.INSTANCE::list);
|
* PageListBean<GoodsResp> result = PageConverterUtils.convertPageListBean(iPage, GoodConverter.INSTANCE::list);
|
||||||
* </code>
|
* </code>
|
||||||
*
|
* <p>
|
||||||
* 通用分页对象转换方法
|
* 通用分页对象转换方法
|
||||||
* @param sourcePage MyBatis Plus 分页对象
|
*
|
||||||
* @param converter 数据转换函数 (如 GoodConverter.INSTANCE::list)
|
* @param sourcePage MyBatis Plus 分页对象
|
||||||
* @param <T> 源数据类型
|
* @param converter 数据转换函数 (如 GoodConverter.INSTANCE::list)
|
||||||
|
* @param <T> 源数据类型
|
||||||
* @return PageListBean<R> 自定义分页响应对象
|
* @return PageListBean<R> 自定义分页响应对象
|
||||||
*/
|
*/
|
||||||
public static <T, R> PageListBean<R> convertPageListBean(
|
public static <T, R> PageListBean<R> convertPageListBean(
|
||||||
IPage<T> sourcePage,
|
IPage<T> sourcePage,
|
||||||
Function<List<T>, List<R>> converter) {
|
Function<List<T>, List<R>> converter) {
|
||||||
PageListBean<R> result = new PageListBean<>();
|
PageListBean<R> result = new PageListBean<>();
|
||||||
if(null == sourcePage || sourcePage.getRecords() == null || sourcePage.getRecords().isEmpty()){
|
if (null == sourcePage || sourcePage.getRecords() == null || sourcePage.getRecords().isEmpty()) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
// 应用转换函数
|
// 应用转换函数
|
||||||
result.setList(converter.apply(sourcePage.getRecords()));
|
result.setList(converter.apply(sourcePage.getRecords()));
|
||||||
result.setPageSize((int) sourcePage.getSize());
|
result.setPageSize(sourcePage.getSize());
|
||||||
result.setTotalPage((int) sourcePage.getPages());
|
result.setTotalPage(sourcePage.getPages());
|
||||||
|
result.setTotal(sourcePage.getTotal());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页数据转换方法
|
||||||
|
* 将MyBatis-Plus的IPage分页结果转换为目标分页Bean
|
||||||
|
* 使用示例:
|
||||||
|
* <code>
|
||||||
|
* IPage<GoodsEntity> iPage = goodsService.queryPageList(size, current, goods);
|
||||||
|
* PageListBean<GoodsResp> result = PageConverterUtils.convertPageList(iPage, GoodConverter.INSTANCE::one);
|
||||||
|
* </code>
|
||||||
|
* <p>
|
||||||
|
* 通用分页对象转换方法
|
||||||
|
* @param sourcePage MyBatis Plus 分页对象
|
||||||
|
* @param converter 数据转换函数 (如 GoodConverter.INSTANCE::one)
|
||||||
|
* @param <T> 源数据类型
|
||||||
|
* @return PageListBean 自定义分页响应对象
|
||||||
|
*/
|
||||||
|
public static <T, R> PageListBean<R> convertPageList(
|
||||||
|
IPage<T> sourcePage,
|
||||||
|
Function<T, R> converter) {
|
||||||
|
PageListBean<R> result = new PageListBean<>();
|
||||||
|
if (null == sourcePage || sourcePage.getRecords() == null || sourcePage.getRecords().isEmpty()) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
result.setList(sourcePage.getRecords().stream().map(converter).toList());
|
||||||
|
result.setPageSize(sourcePage.getSize());
|
||||||
|
result.setTotalPage(sourcePage.getPages());
|
||||||
result.setTotal(sourcePage.getTotal());
|
result.setTotal(sourcePage.getTotal());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,37 @@
|
|||||||
|
package com.seer.teach.mp.api.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(name = "AgentActivityDTO", description = "代理商活动DTO")
|
||||||
|
@Data
|
||||||
|
public class AgentActivityDTO {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Schema(description = "活动名称")
|
||||||
|
private String activityName;
|
||||||
|
|
||||||
|
@Schema(description = "活动描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@Schema(description = "活动开始时间")
|
||||||
|
private LocalDateTime startTime;
|
||||||
|
|
||||||
|
@Schema(description = "活动结束时间")
|
||||||
|
private LocalDateTime endTime;
|
||||||
|
|
||||||
|
@Schema(description = "活动状态:0-禁用,1-启用")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@Schema(description = "创建人ID")
|
||||||
|
private Integer creatorId;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Schema(description = "更新时间")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
package com.seer.teach.mp.api.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代理商DTO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(name = "代理商DTO")
|
||||||
|
public class AgentDTO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Schema(name = "代理商ID")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Schema(name = "代理商名称")
|
||||||
|
private String agentName;
|
||||||
|
|
||||||
|
@Schema(name = "代理商编码")
|
||||||
|
private String agentCode;
|
||||||
|
|
||||||
|
@Schema(name = "代理商等级")
|
||||||
|
private String agentLevel;
|
||||||
|
|
||||||
|
@Schema(name = "联系人姓名")
|
||||||
|
private String contactName;
|
||||||
|
|
||||||
|
@Schema(name = "联系电话")
|
||||||
|
private String contactPhone;
|
||||||
|
|
||||||
|
@Schema(name = "代理商地址")
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
@Schema(name = "代理商状态:0-禁用,1-启用")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@Schema(name = "创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Schema(name = "更新时间")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
package com.seer.teach.mp.api.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(name = "AgentEmployeeRelationDTO", description = "代理商员工关联DTO")
|
||||||
|
@Data
|
||||||
|
public class AgentEmployeeRelationDTO {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Schema(description = "代理商ID")
|
||||||
|
private Integer agentId;
|
||||||
|
|
||||||
|
@Schema(description = "员工用户ID")
|
||||||
|
private Integer employeeUserId;
|
||||||
|
|
||||||
|
@Schema(description = "员工职位")
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
@Schema(description = "员工状态:0-禁用,1-启用")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Schema(description = "更新时间")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
package com.seer.teach.mp.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.seer.teach.common.entity.BaseEntity;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 代理商活动表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Lingma
|
||||||
|
* @since 2025-12-29
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@TableName("mp_activities")
|
||||||
|
@Schema(name = "MpAgentActivityEntity对象", description = "活动表")
|
||||||
|
public class MpActivityEntity extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动名称,如千人助学计划
|
||||||
|
*/
|
||||||
|
@TableField("activity_name")
|
||||||
|
private String activityName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动描述
|
||||||
|
*/
|
||||||
|
@TableField("description")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动开始时间
|
||||||
|
*/
|
||||||
|
@TableField("start_time")
|
||||||
|
private LocalDateTime startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动结束时间
|
||||||
|
*/
|
||||||
|
@TableField("end_time")
|
||||||
|
private LocalDateTime endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动状态:0-禁用,1-启用
|
||||||
|
*/
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
}
|
||||||
@ -0,0 +1,113 @@
|
|||||||
|
package com.seer.teach.mp.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.seer.teach.common.config.mybatis.hanler.IntegerListTypeHandler;
|
||||||
|
import com.seer.teach.common.entity.BaseEntity;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 活动信息收集表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Lingma
|
||||||
|
* @since 2025-12-30
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@TableName("mp_activity_info_collection")
|
||||||
|
@Schema(name = "MpActivityInfoCollectionEntity对象", description = "活动信息收集表")
|
||||||
|
public class MpActivityInfoCollectionEntity extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联的家长参与代理商活动关系ID
|
||||||
|
*/
|
||||||
|
@TableField("relation_id")
|
||||||
|
private Integer relationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动ID
|
||||||
|
*/
|
||||||
|
@TableField("activity_id")
|
||||||
|
private Integer activityId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代理商ID
|
||||||
|
*/
|
||||||
|
@TableField("agent_id")
|
||||||
|
private Integer agentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 家长ID
|
||||||
|
*/
|
||||||
|
@TableField("parent_id")
|
||||||
|
private Integer parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 孩子姓名
|
||||||
|
*/
|
||||||
|
@TableField("child_name")
|
||||||
|
private String childName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 孩子性别(M-男,F-女)
|
||||||
|
*/
|
||||||
|
@TableField("child_gender")
|
||||||
|
private String childGender;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出生年月
|
||||||
|
*/
|
||||||
|
@TableField("child_birth_date")
|
||||||
|
private LocalDate childBirthDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年级
|
||||||
|
*/
|
||||||
|
@TableField("grade")
|
||||||
|
private String grade;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学校
|
||||||
|
*/
|
||||||
|
@TableField("school")
|
||||||
|
private String school;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地区
|
||||||
|
*/
|
||||||
|
@TableField("region")
|
||||||
|
private String region;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 家长身份(爸爸,妈妈)
|
||||||
|
*/
|
||||||
|
@TableField("parent_identity")
|
||||||
|
private String parentIdentity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学习情况(优、良、中、差)
|
||||||
|
*/
|
||||||
|
@TableField("learning_situation")
|
||||||
|
private String learningSituation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 优势学科(数学、英语等)
|
||||||
|
*/
|
||||||
|
@TableField(value = "strong_subject_ids",typeHandler = IntegerListTypeHandler.class)
|
||||||
|
private List<Integer> strongSubjectIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 劣势学科(数学、英语等)
|
||||||
|
*/
|
||||||
|
@TableField(value = "weak_subject_ids",typeHandler = IntegerListTypeHandler.class)
|
||||||
|
private List<Integer> weakSubjectIds;
|
||||||
|
}
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
package com.seer.teach.mp.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.seer.teach.common.entity.BaseEntity;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 代理商活动操作日志表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Lingma
|
||||||
|
* @since 2025-12-29
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@TableName("mp_agent_activity_log")
|
||||||
|
@Schema(name = "MpAgentActivityLogEntity对象", description = "代理商活动操作日志表")
|
||||||
|
public class MpAgentActivityLogEntity extends BaseEntity {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动ID
|
||||||
|
*/
|
||||||
|
@TableField("activity_id")
|
||||||
|
private Integer activityId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作人ID
|
||||||
|
*/
|
||||||
|
@TableField("operator_id")
|
||||||
|
private String operatorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作类型
|
||||||
|
*/
|
||||||
|
@TableField("operation_type")
|
||||||
|
private String operationType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作描述
|
||||||
|
*/
|
||||||
|
@TableField("description")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作前数据(JSON格式)
|
||||||
|
*/
|
||||||
|
@TableField("before_data")
|
||||||
|
private String beforeData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作后数据(JSON格式)
|
||||||
|
*/
|
||||||
|
@TableField("after_data")
|
||||||
|
private String afterData;
|
||||||
|
}
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
package com.seer.teach.mp.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.seer.teach.common.entity.BaseEntity;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 代理商活动参与记录表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Lingma
|
||||||
|
* @since 2025-12-29
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@TableName("mp_agent_activity_participants")
|
||||||
|
@Schema(name = "MpAgentActivityParticipantEntity对象", description = "代理商活动参与记录表")
|
||||||
|
public class MpAgentActivityParticipantEntity extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动ID
|
||||||
|
*/
|
||||||
|
@TableField("activity_id")
|
||||||
|
private Integer activityId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代理商ID(对应user表的ID)
|
||||||
|
*/
|
||||||
|
@TableField("agent_id")
|
||||||
|
private Integer agentId;
|
||||||
|
}
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
package com.seer.teach.mp.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.seer.teach.common.entity.BaseEntity;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 代理商员工关联表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Lingma
|
||||||
|
* @since 2025-12-29
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@TableName("mp_agent_employee_relations")
|
||||||
|
@Schema(name = "MpAgentEmployeeRelationEntity对象", description = "代理商员工关联表")
|
||||||
|
public class MpAgentEmployeeRelationEntity extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代理商ID(对应user表的ID)
|
||||||
|
*/
|
||||||
|
@TableField("agent_id")
|
||||||
|
private Integer agentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工用户ID(对应user表的ID)
|
||||||
|
*/
|
||||||
|
@TableField("employee_user_id")
|
||||||
|
private Integer employeeUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工职位
|
||||||
|
*/
|
||||||
|
@TableField("position")
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工状态:0-禁用,1-启用
|
||||||
|
*/
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
}
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
package com.seer.teach.mp.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.seer.teach.common.entity.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代理商实体类
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("mp_agents")
|
||||||
|
public class MpAgentEntity extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代理商名称
|
||||||
|
*/
|
||||||
|
private String agentName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代理商编码
|
||||||
|
*/
|
||||||
|
private String agentCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代理商等级
|
||||||
|
*/
|
||||||
|
private String agentLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系人姓名
|
||||||
|
*/
|
||||||
|
private String contactName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
private String contactPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代理商地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代理商状态:0-禁用,1-启用
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,68 @@
|
|||||||
|
package com.seer.teach.mp.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.seer.teach.common.entity.BaseEntity;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 家长参与代理商活动关系表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Lingma
|
||||||
|
* @since 2025-12-30
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@TableName("mp_parent_agent_activity_relations")
|
||||||
|
@Schema(name = "MpParentAgentActivityRelationEntity对象", description = "家长参与代理商活动关系表")
|
||||||
|
public class MpParentAgentActivityRelationEntity extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动ID
|
||||||
|
*/
|
||||||
|
@TableField("activity_id")
|
||||||
|
private Integer activityId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代理商ID
|
||||||
|
*/
|
||||||
|
@TableField("agent_id")
|
||||||
|
private Integer agentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 家长ID
|
||||||
|
*/
|
||||||
|
@TableField("parent_id")
|
||||||
|
private Integer parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动名称(冗余字段)
|
||||||
|
*/
|
||||||
|
@TableField("activity_name")
|
||||||
|
private String activityName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代理商名称(冗余字段)
|
||||||
|
*/
|
||||||
|
@TableField("agent_name")
|
||||||
|
private String agentName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参与状态:0-取消参与,1-正常参与
|
||||||
|
*/
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报名时间
|
||||||
|
*/
|
||||||
|
@TableField("sign_up_time")
|
||||||
|
private LocalDateTime signUpTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.seer.teach.mp.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.seer.teach.mp.entity.MpActivityInfoCollectionEntity;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 活动信息收集表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Lingma
|
||||||
|
* @since 2025-12-30
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface MpActivityInfoCollectionMapper extends BaseMapper<MpActivityInfoCollectionEntity> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.seer.teach.mp.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.seer.teach.mp.entity.MpAgentActivityLogEntity;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 代理商活动操作日志表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Lingma
|
||||||
|
* @since 2025-12-29
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface MpAgentActivityLogMapper extends BaseMapper<MpAgentActivityLogEntity> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.seer.teach.mp.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.seer.teach.mp.entity.MpActivityEntity;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 代理商活动表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Lingma
|
||||||
|
* @since 2025-12-29
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface MpAgentActivityMapper extends BaseMapper<MpActivityEntity> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.seer.teach.mp.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.seer.teach.mp.entity.MpAgentActivityParticipantEntity;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 代理商活动参与记录表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Lingma
|
||||||
|
* @since 2025-12-29
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface MpAgentActivityParticipantMapper extends BaseMapper<MpAgentActivityParticipantEntity> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.seer.teach.mp.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.seer.teach.mp.entity.MpAgentEmployeeRelationEntity;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 代理商员工关联表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Lingma
|
||||||
|
* @since 2025-12-29
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface MpAgentEmployeeRelationMapper extends BaseMapper<MpAgentEmployeeRelationEntity> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
package com.seer.teach.mp.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.seer.teach.mp.entity.MpAgentEntity;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代理商Mapper接口
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface MpAgentMapper extends BaseMapper<MpAgentEntity> {
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.seer.teach.mp.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.seer.teach.mp.entity.MpParentAgentActivityRelationEntity;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 家长参与代理商活动关系表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Lingma
|
||||||
|
* @since 2025-12-30
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface MpParentAgentActivityRelationMapper extends BaseMapper<MpParentAgentActivityRelationEntity> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,60 @@
|
|||||||
|
package com.seer.teach.mp.admin.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.seer.teach.common.PageListBean;
|
||||||
|
import com.seer.teach.common.ResultBean;
|
||||||
|
import com.seer.teach.common.annotation.LogPrint;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.MpActivityQueryReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.MpActivityReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.AdminActivityResp;
|
||||||
|
import com.seer.teach.mp.admin.service.IAdminActivityService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
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;
|
||||||
|
|
||||||
|
@LogPrint
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@Tag(name = "管理端 - 活动")
|
||||||
|
@RequestMapping("/mp/agent/activity")
|
||||||
|
public class AdminActivityController {
|
||||||
|
|
||||||
|
private final IAdminActivityService agentActivityService;
|
||||||
|
|
||||||
|
@Operation(summary = "活动列表")
|
||||||
|
@GetMapping("/page-list")
|
||||||
|
@SaCheckPermission("mp:admin:agent:activity:list")
|
||||||
|
public ResultBean<PageListBean<AdminActivityResp>> pageList(MpActivityQueryReq query) {
|
||||||
|
return ResultBean.success(agentActivityService.pageList(query));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "创建或更新活动")
|
||||||
|
@PostMapping("/save")
|
||||||
|
@SaCheckPermission("mp:admin:agent:activity:save")
|
||||||
|
public ResultBean<Boolean> save(@Valid @RequestBody MpActivityReq request) {
|
||||||
|
return ResultBean.success(agentActivityService.saveOrUpdateActivity(request));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "删除活动")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
@SaCheckPermission("mp:admin:agent:activity:delete")
|
||||||
|
public ResultBean<Boolean> delete(@PathVariable Integer id) {
|
||||||
|
return ResultBean.success(agentActivityService.deleteActivity(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "详情")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
@SaCheckPermission("mp:admin:agent:activity:get")
|
||||||
|
public ResultBean<AdminActivityResp> get(@PathVariable Integer id) {
|
||||||
|
AdminActivityResp result = agentActivityService.getById(id);
|
||||||
|
return ResultBean.success(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
package com.seer.teach.mp.admin.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.seer.teach.common.PageListBean;
|
||||||
|
import com.seer.teach.common.ResultBean;
|
||||||
|
import com.seer.teach.common.annotation.LogPrint;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.AgentActivityLogQueryReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.AdminAgentActivityLogResp;
|
||||||
|
import com.seer.teach.mp.admin.service.IAdminAgentActivityLogService;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@LogPrint
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@Tag(name = "管理端 - 代理商活动操作日志")
|
||||||
|
@RequestMapping("/mp/agent/activity/log")
|
||||||
|
public class AdminAgentActivityLogController {
|
||||||
|
|
||||||
|
private final IAdminAgentActivityLogService adminAgentActivityLogService;
|
||||||
|
|
||||||
|
@Operation(summary = "代理商活动操作日志列表")
|
||||||
|
@GetMapping("/page-list")
|
||||||
|
@SaCheckPermission("mp:admin:agent:activity:log:list")
|
||||||
|
public ResultBean<PageListBean<AdminAgentActivityLogResp>> pageList(AgentActivityLogQueryReq query) {
|
||||||
|
return ResultBean.success(adminAgentActivityLogService.pageList(query));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "详情")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
@SaCheckPermission("mp:admin:agent:activity:log:get")
|
||||||
|
public ResultBean<AdminAgentActivityLogResp> getLog(@PathVariable Integer id) {
|
||||||
|
return ResultBean.success(adminAgentActivityLogService.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "删除")
|
||||||
|
@DeleteMapping
|
||||||
|
@SaCheckPermission("mp:admin:agent:activity:log:delete")
|
||||||
|
public ResultBean<Boolean> delete(@RequestBody List<Integer> ids) {
|
||||||
|
boolean result = true;
|
||||||
|
for (Integer id : ids) {
|
||||||
|
result &= adminAgentActivityLogService.deleteLog(id);
|
||||||
|
}
|
||||||
|
return ResultBean.success(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,72 @@
|
|||||||
|
package com.seer.teach.mp.admin.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.seer.teach.common.PageListBean;
|
||||||
|
import com.seer.teach.common.ResultBean;
|
||||||
|
import com.seer.teach.common.annotation.LogPrint;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.AgentActivityParticipantQueryReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.AdminAgentActivityParticipantResp;
|
||||||
|
import com.seer.teach.mp.admin.service.IAdminAgentActivityParticipantService;
|
||||||
|
import com.seer.teach.mp.entity.MpAgentActivityParticipantEntity;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@LogPrint
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@Tag(name = "管理端 - 代理商活动参与记录")
|
||||||
|
@RequestMapping("/mp/agent/activity/participant")
|
||||||
|
public class AdminAgentActivityParticipantController {
|
||||||
|
|
||||||
|
private final IAdminAgentActivityParticipantService adminAgentActivityParticipantService;
|
||||||
|
|
||||||
|
@Operation(summary = "代理商活动参与记录列表")
|
||||||
|
@GetMapping("/page-list")
|
||||||
|
@SaCheckPermission("mp:admin:agent:activity:participant:list")
|
||||||
|
public ResultBean<PageListBean<AdminAgentActivityParticipantResp>> pageList(AgentActivityParticipantQueryReq query) {
|
||||||
|
return ResultBean.success(adminAgentActivityParticipantService.pageList(query));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "详情")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
@SaCheckPermission("mp:admin:agent:activity:participant:get")
|
||||||
|
public ResultBean<AdminAgentActivityParticipantResp> getParticipant(@PathVariable Integer id) {
|
||||||
|
return ResultBean.success(adminAgentActivityParticipantService.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "新增")
|
||||||
|
@PostMapping
|
||||||
|
@SaCheckPermission("mp:admin:agent:activity:participant:save")
|
||||||
|
public ResultBean<Boolean> save(@RequestBody MpAgentActivityParticipantEntity participantEntity) {
|
||||||
|
return ResultBean.success(adminAgentActivityParticipantService.saveParticipant(participantEntity));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "更新")
|
||||||
|
@PutMapping
|
||||||
|
@SaCheckPermission("mp:admin:agent:activity:participant:update")
|
||||||
|
public ResultBean<Boolean> update(@RequestBody MpAgentActivityParticipantEntity participantEntity) {
|
||||||
|
return ResultBean.success(adminAgentActivityParticipantService.updateParticipant(participantEntity));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "删除")
|
||||||
|
@DeleteMapping
|
||||||
|
@SaCheckPermission("mp:admin:agent:activity:participant:delete")
|
||||||
|
public ResultBean<Boolean> delete(@RequestBody List<Integer> ids) {
|
||||||
|
boolean result = true;
|
||||||
|
for (Integer id : ids) {
|
||||||
|
result &= adminAgentActivityParticipantService.deleteParticipant(id);
|
||||||
|
}
|
||||||
|
return ResultBean.success(result);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
package com.seer.teach.mp.admin.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.seer.teach.common.PageListBean;
|
||||||
|
import com.seer.teach.common.ResultBean;
|
||||||
|
import com.seer.teach.common.annotation.LogPrint;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.AgentQueryReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.AgentResp;
|
||||||
|
import com.seer.teach.mp.admin.service.AdminAgentService;
|
||||||
|
import com.seer.teach.mp.entity.MpAgentEntity;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@LogPrint
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@Tag(name = "管理端 - 代理商")
|
||||||
|
@RequestMapping("/mp/agent")
|
||||||
|
public class AdminAgentController {
|
||||||
|
|
||||||
|
private final AdminAgentService adminAgentService;
|
||||||
|
|
||||||
|
@Operation(summary = "代理商列表")
|
||||||
|
@GetMapping("/page-list")
|
||||||
|
@SaCheckPermission("mp:admin:agent:list")
|
||||||
|
public ResultBean<PageListBean<AgentResp>> pageList(AgentQueryReq query) {
|
||||||
|
return ResultBean.success(adminAgentService.pageList(query));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "详情")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
@SaCheckPermission("mp:admin:agent:get")
|
||||||
|
public ResultBean<AgentResp> getAgent(@PathVariable Integer id) {
|
||||||
|
return ResultBean.success(adminAgentService.getAgentById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "新增")
|
||||||
|
@PostMapping
|
||||||
|
@SaCheckPermission("mp:admin:agent:save")
|
||||||
|
public ResultBean<Boolean> save(@RequestBody MpAgentEntity agentEntity) {
|
||||||
|
return ResultBean.success(adminAgentService.saveAgent(agentEntity));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "更新")
|
||||||
|
@PutMapping
|
||||||
|
@SaCheckPermission("mp:admin:agent:update")
|
||||||
|
public ResultBean<Boolean> update(@RequestBody MpAgentEntity agentEntity) {
|
||||||
|
return ResultBean.success(adminAgentService.updateAgent(agentEntity));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "删除")
|
||||||
|
@DeleteMapping
|
||||||
|
@SaCheckPermission("mp:admin:agent:delete")
|
||||||
|
public ResultBean<Boolean> delete(@RequestBody List<Integer> ids) {
|
||||||
|
return ResultBean.success(adminAgentService.deleteById(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,67 @@
|
|||||||
|
package com.seer.teach.mp.admin.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.seer.teach.common.PageListBean;
|
||||||
|
import com.seer.teach.common.ResultBean;
|
||||||
|
import com.seer.teach.common.annotation.LogPrint;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.AgentEmployeeRelationQueryReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.AgentEmployeeRelationReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.AgentEmployeeRelationResp;
|
||||||
|
import com.seer.teach.mp.admin.service.IAdminAgentEmployeeRelationService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
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;
|
||||||
|
|
||||||
|
@LogPrint
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@Tag(name = "管理端 - 代理商员工")
|
||||||
|
@RequestMapping("/mp/agent/employee")
|
||||||
|
public class AdminAgentEmployeeRelationController {
|
||||||
|
|
||||||
|
private final IAdminAgentEmployeeRelationService agentEmployeeRelationService;
|
||||||
|
|
||||||
|
@Operation(summary = "代理商员工关联列表")
|
||||||
|
@GetMapping("/page-list")
|
||||||
|
@SaCheckPermission("mp:admin:agent:employee:list")
|
||||||
|
public ResultBean<PageListBean<AgentEmployeeRelationResp>> pageList(AgentEmployeeRelationQueryReq query) {
|
||||||
|
return ResultBean.success(agentEmployeeRelationService.pageList(query));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "创建或更新代理商员工关联")
|
||||||
|
@PostMapping("/save")
|
||||||
|
@SaCheckPermission("mp:admin:agent:employee:save")
|
||||||
|
public ResultBean<Boolean> save(@Valid @RequestBody AgentEmployeeRelationReq request) {
|
||||||
|
return ResultBean.success(agentEmployeeRelationService.saveOrUpdateRelation(request));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "删除代理商员工关联")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
@SaCheckPermission("mp:admin:agent:employee:delete")
|
||||||
|
public ResultBean<Boolean> delete(@PathVariable Integer id) {
|
||||||
|
return ResultBean.success(agentEmployeeRelationService.deleteRelation(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "详情")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
@SaCheckPermission("mp:admin:agent:employee:get")
|
||||||
|
public ResultBean<AgentEmployeeRelationResp> get(@PathVariable Integer id) {
|
||||||
|
AgentEmployeeRelationResp result = agentEmployeeRelationService.getById(id);
|
||||||
|
return ResultBean.success(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "根据代理商ID获取员工列表")
|
||||||
|
@GetMapping("/by-agent/{agentId}")
|
||||||
|
@SaCheckPermission("mp:admin:agent:employee:by-agent")
|
||||||
|
public ResultBean<java.util.List<AgentEmployeeRelationResp>> getByAgent(@PathVariable Integer agentId) {
|
||||||
|
return ResultBean.success(agentEmployeeRelationService.getEmployeeRelationsByAgentId(agentId));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,13 +1,13 @@
|
|||||||
package com.seer.teach.mp.controller;
|
package com.seer.teach.mp.admin.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import com.seer.teach.common.PageListBean;
|
import com.seer.teach.common.PageListBean;
|
||||||
import com.seer.teach.common.ResultBean;
|
import com.seer.teach.common.ResultBean;
|
||||||
import com.seer.teach.common.annotation.LogPrint;
|
import com.seer.teach.common.annotation.LogPrint;
|
||||||
import com.seer.teach.mp.controller.req.MpDealerApplyQueryReq;
|
import com.seer.teach.mp.admin.controller.req.MpDealerApplyQueryReq;
|
||||||
import com.seer.teach.mp.controller.resp.MpDealerApplyResp;
|
import com.seer.teach.mp.admin.controller.resp.MpDealerApplyResp;
|
||||||
import com.seer.teach.mp.request.DealerApplyReq;
|
import com.seer.teach.mp.request.DealerApplyReq;
|
||||||
import com.seer.teach.mp.service.AdminDealerApplicationsService;
|
import com.seer.teach.mp.admin.service.AdminDealerApplicationsService;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.controller;
|
package com.seer.teach.mp.admin.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@ -6,11 +6,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.seer.teach.common.PageListBean;
|
import com.seer.teach.common.PageListBean;
|
||||||
import com.seer.teach.common.ResultBean;
|
import com.seer.teach.common.ResultBean;
|
||||||
import com.seer.teach.common.utils.PageConverterUtils;
|
import com.seer.teach.common.utils.PageConverterUtils;
|
||||||
import com.seer.teach.mp.controller.req.MpMessageGroupReq;
|
import com.seer.teach.mp.admin.controller.req.MpMessageGroupReq;
|
||||||
import com.seer.teach.mp.controller.req.MpMessageGroupQueryReq;
|
import com.seer.teach.mp.admin.controller.req.MpMessageGroupQueryReq;
|
||||||
import com.seer.teach.mp.controller.req.MpMessageGroupUpdateReq;
|
import com.seer.teach.mp.admin.controller.req.MpMessageGroupUpdateReq;
|
||||||
import com.seer.teach.mp.controller.resp.MpMessageGroupResp;
|
import com.seer.teach.mp.admin.controller.resp.MpMessageGroupResp;
|
||||||
import com.seer.teach.mp.convert.MpMessageGroupConvert;
|
import com.seer.teach.mp.admin.convert.MpMessageGroupConvert;
|
||||||
import com.seer.teach.mp.entity.MpMessageGroupEntity;
|
import com.seer.teach.mp.entity.MpMessageGroupEntity;
|
||||||
import com.seer.teach.mp.service.IMqMessageGroupService;
|
import com.seer.teach.mp.service.IMqMessageGroupService;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
@ -33,9 +33,8 @@ public class AdminMessageGroupController {
|
|||||||
@PostMapping
|
@PostMapping
|
||||||
@Operation(summary = "创建消息组")
|
@Operation(summary = "创建消息组")
|
||||||
@SaCheckPermission("admin:mp:message-group:create")
|
@SaCheckPermission("admin:mp:message-group:create")
|
||||||
public ResultBean create(@RequestBody @Validated MpMessageGroupReq params) {
|
public ResultBean<Boolean> create(@RequestBody @Validated MpMessageGroupReq params) {
|
||||||
mqMessageGroupService.crateMesGroup(MpMessageGroupConvert.INSTANCE.convertOne(params));
|
return ResultBean.success(mqMessageGroupService.crateMesGroup(MpMessageGroupConvert.INSTANCE.convertOne(params))) ;
|
||||||
return ResultBean.success() ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -59,7 +58,7 @@ public class AdminMessageGroupController {
|
|||||||
Page<MpMessageGroupEntity> pageParam = new Page<>(params.getPageNo(), params.getPageSize());
|
Page<MpMessageGroupEntity> pageParam = new Page<>(params.getPageNo(), params.getPageSize());
|
||||||
MpMessageGroupEntity queryParam = MpMessageGroupConvert.INSTANCE.convertQueryOne(params);
|
MpMessageGroupEntity queryParam = MpMessageGroupConvert.INSTANCE.convertQueryOne(params);
|
||||||
IPage<MpMessageGroupEntity> pageList = mqMessageGroupService.pageList(pageParam, queryParam);
|
IPage<MpMessageGroupEntity> pageList = mqMessageGroupService.pageList(pageParam, queryParam);
|
||||||
PageListBean resultBean = PageConverterUtils.convertPageListBean(pageList, MpMessageGroupConvert.INSTANCE::convertRespList);
|
PageListBean<MpMessageGroupResp> resultBean = PageConverterUtils.convertPageListBean(pageList, MpMessageGroupConvert.INSTANCE::convertRespList);
|
||||||
return ResultBean.success(resultBean);
|
return ResultBean.success(resultBean);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,11 +68,10 @@ public class AdminMessageGroupController {
|
|||||||
@PostMapping("/{id}")
|
@PostMapping("/{id}")
|
||||||
@Operation(summary = "更新消息组")
|
@Operation(summary = "更新消息组")
|
||||||
@SaCheckPermission("admin:mp:message-group:update")
|
@SaCheckPermission("admin:mp:message-group:update")
|
||||||
public ResultBean update(@RequestBody @Validated MpMessageGroupUpdateReq params,
|
public ResultBean<Boolean> update(@RequestBody @Validated MpMessageGroupUpdateReq params,
|
||||||
@PathVariable Integer id) {
|
@PathVariable Integer id) {
|
||||||
MpMessageGroupEntity entity = MpMessageGroupConvert.INSTANCE.convertUpdateOne( params);
|
MpMessageGroupEntity entity = MpMessageGroupConvert.INSTANCE.convertUpdateOne( params);
|
||||||
mqMessageGroupService.updateMesGroup(entity, id);
|
return ResultBean.success(mqMessageGroupService.updateMesGroup(entity, id));
|
||||||
return ResultBean.success();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -82,8 +80,7 @@ public class AdminMessageGroupController {
|
|||||||
@DeleteMapping("/{id}")
|
@DeleteMapping("/{id}")
|
||||||
@Operation(summary = "根据ID删除消息组")
|
@Operation(summary = "根据ID删除消息组")
|
||||||
@SaCheckPermission("admin:mp:message-group:delete")
|
@SaCheckPermission("admin:mp:message-group:delete")
|
||||||
public ResultBean delete(@PathVariable Integer id) {
|
public ResultBean<Boolean> delete(@PathVariable Integer id) {
|
||||||
mqMessageGroupService.deleteById(id);
|
return ResultBean.success(mqMessageGroupService.deleteById(id));
|
||||||
return ResultBean.success();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,14 +1,14 @@
|
|||||||
package com.seer.teach.mp.controller;
|
package com.seer.teach.mp.admin.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.seer.teach.common.PageListBean;
|
import com.seer.teach.common.PageListBean;
|
||||||
import com.seer.teach.common.ResultBean;
|
import com.seer.teach.common.ResultBean;
|
||||||
import com.seer.teach.common.utils.PageConverterUtils;
|
import com.seer.teach.common.utils.PageConverterUtils;
|
||||||
import com.seer.teach.mp.controller.req.MpMessageGroupUserReq;
|
import com.seer.teach.mp.admin.controller.req.MpMessageGroupUserReq;
|
||||||
import com.seer.teach.mp.controller.req.MpMessageGroupUserQueryReq;
|
import com.seer.teach.mp.admin.controller.req.MpMessageGroupUserQueryReq;
|
||||||
import com.seer.teach.mp.controller.resp.MpMessageGroupUserResp;
|
import com.seer.teach.mp.admin.controller.resp.MpMessageGroupUserResp;
|
||||||
import com.seer.teach.mp.convert.MpMessageGroupUserConvert;
|
import com.seer.teach.mp.admin.convert.MpMessageGroupUserConvert;
|
||||||
import com.seer.teach.mp.entity.MpMessageGroupUserEntity;
|
import com.seer.teach.mp.entity.MpMessageGroupUserEntity;
|
||||||
import com.seer.teach.mp.service.IMqMessageGroupUserService;
|
import com.seer.teach.mp.service.IMqMessageGroupUserService;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
@ -1,12 +1,12 @@
|
|||||||
package com.seer.teach.mp.controller;
|
package com.seer.teach.mp.admin.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import com.seer.teach.common.PageListBean;
|
import com.seer.teach.common.PageListBean;
|
||||||
import com.seer.teach.common.ResultBean;
|
import com.seer.teach.common.ResultBean;
|
||||||
import com.seer.teach.mp.controller.req.MpAccountPageReq;
|
import com.seer.teach.mp.admin.controller.req.MpAccountPageReq;
|
||||||
import com.seer.teach.mp.controller.req.MpAccountReq;
|
import com.seer.teach.mp.admin.controller.req.MpAccountReq;
|
||||||
import com.seer.teach.mp.controller.resp.AdminMpAccountResp;
|
import com.seer.teach.mp.admin.controller.resp.AdminMpAccountResp;
|
||||||
import com.seer.teach.mp.service.AdminMpAccountService;
|
import com.seer.teach.mp.admin.service.AdminMpAccountService;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.controller;
|
package com.seer.teach.mp.admin.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@ -8,10 +8,10 @@ import com.seer.teach.common.ResultBean;
|
|||||||
import com.seer.teach.common.enums.ResultCodeEnum;
|
import com.seer.teach.common.enums.ResultCodeEnum;
|
||||||
import com.seer.teach.common.utils.AssertUtils;
|
import com.seer.teach.common.utils.AssertUtils;
|
||||||
import com.seer.teach.common.utils.PageConverterUtils;
|
import com.seer.teach.common.utils.PageConverterUtils;
|
||||||
import com.seer.teach.mp.controller.req.MpTemplateMessageConfigPageQueryReq;
|
import com.seer.teach.mp.admin.controller.req.MpTemplateMessageConfigPageQueryReq;
|
||||||
import com.seer.teach.mp.controller.req.MpTemplateMessageConfigReq;
|
import com.seer.teach.mp.admin.controller.req.MpTemplateMessageConfigReq;
|
||||||
import com.seer.teach.mp.controller.resp.MpTemplateMessageConfigResp;
|
import com.seer.teach.mp.admin.controller.resp.MpTemplateMessageConfigResp;
|
||||||
import com.seer.teach.mp.convert.AdminMpTemplateMessageConfigConvert;
|
import com.seer.teach.mp.admin.convert.AdminMpTemplateMessageConfigConvert;
|
||||||
import com.seer.teach.mp.entity.MpTemplateMessageConfigEntity;
|
import com.seer.teach.mp.entity.MpTemplateMessageConfigEntity;
|
||||||
import com.seer.teach.mp.service.IMpTemplateMessageConfigService;
|
import com.seer.teach.mp.service.IMpTemplateMessageConfigService;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
@ -1,15 +1,15 @@
|
|||||||
package com.seer.teach.mp.controller;
|
package com.seer.teach.mp.admin.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import cn.dev33.satoken.stp.StpUtil;
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
import com.seer.teach.common.ResultBean;
|
import com.seer.teach.common.ResultBean;
|
||||||
import com.seer.teach.mp.controller.req.MpTemplateMessageReq;
|
import com.seer.teach.mp.admin.controller.req.MpTemplateMessageReq;
|
||||||
import com.seer.teach.mp.controller.resp.MpTemplateMessageResp;
|
import com.seer.teach.mp.admin.controller.resp.MpTemplateMessageResp;
|
||||||
import com.seer.teach.mp.controller.resp.MpWxMpTemplateResp;
|
import com.seer.teach.mp.admin.controller.resp.MpWxMpTemplateResp;
|
||||||
import com.seer.teach.mp.convert.MpWxMpTemplateConvert;
|
import com.seer.teach.mp.admin.convert.MpWxMpTemplateConvert;
|
||||||
import com.seer.teach.mp.entity.MpTemplateMessageEntity;
|
import com.seer.teach.mp.entity.MpTemplateMessageEntity;
|
||||||
import com.seer.teach.mp.service.AdminTemplateMessageService;
|
import com.seer.teach.mp.admin.service.AdminTemplateMessageService;
|
||||||
import com.seer.teach.mp.utils.ClassFieldUtils;
|
import com.seer.teach.mp.admin.utils.ClassFieldUtils;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
package com.seer.teach.mp.admin.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.seer.teach.common.PageListBean;
|
||||||
|
import com.seer.teach.common.ResultBean;
|
||||||
|
import com.seer.teach.common.annotation.LogPrint;
|
||||||
|
import com.seer.teach.common.utils.PageConverterUtils;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.ParentAgentActivityQueryReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.AdminParentAgentActivityResp;
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.MpParentAgentActivityResp;
|
||||||
|
import com.seer.teach.mp.admin.service.AdminParentAgentActivityService;
|
||||||
|
import com.seer.teach.mp.entity.MpParentAgentActivityRelationEntity;
|
||||||
|
import com.seer.teach.mp.service.IMpParentAgentActivityRelationService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 家长参与代理商活动控制器 - 管理端
|
||||||
|
*/
|
||||||
|
@Tag(name = "管理端 - 家长参与代理商活动管理")
|
||||||
|
@AllArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/mp/admin/parent/agent/activity")
|
||||||
|
public class AdminParentAgentActivityController {
|
||||||
|
|
||||||
|
private final AdminParentAgentActivityService adminParentAgentActivityService;
|
||||||
|
|
||||||
|
@PostMapping("/page")
|
||||||
|
@SaCheckPermission("admin:parent:agent:activity:page")
|
||||||
|
@Operation(summary = "分页查询家长参与代理商活动记录")
|
||||||
|
@LogPrint
|
||||||
|
public ResultBean<PageListBean<AdminParentAgentActivityResp>> pageList(
|
||||||
|
@RequestBody ParentAgentActivityQueryReq queryReq) {
|
||||||
|
return ResultBean.success(adminParentAgentActivityService.pageList(queryReq));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
@SaCheckPermission("admin:parent:agent:activity:detail")
|
||||||
|
@Operation(summary = "获取家长参与代理商活动记录详情")
|
||||||
|
@LogPrint
|
||||||
|
public ResultBean<AdminParentAgentActivityResp> detail(@PathVariable Integer id) {
|
||||||
|
return ResultBean.success(adminParentAgentActivityService.getDetail(id));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.controller;
|
package com.seer.teach.mp.admin.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
package com.seer.teach.mp.admin.controller.req;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.Min;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代理商活动操作日志查询请求对象
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
* @since 2025-12-30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(name = "代理商活动操作日志查询请求对象")
|
||||||
|
public class AgentActivityLogQueryReq {
|
||||||
|
|
||||||
|
@Min(value = 1, message = "页码必须大于0")
|
||||||
|
@Schema(description = "页码")
|
||||||
|
private Integer pageNum = 1;
|
||||||
|
|
||||||
|
@Min(value = 1, message = "每页数量必须大于0")
|
||||||
|
@Schema(description = "每页数量")
|
||||||
|
private Integer pageSize = 10;
|
||||||
|
|
||||||
|
@Schema(description = "活动ID")
|
||||||
|
private Integer activityId;
|
||||||
|
|
||||||
|
@Schema(description = "操作人ID")
|
||||||
|
private Integer operatorId;
|
||||||
|
|
||||||
|
@Schema(description = "操作类型")
|
||||||
|
private String operationType;
|
||||||
|
|
||||||
|
@Schema(description = "开始时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime startTime;
|
||||||
|
|
||||||
|
@Schema(description = "结束时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime endTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,33 @@
|
|||||||
|
package com.seer.teach.mp.admin.controller.req;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.Min;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代理商活动参与记录查询请求对象
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
* @since 2025-12-30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(name = "代理商活动参与记录查询请求对象")
|
||||||
|
public class AgentActivityParticipantQueryReq {
|
||||||
|
|
||||||
|
@Min(value = 1, message = "页码必须大于0")
|
||||||
|
@Schema(description = "页码")
|
||||||
|
private Integer pageNum = 1;
|
||||||
|
|
||||||
|
@Min(value = 1, message = "每页数量必须大于0")
|
||||||
|
@Schema(description = "每页数量")
|
||||||
|
private Integer pageSize = 10;
|
||||||
|
|
||||||
|
@Schema(description = "活动ID")
|
||||||
|
private Integer activityId;
|
||||||
|
|
||||||
|
@Schema(description = "代理商ID")
|
||||||
|
private Integer agentId;
|
||||||
|
|
||||||
|
@Schema(description = "家长ID")
|
||||||
|
private Integer parentId;
|
||||||
|
}
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
package com.seer.teach.mp.admin.controller.req;
|
||||||
|
|
||||||
|
import com.seer.teach.common.request.PageRequest;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Schema(name = "AgentEmployeeRelationQueryReq", description = "代理商员工关联查询请求参数")
|
||||||
|
@Data
|
||||||
|
public class AgentEmployeeRelationQueryReq extends PageRequest {
|
||||||
|
|
||||||
|
@Schema(description = "代理商ID")
|
||||||
|
private Integer agentId;
|
||||||
|
|
||||||
|
@Schema(description = "员工用户ID")
|
||||||
|
private Integer employeeUserId;
|
||||||
|
|
||||||
|
@Schema(description = "员工状态:0-禁用,1-启用")
|
||||||
|
private Integer status;
|
||||||
|
}
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
package com.seer.teach.mp.admin.controller.req;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
@Schema(name = "AgentEmployeeRelationReq", description = "代理商员工关联请求参数")
|
||||||
|
@Data
|
||||||
|
public class AgentEmployeeRelationReq {
|
||||||
|
|
||||||
|
@Schema(description = "关联ID")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@NotNull(message = "代理商ID不能为空")
|
||||||
|
@Schema(description = "代理商ID")
|
||||||
|
private Integer agentId;
|
||||||
|
|
||||||
|
@NotNull(message = "员工用户ID不能为空")
|
||||||
|
@Schema(description = "员工用户ID")
|
||||||
|
private Integer employeeUserId;
|
||||||
|
|
||||||
|
@Schema(description = "员工职位")
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
@Schema(description = "员工状态:0-禁用,1-启用")
|
||||||
|
private Integer status = 1;
|
||||||
|
}
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
package com.seer.teach.mp.admin.controller.req;
|
||||||
|
|
||||||
|
import com.seer.teach.common.request.PageRequest;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Schema(description = "代理商查询参数")
|
||||||
|
@Data
|
||||||
|
public class AgentQueryReq extends PageRequest {
|
||||||
|
|
||||||
|
@Schema(description = "代理商名称")
|
||||||
|
private String agentName;
|
||||||
|
|
||||||
|
@Schema(description = "代理商编码")
|
||||||
|
private String agentCode;
|
||||||
|
|
||||||
|
@Schema(description = "代理商等级")
|
||||||
|
private String agentLevel;
|
||||||
|
|
||||||
|
@Schema(description = "联系人姓名")
|
||||||
|
private String contactName;
|
||||||
|
|
||||||
|
@Schema(description = "联系电话")
|
||||||
|
private String contactPhone;
|
||||||
|
|
||||||
|
@Schema(description = "代理商状态:0-禁用,1-启用")
|
||||||
|
private Integer status;
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.controller.req;
|
package com.seer.teach.mp.admin.controller.req;
|
||||||
|
|
||||||
|
|
||||||
import com.seer.teach.common.request.PageRequest;
|
import com.seer.teach.common.request.PageRequest;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.controller.req;
|
package com.seer.teach.mp.admin.controller.req;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
package com.seer.teach.mp.admin.controller.req;
|
||||||
|
|
||||||
|
import com.seer.teach.common.request.PageRequest;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Schema(name = "MpActivityQueryReq", description = "代理商活动查询请求参数")
|
||||||
|
@Data
|
||||||
|
public class MpActivityQueryReq extends PageRequest {
|
||||||
|
|
||||||
|
@Schema(description = "活动名称")
|
||||||
|
private String activityName;
|
||||||
|
|
||||||
|
@Schema(description = "活动状态:0-禁用,1-启用")
|
||||||
|
private Integer status;
|
||||||
|
}
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
package com.seer.teach.mp.admin.controller.req;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(name = "MpActivityReq", description = "代理商活动请求参数")
|
||||||
|
@Data
|
||||||
|
public class MpActivityReq {
|
||||||
|
|
||||||
|
@Schema(description = "活动ID")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@NotBlank(message = "活动名称不能为空")
|
||||||
|
@Schema(description = "活动名称")
|
||||||
|
private String activityName;
|
||||||
|
|
||||||
|
@Schema(description = "活动描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@NotNull(message = "活动开始时间不能为空")
|
||||||
|
@Schema(description = "活动开始时间")
|
||||||
|
private LocalDateTime startTime;
|
||||||
|
|
||||||
|
@NotNull(message = "活动结束时间不能为空")
|
||||||
|
@Schema(description = "活动结束时间")
|
||||||
|
private LocalDateTime endTime;
|
||||||
|
|
||||||
|
@Schema(description = "活动状态:0-禁用,1-启用")
|
||||||
|
private Integer status = 1;
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.controller.req;
|
package com.seer.teach.mp.admin.controller.req;
|
||||||
|
|
||||||
import com.seer.teach.common.request.PageRequest;
|
import com.seer.teach.common.request.PageRequest;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.controller.req;
|
package com.seer.teach.mp.admin.controller.req;
|
||||||
|
|
||||||
import com.seer.teach.common.request.PageRequest;
|
import com.seer.teach.common.request.PageRequest;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.controller.req;
|
package com.seer.teach.mp.admin.controller.req;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.controller.req;
|
package com.seer.teach.mp.admin.controller.req;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.controller.req;
|
package com.seer.teach.mp.admin.controller.req;
|
||||||
|
|
||||||
import com.seer.teach.common.request.PageRequest;
|
import com.seer.teach.common.request.PageRequest;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.controller.req;
|
package com.seer.teach.mp.admin.controller.req;
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.api.dto;
|
package com.seer.teach.mp.admin.controller.req;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.controller.req;
|
package com.seer.teach.mp.admin.controller.req;
|
||||||
|
|
||||||
import com.seer.teach.common.request.PageRequest;
|
import com.seer.teach.common.request.PageRequest;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.controller.req;
|
package com.seer.teach.mp.admin.controller.req;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.controller.req;
|
package com.seer.teach.mp.admin.controller.req;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -0,0 +1,51 @@
|
|||||||
|
package com.seer.teach.mp.admin.controller.req;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.seer.teach.common.request.PageRequest;
|
||||||
|
import com.seer.teach.mp.entity.MpParentAgentActivityRelationEntity;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 家长参与代理商活动查询请求类
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
@Schema(description = "家长参与代理商活动查询请求")
|
||||||
|
public class ParentAgentActivityQueryReq extends PageRequest {
|
||||||
|
|
||||||
|
@Schema(description = "活动ID")
|
||||||
|
private Integer activityId;
|
||||||
|
|
||||||
|
@Schema(description = "代理商ID")
|
||||||
|
private Integer agentId;
|
||||||
|
|
||||||
|
@Schema(description = "家长ID")
|
||||||
|
private Integer parentId;
|
||||||
|
|
||||||
|
@Schema(description = "活动名称")
|
||||||
|
private String activityName;
|
||||||
|
|
||||||
|
@Schema(description = "代理商名称")
|
||||||
|
private String agentName;
|
||||||
|
|
||||||
|
@Schema(description = "参与状态:0-取消参与,1-正常参与")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 转换为查询条件
|
||||||
|
* @return 查询条件
|
||||||
|
*/
|
||||||
|
public LambdaQueryWrapper<MpParentAgentActivityRelationEntity> toQueryWrapper() {
|
||||||
|
LambdaQueryWrapper<MpParentAgentActivityRelationEntity> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(activityId != null, MpParentAgentActivityRelationEntity::getActivityId, activityId)
|
||||||
|
.eq(agentId != null, MpParentAgentActivityRelationEntity::getAgentId, agentId)
|
||||||
|
.eq(parentId != null, MpParentAgentActivityRelationEntity::getParentId, parentId)
|
||||||
|
.like(activityName != null && !activityName.isEmpty(), MpParentAgentActivityRelationEntity::getActivityName, activityName)
|
||||||
|
.like(agentName != null && !agentName.isEmpty(), MpParentAgentActivityRelationEntity::getAgentName, agentName)
|
||||||
|
.eq(status != null, MpParentAgentActivityRelationEntity::getStatus, status)
|
||||||
|
.orderByDesc(MpParentAgentActivityRelationEntity::getSignUpTime); // 按报名时间倒序排列
|
||||||
|
return wrapper;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.controller.req;
|
package com.seer.teach.mp.admin.controller.req;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
package com.seer.teach.mp.admin.controller.resp;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(name = "AdminActivityResp", description = "代理商活动响应参数")
|
||||||
|
@Data
|
||||||
|
public class AdminActivityResp {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Schema(description = "活动名称")
|
||||||
|
private String activityName;
|
||||||
|
|
||||||
|
@Schema(description = "活动描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@Schema(description = "活动开始时间")
|
||||||
|
private LocalDateTime startTime;
|
||||||
|
|
||||||
|
@Schema(description = "活动结束时间")
|
||||||
|
private LocalDateTime endTime;
|
||||||
|
|
||||||
|
@Schema(description = "活动状态:0-禁用,1-启用")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@Schema(description = "创建人ID")
|
||||||
|
private Integer creatorId;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Schema(description = "更新时间")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
package com.seer.teach.mp.admin.controller.resp;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代理商活动操作日志响应对象
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
* @since 2025-12-30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(name = "代理商活动操作日志响应对象")
|
||||||
|
public class AdminAgentActivityLogResp {
|
||||||
|
|
||||||
|
@Schema(description = "日志ID")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Schema(description = "活动ID")
|
||||||
|
private Integer activityId;
|
||||||
|
|
||||||
|
@Schema(description = "操作人ID")
|
||||||
|
private String operatorId;
|
||||||
|
|
||||||
|
@Schema(description = "操作类型")
|
||||||
|
private String operationType;
|
||||||
|
|
||||||
|
@Schema(description = "操作描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@Schema(description = "操作前数据")
|
||||||
|
private String beforeData;
|
||||||
|
|
||||||
|
@Schema(description = "操作后数据")
|
||||||
|
private String afterData;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Schema(description = "更新时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
package com.seer.teach.mp.admin.controller.resp;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代理商活动参与记录响应对象
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
* @since 2025-12-30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(name = "代理商活动参与记录响应对象")
|
||||||
|
public class AdminAgentActivityParticipantResp {
|
||||||
|
|
||||||
|
@Schema(description = "参与记录ID")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Schema(description = "活动ID")
|
||||||
|
private Integer activityId;
|
||||||
|
|
||||||
|
@Schema(description = "代理商ID")
|
||||||
|
private Integer agentId;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Schema(description = "更新时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.controller.resp;
|
package com.seer.teach.mp.admin.controller.resp;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
package com.seer.teach.mp.admin.controller.resp;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 管理端家长参与代理商活动响应类
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(description = "管理端家长参与代理商活动响应")
|
||||||
|
public class AdminParentAgentActivityResp {
|
||||||
|
|
||||||
|
@Schema(description = "关系ID")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Schema(description = "活动ID")
|
||||||
|
private Integer activityId;
|
||||||
|
|
||||||
|
@Schema(description = "活动名称")
|
||||||
|
private String activityName;
|
||||||
|
|
||||||
|
@Schema(description = "代理商ID")
|
||||||
|
private Integer agentId;
|
||||||
|
|
||||||
|
@Schema(description = "代理商名称")
|
||||||
|
private String agentName;
|
||||||
|
|
||||||
|
@Schema(description = "家长ID")
|
||||||
|
private Integer parentId;
|
||||||
|
|
||||||
|
@Schema(description = "参与状态:0-取消参与,1-正常参与")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@Schema(description = "报名时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime signUpTime;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,31 @@
|
|||||||
|
package com.seer.teach.mp.admin.controller.resp;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(name = "AgentEmployeeRelationResp", description = "代理商员工关联响应参数")
|
||||||
|
@Data
|
||||||
|
public class AgentEmployeeRelationResp {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Schema(description = "代理商ID")
|
||||||
|
private Integer agentId;
|
||||||
|
|
||||||
|
@Schema(description = "员工用户ID")
|
||||||
|
private Integer employeeUserId;
|
||||||
|
|
||||||
|
@Schema(description = "员工职位")
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
@Schema(description = "员工状态:0-禁用,1-启用")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Schema(description = "更新时间")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
package com.seer.teach.mp.admin.controller.resp;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(name = "AgentResp", description = "代理商Response")
|
||||||
|
@Data
|
||||||
|
public class AgentResp {
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Schema(description = "代理商名称")
|
||||||
|
private String agentName;
|
||||||
|
|
||||||
|
@Schema(description = "代理商编码")
|
||||||
|
private String agentCode;
|
||||||
|
|
||||||
|
@Schema(description = "代理商等级")
|
||||||
|
private String agentLevel;
|
||||||
|
|
||||||
|
@Schema(description = "联系人姓名")
|
||||||
|
private String contactName;
|
||||||
|
|
||||||
|
@Schema(description = "联系电话")
|
||||||
|
private String contactPhone;
|
||||||
|
|
||||||
|
@Schema(description = "代理商地址")
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
@Schema(description = "代理商状态:0-禁用,1-启用")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@Schema(description = "更新时间")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.controller.resp;
|
package com.seer.teach.mp.admin.controller.resp;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.controller.resp;
|
package com.seer.teach.mp.admin.controller.resp;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.controller.resp;
|
package com.seer.teach.mp.admin.controller.resp;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
package com.seer.teach.mp.admin.controller.resp;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 家长参与代理商活动Resp
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(description = "家长参与代理商活动Resp")
|
||||||
|
public class MpParentAgentActivityResp {
|
||||||
|
|
||||||
|
@Schema(description = "关系ID")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Schema(description = "活动ID")
|
||||||
|
private Integer activityId;
|
||||||
|
|
||||||
|
@Schema(description = "活动名称")
|
||||||
|
private String activityName;
|
||||||
|
|
||||||
|
@Schema(description = "代理商ID")
|
||||||
|
private Integer agentId;
|
||||||
|
|
||||||
|
@Schema(description = "代理商名称")
|
||||||
|
private String agentName;
|
||||||
|
|
||||||
|
@Schema(description = "家长ID")
|
||||||
|
private Integer parentId;
|
||||||
|
|
||||||
|
@Schema(description = "参与状态:0-取消参与,1-正常参与")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@Schema(description = "报名时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime signUpTime;
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.controller.resp;
|
package com.seer.teach.mp.admin.controller.resp;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.controller.resp;
|
package com.seer.teach.mp.admin.controller.resp;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.controller.resp;
|
package com.seer.teach.mp.admin.controller.resp;
|
||||||
|
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
package com.seer.teach.mp.admin.convert;
|
||||||
|
|
||||||
|
import com.seer.teach.mp.admin.controller.req.MpActivityQueryReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.MpActivityReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.AdminActivityResp;
|
||||||
|
import com.seer.teach.mp.entity.MpActivityEntity;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface AdminActivityConvert {
|
||||||
|
|
||||||
|
AdminActivityConvert INSTANCE = Mappers.getMapper(AdminActivityConvert.class);
|
||||||
|
|
||||||
|
MpActivityEntity convert(MpActivityReq req);
|
||||||
|
|
||||||
|
MpActivityEntity convert(MpActivityQueryReq req);
|
||||||
|
|
||||||
|
AdminActivityResp convertToResp(MpActivityEntity entity);
|
||||||
|
|
||||||
|
List<AdminActivityResp> convertToRespList(List<MpActivityEntity> list);
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.seer.teach.mp.admin.convert;
|
||||||
|
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.AdminAgentActivityParticipantResp;
|
||||||
|
import com.seer.teach.mp.entity.MpAgentActivityParticipantEntity;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface AdminAgentActivityParticipantConvert {
|
||||||
|
|
||||||
|
AdminAgentActivityParticipantConvert INSTANCE = Mappers.getMapper(AdminAgentActivityParticipantConvert.class);
|
||||||
|
|
||||||
|
AdminAgentActivityParticipantResp convertToResp(MpAgentActivityParticipantEntity entity);
|
||||||
|
|
||||||
|
List<AdminAgentActivityParticipantResp> convertToRespList(List<MpAgentActivityParticipantEntity> entity);
|
||||||
|
}
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
package com.seer.teach.mp.admin.convert;
|
||||||
|
|
||||||
|
import com.seer.teach.mp.admin.controller.req.AgentEmployeeRelationQueryReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.AgentEmployeeRelationReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.AgentEmployeeRelationResp;
|
||||||
|
import com.seer.teach.mp.entity.MpAgentEmployeeRelationEntity;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface AdminAgentEmployeeRelationConvert {
|
||||||
|
|
||||||
|
AdminAgentEmployeeRelationConvert INSTANCE = Mappers.getMapper(AdminAgentEmployeeRelationConvert.class);
|
||||||
|
|
||||||
|
MpAgentEmployeeRelationEntity convert(AgentEmployeeRelationReq req);
|
||||||
|
|
||||||
|
MpAgentEmployeeRelationEntity convert(AgentEmployeeRelationQueryReq req);
|
||||||
|
|
||||||
|
AgentEmployeeRelationResp convertToResp(MpAgentEmployeeRelationEntity entity);
|
||||||
|
|
||||||
|
List<AgentEmployeeRelationResp> convertToRespList(List<MpAgentEmployeeRelationEntity> mpAgentEmployeeRelationEntities);
|
||||||
|
}
|
||||||
@ -1,7 +1,7 @@
|
|||||||
package com.seer.teach.mp.convert;
|
package com.seer.teach.mp.admin.convert;
|
||||||
|
|
||||||
import com.seer.teach.mp.controller.req.MpDealerApplyQueryReq;
|
import com.seer.teach.mp.admin.controller.req.MpDealerApplyQueryReq;
|
||||||
import com.seer.teach.mp.controller.resp.MpDealerApplyResp;
|
import com.seer.teach.mp.admin.controller.resp.MpDealerApplyResp;
|
||||||
import com.seer.teach.mp.entity.MpDealerApplicationsEntity;
|
import com.seer.teach.mp.entity.MpDealerApplicationsEntity;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
@ -1,7 +1,7 @@
|
|||||||
package com.seer.teach.mp.convert;
|
package com.seer.teach.mp.admin.convert;
|
||||||
|
|
||||||
import com.seer.teach.mp.controller.req.MpAccountReq;
|
import com.seer.teach.mp.admin.controller.req.MpAccountReq;
|
||||||
import com.seer.teach.mp.controller.resp.AdminMpAccountResp;
|
import com.seer.teach.mp.admin.controller.resp.AdminMpAccountResp;
|
||||||
import com.seer.teach.mp.entity.MpAccountEntity;
|
import com.seer.teach.mp.entity.MpAccountEntity;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
@ -1,8 +1,8 @@
|
|||||||
package com.seer.teach.mp.convert;
|
package com.seer.teach.mp.admin.convert;
|
||||||
|
|
||||||
import com.seer.teach.mp.controller.req.MpTemplateMessageConfigPageQueryReq;
|
import com.seer.teach.mp.admin.controller.req.MpTemplateMessageConfigPageQueryReq;
|
||||||
import com.seer.teach.mp.controller.req.MpTemplateMessageConfigReq;
|
import com.seer.teach.mp.admin.controller.req.MpTemplateMessageConfigReq;
|
||||||
import com.seer.teach.mp.controller.resp.MpTemplateMessageConfigResp;
|
import com.seer.teach.mp.admin.controller.resp.MpTemplateMessageConfigResp;
|
||||||
import com.seer.teach.mp.entity.MpTemplateMessageConfigEntity;
|
import com.seer.teach.mp.entity.MpTemplateMessageConfigEntity;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.seer.teach.mp.admin.convert;
|
||||||
|
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.AdminParentAgentActivityResp;
|
||||||
|
import com.seer.teach.mp.entity.MpParentAgentActivityRelationEntity;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface AdminParentAgentActivityConvert {
|
||||||
|
|
||||||
|
AdminParentAgentActivityConvert INSTANCE = Mappers.getMapper(AdminParentAgentActivityConvert.class);
|
||||||
|
|
||||||
|
AdminParentAgentActivityResp convertToResp(MpParentAgentActivityRelationEntity entity);
|
||||||
|
|
||||||
|
List<AdminParentAgentActivityResp> convertToRespList(List<MpParentAgentActivityRelationEntity> entityList);
|
||||||
|
}
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
package com.seer.teach.mp.admin.convert;
|
||||||
|
|
||||||
|
import com.seer.teach.mp.admin.controller.req.AgentQueryReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.AgentResp;
|
||||||
|
import com.seer.teach.mp.entity.MpAgentEntity;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface AgentConvert {
|
||||||
|
|
||||||
|
AgentConvert INSTANCE = Mappers.getMapper(AgentConvert.class);
|
||||||
|
|
||||||
|
AgentResp convertOne(MpAgentEntity entity);
|
||||||
|
|
||||||
|
List<AgentResp> convertRespList(List<MpAgentEntity> list);
|
||||||
|
|
||||||
|
MpAgentEntity convertOne(AgentQueryReq req);
|
||||||
|
|
||||||
|
AgentQueryReq convertToReq(MpAgentEntity entity);
|
||||||
|
}
|
||||||
@ -1,9 +1,9 @@
|
|||||||
package com.seer.teach.mp.convert;
|
package com.seer.teach.mp.admin.convert;
|
||||||
|
|
||||||
import com.seer.teach.mp.controller.req.MpMessageGroupQueryReq;
|
import com.seer.teach.mp.admin.controller.req.MpMessageGroupQueryReq;
|
||||||
import com.seer.teach.mp.controller.req.MpMessageGroupReq;
|
import com.seer.teach.mp.admin.controller.req.MpMessageGroupReq;
|
||||||
import com.seer.teach.mp.controller.req.MpMessageGroupUpdateReq;
|
import com.seer.teach.mp.admin.controller.req.MpMessageGroupUpdateReq;
|
||||||
import com.seer.teach.mp.controller.resp.MpMessageGroupResp;
|
import com.seer.teach.mp.admin.controller.resp.MpMessageGroupResp;
|
||||||
import com.seer.teach.mp.entity.MpMessageGroupEntity;
|
import com.seer.teach.mp.entity.MpMessageGroupEntity;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
@ -1,8 +1,8 @@
|
|||||||
package com.seer.teach.mp.convert;
|
package com.seer.teach.mp.admin.convert;
|
||||||
|
|
||||||
import com.seer.teach.mp.controller.req.MpMessageGroupUserQueryReq;
|
import com.seer.teach.mp.admin.controller.req.MpMessageGroupUserQueryReq;
|
||||||
import com.seer.teach.mp.controller.req.MpMessageGroupUserReq;
|
import com.seer.teach.mp.admin.controller.req.MpMessageGroupUserReq;
|
||||||
import com.seer.teach.mp.controller.resp.MpMessageGroupUserResp;
|
import com.seer.teach.mp.admin.controller.resp.MpMessageGroupUserResp;
|
||||||
import com.seer.teach.mp.entity.MpMessageGroupUserEntity;
|
import com.seer.teach.mp.entity.MpMessageGroupUserEntity;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
@ -1,7 +1,7 @@
|
|||||||
package com.seer.teach.mp.convert;
|
package com.seer.teach.mp.admin.convert;
|
||||||
|
|
||||||
import com.seer.teach.mp.controller.resp.MpTemplateMessageResp;
|
import com.seer.teach.mp.admin.controller.resp.MpTemplateMessageResp;
|
||||||
import com.seer.teach.mp.controller.resp.MpWxMpTemplateResp;
|
import com.seer.teach.mp.admin.controller.resp.MpWxMpTemplateResp;
|
||||||
import com.seer.teach.mp.entity.MpTemplateMessageEntity;
|
import com.seer.teach.mp.entity.MpTemplateMessageEntity;
|
||||||
import me.chanjar.weixin.mp.bean.template.WxMpTemplate;
|
import me.chanjar.weixin.mp.bean.template.WxMpTemplate;
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
@ -0,0 +1,98 @@
|
|||||||
|
package com.seer.teach.mp.admin.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.seer.teach.common.PageListBean;
|
||||||
|
import com.seer.teach.common.utils.PageConverterUtils;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.AgentQueryReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.AgentResp;
|
||||||
|
import com.seer.teach.mp.admin.convert.AgentConvert;
|
||||||
|
import com.seer.teach.mp.entity.MpAgentEntity;
|
||||||
|
import com.seer.teach.mp.service.IMpAgentService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class AdminAgentService {
|
||||||
|
|
||||||
|
private final IMpAgentService mpAgentService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取代理商列表
|
||||||
|
*
|
||||||
|
* @param pageReq 分页参数
|
||||||
|
* @return 代理商列表
|
||||||
|
*/
|
||||||
|
public PageListBean<AgentResp> pageList(AgentQueryReq pageReq) {
|
||||||
|
Page<MpAgentEntity> pageParam = new Page<>(pageReq.getPageNo(), pageReq.getPageSize());
|
||||||
|
|
||||||
|
MpAgentEntity query = AgentConvert.INSTANCE.convertOne(pageReq);
|
||||||
|
IPage<MpAgentEntity> resultPage = mpAgentService.page(pageParam, new LambdaQueryWrapper<>(MpAgentEntity.class)
|
||||||
|
.like(StringUtils.isNotBlank(query.getAgentName()), MpAgentEntity::getAgentName, query.getAgentName())
|
||||||
|
.like(StringUtils.isNotBlank(query.getContactName()), MpAgentEntity::getContactName, query.getContactName())
|
||||||
|
.like(StringUtils.isNotBlank(query.getContactPhone()), MpAgentEntity::getContactPhone, query.getContactPhone()));
|
||||||
|
|
||||||
|
return PageConverterUtils.convertPageListBean(resultPage, AgentConvert.INSTANCE::convertRespList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取代理商详情
|
||||||
|
*
|
||||||
|
* @param id 代理商Id
|
||||||
|
* @return 代理商详情
|
||||||
|
*/
|
||||||
|
public AgentResp getAgentById(Integer id) {
|
||||||
|
MpAgentEntity agentEntity = mpAgentService.getAgentById(id);
|
||||||
|
return AgentConvert.INSTANCE.convertOne(agentEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存代理商
|
||||||
|
*
|
||||||
|
* @param agentEntity 代理商实体
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
public Boolean saveAgent(MpAgentEntity agentEntity) {
|
||||||
|
boolean result = mpAgentService.saveAgent(agentEntity);
|
||||||
|
log.info("保存代理商结果: {}", result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新代理商
|
||||||
|
*
|
||||||
|
* @param agentEntity 代理商实体
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
public Boolean updateAgent(MpAgentEntity agentEntity) {
|
||||||
|
boolean result = mpAgentService.updateAgent(agentEntity);
|
||||||
|
log.info("更新代理商结果: {}", result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除代理商
|
||||||
|
*
|
||||||
|
* @param ids 代理商ID列表
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
public Boolean deleteById(List<Integer> ids) {
|
||||||
|
if(ids == null || ids.isEmpty()){
|
||||||
|
log.warn("删除代理商时,ID列表为空");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
boolean result = mpAgentService.removeByIds(ids);
|
||||||
|
log.info("删除代理商结果: {}", result);
|
||||||
|
if(result){
|
||||||
|
log.info("删除代理商成功,ID列表: {}", ids);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.service;
|
package com.seer.teach.mp.admin.service;
|
||||||
|
|
||||||
import cn.dev33.satoken.stp.StpUtil;
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@ -8,11 +8,12 @@ import com.seer.teach.common.enums.ResultCodeEnum;
|
|||||||
import com.seer.teach.common.enums.RoleEnum;
|
import com.seer.teach.common.enums.RoleEnum;
|
||||||
import com.seer.teach.common.exception.CommonException;
|
import com.seer.teach.common.exception.CommonException;
|
||||||
import com.seer.teach.common.utils.PageConverterUtils;
|
import com.seer.teach.common.utils.PageConverterUtils;
|
||||||
import com.seer.teach.mp.controller.req.MpDealerApplyQueryReq;
|
import com.seer.teach.mp.admin.controller.req.MpDealerApplyQueryReq;
|
||||||
import com.seer.teach.mp.controller.resp.MpDealerApplyResp;
|
import com.seer.teach.mp.admin.controller.resp.MpDealerApplyResp;
|
||||||
import com.seer.teach.mp.convert.AdminDealerApplicationsConvert;
|
import com.seer.teach.mp.admin.convert.AdminDealerApplicationsConvert;
|
||||||
import com.seer.teach.mp.entity.MpDealerApplicationsEntity;
|
import com.seer.teach.mp.entity.MpDealerApplicationsEntity;
|
||||||
import com.seer.teach.mp.request.DealerApplyReq;
|
import com.seer.teach.mp.request.DealerApplyReq;
|
||||||
|
import com.seer.teach.mp.service.IMpDealerApplicationsService;
|
||||||
import com.seer.teach.user.api.UserInfoServiceApi;
|
import com.seer.teach.user.api.UserInfoServiceApi;
|
||||||
import com.seer.teach.user.api.dto.UserInfoDTO;
|
import com.seer.teach.user.api.dto.UserInfoDTO;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
package com.seer.teach.mp.service;
|
package com.seer.teach.mp.admin.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@ -8,12 +8,13 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.seer.teach.common.PageListBean;
|
import com.seer.teach.common.PageListBean;
|
||||||
import com.seer.teach.common.utils.PageConverterUtils;
|
import com.seer.teach.common.utils.PageConverterUtils;
|
||||||
import com.seer.teach.mp.api.WechatOfficialAccountApi;
|
import com.seer.teach.mp.api.WechatOfficialAccountApi;
|
||||||
import com.seer.teach.mp.controller.req.MpAccountPageReq;
|
import com.seer.teach.mp.admin.controller.req.MpAccountPageReq;
|
||||||
import com.seer.teach.mp.controller.req.MpAccountReq;
|
import com.seer.teach.mp.admin.controller.req.MpAccountReq;
|
||||||
import com.seer.teach.mp.controller.resp.AdminMpAccountResp;
|
import com.seer.teach.mp.admin.controller.resp.AdminMpAccountResp;
|
||||||
import com.seer.teach.mp.convert.AdminMpAccountConvert;
|
import com.seer.teach.mp.admin.convert.AdminMpAccountConvert;
|
||||||
import com.seer.teach.mp.entity.MpAccountEntity;
|
import com.seer.teach.mp.entity.MpAccountEntity;
|
||||||
import com.seer.teach.mp.factory.MpServiceFactory;
|
import com.seer.teach.mp.factory.MpServiceFactory;
|
||||||
|
import com.seer.teach.mp.service.IMpAccountService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import me.chanjar.weixin.common.error.WxErrorException;
|
import me.chanjar.weixin.common.error.WxErrorException;
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
package com.seer.teach.mp.admin.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.seer.teach.common.PageListBean;
|
||||||
|
import com.seer.teach.common.ResultBean;
|
||||||
|
import com.seer.teach.common.utils.PageConverterUtils;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.ParentAgentActivityQueryReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.AdminParentAgentActivityResp;
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.MpParentAgentActivityResp;
|
||||||
|
import com.seer.teach.mp.admin.convert.AdminParentAgentActivityConvert;
|
||||||
|
import com.seer.teach.mp.entity.MpParentAgentActivityRelationEntity;
|
||||||
|
import com.seer.teach.mp.service.IMpParentAgentActivityRelationService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class AdminParentAgentActivityService {
|
||||||
|
|
||||||
|
private final IMpParentAgentActivityRelationService parentAgentActivityRelationService;
|
||||||
|
|
||||||
|
public PageListBean<AdminParentAgentActivityResp> pageList(ParentAgentActivityQueryReq query) {
|
||||||
|
|
||||||
|
IPage<MpParentAgentActivityRelationEntity> pageParam = new Page<>(query.getPageNo(),query.getPageSize());
|
||||||
|
|
||||||
|
LambdaQueryWrapper<MpParentAgentActivityRelationEntity> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(Objects.nonNull(query.getActivityId()), MpParentAgentActivityRelationEntity::getActivityId, query.getActivityId())
|
||||||
|
.eq(Objects.nonNull(query.getAgentId()), MpParentAgentActivityRelationEntity::getAgentId, query.getAgentId())
|
||||||
|
.eq(Objects.nonNull(query.getAgentId()), MpParentAgentActivityRelationEntity::getParentId, query.getAgentId())
|
||||||
|
.like(Objects.nonNull(query.getActivityName()) && !query.getActivityName().isEmpty(), MpParentAgentActivityRelationEntity::getActivityName, query.getActivityName())
|
||||||
|
.like(Objects.nonNull(query.getAgentName()) && !query.getAgentName().isEmpty(), MpParentAgentActivityRelationEntity::getAgentName, query.getAgentName())
|
||||||
|
.eq(Objects.nonNull(query.getStatus()), MpParentAgentActivityRelationEntity::getStatus, query.getStatus())
|
||||||
|
.orderByDesc(MpParentAgentActivityRelationEntity::getSignUpTime);
|
||||||
|
|
||||||
|
IPage<MpParentAgentActivityRelationEntity> pageResult = parentAgentActivityRelationService.page(pageParam, wrapper);
|
||||||
|
|
||||||
|
return PageConverterUtils.convertPageListBean(pageResult, AdminParentAgentActivityConvert.INSTANCE::convertToRespList);
|
||||||
|
}
|
||||||
|
|
||||||
|
public AdminParentAgentActivityResp getDetail(Integer id) {
|
||||||
|
MpParentAgentActivityRelationEntity entity = parentAgentActivityRelationService.getById(id);
|
||||||
|
return AdminParentAgentActivityConvert.INSTANCE.convertToResp(entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.service;
|
package com.seer.teach.mp.admin.service;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.seer.teach.common.enums.ResultCodeEnum;
|
import com.seer.teach.common.enums.ResultCodeEnum;
|
||||||
@ -7,9 +7,10 @@ import com.seer.teach.common.utils.AssertUtils;
|
|||||||
import com.seer.teach.common.utils.BeanToMapConverter;
|
import com.seer.teach.common.utils.BeanToMapConverter;
|
||||||
import com.seer.teach.mall.api.MallOrderApi;
|
import com.seer.teach.mall.api.MallOrderApi;
|
||||||
import com.seer.teach.mall.api.resp.OrderDTO;
|
import com.seer.teach.mall.api.resp.OrderDTO;
|
||||||
import com.seer.teach.mp.controller.req.MpTemplateMessageReq;
|
import com.seer.teach.mp.admin.controller.req.MpTemplateMessageReq;
|
||||||
import com.seer.teach.mp.entity.MpTemplateMessageEntity;
|
import com.seer.teach.mp.entity.MpTemplateMessageEntity;
|
||||||
import com.seer.teach.mp.factory.MpServiceFactory;
|
import com.seer.teach.mp.factory.MpServiceFactory;
|
||||||
|
import com.seer.teach.mp.service.IMpTemplateMessageService;
|
||||||
import com.seer.teach.mp.service.dto.MpTemplateMessageDTO;
|
import com.seer.teach.mp.service.dto.MpTemplateMessageDTO;
|
||||||
import com.seer.teach.user.api.UserInfoServiceApi;
|
import com.seer.teach.user.api.UserInfoServiceApi;
|
||||||
import com.seer.teach.user.api.dto.UserInfoDTO;
|
import com.seer.teach.user.api.dto.UserInfoDTO;
|
||||||
@ -34,7 +35,7 @@ public class AdminTemplateMessageService {
|
|||||||
private MallOrderApi mallOrderApi;
|
private MallOrderApi mallOrderApi;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IMpTemplateMessageService mpTemplateMessageService;
|
private IMpTemplateMessageService mpTemplateMessageService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private MpServiceFactory mpServiceFactory;
|
private MpServiceFactory mpServiceFactory;
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
package com.seer.teach.mp.admin.service;
|
||||||
|
|
||||||
|
import com.seer.teach.common.PageListBean;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.MpActivityQueryReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.MpActivityReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.AdminActivityResp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 管理端代理商活动服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Lingma
|
||||||
|
* @since 2025-12-30
|
||||||
|
*/
|
||||||
|
public interface IAdminActivityService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询代理商活动列表(管理端)
|
||||||
|
*
|
||||||
|
* @param query 查询条件
|
||||||
|
* @return 代理商活动分页列表
|
||||||
|
*/
|
||||||
|
PageListBean<AdminActivityResp> pageList(MpActivityQueryReq query);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建或更新代理商活动(管理端)
|
||||||
|
*
|
||||||
|
* @param request 活动请求对象
|
||||||
|
* @return 操作是否成功
|
||||||
|
*/
|
||||||
|
boolean saveOrUpdateActivity(MpActivityReq request);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除代理商活动(管理端)
|
||||||
|
*
|
||||||
|
* @param id 活动ID
|
||||||
|
* @return 操作是否成功
|
||||||
|
*/
|
||||||
|
boolean deleteActivity(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID获取活动详情(管理端)
|
||||||
|
*
|
||||||
|
* @param id 活动ID
|
||||||
|
* @return 活动详情
|
||||||
|
*/
|
||||||
|
AdminActivityResp getById(Integer id);
|
||||||
|
}
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
package com.seer.teach.mp.admin.service;
|
||||||
|
|
||||||
|
import com.seer.teach.common.PageListBean;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.AgentActivityLogQueryReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.AdminAgentActivityLogResp;
|
||||||
|
import com.seer.teach.mp.entity.MpAgentActivityLogEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 代理商活动操作日志表 管理端服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
* @since 2025-12-30
|
||||||
|
*/
|
||||||
|
public interface IAdminAgentActivityLogService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询代理商活动操作日志列表(管理端)
|
||||||
|
*
|
||||||
|
* @param query 查询条件
|
||||||
|
* @return 代理商活动操作日志分页列表
|
||||||
|
*/
|
||||||
|
PageListBean<AdminAgentActivityLogResp> pageList(AgentActivityLogQueryReq query);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID获取代理商活动操作日志详情(管理端)
|
||||||
|
*
|
||||||
|
* @param id 日志ID
|
||||||
|
* @return 操作日志详情
|
||||||
|
*/
|
||||||
|
AdminAgentActivityLogResp getById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID删除代理商活动操作日志(管理端)
|
||||||
|
*
|
||||||
|
* @param id 日志ID
|
||||||
|
* @return 操作是否成功
|
||||||
|
*/
|
||||||
|
boolean deleteLog(Integer id);
|
||||||
|
}
|
||||||
@ -0,0 +1,57 @@
|
|||||||
|
package com.seer.teach.mp.admin.service;
|
||||||
|
|
||||||
|
import com.seer.teach.common.PageListBean;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.AgentActivityParticipantQueryReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.AdminAgentActivityParticipantResp;
|
||||||
|
import com.seer.teach.mp.entity.MpAgentActivityParticipantEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 代理商活动参与记录表 管理端服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
* @since 2025-12-30
|
||||||
|
*/
|
||||||
|
public interface IAdminAgentActivityParticipantService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询代理商活动参与记录列表(管理端)
|
||||||
|
*
|
||||||
|
* @param query 查询条件
|
||||||
|
* @return 代理商活动参与记录分页列表
|
||||||
|
*/
|
||||||
|
PageListBean<AdminAgentActivityParticipantResp> pageList(AgentActivityParticipantQueryReq query);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建代理商活动参与记录(管理端)
|
||||||
|
*
|
||||||
|
* @param entity 参与记录实体
|
||||||
|
* @return 操作是否成功
|
||||||
|
*/
|
||||||
|
boolean saveParticipant(MpAgentActivityParticipantEntity entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新代理商活动参与记录(管理端)
|
||||||
|
*
|
||||||
|
* @param entity 参与记录实体
|
||||||
|
* @return 操作是否成功
|
||||||
|
*/
|
||||||
|
boolean updateParticipant(MpAgentActivityParticipantEntity entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID删除代理商活动参与记录(管理端)
|
||||||
|
*
|
||||||
|
* @param id 参与记录ID
|
||||||
|
* @return 操作是否成功
|
||||||
|
*/
|
||||||
|
boolean deleteParticipant(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID获取代理商活动参与记录详情(管理端)
|
||||||
|
*
|
||||||
|
* @param id 参与记录ID
|
||||||
|
* @return 参与记录详情
|
||||||
|
*/
|
||||||
|
AdminAgentActivityParticipantResp getById(Integer id);
|
||||||
|
}
|
||||||
@ -0,0 +1,59 @@
|
|||||||
|
package com.seer.teach.mp.admin.service;
|
||||||
|
|
||||||
|
import com.seer.teach.common.PageListBean;
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.AgentEmployeeRelationResp;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.AgentEmployeeRelationQueryReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.AgentEmployeeRelationReq;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 管理端代理商员工关系服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Lingma
|
||||||
|
* @since 2025-12-30
|
||||||
|
*/
|
||||||
|
public interface IAdminAgentEmployeeRelationService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询代理商员工关联列表(管理端)
|
||||||
|
*
|
||||||
|
* @param query 查询条件
|
||||||
|
* @return 代理商员工关联分页列表
|
||||||
|
*/
|
||||||
|
PageListBean<AgentEmployeeRelationResp> pageList(AgentEmployeeRelationQueryReq query);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建或更新代理商员工关联(管理端)
|
||||||
|
*
|
||||||
|
* @param request 关联请求对象
|
||||||
|
* @return 操作是否成功
|
||||||
|
*/
|
||||||
|
boolean saveOrUpdateRelation(AgentEmployeeRelationReq request);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除代理商员工关联(管理端)
|
||||||
|
*
|
||||||
|
* @param id 关联ID
|
||||||
|
* @return 操作是否成功
|
||||||
|
*/
|
||||||
|
boolean deleteRelation(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID获取详情(管理端)
|
||||||
|
*
|
||||||
|
* @param id 关联ID
|
||||||
|
* @return 关联详情
|
||||||
|
*/
|
||||||
|
AgentEmployeeRelationResp getById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据代理商ID获取员工列表(管理端)
|
||||||
|
*
|
||||||
|
* @param agentId 代理商ID
|
||||||
|
* @return 员工关联列表
|
||||||
|
*/
|
||||||
|
List<AgentEmployeeRelationResp> getEmployeeRelationsByAgentId(Integer agentId);
|
||||||
|
}
|
||||||
@ -0,0 +1,59 @@
|
|||||||
|
package com.seer.teach.mp.admin.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.seer.teach.common.PageListBean;
|
||||||
|
import com.seer.teach.common.utils.PageConverterUtils;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.MpActivityQueryReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.MpActivityReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.AdminActivityResp;
|
||||||
|
import com.seer.teach.mp.admin.service.IAdminActivityService;
|
||||||
|
import com.seer.teach.mp.admin.convert.AdminActivityConvert;
|
||||||
|
import com.seer.teach.mp.entity.MpActivityEntity;
|
||||||
|
import com.seer.teach.mp.service.IMpActivityService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 管理端代理商活动服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Lingma
|
||||||
|
* @since 2025-12-30
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class AdminActivityServiceImpl implements IAdminActivityService {
|
||||||
|
|
||||||
|
private final IMpActivityService agentActivityService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageListBean<AdminActivityResp> pageList(MpActivityQueryReq query) {
|
||||||
|
Page<MpActivityEntity> page = new Page<>(query.getPageNo(), query.getPageSize());
|
||||||
|
var pageResult = agentActivityService.page(page, new LambdaQueryWrapper<>(MpActivityEntity.class)
|
||||||
|
.like(StringUtils.isNotBlank(query.getActivityName()), MpActivityEntity::getActivityName, query.getActivityName())
|
||||||
|
.eq(Objects.nonNull(query.getStatus()), MpActivityEntity::getStatus, query.getStatus()));
|
||||||
|
return PageConverterUtils.convertPageListBean(pageResult, AdminActivityConvert.INSTANCE::convertToRespList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean saveOrUpdateActivity(MpActivityReq request) {
|
||||||
|
MpActivityEntity entity = AdminActivityConvert.INSTANCE.convert(request);
|
||||||
|
return agentActivityService.saveOrUpdateActivity(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean deleteActivity(Integer id) {
|
||||||
|
return agentActivityService.deleteActivity(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AdminActivityResp getById(Integer id) {
|
||||||
|
MpActivityEntity entity = agentActivityService.getById(id);
|
||||||
|
return AdminActivityConvert.INSTANCE.convertToResp(entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,93 @@
|
|||||||
|
package com.seer.teach.mp.admin.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.seer.teach.common.PageListBean;
|
||||||
|
import com.seer.teach.common.utils.PageConverterUtils;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.AgentActivityLogQueryReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.AdminAgentActivityLogResp;
|
||||||
|
import com.seer.teach.mp.admin.service.IAdminAgentActivityLogService;
|
||||||
|
import com.seer.teach.mp.entity.MpAgentActivityLogEntity;
|
||||||
|
import com.seer.teach.mp.service.IMpAgentActivityLogService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 代理商活动操作日志表 管理端服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
* @since 2025-12-30
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class AdminAgentActivityLogServiceImpl implements IAdminAgentActivityLogService {
|
||||||
|
|
||||||
|
private final IMpAgentActivityLogService mpAgentActivityLogService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageListBean<AdminAgentActivityLogResp> pageList(AgentActivityLogQueryReq query) {
|
||||||
|
Page<MpAgentActivityLogEntity> page = new Page<>(query.getPageNum(), query.getPageSize());
|
||||||
|
|
||||||
|
LambdaQueryWrapper<MpAgentActivityLogEntity> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
|
||||||
|
// 根据活动ID查询
|
||||||
|
if (query.getActivityId() != null) {
|
||||||
|
wrapper.eq(MpAgentActivityLogEntity::getActivityId, query.getActivityId());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据操作人ID查询
|
||||||
|
if (query.getOperatorId() != null) {
|
||||||
|
wrapper.eq(MpAgentActivityLogEntity::getOperatorId, query.getOperatorId());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据操作类型查询
|
||||||
|
if (query.getOperationType() != null && !query.getOperationType().isEmpty()) {
|
||||||
|
wrapper.eq(MpAgentActivityLogEntity::getOperationType, query.getOperationType());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据创建时间范围查询
|
||||||
|
if (query.getStartTime() != null) {
|
||||||
|
wrapper.ge(MpAgentActivityLogEntity::getCreateTime, query.getStartTime());
|
||||||
|
}
|
||||||
|
if (query.getEndTime() != null) {
|
||||||
|
wrapper.le(MpAgentActivityLogEntity::getCreateTime, query.getEndTime());
|
||||||
|
}
|
||||||
|
|
||||||
|
IPage<MpAgentActivityLogEntity> result = mpAgentActivityLogService.page(page, wrapper);
|
||||||
|
|
||||||
|
return PageConverterUtils.convertPageList(result, this::convertToResp);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AdminAgentActivityLogResp getById(Integer id) {
|
||||||
|
MpAgentActivityLogEntity entity = mpAgentActivityLogService.getById(id);
|
||||||
|
return convertToResp(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean deleteLog(Integer id) {
|
||||||
|
return mpAgentActivityLogService.removeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将实体转换为响应对象
|
||||||
|
*/
|
||||||
|
private AdminAgentActivityLogResp convertToResp(MpAgentActivityLogEntity entity) {
|
||||||
|
AdminAgentActivityLogResp resp = new AdminAgentActivityLogResp();
|
||||||
|
resp.setId(entity.getId());
|
||||||
|
resp.setActivityId(entity.getActivityId());
|
||||||
|
resp.setOperatorId(entity.getOperatorId());
|
||||||
|
resp.setOperationType(entity.getOperationType());
|
||||||
|
resp.setDescription(entity.getDescription());
|
||||||
|
resp.setBeforeData(entity.getBeforeData());
|
||||||
|
resp.setAfterData(entity.getAfterData());
|
||||||
|
resp.setCreateTime(entity.getCreateTime());
|
||||||
|
resp.setUpdateTime(entity.getUpdateTime());
|
||||||
|
return resp;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,93 @@
|
|||||||
|
package com.seer.teach.mp.admin.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.seer.teach.common.PageListBean;
|
||||||
|
import com.seer.teach.common.utils.PageConverterUtils;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.AgentActivityParticipantQueryReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.AdminAgentActivityParticipantResp;
|
||||||
|
import com.seer.teach.mp.admin.convert.AdminAgentActivityParticipantConvert;
|
||||||
|
import com.seer.teach.mp.admin.service.IAdminAgentActivityParticipantService;
|
||||||
|
import com.seer.teach.mp.entity.MpAgentActivityParticipantEntity;
|
||||||
|
import com.seer.teach.mp.service.IMpAgentActivityParticipantService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 代理商活动参与记录表 管理端服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
* @since 2025-12-30
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class AdminAgentActivityParticipantServiceImpl implements IAdminAgentActivityParticipantService {
|
||||||
|
|
||||||
|
private final IMpAgentActivityParticipantService mpAgentActivityParticipantService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageListBean<AdminAgentActivityParticipantResp> pageList(AgentActivityParticipantQueryReq query) {
|
||||||
|
Page<MpAgentActivityParticipantEntity> page = new Page<>(query.getPageNum(), query.getPageSize());
|
||||||
|
|
||||||
|
LambdaQueryWrapper<MpAgentActivityParticipantEntity> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
|
||||||
|
// 根据活动ID查询
|
||||||
|
if (query.getActivityId() != null) {
|
||||||
|
wrapper.eq(MpAgentActivityParticipantEntity::getActivityId, query.getActivityId());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据代理商ID查询
|
||||||
|
if (query.getAgentId() != null) {
|
||||||
|
wrapper.eq(MpAgentActivityParticipantEntity::getAgentId, query.getAgentId());
|
||||||
|
}
|
||||||
|
IPage<MpAgentActivityParticipantEntity> result = mpAgentActivityParticipantService.page(page, wrapper);
|
||||||
|
|
||||||
|
return PageConverterUtils.convertPageListBean(result, AdminAgentActivityParticipantConvert.INSTANCE::convertToRespList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean saveParticipant(MpAgentActivityParticipantEntity entity) {
|
||||||
|
// 检查是否已存在相同的活动、代理商和家长记录
|
||||||
|
LambdaQueryWrapper<MpAgentActivityParticipantEntity> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(MpAgentActivityParticipantEntity::getActivityId, entity.getActivityId())
|
||||||
|
.eq(MpAgentActivityParticipantEntity::getAgentId, entity.getAgentId());
|
||||||
|
|
||||||
|
long count = mpAgentActivityParticipantService.count(wrapper);
|
||||||
|
if (count > 0) {
|
||||||
|
throw new RuntimeException("该代理商活动参与记录已存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
return mpAgentActivityParticipantService.save(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean updateParticipant(MpAgentActivityParticipantEntity entity) {
|
||||||
|
// 检查是否存在相同的活动、代理商和家长记录(排除当前记录)
|
||||||
|
LambdaQueryWrapper<MpAgentActivityParticipantEntity> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(MpAgentActivityParticipantEntity::getActivityId, entity.getActivityId())
|
||||||
|
.eq(MpAgentActivityParticipantEntity::getAgentId, entity.getAgentId())
|
||||||
|
.ne(MpAgentActivityParticipantEntity::getId, entity.getId());
|
||||||
|
|
||||||
|
long count = mpAgentActivityParticipantService.count(wrapper);
|
||||||
|
if (count > 0) {
|
||||||
|
throw new RuntimeException("该代理商活动参与记录已存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
return mpAgentActivityParticipantService.updateById(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean deleteParticipant(Integer id) {
|
||||||
|
return mpAgentActivityParticipantService.removeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AdminAgentActivityParticipantResp getById(Integer id) {
|
||||||
|
MpAgentActivityParticipantEntity entity = mpAgentActivityParticipantService.getById(id);
|
||||||
|
return AdminAgentActivityParticipantConvert.INSTANCE.convertToResp(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
package com.seer.teach.mp.admin.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.seer.teach.common.PageListBean;
|
||||||
|
import com.seer.teach.common.utils.PageConverterUtils;
|
||||||
|
import com.seer.teach.mp.admin.service.IAdminAgentEmployeeRelationService;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.AgentEmployeeRelationQueryReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.req.AgentEmployeeRelationReq;
|
||||||
|
import com.seer.teach.mp.admin.controller.resp.AgentEmployeeRelationResp;
|
||||||
|
import com.seer.teach.mp.admin.convert.AdminAgentEmployeeRelationConvert;
|
||||||
|
import com.seer.teach.mp.entity.MpAgentEmployeeRelationEntity;
|
||||||
|
import com.seer.teach.mp.service.IMpAgentEmployeeRelationService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 管理端代理商员工关系服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Lingma
|
||||||
|
* @since 2025-12-30
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class AdminAgentEmployeeRelationServiceImpl implements IAdminAgentEmployeeRelationService {
|
||||||
|
|
||||||
|
private final IMpAgentEmployeeRelationService agentEmployeeRelationService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageListBean<AgentEmployeeRelationResp> pageList(AgentEmployeeRelationQueryReq query) {
|
||||||
|
Page<MpAgentEmployeeRelationEntity> pageParm = new Page<>(query.getPageNo(), query.getPageSize());
|
||||||
|
var pageResult = agentEmployeeRelationService.page(pageParm, new LambdaQueryWrapper<>(MpAgentEmployeeRelationEntity.class)
|
||||||
|
.eq(Objects.nonNull(query.getAgentId()), MpAgentEmployeeRelationEntity::getAgentId, query.getAgentId())
|
||||||
|
.eq(Objects.nonNull(query.getEmployeeUserId()), MpAgentEmployeeRelationEntity::getEmployeeUserId, query.getEmployeeUserId())
|
||||||
|
.eq(Objects.nonNull(query.getStatus()), MpAgentEmployeeRelationEntity::getStatus, query.getStatus()));
|
||||||
|
|
||||||
|
return PageConverterUtils.convertPageListBean(pageResult, AdminAgentEmployeeRelationConvert.INSTANCE::convertToRespList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean saveOrUpdateRelation(AgentEmployeeRelationReq request) {
|
||||||
|
MpAgentEmployeeRelationEntity entity = AdminAgentEmployeeRelationConvert.INSTANCE.convert(request);
|
||||||
|
return agentEmployeeRelationService.saveOrUpdateRelation(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean deleteRelation(Integer id) {
|
||||||
|
return agentEmployeeRelationService.deleteRelation(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AgentEmployeeRelationResp getById(Integer id) {
|
||||||
|
MpAgentEmployeeRelationEntity entity = agentEmployeeRelationService.getById(id);
|
||||||
|
return AdminAgentEmployeeRelationConvert.INSTANCE.convertToResp(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<AgentEmployeeRelationResp> getEmployeeRelationsByAgentId(Integer agentId) {
|
||||||
|
var relations = agentEmployeeRelationService.getEmployeeRelationsByAgentId(agentId);
|
||||||
|
return relations.stream()
|
||||||
|
.map(AdminAgentEmployeeRelationConvert.INSTANCE::convertToResp)
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.seer.teach.mp.utils;
|
package com.seer.teach.mp.admin.utils;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||||
import com.fasterxml.jackson.databind.BeanDescription;
|
import com.fasterxml.jackson.databind.BeanDescription;
|
||||||
@ -0,0 +1,146 @@
|
|||||||
|
-- 创建代理商表
|
||||||
|
DROP TABLE IF EXISTS `mp_agent`;
|
||||||
|
CREATE TABLE `mp_agent` (
|
||||||
|
`id` int NOT NULL AUTO_INCREMENT COMMENT '代理商ID',
|
||||||
|
`agent_name` varchar(255) NOT NULL COMMENT '代理商名称',
|
||||||
|
`agent_code` varchar(100) NOT NULL COMMENT '代理商编码',
|
||||||
|
`agent_level` varchar(50) DEFAULT NULL COMMENT '代理商等级',
|
||||||
|
`contact_name` varchar(100) DEFAULT NULL COMMENT '联系人姓名',
|
||||||
|
`contact_phone` varchar(20) DEFAULT NULL COMMENT '联系电话',
|
||||||
|
`address` varchar(500) DEFAULT NULL COMMENT '代理商地址',
|
||||||
|
`status` tinyint NOT NULL DEFAULT '1' COMMENT '代理商状态:0-禁用,1-启用',
|
||||||
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`create_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_german2_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||||
|
`update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||||
|
`update_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_german2_ci NULL DEFAULT NULL COMMENT '修改人',
|
||||||
|
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||||
|
`tenant_id` varchar(20) DEFAULT 'Default' COMMENT '租户id',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
UNIQUE KEY `uk_agent_code` (`agent_code`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理商表';
|
||||||
|
|
||||||
|
-- 创建代理商员工关联表
|
||||||
|
DROP TABLE IF EXISTS `mp_agent_employee_relation`;
|
||||||
|
CREATE TABLE `mp_agent_employee_relation` (
|
||||||
|
`id` int NOT NULL AUTO_INCREMENT COMMENT '关联ID',
|
||||||
|
`agent_id` int NOT NULL COMMENT '代理商ID(对应user表的ID)',
|
||||||
|
`employee_user_id` int NOT NULL COMMENT '员工用户ID(对应user表的ID)',
|
||||||
|
`position` varchar(50) COMMENT '员工职位',
|
||||||
|
`status` tinyint NOT NULL DEFAULT '1' COMMENT '员工状态:0-禁用,1-启用',
|
||||||
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`create_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_german2_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||||
|
`update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||||
|
`update_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_german2_ci NULL DEFAULT NULL COMMENT '修改人',
|
||||||
|
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||||
|
`tenant_id` varchar(20) DEFAULT 'Default' COMMENT '租户id',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
UNIQUE KEY `uk_agent_employee` (`agent_id`, `employee_user_id`),
|
||||||
|
KEY `idx_agent_id` (`agent_id`),
|
||||||
|
KEY `idx_employee_user_id` (`employee_user_id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理商员工关联表';
|
||||||
|
|
||||||
|
-- 创建活动表
|
||||||
|
DROP TABLE IF EXISTS `mp_activity`;
|
||||||
|
CREATE TABLE `mp_activity` (
|
||||||
|
`id` int NOT NULL AUTO_INCREMENT COMMENT '活动ID',
|
||||||
|
`activity_name` varchar(255) NOT NULL COMMENT '活动名称,如千人助学计划',
|
||||||
|
`description` text COMMENT '活动描述',
|
||||||
|
`start_time` datetime NOT NULL COMMENT '活动开始时间',
|
||||||
|
`end_time` datetime NOT NULL COMMENT '活动结束时间',
|
||||||
|
`status` tinyint NOT NULL DEFAULT '1' COMMENT '活动状态:0-禁用,1-启用',
|
||||||
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`create_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_german2_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||||
|
`update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||||
|
`update_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_german2_ci NULL DEFAULT NULL COMMENT '修改人',
|
||||||
|
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||||
|
`tenant_id` varchar(20) DEFAULT 'Default' COMMENT '租户id',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理商活动表';
|
||||||
|
|
||||||
|
-- 创建代理商活动参与记录表
|
||||||
|
DROP TABLE IF EXISTS `mp_agent_activity_participant`;
|
||||||
|
CREATE TABLE `mp_agent_activity_participant` (
|
||||||
|
`id` int NOT NULL AUTO_INCREMENT COMMENT '参与记录ID',
|
||||||
|
`activity_id` int NOT NULL COMMENT '活动ID',
|
||||||
|
`agent_id` int NOT NULL COMMENT '代理商ID',
|
||||||
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`create_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_german2_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||||
|
`update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||||
|
`update_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_german2_ci NULL DEFAULT NULL COMMENT '修改人',
|
||||||
|
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||||
|
`tenant_id` varchar(20) DEFAULT 'Default' COMMENT '租户id',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
KEY `idx_activity_agent` (`activity_id`, `agent_id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理商活动参与记录表';
|
||||||
|
|
||||||
|
-- 创建代理商活动操作日志表
|
||||||
|
DROP TABLE IF EXISTS `mp_agent_activity_log`;
|
||||||
|
CREATE TABLE `mp_agent_activity_log` (
|
||||||
|
`id` int NOT NULL AUTO_INCREMENT COMMENT '日志ID',
|
||||||
|
`activity_id` int DEFAULT NULL COMMENT '活动ID',
|
||||||
|
`operator_id` int DEFAULT NULL COMMENT '操作人ID',
|
||||||
|
`operation_type` varchar(50) DEFAULT NULL COMMENT '操作类型',
|
||||||
|
`description` text COMMENT '操作描述',
|
||||||
|
`before_data` text COMMENT '操作前数据(JSON格式)',
|
||||||
|
`after_data` text COMMENT '操作后数据(JSON格式)',
|
||||||
|
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
|
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '逻辑删除标记(0-正常,1-已删除)',
|
||||||
|
`create_by` varchar(20) DEFAULT NULL COMMENT '创建人',
|
||||||
|
`update_by` varchar(20) DEFAULT NULL COMMENT '修改人',
|
||||||
|
`tenant_id` varchar(20) DEFAULT 'Default' COMMENT '租户id',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
KEY `idx_activity_id` (`activity_id`),
|
||||||
|
KEY `idx_operator_id` (`operator_id`),
|
||||||
|
KEY `idx_create_time` (`create_time`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='代理商活动操作日志表';
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `mp_parent_agent_activity_relation`;
|
||||||
|
CREATE TABLE `mp_parent_agent_activity_relation` (
|
||||||
|
`id` int NOT NULL AUTO_INCREMENT COMMENT '关系ID',
|
||||||
|
`activity_id` int NOT NULL COMMENT '活动ID',
|
||||||
|
`agent_id` int NOT NULL COMMENT '代理商ID',
|
||||||
|
`parent_id` int NOT NULL COMMENT '家长ID',
|
||||||
|
`activity_name` varchar(255) NULL COMMENT '活动名称(冗余字段)',
|
||||||
|
`agent_name` varchar(255) NULL COMMENT '代理商名称(冗余字段)',
|
||||||
|
`status` tinyint NOT NULL DEFAULT '1' COMMENT '参与状态:0-取消参与,1-正常参与',
|
||||||
|
`sign_up_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '报名时间',
|
||||||
|
`create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`create_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_german2_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||||
|
`update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||||
|
`update_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_german2_ci NULL DEFAULT NULL COMMENT '修改人',
|
||||||
|
`deleted` bit(1) NULL DEFAULT b'0' COMMENT '是否删除',
|
||||||
|
`tenant_id` varchar(20) DEFAULT 'Default' COMMENT '租户id',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
KEY `idx_activity_id` (`activity_id`),
|
||||||
|
KEY `idx_agent_id` (`agent_id`),
|
||||||
|
KEY `idx_parent_id` (`parent_id`),
|
||||||
|
KEY `idx_sign_up_time` (`sign_up_time`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='家长参与代理商活动关系表';
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `mp_activity_info_collection`;
|
||||||
|
CREATE TABLE `mp_activity_info_collection` (
|
||||||
|
`id` int NOT NULL AUTO_INCREMENT COMMENT '信息收集ID',
|
||||||
|
`relation_id` int NOT NULL COMMENT '关联的家长参与代理商活动关系ID',
|
||||||
|
`activity_id` int NOT NULL COMMENT '活动ID',
|
||||||
|
`parent_id` int NOT NULL COMMENT '家长ID',
|
||||||
|
`child_name` varchar(100) COMMENT '孩子姓名',
|
||||||
|
`child_gender` varchar(10) COMMENT '孩子性别(M-男,F-女)',
|
||||||
|
`child_birth_date` date COMMENT '出生年月',
|
||||||
|
`grade` varchar(20) COMMENT '年级',
|
||||||
|
`school` varchar(255) COMMENT '学校',
|
||||||
|
`region` varchar(255) COMMENT '地区',
|
||||||
|
`parent_identity` varchar(20) COMMENT '家长身份(爸爸,妈妈)',
|
||||||
|
`learning_situation` varchar(20) COMMENT '学习情况(优、良、中、差)',
|
||||||
|
`weak_subject` varchar(50) COMMENT '偏科(数学、英语等)',
|
||||||
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
|
`create_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_german2_ci NULL DEFAULT NULL COMMENT '创建人',
|
||||||
|
`update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
|
||||||
|
`update_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_german2_ci NULL DEFAULT NULL COMMENT '修改人',
|
||||||
|
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||||
|
`tenant_id` varchar(20) DEFAULT 'Default' COMMENT '租户id',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
KEY `idx_activity_id` (`activity_id`),
|
||||||
|
KEY `idx_parent_id` (`parent_id`),
|
||||||
|
KEY `idx_relation_id` (`relation_id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='活动信息收集表';
|
||||||
@ -29,6 +29,23 @@
|
|||||||
<groupId>org.springdoc</groupId>
|
<groupId>org.springdoc</groupId>
|
||||||
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mapstruct</groupId>
|
||||||
|
<artifactId>mapstruct</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mapstruct</groupId>
|
||||||
|
<artifactId>mapstruct-processor</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok-mapstruct-binding</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@ -0,0 +1,54 @@
|
|||||||
|
package com.seer.teach.mp.app.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
|
import com.seer.teach.common.PageListBean;
|
||||||
|
import com.seer.teach.common.ResultBean;
|
||||||
|
import com.seer.teach.common.annotation.DecryptionAnnotation;
|
||||||
|
import com.seer.teach.common.annotation.EncryptionAnnotation;
|
||||||
|
import com.seer.teach.common.annotation.LogPrint;
|
||||||
|
import com.seer.teach.mp.app.controller.req.AppAgentActivityQueryReq;
|
||||||
|
import com.seer.teach.mp.app.controller.resp.AppActivityResp;
|
||||||
|
import com.seer.teach.mp.app.service.IAppActivityService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 代理商活动App控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Lingma
|
||||||
|
* @since 2025-12-29
|
||||||
|
*/
|
||||||
|
@Tag(name = "APP - 活动列表")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/app/activity")
|
||||||
|
@LogPrint
|
||||||
|
@EncryptionAnnotation
|
||||||
|
@DecryptionAnnotation
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class AppAgentActivityController {
|
||||||
|
|
||||||
|
private final IAppActivityService agentActivityService;
|
||||||
|
|
||||||
|
@Operation(summary = "活动列表")
|
||||||
|
@GetMapping("/page-list")
|
||||||
|
@SaCheckPermission("mp:app:agent:activity:list")
|
||||||
|
public ResultBean<PageListBean<AppActivityResp>> pageList(AppAgentActivityQueryReq query) {
|
||||||
|
Integer userId = StpUtil.getLoginIdAsInt();
|
||||||
|
return ResultBean.success(agentActivityService.pageList(query,userId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "查看活动详情")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
@SaCheckPermission("mp:app:agent:activity:detail")
|
||||||
|
public ResultBean<AppActivityResp> getDetail(@PathVariable Integer id) {
|
||||||
|
return ResultBean.success(agentActivityService.getById(id));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
package com.seer.teach.mp.app.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
|
import com.seer.teach.common.ResultBean;
|
||||||
|
import com.seer.teach.common.annotation.DecryptionAnnotation;
|
||||||
|
import com.seer.teach.common.annotation.EncryptionAnnotation;
|
||||||
|
import com.seer.teach.common.annotation.LogPrint;
|
||||||
|
import com.seer.teach.mp.app.controller.resp.AgentActivityParentInfoResp;
|
||||||
|
import com.seer.teach.mp.app.service.IAppAgentActivityParentInfoService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 代理商活动参与家长信息App控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Lingma
|
||||||
|
* @since 2025-12-30
|
||||||
|
*/
|
||||||
|
@Tag(name = "APP - 参与代理商活动家长信息")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/app/agent/activity/parent-info")
|
||||||
|
@LogPrint
|
||||||
|
@EncryptionAnnotation
|
||||||
|
@DecryptionAnnotation
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class AppAgentActivityParentInfoController {
|
||||||
|
|
||||||
|
private final IAppAgentActivityParentInfoService agentActivityParentInfoService;
|
||||||
|
|
||||||
|
@Operation(summary = "获取参加指定活动的家长列表")
|
||||||
|
@GetMapping("/getActivityParents")
|
||||||
|
@SaCheckLogin
|
||||||
|
public ResultBean<List<AgentActivityParentInfoResp>> getActivityParents(
|
||||||
|
@RequestParam("activityId") Integer activityId,
|
||||||
|
@RequestParam("agentId") Integer agentId) {
|
||||||
|
Integer userId = StpUtil.getLoginIdAsInt();
|
||||||
|
return ResultBean.success(agentActivityParentInfoService.getParentsByActivityAndAgent(activityId, agentId,userId));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
package com.seer.teach.mp.app.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
|
import com.seer.teach.common.ResultBean;
|
||||||
|
import com.seer.teach.common.annotation.DecryptionAnnotation;
|
||||||
|
import com.seer.teach.common.annotation.EncryptionAnnotation;
|
||||||
|
import com.seer.teach.common.annotation.LogPrint;
|
||||||
|
import com.seer.teach.mp.app.controller.resp.AgentActivityParticipantResp;
|
||||||
|
import com.seer.teach.mp.app.service.IAppAgentActivityParticipantService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 代理商参与活动记录App控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Lingma
|
||||||
|
* @since 2025-12-29
|
||||||
|
*/
|
||||||
|
@Tag(name = "APP - 代理商参与活动记录")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/app/agent/activity/participant")
|
||||||
|
@LogPrint
|
||||||
|
@EncryptionAnnotation
|
||||||
|
@DecryptionAnnotation
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class AppAgentActivityParticipantController {
|
||||||
|
|
||||||
|
private final IAppAgentActivityParticipantService agentActivityParticipantService;
|
||||||
|
|
||||||
|
@Operation(summary = "获取代理商参加的活动列表")
|
||||||
|
@GetMapping()
|
||||||
|
@SaCheckPermission("mp:app:agent:participant:parents")
|
||||||
|
public ResultBean<List<AgentActivityParticipantResp>> getParentsByAgentAndActivity(@RequestParam("agentId") Integer agentId) {
|
||||||
|
Integer userId = StpUtil.getLoginIdAsInt();
|
||||||
|
return ResultBean.success(agentActivityParticipantService.getParticipantsByActivityAndAgent(agentId,userId));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
package com.seer.teach.mp.app.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
|
import com.seer.teach.common.ResultBean;
|
||||||
|
import com.seer.teach.common.annotation.DecryptionAnnotation;
|
||||||
|
import com.seer.teach.common.annotation.EncryptionAnnotation;
|
||||||
|
import com.seer.teach.common.annotation.LogPrint;
|
||||||
|
import com.seer.teach.mp.app.controller.resp.AppMpAgentResp;
|
||||||
|
import com.seer.teach.mp.app.service.IAppActivityService;
|
||||||
|
import com.seer.teach.mp.app.service.IAppAgentService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 代理商App控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author Lingma
|
||||||
|
* @since 2025-12-29
|
||||||
|
*/
|
||||||
|
@Tag(name = "APP - 代理商管理接口")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/app/agent")
|
||||||
|
@LogPrint
|
||||||
|
@EncryptionAnnotation
|
||||||
|
@DecryptionAnnotation
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class AppAgentController {
|
||||||
|
|
||||||
|
private final IAppActivityService agentActivityService;
|
||||||
|
private final IAppAgentService appAgentService;
|
||||||
|
|
||||||
|
@Operation(summary = "获取代理商详情")
|
||||||
|
@GetMapping("/detail")
|
||||||
|
public ResultBean<AppMpAgentResp> getAgent() {
|
||||||
|
Integer userId = StpUtil.getLoginIdAsInt();
|
||||||
|
return ResultBean.success(appAgentService.getAgentRespByUserId(userId));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
package com.seer.teach.mp.app.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||||
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
|
import com.seer.teach.common.ResultBean;
|
||||||
|
import com.seer.teach.mp.app.controller.req.AppMpSignUpActivityReq;
|
||||||
|
import com.seer.teach.mp.app.controller.resp.AppMpSignUpActivityResp;
|
||||||
|
import com.seer.teach.mp.app.service.AppParentAgentActivityService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 家长参与代理商活动控制器 - 应用端
|
||||||
|
*/
|
||||||
|
@Tag(name = "应用端 - 家长参与代理商活动管理")
|
||||||
|
@AllArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/app/parent/agent/activity")
|
||||||
|
public class AppParentAgentActivityController {
|
||||||
|
|
||||||
|
private final AppParentAgentActivityService appParentAgentActivityService;
|
||||||
|
|
||||||
|
@PostMapping("/sign-up")
|
||||||
|
@SaCheckLogin
|
||||||
|
@Operation(summary = "家长报名参加代理商活动")
|
||||||
|
public ResultBean<Boolean> signUpForActivity(@RequestBody AppMpSignUpActivityReq request) {
|
||||||
|
Integer parentId = StpUtil.getLoginIdAsInt();
|
||||||
|
return ResultBean.success(appParentAgentActivityService.signUpForActivityWithInfo(request, parentId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/update-info")
|
||||||
|
@SaCheckLogin
|
||||||
|
@Operation(summary = "家长更新活动信息")
|
||||||
|
public ResultBean<Boolean> updateActivityInfo(@RequestBody AppMpSignUpActivityReq request) {
|
||||||
|
Integer parentId = StpUtil.getLoginIdAsInt();
|
||||||
|
return ResultBean.success(appParentAgentActivityService.updateActivityInfo(request, parentId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/cancel/{id}")
|
||||||
|
@SaCheckLogin
|
||||||
|
@Operation(summary = "取消报名参加代理商活动")
|
||||||
|
public ResultBean<Boolean> cancelSignUp(@PathVariable("id") Integer id) {
|
||||||
|
Integer parentId = StpUtil.getLoginIdAsInt();
|
||||||
|
return ResultBean.success(appParentAgentActivityService.cancelSignUp(id,parentId));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/{agentId}/{activityId}/info")
|
||||||
|
@SaCheckLogin
|
||||||
|
@Operation(summary = "获取家长参与代理商活动详情")
|
||||||
|
public ResultBean<AppMpSignUpActivityResp> getRelationById(@PathVariable("agentId") Integer agentId,@PathVariable("activityId") Integer activityId) {
|
||||||
|
Integer parentId = StpUtil.getLoginIdAsInt();
|
||||||
|
return ResultBean.success(appParentAgentActivityService.getByActivityIdAndParentId(agentId,activityId,parentId));
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user