fix:修改App取消报名参加代理商活动,同时删除活动信息
This commit is contained in:
parent
550a576a2f
commit
baccd3a433
@ -19,7 +19,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.HashMap;
|
||||
import java.util.Objects;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
@ -122,6 +121,7 @@ public class AppParentAgentActivityService implements IAppParentAgentActivitySer
|
||||
* @param parentId 家长ID
|
||||
* @return true表示成功,false表示失败
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class, timeout = 120)
|
||||
public boolean cancelSignUp(Integer id, Integer parentId) {
|
||||
MpActivityInfoCollectionEntity entity = activityInfoCollectionService.getById(id);
|
||||
if (entity == null) {
|
||||
@ -130,13 +130,7 @@ public class AppParentAgentActivityService implements IAppParentAgentActivitySer
|
||||
boolean activityResult = activityInfoCollectionService.removeById(entity);
|
||||
if (activityResult) {
|
||||
Integer relationId = entity.getRelationId();
|
||||
MpParentAgentActivityRelationEntity relation = parentAgentActivityRelationService.getById(relationId);
|
||||
if (Objects.nonNull(relation) && relation.getParentId().equals(parentId)) {
|
||||
relation.setStatus(0);
|
||||
boolean result = parentAgentActivityRelationService.updateById(relation);
|
||||
log.info("取消报名结果:{}", result);
|
||||
return result;
|
||||
}
|
||||
return parentAgentActivityRelationService.removeById(relationId);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user