代理商在增加员工时,同步增加员工的角色
This commit is contained in:
parent
543f972c5c
commit
dbe8e28237
@ -14,5 +14,8 @@ public class MpGenerateQrCodeReq {
|
||||
private String appId;
|
||||
|
||||
@Schema(description = "二维码类型 1-临时 2-永久")
|
||||
private Integer type;
|
||||
private Integer type = 2;
|
||||
|
||||
@Schema(description = "二维码有效期")
|
||||
private Integer expireSeconds;
|
||||
}
|
||||
@ -42,7 +42,7 @@ public class AppAgentActivityParentInfoServiceImpl implements IAppAgentActivityP
|
||||
if (Objects.isNull(userAgentId)) {
|
||||
return List.of();
|
||||
}
|
||||
log.info("userAgentId:{}", userAgentId);
|
||||
log.info("getParentsByActivityAndAgent userAgentId:{}", userAgentId);
|
||||
if(userAgentId.intValue() != agentId){
|
||||
throw new CommonException(ResultCodeEnum.RELATION_NOT_FOUND);
|
||||
}
|
||||
|
||||
@ -10,6 +10,8 @@ import lombok.RequiredArgsConstructor;
|
||||
import com.seer.teach.mp.app.convert.AppAgentConvert;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* App端代理商服务实现类
|
||||
*/
|
||||
@ -27,11 +29,12 @@ public class AppAgentServiceImpl implements IAppAgentService {
|
||||
return null;
|
||||
}
|
||||
MpAgentEntity agentEntity = mpAgentService.getAgentById(mpAgentEmployeeRelationEntity.getAgentId());
|
||||
if (agentEntity == null) {
|
||||
if (Objects.isNull(agentEntity)) {
|
||||
return null;
|
||||
}
|
||||
AppMpAgentResp appMpAgentResp = AppAgentConvert.INSTANCE.entityToResp(agentEntity);
|
||||
appMpAgentResp.setIsContactPerson(agentEntity.getContactUserId().equals(userId));
|
||||
Boolean isContactPerson = Objects.nonNull(agentEntity.getContactUserId()) && agentEntity.getContactUserId().equals(userId);
|
||||
appMpAgentResp.setIsContactPerson(isContactPerson);
|
||||
return appMpAgentResp;
|
||||
}
|
||||
|
||||
|
||||
@ -47,12 +47,6 @@ public interface GradeServiceApi {
|
||||
@PostMapping("/addGrade")
|
||||
ResultBean addGrade(@RequestParam("status") Integer status, @RequestParam("grade") String grade);
|
||||
|
||||
/**
|
||||
* 删除年级
|
||||
* @param ids
|
||||
*/
|
||||
@DeleteMapping("/delete")
|
||||
void deleteGrade(@RequestBody List<Integer> ids);
|
||||
|
||||
/**
|
||||
* 修改年级状态
|
||||
|
||||
@ -140,7 +140,7 @@ public interface UserInfoServiceApi {
|
||||
* @param userInfoDTO 用户信息
|
||||
* @return 用户ID
|
||||
*/
|
||||
@PostMapping("/update-user-assign-role")
|
||||
@PostMapping("/add-user-assign-role")
|
||||
Integer addUserInfoAndAssignRole(@RequestBody UserInfoDTO userInfoDTO);
|
||||
|
||||
/**
|
||||
|
||||
@ -95,19 +95,6 @@ public class GradeServiceApiImpl implements GradeServiceApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除年级
|
||||
* @param ids
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteGrade(List<Integer> ids) {
|
||||
AssertUtils.notEmpty(ids, ResultCodeEnum.PLEASE_SELECT_THE_GRADE_TO_DELETED);
|
||||
List<Integer> distinctIds = ids.stream().filter(Objects::nonNull).distinct().collect(Collectors.toList());
|
||||
gradeService.removeByIds(distinctIds);
|
||||
log.info("删除年级成功,ids={}", distinctIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean updateGradeStatus(GradeUpdateDTO params) {
|
||||
GradeEntity grade = gradeService.getById(params.getId());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user