| @@ -240,7 +240,9 @@ public class WxUserGrantController extends BaseController { | |||||
| } | } | ||||
| // 积分 | // 积分 | ||||
| try { | try { | ||||
| credit = addCredit(user1,EnumScoreType.LOGIN).getCreditNum(); | |||||
| WxCreditHistory wxCreditHistory = addCredit(user1,EnumScoreType.LOGIN); | |||||
| credit = wxCreditHistory.getCreditNum(); | |||||
| logger.info("user_id:" + user1.getId() + " 登录新增积分:" + credit); | |||||
| } catch (MallinkException e) { | } catch (MallinkException e) { | ||||
| logger.error("c_user 积分 " + e.getMessage()); | logger.error("c_user 积分 " + e.getMessage()); | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| @@ -283,7 +285,9 @@ public class WxUserGrantController extends BaseController { | |||||
| // 积分 | // 积分 | ||||
| try { | try { | ||||
| credit = addCredit(user,EnumScoreType.LOGIN).getCreditNum(); | |||||
| WxCreditHistory wxCreditHistory = addCredit(user,EnumScoreType.LOGIN); | |||||
| credit = wxCreditHistory.getCreditNum(); | |||||
| logger.info("user_id:" + user.getId() + " 登录新增积分:" + credit); | |||||
| } catch (MallinkException e) { | } catch (MallinkException e) { | ||||
| logger.error("c_user 积分 " + e.getMessage()); | logger.error("c_user 积分 " + e.getMessage()); | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| @@ -697,8 +701,8 @@ public class WxUserGrantController extends BaseController { | |||||
| wxCreditHistory.setCreditType(enumScoreType.getCode()); | wxCreditHistory.setCreditType(enumScoreType.getCode()); | ||||
| wxCreditHistory.setOperatorType(EnumUserType.CUSER.getCode()); | wxCreditHistory.setOperatorType(EnumUserType.CUSER.getCode()); | ||||
| wxCreditHistory.setOperatorId(wxCUser.getId()); | wxCreditHistory.setOperatorId(wxCUser.getId()); | ||||
| ResultData resultData = wxCreditHistoryService.saveOrUpdate(wxCreditHistory); | |||||
| return (WxCreditHistory) resultData.data; | |||||
| WxCreditHistory record = wxCreditHistoryService.saveOrUpdate(wxCreditHistory); | |||||
| return record; | |||||
| } | } | ||||
| } | } | ||||
| @@ -1,7 +1,6 @@ | |||||
| package com.iformall.service; | package com.iformall.service; | ||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.WxCreditHistory; | import com.iformall.domain.po.WxCreditHistory; | ||||
| import com.iformall.domain.vo.WxCreditHistoryVo; | import com.iformall.domain.vo.WxCreditHistoryVo; | ||||
| @@ -42,7 +41,7 @@ public interface WxCreditHistoryService { | |||||
| * | * | ||||
| * @param record | * @param record | ||||
| */ | */ | ||||
| ResultData saveOrUpdate(WxCreditHistory record); | |||||
| WxCreditHistory saveOrUpdate(WxCreditHistory record); | |||||
| /** | /** | ||||
| * 根据Id删除实体 | * 根据Id删除实体 | ||||
| @@ -8,8 +8,6 @@ import com.google.common.collect.Lists; | |||||
| import com.google.common.collect.Maps; | import com.google.common.collect.Maps; | ||||
| import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
| import com.iformall.common.IdWorker; | import com.iformall.common.IdWorker; | ||||
| import com.iformall.common.Result; | |||||
| import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.*; | import com.iformall.domain.po.*; | ||||
| import com.iformall.domain.vo.WxCreditHistoryVo; | import com.iformall.domain.vo.WxCreditHistoryVo; | ||||
| import com.iformall.enums.EnumBusiness; | import com.iformall.enums.EnumBusiness; | ||||
| @@ -142,7 +140,7 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService { | |||||
| @Override | @Override | ||||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | ||||
| public ResultData saveOrUpdate(WxCreditHistory record) { | |||||
| public WxCreditHistory saveOrUpdate(WxCreditHistory record) { | |||||
| WxCUser wxCUser = wxCUserMapper.selectByPrimaryKey(record.getCUserId()); | WxCUser wxCUser = wxCUserMapper.selectByPrimaryKey(record.getCUserId()); | ||||
| WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoMapper.selectByPrimaryKey(record.getCUserId()); | WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoMapper.selectByPrimaryKey(record.getCUserId()); | ||||
| if (wxCUser == null && wxCUserBasicInfo == null) { | if (wxCUser == null && wxCUserBasicInfo == null) { | ||||
| @@ -190,7 +188,7 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService { | |||||
| //wxCreditHistoryMapper.updateByPrimaryKeySelective(record); | //wxCreditHistoryMapper.updateByPrimaryKeySelective(record); | ||||
| } | } | ||||
| } | } | ||||
| return new ResultData(Result.SUCCESS,"积分操作成功",record); | |||||
| return record; | |||||
| } | } | ||||
| @Override | @Override | ||||