dev-chenjiajian #1
@ -114,25 +114,60 @@ public class AppParentAgentActivityService implements IAppParentAgentActivitySer
|
||||
entity.setLearningSituation(request.getLearningSituation());
|
||||
entity.setWeakSubjectIds(request.getWeakSubjectIds());
|
||||
entity.setStrongSubjectIds(request.getStrongSubjectIds());
|
||||
return activityInfoCollectionService.updateById(entity);
|
||||
boolean updateResult = activityInfoCollectionService.updateById(entity);
|
||||
if (updateResult) {
|
||||
// 查询性格测试记录,如果存在则删除
|
||||
MpTestChildCharacterEntity characterEntity = mpTestChildCharacterService
|
||||
.lambdaQuery()
|
||||
.eq(MpTestChildCharacterEntity::getParentId, parentId)
|
||||
.orderByDesc(MpTestChildCharacterEntity::getCreateTime)
|
||||
.last("LIMIT 1")
|
||||
.one();
|
||||
|
||||
if (characterEntity != null) {
|
||||
// 如果存在性格测试记录,则删除
|
||||
boolean removeResult = mpTestChildCharacterService.removeById(characterEntity.getId());
|
||||
log.info("删除AI测试结果: {}", removeResult);
|
||||
} else {
|
||||
log.info("未找到家长 {} 的性格测试记录,无需删除", parentId);
|
||||
}
|
||||
}
|
||||
|
||||
return updateResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消报名
|
||||
*
|
||||
* @param id 报名ID
|
||||
* @param parentId 家长ID
|
||||
* @param id 报名ID
|
||||
* @param parentId 家长ID
|
||||
* @return true表示成功,false表示失败
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class, timeout = 120)
|
||||
public boolean cancelSignUp(Integer id, Integer parentId) {
|
||||
MpActivityInfoCollectionEntity entity = activityInfoCollectionService.getById(id);
|
||||
MpActivityInfoCollectionEntity entity = activityInfoCollectionService.getById(id);
|
||||
if (entity == null) {
|
||||
return false;
|
||||
}
|
||||
boolean activityResult = activityInfoCollectionService.removeById(entity);
|
||||
if (activityResult) {
|
||||
Integer relationId = entity.getRelationId();
|
||||
// 查询性格测试记录,如果存在则删除
|
||||
MpTestChildCharacterEntity characterEntity = mpTestChildCharacterService
|
||||
.lambdaQuery()
|
||||
.eq(MpTestChildCharacterEntity::getParentId, parentId)
|
||||
.orderByDesc(MpTestChildCharacterEntity::getCreateTime)
|
||||
.last("LIMIT 1")
|
||||
.one();
|
||||
|
||||
if (characterEntity != null) {
|
||||
// 如果存在性格测试记录,则删除
|
||||
boolean removeResult = mpTestChildCharacterService.removeById(characterEntity.getId());
|
||||
log.info("删除AI测试结果: {}", removeResult);
|
||||
} else {
|
||||
log.info("未找到家长 {} 的性格测试记录,无需删除", parentId);
|
||||
}
|
||||
|
||||
return parentAgentActivityRelationService.removeById(relationId);
|
||||
}
|
||||
return false;
|
||||
@ -328,6 +363,7 @@ public class AppParentAgentActivityService implements IAppParentAgentActivitySer
|
||||
|
||||
/**
|
||||
* 获取孩子性格返回结果
|
||||
*
|
||||
* @param parentId 家长ID
|
||||
* @return 孩子性格返回结果
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user