| @@ -63,6 +63,10 @@ public class WxShopController extends BaseController { | |||||
| @SystemControllerLog(description = "店铺管理-更新") | @SystemControllerLog(description = "店铺管理-更新") | ||||
| public ResultData update(@RequestBody WxShop wxShop) { | public ResultData update(@RequestBody WxShop wxShop) { | ||||
| logger.debug("[" + getIpAddr() + "] WxShopController::update"); | logger.debug("[" + getIpAddr() + "] WxShopController::update"); | ||||
| if (null == wxShop){ | |||||
| wxShop = new WxShop(); | |||||
| } | |||||
| wxShop.updateTenantInfo(getTenantInfo()); | |||||
| return wxShopService.saveOrUpdate(wxShop); | return wxShopService.saveOrUpdate(wxShop); | ||||
| } | } | ||||
| @@ -89,9 +93,9 @@ public class WxShopController extends BaseController { | |||||
| @GetMapping("getShopListByShopNumber") | @GetMapping("getShopListByShopNumber") | ||||
| @ApiImplicitParam(name = "shopNumber", value = "shopNumber", dataType = "String", paramType = "query", required = true) | @ApiImplicitParam(name = "shopNumber", value = "shopNumber", dataType = "String", paramType = "query", required = true) | ||||
| @SystemControllerLog(description = "店铺管理-获取商铺数据") | @SystemControllerLog(description = "店铺管理-获取商铺数据") | ||||
| public ResultData getbshoplist(String shopNumber) { | |||||
| public ResultData getShoplist(String shopNumber) { | |||||
| logger.debug("[" + getIpAddr() + "] WxShopController::getbshoplist"); | logger.debug("[" + getIpAddr() + "] WxShopController::getbshoplist"); | ||||
| return wxShopService.getbshoplist(getTenantId(), shopNumber); | |||||
| return wxShopService.getShopList(getTenantInfo(), shopNumber); | |||||
| } | } | ||||
| @ApiOperation("获取商户商铺数据") | @ApiOperation("获取商户商铺数据") | ||||
| @@ -100,7 +104,7 @@ public class WxShopController extends BaseController { | |||||
| @SystemControllerLog(description = "店铺管理-获取商户商铺数据") | @SystemControllerLog(description = "店铺管理-获取商户商铺数据") | ||||
| public ResultData getMerchantShopByShopId(String shopId) { | public ResultData getMerchantShopByShopId(String shopId) { | ||||
| logger.debug("[" + getIpAddr() + "] WxShopController::getMerchantShopByShopId"); | logger.debug("[" + getIpAddr() + "] WxShopController::getMerchantShopByShopId"); | ||||
| return wxShopService.getMerchantShopByShopId(getTenantId(), shopId); | |||||
| return wxShopService.getMerchantShopByShopId(getTenantInfo(), shopId); | |||||
| } | } | ||||
| @ApiOperation("查询商铺号是否存在") | @ApiOperation("查询商铺号是否存在") | ||||
| @@ -112,7 +116,13 @@ public class WxShopController extends BaseController { | |||||
| @SystemControllerLog(description = "店铺管理-查询商铺号是否存在") | @SystemControllerLog(description = "店铺管理-查询商铺号是否存在") | ||||
| public ResultData hasShopNumber(String shopNumber, Long id, Integer type) { | public ResultData hasShopNumber(String shopNumber, Long id, Integer type) { | ||||
| logger.debug("[" + getIpAddr() + "] WxShopController::hasShopNumber"); | logger.debug("[" + getIpAddr() + "] WxShopController::hasShopNumber"); | ||||
| return wxShopService.hasShopNumber(getTenantId(), shopNumber, id, type); | |||||
| WxShop wxShop = new WxShop() {{ | |||||
| setShopNumber(shopNumber); | |||||
| setType(type); | |||||
| setId(id); | |||||
| }}; | |||||
| wxShop.updateTenantInfo(getTenantInfo()); | |||||
| return wxShopService.hasShopNumber(wxShop); | |||||
| } | } | ||||
| @@ -169,7 +169,7 @@ public class InvestSchedule { | |||||
| private void addTaskMessage(InvestTaskEntity task, List<Long> ownerArray) { | private void addTaskMessage(InvestTaskEntity task, List<Long> ownerArray) { | ||||
| String message = String.format(EnumInvestMessageType.TASK_REMIND.getInfo(), task.getId(), DateUtils.format(task.getLastTime())); | String message = String.format(EnumInvestMessageType.TASK_REMIND.getInfo(), task.getId(), DateUtils.format(task.getLastTime())); | ||||
| messageService.saveBatchMessage(ownerArray, message, EnumInvestMessageTag.TASK_MONTH, EnumFollowType.TASK, task.getId(),task.getTenantId()); | |||||
| messageService.saveBatchMessage(ownerArray, message, EnumInvestMessageTag.TASK_MONTH, EnumFollowType.TASK, task.getId(),task); | |||||
| log.info("{}:taskID:{} 为用户{}创建消息提醒", TAG_MESSAGE, task.getId(), task.getOwner()); | log.info("{}:taskID:{} 为用户{}创建消息提醒", TAG_MESSAGE, task.getId(), task.getOwner()); | ||||
| } | } | ||||
| @@ -223,7 +223,7 @@ public class InvestSchedule { | |||||
| private void addCustomerMessage(InvestCustomerVo customerVo, Long owner) { | private void addCustomerMessage(InvestCustomerVo customerVo, Long owner) { | ||||
| String message = String.format(EnumInvestMessageType.COSTOMER_REMIND.getInfo(), customerVo.getId()); | String message = String.format(EnumInvestMessageType.COSTOMER_REMIND.getInfo(), customerVo.getId()); | ||||
| messageService.saveBatchMessage(Collections.singletonList(owner), message, EnumInvestMessageTag.CUSTOMER_WEEK, EnumFollowType.DEMAND, customerVo.getId(), customerVo.getTenantId()); | |||||
| messageService.saveBatchMessage(Collections.singletonList(owner), message, EnumInvestMessageTag.CUSTOMER_WEEK, EnumFollowType.DEMAND, customerVo.getId(), customerVo); | |||||
| log.info("{}:customerID:{} 为用户{}创建消息提醒", TAG_MESSAGE, customerVo.getId(), customerVo.getDemandOwner()); | log.info("{}:customerID:{} 为用户{}创建消息提醒", TAG_MESSAGE, customerVo.getId(), customerVo.getDemandOwner()); | ||||
| } | } | ||||
| @@ -3,6 +3,7 @@ package com.iformall.service; | |||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.domain.po.WxScreenAd; | import com.iformall.domain.po.WxScreenAd; | ||||
| import java.util.List; | import java.util.List; | ||||
| @@ -56,7 +57,7 @@ public interface WxScreenAdService { | |||||
| void updateStatusByCouponChannelId(Long couponChannelId, String tenantId, int status); | |||||
| void updateStatusByCouponChannelId(Long couponChannelId, TenantEntity tenantEntity, int status); | |||||
| void updateStatusByCouponId(Long couponId, String tenantId, int status); | |||||
| void updateStatusByCouponId(Long couponId, TenantEntity tenantEntity, int status); | |||||
| } | } | ||||
| @@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.extension.service.IService; | |||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.po.WxShop; | import com.iformall.domain.po.WxShop; | ||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.HttpServletRequest; | ||||
| import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.HttpServletResponse; | ||||
| @@ -19,8 +21,8 @@ public interface WxShopService { | |||||
| * 根据实体查询分页列表 | * 根据实体查询分页列表 | ||||
| * | * | ||||
| * @param record | * @param record | ||||
| * @param offset | |||||
| * @param limit | |||||
| * @param pageIndex | |||||
| * @param pageSize | |||||
| * @return | * @return | ||||
| */ | */ | ||||
| PageInfo<WxShop> listAsPage(WxShop record, Integer pageIndex, Integer pageSize); | PageInfo<WxShop> listAsPage(WxShop record, Integer pageIndex, Integer pageSize); | ||||
| @@ -54,12 +56,11 @@ public interface WxShopService { | |||||
| */ | */ | ||||
| ResultData deleteById(Long id, Integer isAdmin); | ResultData deleteById(Long id, Integer isAdmin); | ||||
| ResultData getShopList(TenantEntity tenantEntity, String shopNumber); | |||||
| ResultData getbshoplist(String tenantId, String shopNumber); | |||||
| ResultData getMerchantShopByShopId(String tenantId, String shopId); | |||||
| ResultData getMerchantShopByShopId(TenantEntity tenantEntity, String shopId); | |||||
| ResultData hasShopNumber(String tenantId, String shopNumber, Long id, Integer type); | |||||
| ResultData hasShopNumber(WxShop wxShop); | |||||
| PageInfo<Map<String,Object>> listShopFromContract(WxShop wxShop, Integer pageNum, Integer pageSize); | PageInfo<Map<String,Object>> listShopFromContract(WxShop wxShop, Integer pageNum, Integer pageSize); | ||||
| @@ -109,7 +109,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { | |||||
| WxCouponChannel orignal = getById(record.getId()); | WxCouponChannel orignal = getById(record.getId()); | ||||
| if (orignal.getStatus().equals(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()) | if (orignal.getStatus().equals(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()) | ||||
| && record.getStatus().equals(EnumCouponChannelStatus.STATUS_TAKE_OFFF.getCode())) { | && record.getStatus().equals(EnumCouponChannelStatus.STATUS_TAKE_OFFF.getCode())) { | ||||
| wxScreenAdService.updateStatusByCouponChannelId(record.getId(),record.getTenantId(),EnumScreenAdStatus.INVALID.getCode()); | |||||
| wxScreenAdService.updateStatusByCouponChannelId(record.getId(),record,EnumScreenAdStatus.INVALID.getCode()); | |||||
| //下架拼团券 | //下架拼团券 | ||||
| wxOrderService.updateOrderGroupStatusByCouponChannelId(record.getId(), record.getTenantId(), EnumOrderStatus.ORDER_STATUS_COOPERATING_CANCEL.getCode()); | wxOrderService.updateOrderGroupStatusByCouponChannelId(record.getId(), record.getTenantId(), EnumOrderStatus.ORDER_STATUS_COOPERATING_CANCEL.getCode()); | ||||
| //修改卡状态 | //修改卡状态 | ||||
| @@ -424,7 +424,7 @@ import java.util.stream.Collectors; | |||||
| //下架所有已砍价券 | //下架所有已砍价券 | ||||
| wxOrderService.updateStatusByPressCouponId(record.getId(), record.getTenantId(), EnumOrderStatus.ORDER_STATUS_PRESS_CANCEL.getCode()); | wxOrderService.updateStatusByPressCouponId(record.getId(), record.getTenantId(), EnumOrderStatus.ORDER_STATUS_PRESS_CANCEL.getCode()); | ||||
| //下架所有相关广告 | //下架所有相关广告 | ||||
| wxScreenAdService.updateStatusByCouponId(record.getId(), record.getTenantId(), EnumScreenAdStatus.INVALID.getCode()); | |||||
| wxScreenAdService.updateStatusByCouponId(record.getId(), record, EnumScreenAdStatus.INVALID.getCode()); | |||||
| //下架拼团券 | //下架拼团券 | ||||
| wxOrderService.updateOrderGroupStatusByCouponId(record.getId(), record.getTenantId(), EnumOrderStatus.ORDER_STATUS_COOPERATING_CANCEL.getCode()); | wxOrderService.updateOrderGroupStatusByCouponId(record.getId(), record.getTenantId(), EnumOrderStatus.ORDER_STATUS_COOPERATING_CANCEL.getCode()); | ||||
| // 卡下架后,转赠找不到卡相关信息,所以修改卡转赠状态为不可转赠 | // 卡下架后,转赠找不到卡相关信息,所以修改卡转赠状态为不可转赠 | ||||
| @@ -9,6 +9,7 @@ import com.iformall.common.IdWorker; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.po.*; | import com.iformall.domain.po.*; | ||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.domain.vo.WxCouponCVo; | import com.iformall.domain.vo.WxCouponCVo; | ||||
| import com.iformall.enums.EnumCouponChannelType; | import com.iformall.enums.EnumCouponChannelType; | ||||
| import com.iformall.enums.EnumScreenAdType; | import com.iformall.enums.EnumScreenAdType; | ||||
| @@ -125,9 +126,9 @@ public class WxScreenAdServiceImpl implements WxScreenAdService { | |||||
| @Override | @Override | ||||
| public void updateStatusByCouponChannelId(Long couponChannelId, String tenantId, int status) { | |||||
| public void updateStatusByCouponChannelId(Long couponChannelId, TenantEntity tenantEntity, int status) { | |||||
| WxScreenAd wxScreenAd = new WxScreenAd(); | WxScreenAd wxScreenAd = new WxScreenAd(); | ||||
| wxScreenAd.setTenantId(tenantId); | |||||
| wxScreenAd.updateTenantInfo(tenantEntity); | |||||
| wxScreenAd.setStatus(status); | wxScreenAd.setStatus(status); | ||||
| wxScreenAd.setTargetId(couponChannelId); | wxScreenAd.setTargetId(couponChannelId); | ||||
| wxScreenAd.setUpdateDate(new Date()); | wxScreenAd.setUpdateDate(new Date()); | ||||
| @@ -135,17 +136,17 @@ public class WxScreenAdServiceImpl implements WxScreenAdService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public void updateStatusByCouponId(Long couponId, String tenantId, int status) { | |||||
| public void updateStatusByCouponId(Long couponId, TenantEntity tenantEntity, int status) { | |||||
| WxCouponChannel wxCouponChannel = new WxCouponChannel(); | WxCouponChannel wxCouponChannel = new WxCouponChannel(); | ||||
| wxCouponChannel.setTenantId(tenantId); | |||||
| wxCouponChannel.updateTenantInfo(tenantEntity); | |||||
| wxCouponChannel.setCouponId(couponId); | wxCouponChannel.setCouponId(couponId); | ||||
| List<WxCouponChannel> list = wxCouponChannelMapper.findList(wxCouponChannel); | List<WxCouponChannel> list = wxCouponChannelMapper.findList(wxCouponChannel); | ||||
| list.stream().forEach(cc->{ | list.stream().forEach(cc->{ | ||||
| WxScreenAd wxScreenAd = new WxScreenAd(); | WxScreenAd wxScreenAd = new WxScreenAd(); | ||||
| wxScreenAd.setTenantId(tenantId); | |||||
| wxScreenAd.updateTenantInfo(tenantEntity); | |||||
| wxScreenAd.setStatus(status); | wxScreenAd.setStatus(status); | ||||
| wxScreenAd.setTargetId(cc.getId()); | wxScreenAd.setTargetId(cc.getId()); | ||||
| wxScreenAd.setUpdateDate(new Date()); | wxScreenAd.setUpdateDate(new Date()); | ||||
| @@ -10,6 +10,7 @@ import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.WxMerchantShop; | import com.iformall.domain.po.WxMerchantShop; | ||||
| import com.iformall.domain.po.WxRentContract; | import com.iformall.domain.po.WxRentContract; | ||||
| import com.iformall.domain.po.WxShop; | import com.iformall.domain.po.WxShop; | ||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.domain.vo.WxNotRentShopVo; | import com.iformall.domain.vo.WxNotRentShopVo; | ||||
| import com.iformall.domain.vo.WxShopVo; | import com.iformall.domain.vo.WxShopVo; | ||||
| import com.iformall.enums.*; | import com.iformall.enums.*; | ||||
| @@ -125,7 +126,7 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| //3、合同 两种 都要查一下 存在时不能删除 | //3、合同 两种 都要查一下 存在时不能删除 | ||||
| WxRentContract wxRentContract = new WxRentContract(); | WxRentContract wxRentContract = new WxRentContract(); | ||||
| wxRentContract.setShopId(wxShop.getId()); | wxRentContract.setShopId(wxShop.getId()); | ||||
| wxRentContract.setTenantId(wxShop.getTenantId()); | |||||
| wxRentContract.updateTenantInfo(wxShop); | |||||
| long count = 0; | long count = 0; | ||||
| if (wxShop.getType().equals(EnumRentShopType.SHOP.getCode())) { | if (wxShop.getType().equals(EnumRentShopType.SHOP.getCode())) { | ||||
| count = wxRentContractMapper.selectRentContractByShopId(wxRentContract).parallelStream() | count = wxRentContractMapper.selectRentContractByShopId(wxRentContract).parallelStream() | ||||
| @@ -165,30 +166,25 @@ public class WxShopServiceImpl implements WxShopService { | |||||
| } | } | ||||
| @Override | @Override | ||||
| public ResultData getbshoplist(String tenantId, String shopNumber) { | |||||
| public ResultData getShopList(TenantEntity tenantEntity, String shopNumber) { | |||||
| Map<String,Object> params=new HashMap<>(); | Map<String,Object> params=new HashMap<>(); | ||||
| params.put("tenantId",tenantId); | |||||
| params.put("tenantId",tenantEntity.getTenantId()); | |||||
| params.put("shopNumber",shopNumber); | params.put("shopNumber",shopNumber); | ||||
| List<Map<String,Object>> list=wxShopMapper.getShopList(params); | List<Map<String,Object>> list=wxShopMapper.getShopList(params); | ||||
| return new ResultData(ResultData.SUCCESS,"",list); | return new ResultData(ResultData.SUCCESS,"",list); | ||||
| } | } | ||||
| @Override | @Override | ||||
| public ResultData getMerchantShopByShopId(String tenantId, String shopId) { | |||||
| public ResultData getMerchantShopByShopId(TenantEntity tenantEntity, String shopId) { | |||||
| Map<String,Object> params=new HashMap<>(); | Map<String,Object> params=new HashMap<>(); | ||||
| params.put("tenantId",tenantId); | |||||
| params.put("tenantId",tenantEntity.getTenantId()); | |||||
| params.put("shopId",shopId); | params.put("shopId",shopId); | ||||
| Map<String,Object> map=wxShopMapper.getMerchantShopByShopId(params); | Map<String,Object> map=wxShopMapper.getMerchantShopByShopId(params); | ||||
| return new ResultData(ResultData.SUCCESS,"",map); | return new ResultData(ResultData.SUCCESS,"",map); | ||||
| } | } | ||||
| @Override | @Override | ||||
| public ResultData hasShopNumber(String tenantId, String shopNumber, Long id, Integer type) { | |||||
| WxShop wxShop = new WxShop(); | |||||
| wxShop.setTenantId(tenantId); | |||||
| wxShop.setShopNumber(shopNumber); | |||||
| wxShop.setType(type); | |||||
| wxShop.setId(id); | |||||
| public ResultData hasShopNumber(WxShop wxShop) { | |||||
| int count = wxShopMapper.hasShopNumber(wxShop); | int count = wxShopMapper.hasShopNumber(wxShop); | ||||
| return new ResultData(ResultData.SUCCESS, "查询成功", count > 0 ? true : false); | return new ResultData(ResultData.SUCCESS, "查询成功", count > 0 ? true : false); | ||||
| } | } | ||||
| @@ -102,7 +102,7 @@ public class WxSubsidyServiceImpl implements WxSubsidyService { | |||||
| String payOrderNo = String.valueOf(id); | String payOrderNo = String.valueOf(id); | ||||
| WxSubsidy record = new WxSubsidy(); | WxSubsidy record = new WxSubsidy(); | ||||
| record.setId(id); | record.setId(id); | ||||
| record.setTenantId(user.getTenantId()); | |||||
| record.updateTenantInfo(user); | |||||
| record.setOperatorUserId(user.getId()); | record.setOperatorUserId(user.getId()); | ||||
| record.setCreateTime(curDate); | record.setCreateTime(curDate); | ||||
| record.setUpdateTime(curDate); | record.setUpdateTime(curDate); | ||||
| @@ -71,7 +71,7 @@ public class WxTopicServiceImpl implements WxTopicService { | |||||
| //验证是否存在已发放的专题 | //验证是否存在已发放的专题 | ||||
| if(record.getStatus().equals(EnumWxTopicStatus.VAILD.getCode())) { | if(record.getStatus().equals(EnumWxTopicStatus.VAILD.getCode())) { | ||||
| WxTopic query = new WxTopic(); | WxTopic query = new WxTopic(); | ||||
| query.setTenantId(record.getTenantId()); | |||||
| query.updateTenantInfo(record); | |||||
| if(record.getId() != null && record.getBeginTime() == null){ | if(record.getId() != null && record.getBeginTime() == null){ | ||||
| WxTopic wt = wxTopicMapper.selectById(record.getId()); | WxTopic wt = wxTopicMapper.selectById(record.getId()); | ||||
| query.setBeginTime(wt.getBeginTime()); | query.setBeginTime(wt.getBeginTime()); | ||||
| @@ -81,7 +81,7 @@ public class WxTopicServiceImpl implements WxTopicService { | |||||
| query.setEndTime(record.getEndTime()); | query.setEndTime(record.getEndTime()); | ||||
| } | } | ||||
| WxTopic dbquery = new WxTopic(); | WxTopic dbquery = new WxTopic(); | ||||
| dbquery.setTenantId(record.getTenantId()); | |||||
| dbquery.updateTenantInfo(record); | |||||
| dbquery.setStatus(EnumWxTopicStatus.VAILD.getCode()); | dbquery.setStatus(EnumWxTopicStatus.VAILD.getCode()); | ||||
| List<WxTopic> onLineTopicList = wxTopicMapper.findList(dbquery); | List<WxTopic> onLineTopicList = wxTopicMapper.findList(dbquery); | ||||
| for (WxTopic topic:onLineTopicList) { | for (WxTopic topic:onLineTopicList) { | ||||
| @@ -127,7 +127,7 @@ public class WxTopicServiceImpl implements WxTopicService { | |||||
| wxCouponChannel.setEndTime(record.getEndTime()); | wxCouponChannel.setEndTime(record.getEndTime()); | ||||
| wxCouponChannel.setCouponId(Long.parseLong(couponArray[1])); | wxCouponChannel.setCouponId(Long.parseLong(couponArray[1])); | ||||
| wxCouponChannel.setSubTargetId(record.getId()); | wxCouponChannel.setSubTargetId(record.getId()); | ||||
| wxCouponChannel.setTenantId(record.getTenantId()); | |||||
| wxCouponChannel.updateTenantInfo(record); | |||||
| wxCouponChannel.setTitle(wxCoupon.getTitle()); | wxCouponChannel.setTitle(wxCoupon.getTitle()); | ||||
| wxCouponChannel.setTargetAd(EnumCouponChannelType.COUPON_CHANNEL_ID_TOPIC.getCode()); | wxCouponChannel.setTargetAd(EnumCouponChannelType.COUPON_CHANNEL_ID_TOPIC.getCode()); | ||||
| wxCouponChannel.setType(wxCoupon.getType()); | wxCouponChannel.setType(wxCoupon.getType()); | ||||
| @@ -1,11 +1,11 @@ | |||||
| package com.iformall.service.invest; | package com.iformall.service.invest; | ||||
| import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.domain.vo.invest.InvestPageQuery; | import com.iformall.domain.vo.invest.InvestPageQuery; | ||||
| import com.iformall.domain.vo.invest.InvestPageResult; | import com.iformall.domain.vo.invest.InvestPageResult; | ||||
| import com.iformall.enums.EnumFollowType; | import com.iformall.enums.EnumFollowType; | ||||
| import com.iformall.enums.EnumInvestMessageTag; | import com.iformall.enums.EnumInvestMessageTag; | ||||
| import com.iformall.enums.EnumInvestMessageType; | |||||
| import java.io.Serializable; | import java.io.Serializable; | ||||
| import java.util.List; | import java.util.List; | ||||
| @@ -33,7 +33,7 @@ public interface InvestBaseService<T> { | |||||
| * @param tid | * @param tid | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| default boolean saveBatchMessage(List<Long> ownerArray, String message, EnumInvestMessageTag tag, EnumFollowType type, Long tid,String tenantId) { | |||||
| default boolean saveBatchMessage(List<Long> ownerArray, String message, EnumInvestMessageTag tag, EnumFollowType type, Long tid, TenantEntity tenantEntity) { | |||||
| return false; | return false; | ||||
| } | } | ||||
| } | } | ||||
| @@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||
| import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
| import com.iformall.domain.po.*; | import com.iformall.domain.po.*; | ||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.domain.po.invest.*; | import com.iformall.domain.po.invest.*; | ||||
| import com.iformall.domain.vo.invest.InvestPageQuery; | import com.iformall.domain.vo.invest.InvestPageQuery; | ||||
| import com.iformall.domain.vo.invest.InvestPageResult; | import com.iformall.domain.vo.invest.InvestPageResult; | ||||
| @@ -105,7 +106,7 @@ public class InvestBaseServiceImpl<M extends BaseMapper<T>, T> extends ServiceIm | |||||
| } | } | ||||
| @Override | @Override | ||||
| public boolean saveBatchMessage(List<Long> ownerArray, String message, EnumInvestMessageTag tag, EnumFollowType type, Long tid,String tenantId) { | |||||
| public boolean saveBatchMessage(List<Long> ownerArray, String message, EnumInvestMessageTag tag, EnumFollowType type, Long tid, TenantEntity tenantEntity) { | |||||
| if (CollectionUtils.isEmpty(ownerArray)) { | if (CollectionUtils.isEmpty(ownerArray)) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| @@ -125,7 +126,7 @@ public class InvestBaseServiceImpl<M extends BaseMapper<T>, T> extends ServiceIm | |||||
| messageEntity.setOwner(aLong); | messageEntity.setOwner(aLong); | ||||
| messageEntity.setTid(tid); | messageEntity.setTid(tid); | ||||
| messageEntity.setType(type); | messageEntity.setType(type); | ||||
| messageEntity.setTenantId(tenantId); | |||||
| messageEntity.updateTenantInfo(tenantEntity); | |||||
| messageEntity.setMessage(message); | messageEntity.setMessage(message); | ||||
| messageEntity.setTag(tag); | messageEntity.setTag(tag); | ||||
| messageEntityList.add(messageEntity); | messageEntityList.add(messageEntity); | ||||
| @@ -328,7 +328,7 @@ public class InvestBizServiceImpl implements InvestBizService { | |||||
| //商铺信息 | //商铺信息 | ||||
| WxShop shopQuery = new WxShop(); | WxShop shopQuery = new WxShop(); | ||||
| shopQuery.setTenantId(InvestUserContext.getUser().getTenantId()); | |||||
| shopQuery.updateTenantInfo(InvestUserContext.getUser()); | |||||
| List<WxShop> shops = shopService.listAsPage(null, 1, Integer.MAX_VALUE).getList(); | List<WxShop> shops = shopService.listAsPage(null, 1, Integer.MAX_VALUE).getList(); | ||||
| Map<String, WxShop> shopMap = getMap(shops, WxShop::getShopNumber); | Map<String, WxShop> shopMap = getMap(shops, WxShop::getShopNumber); | ||||
| @@ -806,7 +806,7 @@ public class InvestBizServiceImpl implements InvestBizService { | |||||
| if (Objects.equals(customerEntity.getType(), EnumCustomerType.COOPERATIVE)) { | if (Objects.equals(customerEntity.getType(), EnumCustomerType.COOPERATIVE)) { | ||||
| InvestHelper.notNull(customerEntity.getContractNo(), "合同编号"); | InvestHelper.notNull(customerEntity.getContractNo(), "合同编号"); | ||||
| WxRentContract contract = new WxRentContract(); | WxRentContract contract = new WxRentContract(); | ||||
| contract.setTenantId(InvestUserContext.getUser().getTenantId()); | |||||
| contract.updateTenantInfo(InvestUserContext.getUser()); | |||||
| contract.setContractNumber(customerEntity.getContractNo()); | contract.setContractNumber(customerEntity.getContractNo()); | ||||
| ResultData resultData = rentContractService.hasContractNumber(contract); | ResultData resultData = rentContractService.hasContractNumber(contract); | ||||
| InvestHelper.isTrue(Objects.equals(resultData.data, true),ErrorCode.INVEST_RESULT_NOT_FOUND,"合同编号"); | InvestHelper.isTrue(Objects.equals(resultData.data, true),ErrorCode.INVEST_RESULT_NOT_FOUND,"合同编号"); | ||||
| @@ -847,7 +847,7 @@ public class InvestBizServiceImpl implements InvestBizService { | |||||
| if (Objects.nonNull(owner) && !Objects.equals(owner, 0L)) { | if (Objects.nonNull(owner) && !Objects.equals(owner, 0L)) { | ||||
| List<Long> ownerArray = Collections.singletonList(owner); | List<Long> ownerArray = Collections.singletonList(owner); | ||||
| demandService.saveBatchMessage(ownerArray, EnumInvestMessageType.CUSTOMER_CREATE.getInfo(), | demandService.saveBatchMessage(ownerArray, EnumInvestMessageType.CUSTOMER_CREATE.getInfo(), | ||||
| EnumInvestMessageTag.CUSTOMER_CREATE, EnumFollowType.DEMAND, customerEntity.getId(), customerEntity.getTenantId()); | |||||
| EnumInvestMessageTag.CUSTOMER_CREATE, EnumFollowType.DEMAND, customerEntity.getId(), customerEntity); | |||||
| } | } | ||||
| } | } | ||||
| @@ -1130,7 +1130,7 @@ public class InvestBizServiceImpl implements InvestBizService { | |||||
| investTaskEntity.setStatus(EnumTaskStatus.FINISH); | investTaskEntity.setStatus(EnumTaskStatus.FINISH); | ||||
| } else { | } else { | ||||
| WxRentContract contractQuery = new WxRentContract(); | WxRentContract contractQuery = new WxRentContract(); | ||||
| contractQuery.setTenantId(InvestUserContext.getUser().getTenantId()); | |||||
| contractQuery.updateTenantInfo(InvestUserContext.getUser()); | |||||
| contractQuery.setShopId(investTaskEntity.getTargetId()); | contractQuery.setShopId(investTaskEntity.getTargetId()); | ||||
| contractQuery.setStatus(EnumRentContractStatus.INTENTION.getCode()); | contractQuery.setStatus(EnumRentContractStatus.INTENTION.getCode()); | ||||
| //获取意向合同 | //获取意向合同 | ||||
| @@ -59,7 +59,7 @@ public class InvestTaskServiceImpl extends InvestBaseServiceImpl<InvestTaskMappe | |||||
| if (StringUtils.isNotBlank(owner)) { | if (StringUtils.isNotBlank(owner)) { | ||||
| List<Long> ownerArray = JSONArray.parseArray(owner, Long.class); | List<Long> ownerArray = JSONArray.parseArray(owner, Long.class); | ||||
| this.saveBatchMessage(ownerArray, EnumInvestMessageType.TASK_CREATE.getInfo(), | this.saveBatchMessage(ownerArray, EnumInvestMessageType.TASK_CREATE.getInfo(), | ||||
| EnumInvestMessageTag.TASK_CREATE, EnumFollowType.TASK, entity.getId(),entity.getTenantId()); | |||||
| EnumInvestMessageTag.TASK_CREATE, EnumFollowType.TASK, entity.getId(),entity); | |||||
| } | } | ||||
| } | } | ||||