Compare commits

..

No commits in common. "7ccea276e87f8842ca2386146ced214313d7a9d5" and "dbe8e282373070708f52b7427fdefc16f1444553" have entirely different histories.

5 changed files with 13 additions and 6 deletions

View File

@ -337,7 +337,6 @@ public enum ResultCodeEnum {
PARTICIPATION_FAILED(13010, "参与活动失败"), PARTICIPATION_FAILED(13010, "参与活动失败"),
PARENT_NOT_FOUND(13011, "家长不存在"), PARENT_NOT_FOUND(13011, "家长不存在"),
INVALID_ACTIVITY_STATUS(13012, "无效的活动状态"), INVALID_ACTIVITY_STATUS(13012, "无效的活动状态"),
AGENT_NOT_FOUND(13013, "代理商不存在"),
PARENT_ALREADY_SIGN_UP(130121, "已经报名参加该活动"), PARENT_ALREADY_SIGN_UP(130121, "已经报名参加该活动"),
UNAUTHORIZED_UPDATE_EMPLOYEE(13013, "无权限更新员工信息"), UNAUTHORIZED_UPDATE_EMPLOYEE(13013, "无权限更新员工信息"),
DATA_REPEAT_ERROR(130014, "数据重复"), DATA_REPEAT_ERROR(130014, "数据重复"),

View File

@ -3,6 +3,8 @@ 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;
import jakarta.validation.constraints.NotNull;
@Schema(name = "AgentEmployeeRelationReq", description = "代理商员工关联请求参数") @Schema(name = "AgentEmployeeRelationReq", description = "代理商员工关联请求参数")
@Data @Data
public class AgentEmployeeRelationReq { public class AgentEmployeeRelationReq {
@ -10,9 +12,11 @@ public class AgentEmployeeRelationReq {
@Schema(description = "关联ID") @Schema(description = "关联ID")
private Integer id; private Integer id;
@NotNull(message = "代理商ID不能为空")
@Schema(description = "代理商ID") @Schema(description = "代理商ID")
private Integer agentId; private Integer agentId;
@NotNull(message = "员工用户ID不能为空")
@Schema(description = "员工用户ID") @Schema(description = "员工用户ID")
private Integer employeeUserId; private Integer employeeUserId;

View File

@ -17,11 +17,13 @@ public class AgentEmployeeSaveReq {
@NotNull(message = "员工名称不能为空") @NotNull(message = "员工名称不能为空")
private String employeeName; private String employeeName;
@Schema(description = "员工密码")
@NotNull(message = "员工密码不能为空")
private String password;
@Schema(description = "员工职位") @Schema(description = "员工职位")
private String position; private String position;
@Schema(description = "员工状态0-禁用1-启用") @Schema(description = "员工状态0-禁用1-启用")
private Integer status = 1; private Integer status = 1;
private String password;
} }

View File

@ -27,7 +27,7 @@ public interface IAdminAgentEmployeeRelationService {
PageListBean<AgentEmployeeRelationResp> pageList(AgentEmployeeRelationQueryReq query); PageListBean<AgentEmployeeRelationResp> pageList(AgentEmployeeRelationQueryReq query);
/** /**
* 更新代理商员工关联管理端 * 创建或更新代理商员工关联管理端
* *
* @param request 关联请求对象 * @param request 关联请求对象
* @return 操作是否成功 * @return 操作是否成功

View File

@ -304,8 +304,10 @@ public class UserInfoServiceApiImpl implements UserInfoServiceApi {
public Integer getUserIdByUserName(String userName) { public Integer getUserIdByUserName(String userName) {
UserEntity userEntity = userService.getOne(new LambdaQueryWrapper<UserEntity>() UserEntity userEntity = userService.getOne(new LambdaQueryWrapper<UserEntity>()
.eq(UserEntity::getUserName, userName)); .eq(UserEntity::getUserName, userName));
AssertUtils.notNull(userEntity, ResultCodeEnum.USER_NOT_FOUND); if (Objects.nonNull(userEntity)) {
return userEntity.getId(); return userEntity.getId();
}
return null;
} }
/** /**