|
|
@ -1,5 +1,6 @@ |
|
|
|
package com.epmet.service.impl; |
|
|
|
|
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
@ -108,19 +109,14 @@ public class GrantPointsServiceImpl implements GrantPointsService { |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void agree(GrantPointsFormDTO formDTO) { |
|
|
|
//是否是待处理
|
|
|
|
ActUserRelationDTO actUserRelationDTO=actUserRelationService.get(formDTO.getActUserRelationId()); |
|
|
|
if(null==actUserRelationDTO){ |
|
|
|
logger.warn("积分发放-给分act_user_relation is null,actUserRelationId="+formDTO.getActUserRelationId()); |
|
|
|
return; |
|
|
|
} |
|
|
|
//如果是已处理直接返回
|
|
|
|
if(ActConstant.HANDLED.equals(actUserRelationDTO.getProcessFlag())){ |
|
|
|
logger.info("积分发放-给分act_user_relation already handled,actUserRelationId="+formDTO.getActUserRelationId()); |
|
|
|
ActUserRelationDTO actUserRelationDTO=actUserRelationService.get(formDTO.getActUserRelationId()); |
|
|
|
if (null == actUserRelationDTO || ActConstant.HANDLED.equals(actUserRelationDTO.getProcessFlag())) { |
|
|
|
return; |
|
|
|
} |
|
|
|
//查取分值
|
|
|
|
ActInfoDTO actInfoDTO=actInfoService.get(actUserRelationDTO.getActId()); |
|
|
|
if (null == actInfoDTO || ActConstant.ACT_STATUS_FINISHED.equals(actInfoDTO.getActStatus())) { |
|
|
|
if (null == actInfoDTO || ActConstant.ACT_STATUS_FINISHED.equals(actInfoDTO.getActStatus())|| NumConstant.ZERO==actInfoDTO.getReward()) { |
|
|
|
logger.warn("积分发放-给分act_info is null or act_info is finished"); |
|
|
|
return; |
|
|
|
} |
|
|
@ -152,20 +148,14 @@ public class GrantPointsServiceImpl implements GrantPointsService { |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void deny(GrantPointsFormDTO formDTO) { |
|
|
|
//是否是待处理
|
|
|
|
ActUserRelationDTO actUserRelationDTO=actUserRelationService.get(formDTO.getActUserRelationId()); |
|
|
|
if(null==actUserRelationDTO){ |
|
|
|
logger.warn("积分发放-不给分act_user_relation is null,actUserRelationId="+formDTO.getActUserRelationId()); |
|
|
|
return; |
|
|
|
} |
|
|
|
//如果是已处理直接返回
|
|
|
|
if(ActConstant.HANDLED.equals(actUserRelationDTO.getProcessFlag())){ |
|
|
|
logger.info("积分发放-不给分act_user_relation already handled,actUserRelationId="+formDTO.getActUserRelationId()); |
|
|
|
ActUserRelationDTO actUserRelationDTO=actUserRelationService.get(formDTO.getActUserRelationId()); |
|
|
|
if (null == actUserRelationDTO || ActConstant.HANDLED.equals(actUserRelationDTO.getProcessFlag())) { |
|
|
|
return; |
|
|
|
} |
|
|
|
//查取分值
|
|
|
|
ActInfoDTO actInfoDTO=actInfoService.get(actUserRelationDTO.getActId()); |
|
|
|
if (null == actInfoDTO || ActConstant.ACT_STATUS_FINISHED.equals(actInfoDTO.getActStatus())) { |
|
|
|
if (null == actInfoDTO || ActConstant.ACT_STATUS_FINISHED.equals(actInfoDTO.getActStatus())|| NumConstant.ZERO==actInfoDTO.getReward()) { |
|
|
|
logger.warn("积分发放-不给分act_info is null or act_info is finished"); |
|
|
|
return; |
|
|
|
} |
|
|
|