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