| @@ -82,7 +82,8 @@ public class WxCreditHistoryController extends BaseController { | |||
| public ResultData add(@RequestBody WxCreditHistory wxCreditHistory) { | |||
| logger.debug("[" + getIpAddr() + "] WxCreditHistoryController::add"); | |||
| MallUserInfo user = getUser(); | |||
| wxCreditHistory.updateTenantInfo(user); | |||
| //wxCreditHistory.updateTenantInfo(user); | |||
| wxCreditHistory.setTenantId(user.getFinalTenantId()); | |||
| wxCreditHistory.setOperatorId(user.getId()); | |||
| try { | |||
| wxCreditHistoryService.creditUsercheck(wxCreditHistory.getCUserId(),wxCreditHistory) ; | |||
| @@ -100,7 +101,7 @@ public class WxCreditHistoryController extends BaseController { | |||
| @SystemControllerLog(description = "积分历史-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxCreditHistoryController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxCreditHistoryService.getById(id,getTenantInfo().getTenantId())); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxCreditHistoryService.getById(id,getTenantInfo().getFinalTenantId())); | |||
| } | |||
| /** | |||
| @@ -40,6 +40,7 @@ public class WxScoreHistoryController extends BaseController { | |||
| public ResultData list(@ModelAttribute WxScoreHistory wxScoreHistory, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxScoreHistoryController::list"); | |||
| if (null == wxScoreHistory) wxScoreHistory = new WxScoreHistory(); | |||
| wxScoreHistory.setTenantId(getTenantInfo().getFinalTenantId()); | |||
| final PageInfo<WxScoreHistory> page = wxScoreHistoryService.listAsPage(wxScoreHistory, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -54,7 +55,7 @@ public class WxScoreHistoryController extends BaseController { | |||
| if (checkMemberStatus(wxScoreHistory.getCUserId())) { | |||
| return new ResultData(ErrorCode.MEMBER_IS_LOCKED); | |||
| } | |||
| wxScoreHistory.updateTenantInfo(getTenantInfo()); | |||
| wxScoreHistory.setTenantId(getTenantInfo().getFinalTenantId()); | |||
| wxScoreHistoryService.saveOrUpdate(wxScoreHistory); | |||
| return new ResultData(); | |||
| } | |||
| @@ -67,7 +68,7 @@ public class WxScoreHistoryController extends BaseController { | |||
| if (checkMemberStatus(wxScoreHistory.getCUserId())) { | |||
| return new ResultData(ErrorCode.MEMBER_IS_LOCKED); | |||
| } | |||
| wxScoreHistory.updateTenantInfo(getTenantInfo()); | |||
| wxScoreHistory.setTenantId(getTenantInfo().getFinalTenantId()); | |||
| wxScoreHistoryService.saveOrUpdate(wxScoreHistory); | |||
| return new ResultData(); | |||
| } | |||
| @@ -97,7 +98,7 @@ public class WxScoreHistoryController extends BaseController { | |||
| @SystemControllerLog(description = "成长值-查询") | |||
| public ResultData findById(Long id) { | |||
| logger.debug("[" + getIpAddr() + "] WxScoreHistoryController::findById"); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxScoreHistoryService.getById(id,getTenantInfo().getTenantId())); | |||
| return new ResultData(Result.SUCCESS, "查询成功", wxScoreHistoryService.getById(id,getTenantInfo().getFinalTenantId())); | |||
| } | |||
| @@ -319,7 +319,8 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService { | |||
| if (wxMerchant != null && wxMerchant.getBusinessId() != null) { | |||
| WxCreditHistory wxCreditHistory = new WxCreditHistory(); | |||
| wxCreditHistory.setBusinessId(wxMerchant.getBusinessId()); | |||
| wxCreditHistory.updateTenantInfo(tenantEntity); | |||
| //wxCreditHistory.updateTenantInfo(tenantEntity); | |||
| wxCreditHistory.setTenantId(tenantEntity.getFinalTenantId()); | |||
| int credit; | |||
| int creditNew = 0 ; | |||
| if (StringUtils.isNotBlank(spendStr)) { | |||
| @@ -311,7 +311,7 @@ public class WxScoreRulesServiceImpl implements WxScoreRulesService { | |||
| WxScoreHistory scoreHistory = new WxScoreHistory(); | |||
| scoreHistory.setCUserId(cUser.getId()); | |||
| scoreHistory.setScoreType(EnumScoreType.LOGIN.getCode()); | |||
| scoreHistory.updateTenantInfo(tenantinfo); | |||
| scoreHistory.setTenantId(tenantinfo.getFinalTenantId()); | |||
| return wxScoreHistoryMapper.countTodayList(scoreHistory); | |||
| } | |||
| @@ -445,7 +445,7 @@ public class WxScoreRulesServiceImpl implements WxScoreRulesService { | |||
| WxScoreHistory scoreHistory = new WxScoreHistory(); | |||
| scoreHistory.setCUserId(user.getId()); | |||
| scoreHistory.setScoreType(EnumScoreType.COMPLETE_INFO.getCode()); | |||
| scoreHistory.updateTenantInfo(tenantinfo); | |||
| scoreHistory.setTenantId(tenantinfo.getFinalTenantId()); | |||
| return wxScoreHistoryMapper.countList(scoreHistory); | |||
| } | |||
| @@ -501,7 +501,7 @@ public class WxScoreRulesServiceImpl implements WxScoreRulesService { | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| WxScoreHistory history = new WxScoreHistory(); | |||
| history.setId(idWorker.nextId()); | |||
| history.updateTenantInfo(tenantEntity); | |||
| history.setTenantId(tenantEntity.getFinalTenantId()); | |||
| history.setCUserId(userInfo.getId()); | |||
| history.setCreateDate(new Date()); | |||
| history.setScoreType(wechatPhone.getCode()); | |||
| @@ -513,7 +513,7 @@ public class WxScoreRulesServiceImpl implements WxScoreRulesService { | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| WxScoreHistory history = new WxScoreHistory(); | |||
| history.setId(idWorker.nextId()); | |||
| history.updateTenantInfo(tenantEntity); | |||
| history.setTenantId(tenantEntity.getFinalTenantId()); | |||
| history.setCUserId(id); | |||
| history.setCreateDate(new Date()); | |||
| history.setScoreType(wechatPhone.getCode()); | |||
| @@ -525,7 +525,7 @@ public class WxScoreRulesServiceImpl implements WxScoreRulesService { | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| WxScoreHistory history = new WxScoreHistory(); | |||
| history.setId(idWorker.nextId()); | |||
| history.updateTenantInfo(order); | |||
| history.setTenantId(order.getFinalTenantId()); | |||
| history.setCUserId(order.getCUserId()); | |||
| history.setCreateDate(new Date()); | |||
| history.setScoreType(EnumScoreType.CONSUMPTION.getCode()); | |||
| @@ -542,7 +542,7 @@ public class WxScoreRulesServiceImpl implements WxScoreRulesService { | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| WxScoreHistory history = new WxScoreHistory(); | |||
| history.setId(idWorker.nextId()); | |||
| history.updateTenantInfo(tenantEntity); | |||
| history.setTenantId(tenantEntity.getFinalTenantId()); | |||
| history.setCUserId(id); | |||
| history.setCreateDate(new Date()); | |||
| history.setScoreType(wechatPhone.getCode()); | |||