| @@ -1,6 +1,9 @@ | |||||
| package com.iformall.mapper; | package com.iformall.mapper; | ||||
| import java.util.*; | import java.util.*; | ||||
| import org.apache.ibatis.annotations.Param; | |||||
| import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
| import com.iformall.domain.po.WxPayAccount; | import com.iformall.domain.po.WxPayAccount; | ||||
| @@ -9,5 +12,5 @@ public interface WxPayAccountMapper extends CommonMapper<WxPayAccount, Long> { | |||||
| List<WxPayAccount> findList(WxPayAccount wxPayAccount); | List<WxPayAccount> findList(WxPayAccount wxPayAccount); | ||||
| WxPayAccount getByTenantId(String tenantId); | |||||
| List<WxPayAccount> getByTenantId(@Param("tenantId")String tenantId); | |||||
| } | } | ||||
| @@ -2,6 +2,7 @@ package com.iformall.service; | |||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.domain.po.WxAppinfo; | import com.iformall.domain.po.WxAppinfo; | ||||
| import com.iformall.domain.po.WxCoupon; | |||||
| import com.iformall.domain.po.WxProjectConfig; | import com.iformall.domain.po.WxProjectConfig; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.enums.EnumAppPlat; | import com.iformall.enums.EnumAppPlat; | ||||
| @@ -66,6 +67,8 @@ public interface WxAppinfoService { | |||||
| WxAppinfo getBAppInfo(TenantEntity tenantEntity,EnumAppPlat appPlat); | WxAppinfo getBAppInfo(TenantEntity tenantEntity,EnumAppPlat appPlat); | ||||
| WxAppinfo getCouponAppInfo(WxCoupon coupon); | |||||
| /** | /** | ||||
| * 保存或更新实体 | * 保存或更新实体 | ||||
| * | * | ||||
| @@ -8,6 +8,7 @@ import javax.servlet.http.HttpServletResponse; | |||||
| 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.TtCouponChannelPoi; | import com.iformall.domain.po.TtCouponChannelPoi; | ||||
| import com.iformall.domain.po.WxAppinfo; | |||||
| import com.iformall.domain.po.WxCoupon; | import com.iformall.domain.po.WxCoupon; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.domain.vo.TtCouponVo; | import com.iformall.domain.vo.TtCouponVo; | ||||
| @@ -5,6 +5,7 @@ import com.github.pagehelper.PageHelper; | |||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.common.IdWorker; | import com.iformall.common.IdWorker; | ||||
| import com.iformall.domain.po.WxAppinfo; | import com.iformall.domain.po.WxAppinfo; | ||||
| import com.iformall.domain.po.WxCoupon; | |||||
| import com.iformall.domain.po.WxProjectConfig; | import com.iformall.domain.po.WxProjectConfig; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.enums.EnumAppPlat; | import com.iformall.enums.EnumAppPlat; | ||||
| @@ -72,6 +73,11 @@ public class WxAppinfoServiceImpl implements WxAppinfoService { | |||||
| return appInfo; | return appInfo; | ||||
| } | } | ||||
| @Override | |||||
| public WxAppinfo getCouponAppInfo(WxCoupon coupon) { | |||||
| return 111111111111111111; | |||||
| } | |||||
| @Override | @Override | ||||
| public WxAppinfo getByAppId(String appId) { | public WxAppinfo getByAppId(String appId) { | ||||
| return wxAppinfoMapper.findByAppId(appId); | return wxAppinfoMapper.findByAppId(appId); | ||||
| @@ -208,4 +214,5 @@ public class WxAppinfoServiceImpl implements WxAppinfoService { | |||||
| RedisCacheUtils.removeCache(wxAppinfoRedisTemplate, key4); | RedisCacheUtils.removeCache(wxAppinfoRedisTemplate, key4); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -1216,7 +1216,11 @@ public class WxCouponServiceImpl implements WxCouponService { | |||||
| @Override | @Override | ||||
| public boolean validCouponDate(WxCoupon wxCoupon) { | public boolean validCouponDate(WxCoupon wxCoupon) { | ||||
| EnumPayShare isShare = EnumPayShare.NO; | EnumPayShare isShare = EnumPayShare.NO; | ||||
| WxPayAccount payAccount = payAccountMapper.getByTenantId(wxCoupon.getTenantId()); | |||||
| WxAppinfo appinfo = wxAppinfoService.getCouponAppInfo(wxCoupon); | |||||
| if (null == appinfo) { | |||||
| throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(), "券未查询到appInfo"); | |||||
| } | |||||
| WxPayAccount payAccount = payAccountMapper.selectById(appinfo.getPayId()); | |||||
| EnumPayShare paySHareEnum = EnumPayShare.getEnum(payAccount.getShare()); | EnumPayShare paySHareEnum = EnumPayShare.getEnum(payAccount.getShare()); | ||||
| if (paySHareEnum != null) { | if (paySHareEnum != null) { | ||||
| isShare = paySHareEnum; | isShare = paySHareEnum; | ||||
| @@ -53,7 +53,7 @@ public class TtOrderExpiringSchedule { | |||||
| List<WxAppinfo> wxAppinfoList = wxAppinfoService.getList(appQ); | List<WxAppinfo> wxAppinfoList = wxAppinfoService.getList(appQ); | ||||
| for (WxAppinfo wxAppinfo:wxAppinfoList) { | for (WxAppinfo wxAppinfo:wxAppinfoList) { | ||||
| wxAppinfoMap.put(wxAppinfo.getFinalTenantId(),wxAppinfo);//一个集团一个小程序 | wxAppinfoMap.put(wxAppinfo.getFinalTenantId(),wxAppinfo);//一个集团一个小程序 | ||||
| wxPayAccountMap.put(wxAppinfo.getFinalTenantId(),payAccountService.getById(wxAppinfo.getId())); | |||||
| wxPayAccountMap.put(wxAppinfo.getFinalTenantId(),payAccountService.getById(wxAppinfo.getPayId())); | |||||
| } | } | ||||
| for (TtOrder order:orderList) { | for (TtOrder order:orderList) { | ||||