|
|
@ -71,12 +71,18 @@ public class UserPointTotalServiceImpl extends BaseServiceImpl<UserPointTotalDao |
|
|
|
**/ |
|
|
|
@Override |
|
|
|
public ResiPointDetailResultDTO getMyPoint(CommonUserFormDTO param) { |
|
|
|
ResiPointDetailResultDTO result = baseDao.selectPointByCustomerUserId(param.getUserId(),param.getCustomerId()); |
|
|
|
if(null == result) { |
|
|
|
return new ResiPointDetailResultDTO(); |
|
|
|
} |
|
|
|
if(null == result.getUsablePoint() || null == result.getAccumulatedPoint()) { |
|
|
|
return new ResiPointDetailResultDTO(); |
|
|
|
ResiPointDetailResultDTO activeTotal = baseDao.selectPointByCustomerUserId(param.getUserId(), param.getCustomerId()); |
|
|
|
ResiPointDetailResultDTO result = new ResiPointDetailResultDTO(); |
|
|
|
CommonPageUserFormDTO formDTO = new CommonPageUserFormDTO(); |
|
|
|
formDTO.setCustomerId(param.getCustomerId()); |
|
|
|
formDTO.setUserId(param.getUserId()); |
|
|
|
MyTotalPointResultDTO education = getEducationTotal(formDTO); |
|
|
|
MyTotalPointResultDTO party = getPartyTotal(formDTO); |
|
|
|
MyTotalPointResultDTO active = getActiveTotal(formDTO); |
|
|
|
result.setAccumulatedPoint(education.getTotal() + party.getTotal() + active.getTotal()); |
|
|
|
result.setUsablePoint(education.getUsable() + party.getUsable() + active.getUsable()); |
|
|
|
if (null != activeTotal) { |
|
|
|
result.setTodayObtainedPoint(activeTotal.getTodayObtainedPoint()); |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|