| @@ -7,7 +7,6 @@ import com.iformall.common.ErrorCode; | |||
| import com.iformall.domain.po.WxCUser; | |||
| import com.iformall.domain.po.base.BaseCUserEntity; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.service.CUserTokenService; | |||
| import com.iformall.utils.HashUtil; | |||
| import com.iformall.utils.RedisLock; | |||
| import lombok.extern.slf4j.Slf4j; | |||
| @@ -50,8 +49,6 @@ public class RedisCacheAspect { | |||
| @Autowired | |||
| RedisLock redisLock; | |||
| @Autowired | |||
| private CUserTokenService cUserTokenService; | |||
| @Pointcut("@annotation(com.iformall.annotation.RedisCache)") | |||
| public void cacheAspect() { | |||
| @@ -72,16 +69,7 @@ public class RedisCacheAspect { | |||
| //throw new MallinkException(ErrorCode.NET_TOKEN_EMPTY.getCode(),"token为空["+token+"]"); | |||
| } | |||
| log.info("token>>>>>>>>>>>>>>>"+token); | |||
| String tenantId; | |||
| BaseCUserEntity cUser = null ; | |||
| if(StringUtils.isNotBlank(token)) { | |||
| cUser = cUserTokenService.getByToken(token); | |||
| } | |||
| if (Objects.isNull(cUser) || cUser.getExpireTime().getTime() < System.currentTimeMillis()) { | |||
| tenantId = "0"; | |||
| } else { | |||
| tenantId = cUser.getTenantId(); | |||
| } | |||
| String tenantId = "1"; | |||
| // 请求参数 | |||
| Object[] args = jp.getArgs(); | |||
| @@ -57,15 +57,10 @@ public class BaseController { | |||
| @Autowired | |||
| private WxCUserBasicChildService wxCUserBasicChildService; | |||
| @Autowired | |||
| private CUserTokenService cUserTokenService; | |||
| @Autowired | |||
| private WxScoreRulesService wxScoreRulesService; | |||
| @Autowired | |||
| private MemCouponFromDspService memCouponFromDspService; | |||
| @Autowired | |||
| @Qualifier("objectCommonRedisTemplate") | |||
| @@ -11,7 +11,6 @@ import com.iformall.domain.po.WxMall; | |||
| import com.iformall.domain.po.base.BaseCUserEntity; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.service.CUserTokenService; | |||
| import com.iformall.service.WxMallService; | |||
| import com.iformall.utils.Constant; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| @@ -32,8 +31,6 @@ import javax.servlet.http.HttpServletResponse; | |||
| @Component | |||
| public class AuthorizationInterceptor extends HandlerInterceptorAdapter { | |||
| @Autowired | |||
| private CUserTokenService cUserTokenService; | |||
| @Autowired | |||
| private WxMallService wxMallService; | |||
| @@ -3,7 +3,6 @@ package com.iformall.resolver; | |||
| import com.iformall.annotation.LoginUser; | |||
| import com.iformall.domain.po.WxCUserBasicInfo; | |||
| import com.iformall.domain.po.base.BaseCUserEntity; | |||
| import com.iformall.service.CUserTokenService; | |||
| import com.iformall.utils.Constant; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.core.MethodParameter; | |||
| @@ -1,20 +0,0 @@ | |||
| package com.iformall.service; | |||
| import com.iformall.domain.po.base.BaseCUserEntity; | |||
| public interface CUserTokenService { | |||
| /** | |||
| * 根据token获得实体 | |||
| * | |||
| * @param token | |||
| * @return | |||
| */ | |||
| BaseCUserEntity getByToken(String token); | |||
| void removeTokenCache(String token); | |||
| void updateTokenCache(String token,Object updateCuser); | |||
| } | |||
| @@ -1,38 +0,0 @@ | |||
| package com.iformall.service; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import java.util.Map; | |||
| public interface DataTowerService { | |||
| Map<String,Object> queryRunningMobile(TenantEntity tenantEntity); | |||
| Map<String,Object> queryRunningPotal(TenantEntity tenantEntity); | |||
| /** | |||
| * 把这个接口拆开 | |||
| * @param | |||
| * @return | |||
| */ | |||
| // Map<String,Object> queryRunning(TenantEntity tenantEntity); | |||
| Map<String, Object> queryOccupancyRate(TenantEntity tenantInfo); | |||
| Map<String, Object> queryRentCollectionRate(TenantEntity tenantInfo); | |||
| Map<String, Object> queryDeclarationRate(TenantEntity tenantInfo); | |||
| Map<String,Object> queryCar(TenantEntity tenantEntity); | |||
| Map<String,Object> queryCustomer(TenantEntity tenantEntity); | |||
| Map<String,Object> queryCustomerNewVersion(TenantEntity tenantEntity); | |||
| ResultData queryCustomerData(TenantEntity tenantEntity, Map<String, String> params); | |||
| ResultData queryWiWideDataUrl(TenantEntity tenantInfo, String url, Map<String, Object> params); | |||
| byte[] getWiWidePic(TenantEntity tenantInfo, String type, String id); | |||
| } | |||
| @@ -1,67 +0,0 @@ | |||
| package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.MemCouponFromDsp; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import java.util.List; | |||
| public interface MemCouponFromDspService { | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| * @param record | |||
| * @param pageIndex | |||
| * @param pageSize | |||
| * @return | |||
| */ | |||
| PageInfo<MemCouponFromDsp> listAsPage(MemCouponFromDsp record, Integer pageIndex, Integer pageSize); | |||
| List<MemCouponFromDsp> getList(MemCouponFromDsp record); | |||
| /** | |||
| * 根据Id获得实体 | |||
| * | |||
| * @param id | |||
| * @return | |||
| */ | |||
| MemCouponFromDsp getById(Long id); | |||
| /** | |||
| * 保存或更新实体 | |||
| * | |||
| * @param record | |||
| */ | |||
| void saveOrUpdate(MemCouponFromDsp record); | |||
| /** | |||
| * 根据Id删除实体 | |||
| * | |||
| * @param id | |||
| */ | |||
| void deleteById(Long id); | |||
| /** | |||
| * countByInfo | |||
| * @param record | |||
| * @return | |||
| */ | |||
| Integer countByInfo(MemCouponFromDsp record); | |||
| /** | |||
| * 注券 | |||
| * @param record | |||
| * @return | |||
| */ | |||
| Integer couponOrder(MemCouponFromDsp record); | |||
| /** | |||
| * 注券 | |||
| * @param tenantEntity | |||
| * @param phone | |||
| * @return | |||
| */ | |||
| void couponOrderFromDsp(TenantEntity tenantEntity, String phone); | |||
| } | |||
| @@ -1,25 +0,0 @@ | |||
| package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.ProductOrderSharing; | |||
| import java.util.List; | |||
| public interface ProductOrderSharingService { | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| * @param record | |||
| * @param pageIndex | |||
| * @param pageSize | |||
| * @return | |||
| */ | |||
| PageInfo<ProductOrderSharing> listAsPage(ProductOrderSharing record, Integer pageIndex, Integer pageSize); | |||
| List<ProductOrderSharing> findList(ProductOrderSharing record); | |||
| void sharingOrder(Long id); | |||
| void handleSharingOrder(Long id); | |||
| } | |||
| @@ -1,28 +0,0 @@ | |||
| package com.iformall.service; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.enums.EnumAppPlat; | |||
| import com.iformall.enums.EnumProject; | |||
| import com.iformall.exception.MallinkException; | |||
| import org.springframework.stereotype.Service; | |||
| import org.springframework.web.bind.annotation.RequestBody; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| import java.util.Map; | |||
| @Service | |||
| public interface SchemeService { | |||
| /** | |||
| * 获取scheme码 | |||
| * @param project | |||
| * @param plat | |||
| * @param pageUrl | |||
| * @param sceneParam | |||
| * @return | |||
| */ | |||
| ResultData generateScheme(EnumProject project,EnumAppPlat plat,String pageUrl, String sceneParam,Long expireTime); | |||
| } | |||
| @@ -1,14 +0,0 @@ | |||
| package com.iformall.service; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxCVideoTable; | |||
| import java.util.Map; | |||
| public interface WxCVideoService { | |||
| Map<String, Object> getById(Long userId) throws Exception; | |||
| WxCVideoTable selectOne(Long id, long resource_id); | |||
| } | |||
| @@ -1,18 +0,0 @@ | |||
| package com.iformall.service; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.sm.VoiceInfo; | |||
| import com.iformall.sm.AiPreviewParam; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| public interface WxCVoiceService { | |||
| Map<String,Object> getById(Long userId); | |||
| List<VoiceInfo> chooseType(Long id); | |||
| Map<String, Object> voicePreview(Long voiceId, String voiceStyle, String text, Integer speed); | |||
| } | |||
| @@ -1,116 +0,0 @@ | |||
| package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.vo.PromotionCalc; | |||
| import com.iformall.domain.vo.WxCardSpendVo; | |||
| import com.iformall.enums.EnumPayWay; | |||
| import com.iformall.exception.MallinkException; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| public interface WxCardSpendService { | |||
| /** | |||
| * | |||
| */ | |||
| WxCouponMerchant checkMerchantInCoupon(WxCardInfo cardInfo, Long merchantId); | |||
| /** | |||
| * 创建卡花费 | |||
| * | |||
| * @param record | |||
| * @param order | |||
| * @return | |||
| */ | |||
| ResultData createCardSpend(WxCardSpend record, WxOrder order, WxCouponMerchant couponMerchant,EnumPayWay payWay); | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| * @param record | |||
| * @param pageIndex | |||
| * @param pageSize | |||
| * @return | |||
| */ | |||
| PageInfo<WxCardSpendVo> listAsPage(WxCardSpendVo record, Integer pageIndex, Integer pageSize); | |||
| /** | |||
| * 根据实体SUM | |||
| * | |||
| * @param record | |||
| * @return | |||
| */ | |||
| List<Map<String, Object>> sumCardSpendForMerchant(WxCardSpendVo record); | |||
| /** | |||
| * 根据实体SUM | |||
| * | |||
| * @param record | |||
| * @return | |||
| */ | |||
| List<Map<String, Object>> sumCardSpendForOwner(WxCardSpendVo record); | |||
| /** | |||
| * 根据Id获得实体 | |||
| * | |||
| * @param id | |||
| * @return | |||
| */ | |||
| WxCardSpend getById(Long id); | |||
| /** | |||
| * 保存或更新实体 | |||
| * | |||
| * @param record | |||
| */ | |||
| void saveOrUpdate(WxCardSpend record); | |||
| /** | |||
| * 更新实体 | |||
| * | |||
| * @param record | |||
| */ | |||
| void update(WxCardSpend record); | |||
| /** | |||
| * 卡完结 | |||
| * | |||
| * @param cardInfo | |||
| */ | |||
| int finishCard(WxCardInfo cardInfo); | |||
| /** | |||
| * 根据Id删除实体 | |||
| * | |||
| * @param id | |||
| */ | |||
| void deleteById(Long id); | |||
| /** | |||
| * cardPay分账 | |||
| * @param tenantEntity | |||
| * @param orderId | |||
| * @param cardSpendId | |||
| */ | |||
| void shareForCardPay(TenantEntity tenantEntity, Long cardId, Long orderId, Long cardSpendId,Integer payWay); | |||
| /** | |||
| * cardPay交易流水导出 | |||
| */ | |||
| void exportData(WxCardSpendVo wxCardSpendVo, HttpServletRequest request, HttpServletResponse response); | |||
| /** | |||
| * POS 卡支付相关接口 | |||
| */ | |||
| WxCardSpend cardSpendForPosPrePay(WxCardSpend record) throws MallinkException; | |||
| WxCardInfo cardSpendForPosPrePayCancel(WxCardInfo cardInfo, WxCardSpend record) throws MallinkException; | |||
| WxCardSpend cardSpendForPosPay(PromotionCalc scoreCreditCalc, WxCardSpend record, WxMerchant merchant, WxMerchantBUser buUser,Integer payWay) throws MallinkException; | |||
| Integer sumRealPayment(WxCardSpendVo wxCardSpend); | |||
| } | |||
| @@ -1,30 +0,0 @@ | |||
| package com.iformall.service; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxChartDataEntity; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.enums.EnumChartType; | |||
| import java.util.Map; | |||
| public interface WxChartDataService { | |||
| /** | |||
| * 获取昨日, | |||
| * 近一周 | |||
| * @param | |||
| * @return | |||
| */ | |||
| ResultData queryWeekCount(EnumChartType chartType, TenantEntity tenantEntity); | |||
| /** | |||
| * 获取周统计, | |||
| * 月统计 | |||
| * @param | |||
| * @return | |||
| */ | |||
| ResultData queryMonthVos(EnumChartType chartType, TenantEntity tenantEntity); | |||
| ResultData queryData(Map<String, String> params); | |||
| } | |||
| @@ -1,54 +0,0 @@ | |||
| package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxCouponInject; | |||
| public interface WxCouponInjectService { | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| * @param record | |||
| * @param offset | |||
| * @param limit | |||
| * @return | |||
| */ | |||
| PageInfo<WxCouponInject> listAsPage(WxCouponInject record, Integer pageIndex, Integer pageSize); | |||
| /** | |||
| * 根据Id获得实体 | |||
| * | |||
| * @param id | |||
| * @return | |||
| */ | |||
| WxCouponInject getById(Long id); | |||
| /** | |||
| * 保存或更新实体 | |||
| * | |||
| * @param record | |||
| */ | |||
| void saveOrUpdate(WxCouponInject record); | |||
| /** | |||
| * 根据Id删除实体 | |||
| * | |||
| * @param id | |||
| */ | |||
| void deleteById(Long id); | |||
| /** | |||
| * 精准投(立即投送处理) | |||
| * | |||
| * @param id | |||
| */ | |||
| ResultData add(WxCouponInject record); | |||
| } | |||
| @@ -1,108 +0,0 @@ | |||
| package com.iformall.service; | |||
| import java.util.List; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.po.WxCouponSend; | |||
| import com.iformall.domain.vo.WxCouponSendVo; | |||
| import com.iformall.enums.EnumCouponSendSendType; | |||
| import com.iformall.enums.EnumPayVersion; | |||
| import com.iformall.enums.EnumPayWay; | |||
| public interface WxCouponSendService { | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| * @param record | |||
| * @param pageIndex | |||
| * @param pageSize | |||
| * @return | |||
| */ | |||
| PageInfo<WxCouponSendVo> listAsPage(WxCouponSend record, Integer pageIndex, Integer pageSize); | |||
| /** | |||
| * 根据Id获得实体 | |||
| * | |||
| * @param id | |||
| * @return | |||
| */ | |||
| WxCouponSend getById(Long id,String tenantId); | |||
| /** | |||
| * 保存或更新实体 | |||
| * | |||
| * @param record | |||
| */ | |||
| void saveOrUpdate(WxCouponSend record); | |||
| /** | |||
| * 更新为无效 | |||
| * @param record | |||
| */ | |||
| void updateInvalid(WxCouponSend record) ; | |||
| /** | |||
| * 根据Id删除实体 | |||
| * | |||
| * @param id | |||
| */ | |||
| void deleteById(Long id,String tenantId); | |||
| /** | |||
| *停车或核销给用户注入卡券 | |||
| * @param tenantId | |||
| * @param cUserId | |||
| * @param type 2:停车发券 3:核销发券 | |||
| */ | |||
| boolean sendCouponToUser(EnumCouponSendSendType type, Object param,EnumPayWay payWay,EnumPayVersion payVersion); | |||
| void updateStatusByCouponId(Long couponId, TenantEntity tenantEntity, int status); | |||
| /** | |||
| * 添加或更新生日券配置 | |||
| * @param beforeDays | |||
| * @param sendType | |||
| * @param tenantEntity | |||
| */ | |||
| void saveOrUpdateConfig(Integer beforeDays, Integer sendType, TenantEntity tenantEntity) ; | |||
| /** | |||
| * 获取生日券配置 | |||
| * @param sendType | |||
| * @param tenantEntity | |||
| * @return | |||
| */ | |||
| WxCouponSend getConfig(Integer sendType,TenantEntity tenantEntity) ; | |||
| /** | |||
| * 商户注券 库存减少 | |||
| * | |||
| * @param id 券ID | |||
| * @param merchantRemain 当前库存 | |||
| * @param merchantSend 当前已发 | |||
| * @param number 减少数量 | |||
| */ | |||
| void reduceMerchantSend(String tenantId,Long id, Integer merchantRemain, Integer merchantSend ,Integer number); | |||
| /** | |||
| * 商户注券 库存退回 | |||
| * | |||
| * @param id 券ID | |||
| * @param merchantRemain 当前库存 | |||
| * @param merchantSend 当前已发 | |||
| * @param number 回退数量 | |||
| */ | |||
| void backMerchantRemainInventory(String tenantId,Long id, Integer merchantRemain, Integer merchantSend ,Integer number); | |||
| /** | |||
| * | |||
| * @param wxCouponSend | |||
| */ | |||
| void handSel(WxCouponSend wxCouponSend,Long cUserId,EnumPayWay payWay,EnumPayVersion payVersion,Long merchantId,Long bUserId) ; | |||
| List<WxCouponSendVo> findListVo(WxCouponSend record); | |||
| } | |||
| @@ -1,63 +0,0 @@ | |||
| package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.po.WxScreenAd; | |||
| import java.util.List; | |||
| public interface WxScreenAdService { | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| * @param record | |||
| * @param pageIndex | |||
| * @param pageSize | |||
| * @return | |||
| */ | |||
| PageInfo<WxScreenAd> listAsPage(WxScreenAd record, Integer pageIndex, Integer pageSize); | |||
| /** | |||
| * 根据Id获得实体 | |||
| * | |||
| * @param id | |||
| * @return | |||
| */ | |||
| WxScreenAd getById(Long id); | |||
| /** | |||
| * 保存或更新实体 | |||
| * | |||
| * @param record | |||
| */ | |||
| ResultData saveOrUpdate(WxScreenAd record); | |||
| /** | |||
| * 根据Id删除实体 | |||
| * | |||
| * @param id | |||
| */ | |||
| void deleteById(Long id); | |||
| /** | |||
| * 根据实体查询分页列表 | |||
| * | |||
| * @param record | |||
| * @return | |||
| */ | |||
| List<WxScreenAd> findList(WxScreenAd record); | |||
| void updateStatusByCouponChannelId(Long couponChannelId, TenantEntity tenantEntity, int status); | |||
| void updateStatusByCouponId(Long couponId, TenantEntity tenantEntity, int status); | |||
| } | |||