| | |
| | | import com.panzhihua.service_dangjian.dao.ComActIntegralUsersMapper; |
| | | import com.panzhihua.service_dangjian.entity.ComActIntegralUser; |
| | | import com.panzhihua.service_dangjian.entity.ComActIntegralUserTrade; |
| | | import com.panzhihua.service_dangjian.entity.IntegratingTask; |
| | | import com.panzhihua.service_dangjian.service.ComActIntegralUserChangeDAOService; |
| | | import com.panzhihua.service_dangjian.service.ComActIntegralUserTradeDaoService; |
| | | import com.panzhihua.service_dangjian.service.ComActIntegralUsersService; |
| | |
| | | |
| | | @Resource |
| | | private NewFightIntegratingTaskService taskService; |
| | | |
| | | |
| | | @Override |
| | | public R upIntegral(NewFightIntegral item) |
| | |
| | | break; |
| | | case "11": |
| | | //花城登录 |
| | | |
| | | IntegratingTask task=taskService.getDetails(item.getUserId(), |
| | | item.getCommunityId(),item.getType()); |
| | | if(task!=null && StringUtils.equals("2",task.getIsDraw()) ) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | |
| | | item.setAddOrReduce(1); |
| | | item.setIntegralNum("2"); |
| | | |
| | |
| | | //15查看微心愿 |
| | | case "16": |
| | | //查看随手拍 |
| | | // item.setAddOrReduce(1); |
| | | // item.setIntegralNum("1"); |
| | | // break; |
| | | case "17": |
| | | //每日签到 |
| | | IntegratingTask task2=taskService.getDetails(item.getUserId(), |
| | | item.getCommunityId(),item.getType()); |
| | | if(task2!=null && StringUtils.equals("2",task2.getIsDraw()) ) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | item.setAddOrReduce(1); |
| | | item.setIntegralNum("1"); |
| | | |
| | | IntegratingTaskVO taskVO2=new IntegratingTaskVO(); |
| | | taskVO2.setIsDraw("2"); |
| | | taskVO2.setId(item.getTaskId()); |
| | | taskService.editData(taskVO2); |
| | | break; |
| | | case "17": |
| | | //每日签到 |
| | | item.setAddOrReduce(1); |
| | | item.setIntegralNum("1"); |
| | | break; |
| | | case "18": |
| | | //上传“随手拍”或“微心愿 |
| | |
| | | item.setIntegralNum("2"); |
| | | break; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // 根据不同身份,计算钱包金额 |
| | | // if (identityType.equals(ComActIntegralUserTrade.identityType.jm)) { |
| | |
| | | // } |
| | | |
| | | |
| | | //积分总数加减 |
| | | if (item.getAddOrReduce() == ComActIntegralUserTrade.changeType.reduce) |
| | | { |
| | | int integralResidentNow = addIntegral(integralResident + amount); |
| | | integralUserDO.setIntegralResident(integralResidentNow); |
| | | integralUserDO.setIntegralAvailableResident(addIntegral(integralUserDO.getIntegralAvailableResident() + amount)); |
| | | |
| | | } |
| | | else { |
| | | |
| | | int integralResidentNow = addIntegral(integralResident - amount); |
| | | integralUserDO.setIntegralResident(integralResidentNow); |
| | | integralUserDO.setIntegralAvailableResident(addIntegral(integralUserDO.getIntegralAvailableResident() - amount)); |
| | | } |
| | | |
| | | |
| | | //积分总数加减 |
| | | if (item.getAddOrReduce() == ComActIntegralUserTrade.changeType.reduce) |
| | | { |
| | | integralUserDO.setIntegralSum(addIntegral(integralSum - amount)); |