| @@ -1,6 +1,7 @@ | |||
| package com.iformall.config; | |||
| import org.apache.log4j.Logger; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Value; | |||
| import org.springframework.cache.annotation.CachingConfigurerSupport; | |||
| import org.springframework.cache.annotation.EnableCaching; | |||
| @@ -15,6 +16,9 @@ import redis.clients.jedis.JedisPoolConfig; | |||
| @Configuration | |||
| @EnableCaching | |||
| public class RedisConfig extends CachingConfigurerSupport { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Value("${spring.redis.host}") | |||
| private String host; | |||
| @@ -35,8 +39,8 @@ public class RedisConfig extends CachingConfigurerSupport { | |||
| @Bean | |||
| public JedisPool redisPoolFactory() { | |||
| Logger.getLogger(getClass()).info("JedisPool注入成功!!"); | |||
| Logger.getLogger(getClass()).info("redis地址:" + host + ":" + port); | |||
| logger.info("JedisPool注入成功!!"); | |||
| logger.info("redis地址:" + host + ":" + port); | |||
| JedisPoolConfig jedisPoolConfig = new JedisPoolConfig(); | |||
| jedisPoolConfig.setMaxIdle(maxIdle); | |||
| jedisPoolConfig.setMaxWaitMillis(maxWaitMillis); | |||
| @@ -208,7 +208,7 @@ public class ShiroConfig { | |||
| RedisManager redisManager = new RedisManager(); | |||
| redisManager.setHost(host); | |||
| redisManager.setPort(port); | |||
| redisManager.setExpire(expire);// 配置缓存过期时间 | |||
| //redisManager.setExpire(expire);// 配置缓存过期时间 | |||
| redisManager.setTimeout(timeout); | |||
| redisManager.setPassword(password); | |||
| return redisManager; | |||
| @@ -8,18 +8,19 @@ import com.iformall.service.WxMsgSignatureService; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import org.apache.log4j.Logger; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| @RestController | |||
| @RequestMapping("wxMsgSignature") | |||
| public class WxMsgSignatureController extends BaseController { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| private WxMsgSignatureService wxMsgSignatureService; | |||
| private Logger logger = Logger.getLogger(WxMsgSignatureController.class); | |||
| @ApiOperation("分页列表接口") | |||
| @GetMapping("list") | |||
| @ApiImplicitParams({ | |||
| @@ -9,7 +9,7 @@ import com.iformall.service.WxProfitSharingOrderService; | |||
| import com.iformall.service.WxRefundOrderService; | |||
| import com.iformall.utils.XmlUtil; | |||
| import org.apache.commons.io.IOUtils; | |||
| import org.jdom.JDOMException; | |||
| import org.jdom2.JDOMException; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.http.MediaType; | |||
| @@ -1,7 +1,8 @@ | |||
| package com.iformall.schedule; | |||
| import com.iformall.mapper.*; | |||
| import org.apache.log4j.Logger; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.scheduling.annotation.Scheduled; | |||
| import org.springframework.stereotype.Component; | |||
| @@ -11,14 +12,12 @@ import org.springframework.transaction.annotation.Transactional; | |||
| @Component | |||
| public class CouponExpiringSchedule { | |||
| private final Logger logger = Logger.getLogger(CouponExpiringSchedule.class); | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| private WxCouponChannelMapper wxCouponChannelMapper; | |||
| @Scheduled(cron = "0 5 0 * * ?") // 每天凌晨00:05 | |||
| //@Scheduled(cron = "*/10 * * * * ?") // 测试10秒中一次 | |||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | |||
| @@ -7,7 +7,8 @@ import com.iformall.enums.EnumRefundWay; | |||
| import com.iformall.mapper.*; | |||
| import com.iformall.service.WxPayOrderService; | |||
| import com.iformall.service.WxRefundOrderService; | |||
| import org.apache.log4j.Logger; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.scheduling.annotation.Scheduled; | |||
| import org.springframework.stereotype.Component; | |||
| @@ -18,8 +19,7 @@ import java.util.List; | |||
| @Component | |||
| public class CouponOrderExpiringSchedule { | |||
| private final Logger logger = Logger.getLogger(CouponOrderExpiringSchedule.class); | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| @@ -8,7 +8,8 @@ import com.iformall.domain.po.WxMerchant; | |||
| import com.iformall.enums.EnumDateAmtType; | |||
| import com.iformall.mapper.*; | |||
| import com.iformall.service.WxDateAmountRecordService; | |||
| import org.apache.log4j.Logger; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.scheduling.annotation.Scheduled; | |||
| import org.springframework.stereotype.Component; | |||
| @@ -21,8 +22,7 @@ import java.util.*; | |||
| @Component | |||
| public class DaliyAmountSchedule { | |||
| private final Logger logger = Logger.getLogger(DaliyAmountSchedule.class); | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| @@ -6,7 +6,8 @@ import com.iformall.domain.po.WxMsgConfig; | |||
| import com.iformall.mapper.WxMsgConfigMapper; | |||
| import com.iformall.mapper.WxMsgMapper; | |||
| import com.iformall.utils.*; | |||
| import org.apache.log4j.Logger; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.scheduling.annotation.Scheduled; | |||
| import org.springframework.stereotype.Component; | |||
| @@ -16,7 +17,7 @@ import java.util.*; | |||
| @Component | |||
| public class MsgSendingSchedule { | |||
| private final Logger logger = Logger.getLogger(MsgSendingSchedule.class); | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| private WxMsgMapper wxMsgMapper; | |||
| @@ -4,7 +4,8 @@ import com.iformall.domain.po.WxOrder; | |||
| import com.iformall.enums.EnumOrderStatus; | |||
| import com.iformall.mapper.WxOrderMapper; | |||
| import com.iformall.service.WxOrderService; | |||
| import org.apache.log4j.Logger; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.scheduling.annotation.Scheduled; | |||
| import org.springframework.stereotype.Component; | |||
| @@ -18,8 +19,7 @@ import java.util.Map; | |||
| @Component | |||
| public class OrderExpiringSchedule { | |||
| private final Logger logger = Logger.getLogger(OrderExpiringSchedule.class); | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| private final int TIME_OUT_VALUE = 15 * 60 * 1000; //15分钟 | |||
| @@ -7,7 +7,8 @@ import java.util.HashMap; | |||
| import java.util.Map; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.apache.log4j.Logger; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.http.HttpEntity; | |||
| import org.springframework.http.HttpHeaders; | |||
| @@ -29,8 +30,7 @@ import com.iformall.service.WxUserVisitService; | |||
| @Component | |||
| public class WxAppVisitSchedule { | |||
| private Logger logger = Logger.getLogger(WxAppVisitSchedule.class); | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| private static String visit = "https://api.weixin.qq.com/datacube/getweanalysisappiddailyvisittrend?access_token="; | |||
| @@ -5,14 +5,14 @@ import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.mapper.CouponInjectMapper; | |||
| import com.iformall.service.*; | |||
| import org.apache.commons.lang3.time.DateUtils; | |||
| import org.apache.log4j.Logger; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @@ -22,6 +22,7 @@ import java.util.List; | |||
| @Service | |||
| public class CouponInjectServiceImpl implements CouponInjectService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| CouponInjectMapper couponInjectMapper; | |||
| @@ -33,7 +34,6 @@ public class CouponInjectServiceImpl implements CouponInjectService { | |||
| WxCUserTagsService wxCUserTagsService; | |||
| @Autowired | |||
| WxCouponActionLogService wxCouponActionLogService; | |||
| private Logger logger = Logger.getLogger(getClass()); | |||
| @Override | |||
| @@ -12,8 +12,9 @@ import com.iformall.service.DataTowerService; | |||
| import com.iformall.utils.DateUtils; | |||
| import com.iformall.utils.HashUtil; | |||
| import com.iformall.utils.HttpUtil; | |||
| import org.apache.log4j.Logger; | |||
| import org.apache.shiro.codec.Base64; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @@ -25,7 +26,7 @@ import java.util.stream.Collectors; | |||
| @Service | |||
| public class DataTowerServiceImpl implements DataTowerService { | |||
| private Logger logger = Logger.getLogger(getClass()); | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxShopMapper wxShopMapper; | |||
| @@ -6,6 +6,8 @@ import com.iformall.common.IdWorker; | |||
| import com.iformall.domain.po.MallPermission; | |||
| import com.iformall.mapper.MallPermissionMapper; | |||
| import com.iformall.service.MallPermissionService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @@ -13,6 +15,7 @@ import java.util.List; | |||
| @Service | |||
| public class MallPermissionServiceImpl implements MallPermissionService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| MallPermissionMapper mallPermissionMapper; | |||
| @@ -6,11 +6,15 @@ import com.iformall.common.IdWorker; | |||
| import com.iformall.domain.po.MallRolePermission; | |||
| import com.iformall.mapper.MallRolePermissionMapper; | |||
| import com.iformall.service.MallRolePermissionService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @Service | |||
| public class MallRolePermissionServiceImpl implements MallRolePermissionService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| MallRolePermissionMapper mallUserRolePermissionMapper; | |||
| @@ -6,6 +6,8 @@ import com.iformall.common.IdWorker; | |||
| import com.iformall.domain.po.MallRole; | |||
| import com.iformall.mapper.MallRoleMapper; | |||
| import com.iformall.service.MallRoleService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @@ -15,6 +17,7 @@ import java.util.Map; | |||
| @Service | |||
| public class MallRoleServiceImpl implements MallRoleService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| MallRoleMapper mallRoleMapper; | |||
| @@ -6,6 +6,8 @@ import com.iformall.common.IdWorker; | |||
| import com.iformall.domain.po.MallUserRole; | |||
| import com.iformall.mapper.MallUserRoleMapper; | |||
| import com.iformall.service.MallUserRoleService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @@ -13,6 +15,7 @@ import java.util.List; | |||
| @Service | |||
| public class MallUserRoleServiceImpl implements MallUserRoleService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| MallUserRoleMapper mallUserRoleMapper; | |||
| @@ -11,6 +11,8 @@ import com.iformall.domain.vo.TouchUsersReportVo; | |||
| import com.iformall.enums.EnumCouponType; | |||
| import com.iformall.mapper.*; | |||
| import com.iformall.service.MarkingDataReportService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @@ -23,7 +25,7 @@ import java.util.stream.Collectors; | |||
| */ | |||
| @Service | |||
| public class MarkingDataReportServiceImpl implements MarkingDataReportService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| private WxCouponOrderMapper wxCouponOrderMapper; | |||
| @@ -6,6 +6,8 @@ import com.iformall.common.IdWorker; | |||
| import com.iformall.domain.po.PushLimit; | |||
| import com.iformall.mapper.PushLimitMapper; | |||
| import com.iformall.service.PushLimitService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @@ -13,6 +15,7 @@ import java.util.List; | |||
| @Service | |||
| public class PushLimitServiceImpl implements PushLimitService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| PushLimitMapper pushLimitMapper; | |||
| @@ -6,12 +6,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxAdminLog; | |||
| import com.iformall.mapper.WxAdminLogMapper; | |||
| import com.iformall.service.WxAdminLogService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxAdminLogServiceImpl implements WxAdminLogService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxAdminLogMapper wxAdminLogMapper; | |||
| @@ -5,12 +5,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxAppinfo; | |||
| import com.iformall.mapper.WxAppinfoMapper; | |||
| import com.iformall.service.WxAppinfoService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxAppinfoServiceImpl implements WxAppinfoService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxAppinfoMapper wxAppinfoMapper; | |||
| @@ -5,12 +5,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxBLog; | |||
| import com.iformall.mapper.WxBLogMapper; | |||
| import com.iformall.service.WxBLogService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxBLogServiceImpl implements WxBLogService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxBLogMapper wxBLogMapper; | |||
| @@ -7,11 +7,14 @@ import com.iformall.common.IdWorker; | |||
| import com.iformall.domain.po.WxBillRent; | |||
| import com.iformall.mapper.WxBillRentMapper; | |||
| import com.iformall.service.WxBillRentService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @Service | |||
| public class WxBillRentServiceImpl implements WxBillRentService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxBillRentMapper wxBillRentMapper; | |||
| @@ -5,12 +5,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxBusiness; | |||
| import com.iformall.mapper.WxBusinessMapper; | |||
| import com.iformall.service.WxBusinessService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxBusinessServiceImpl implements WxBusinessService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxBusinessMapper wxBusinessMapper; | |||
| @@ -5,12 +5,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxCLog; | |||
| import com.iformall.mapper.WxCLogMapper; | |||
| import com.iformall.service.WxCLogService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxCLogServiceImpl implements WxCLogService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxCLogMapper wxCLogMapper; | |||
| @@ -6,12 +6,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxCUserCar; | |||
| import com.iformall.mapper.WxCUserCarMapper; | |||
| import com.iformall.service.WxCUserCarService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxCUserCarServiceImpl implements WxCUserCarService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxCUserCarMapper wxCUserCarMapper; | |||
| @@ -11,12 +11,15 @@ import com.iformall.mapper.WxCUserMapper; | |||
| import com.iformall.mapper.WxCouponOrderMapper; | |||
| import com.iformall.mapper.WxScoreRulesMapper; | |||
| import com.iformall.service.WxCUserService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxCUserServiceImpl implements WxCUserService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxCUserMapper wxCUserMapper; | |||
| @@ -6,6 +6,8 @@ import java.util.List; | |||
| import com.alibaba.fastjson.JSON; | |||
| import com.iformall.domain.po.WxCUserBasicInfo; | |||
| import com.iformall.mapper.WxCUserBasicInfoMapper; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @@ -23,6 +25,7 @@ import com.iformall.service.WxCUserTagsService; | |||
| @Service | |||
| public class WxCUserTagsServiceImpl implements WxCUserTagsService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxCUserTagsMapper wxCUserTagsMapper; | |||
| @@ -17,6 +17,8 @@ import com.iformall.mapper.WxCouponChannelMapper; | |||
| import com.iformall.service.WxCampaignService; | |||
| import com.iformall.service.WxCouponChannelService; | |||
| import com.iformall.service.WxCouponService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import org.springframework.transaction.annotation.Propagation; | |||
| @@ -27,6 +29,7 @@ import java.util.List; | |||
| @Service | |||
| public class WxCampaignServiceImpl implements WxCampaignService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxCampaignMapper wxCampaignMapper; | |||
| @@ -5,12 +5,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxCarCmdLog; | |||
| import com.iformall.mapper.WxCarCmdLogMapper; | |||
| import com.iformall.service.WxCarCmdLogService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxCarCmdLogServiceImpl implements WxCarCmdLogService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxCarCmdLogMapper wxCarCmdLogMapper; | |||
| @@ -5,12 +5,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxChannel; | |||
| import com.iformall.mapper.WxChannelMapper; | |||
| import com.iformall.service.WxChannelService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxChannelServiceImpl implements WxChannelService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxChannelMapper wxChannelMapper; | |||
| @@ -6,12 +6,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxCouponActionLog; | |||
| import com.iformall.mapper.WxCouponActionLogMapper; | |||
| import com.iformall.service.WxCouponActionLogService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxCouponActionLogServiceImpl implements WxCouponActionLogService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxCouponActionLogMapper wxCouponActionLogMapper; | |||
| @@ -7,11 +7,14 @@ import com.iformall.domain.po.WxCouponCar; | |||
| import com.iformall.domain.vo.WxCouponCarVo; | |||
| import com.iformall.mapper.WxCouponCarMapper; | |||
| import com.iformall.service.WxCouponCarService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @Service | |||
| public class WxCouponCarServiceImpl implements WxCouponCarService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxCouponCarMapper wxCouponCarMapper; | |||
| @@ -16,13 +16,15 @@ import com.iformall.mapper.WxCouponChannelMapper; | |||
| import com.iformall.mapper.WxMerchantMapper; | |||
| import com.iformall.service.WxCouponChannelService; | |||
| import com.iformall.service.WxCouponService; | |||
| import org.apache.log4j.Logger; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxCouponChannelServiceImpl implements WxCouponChannelService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxCouponChannelMapper wxCouponChannelMapper; | |||
| @@ -31,8 +33,6 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { | |||
| @Autowired | |||
| WxMerchantMapper wxMerchantMapper; | |||
| private Logger logger = Logger.getLogger(getClass()); | |||
| /** | |||
| * B端业务端 | |||
| * @param record | |||
| @@ -23,8 +23,9 @@ import com.iformall.service.*; | |||
| import com.iformall.utils.DateUtils; | |||
| import com.iformall.utils.MaUtil; | |||
| import me.chanjar.weixin.common.error.WxErrorException; | |||
| import org.apache.log4j.Logger; | |||
| import org.apache.poi.ss.usermodel.Workbook; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import org.springframework.transaction.annotation.Propagation; | |||
| @@ -39,7 +40,7 @@ import java.util.*; | |||
| @Service | |||
| public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||
| private Logger logger = Logger.getLogger(WxCouponOrderServiceImpl.class); | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxCouponOrderMapper wxCouponOrderMapper; | |||
| @@ -8,6 +8,8 @@ import com.iformall.enums.*; | |||
| import com.iformall.mapper.WxCouponOrderMapper; | |||
| import com.iformall.mapper.WxCouponSendMapper; | |||
| import com.iformall.service.*; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import org.springframework.transaction.annotation.Transactional; | |||
| @@ -16,6 +18,7 @@ import java.util.List; | |||
| @Service | |||
| public class WxCouponSendServiceImpl implements WxCouponSendService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxCouponSendMapper wxCouponSendMapper; | |||
| @@ -11,6 +11,8 @@ import com.iformall.mapper.WxCouponMapper; | |||
| import com.iformall.service.WxCouponChannelService; | |||
| import com.iformall.service.WxCouponSendService; | |||
| import com.iformall.service.WxCouponService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @@ -18,6 +20,7 @@ import org.springframework.transaction.annotation.Transactional; | |||
| @Service | |||
| public class WxCouponServiceImpl implements WxCouponService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxCouponMapper wxCouponMapper; | |||
| @@ -6,12 +6,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxCouponSpread; | |||
| import com.iformall.mapper.WxCouponSpreadMapper; | |||
| import com.iformall.service.WxCouponSpreadService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxCouponSpreadServiceImpl implements WxCouponSpreadService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxCouponSpreadMapper wxCouponSpreadMapper; | |||
| @@ -5,12 +5,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxCouponType; | |||
| import com.iformall.mapper.WxCouponTypeMapper; | |||
| import com.iformall.service.WxCouponTypeService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxCouponTypeServiceImpl implements WxCouponTypeService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxCouponTypeMapper wxCouponTypeMapper; | |||
| @@ -6,12 +6,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxDateAmountRecord; | |||
| import com.iformall.mapper.WxDateAmountRecordMapper; | |||
| import com.iformall.service.WxDateAmountRecordService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxDateAmountRecordServiceImpl implements WxDateAmountRecordService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxDateAmountRecordMapper wxDateAmountRecordMapper; | |||
| @@ -6,11 +6,14 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxGroup; | |||
| import com.iformall.mapper.WxGroupMapper; | |||
| import com.iformall.service.WxGroupService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @Service | |||
| public class WxGroupServiceImpl implements WxGroupService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxGroupMapper wxGroupMapper; | |||
| @@ -5,12 +5,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxLevelConfig; | |||
| import com.iformall.mapper.WxLevelConfigMapper; | |||
| import com.iformall.service.WxLevelConfigService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxLevelConfigServiceImpl implements WxLevelConfigService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxLevelConfigMapper wxLevelConfigMapper; | |||
| @@ -20,6 +20,8 @@ import com.iformall.utils.AesUtil; | |||
| import com.iformall.utils.HMACSHA256; | |||
| import com.iformall.utils.HttpUtil; | |||
| import com.iformall.utils.RsaUtil; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @@ -28,6 +30,7 @@ import java.util.stream.Collectors; | |||
| @Service | |||
| public class WxMallApplyServiceImpl implements WxMallApplyService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxMallApplyMapper wxMallApplyMapper; | |||
| @@ -9,6 +9,8 @@ import com.iformall.domain.po.WxMallFloor; | |||
| import com.iformall.mapper.WxMallBuildingMapper; | |||
| import com.iformall.mapper.WxMallFloorMapper; | |||
| import com.iformall.service.WxMallBuildingService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @@ -17,6 +19,7 @@ import java.util.stream.Collectors; | |||
| @Service | |||
| public class WxMallBuildingServiceImpl implements WxMallBuildingService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxMallBuildingMapper wxMallBuildingMapper; | |||
| @@ -5,12 +5,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxMallConfig; | |||
| import com.iformall.mapper.WxMallConfigMapper; | |||
| import com.iformall.service.WxMallConfigService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxMallConfigServiceImpl implements WxMallConfigService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxMallConfigMapper wxMallConfigMapper; | |||
| @@ -7,12 +7,15 @@ import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxMallFloor; | |||
| import com.iformall.mapper.WxMallFloorMapper; | |||
| import com.iformall.service.WxMallFloorService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxMallFloorServiceImpl implements WxMallFloorService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxMallFloorMapper wxMallFloorMapper; | |||
| @@ -5,12 +5,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxMall; | |||
| import com.iformall.mapper.WxMallMapper; | |||
| import com.iformall.service.WxMallService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxMallServiceImpl implements WxMallService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxMallMapper wxMallMapper; | |||
| @@ -1,11 +1,9 @@ | |||
| package com.iformall.service.impl; | |||
| import java.util.*; | |||
| import java.util.stream.Collectors; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxAppinfo; | |||
| import com.iformall.domain.po.WxMerchantBUser; | |||
| @@ -16,15 +14,18 @@ import com.iformall.mapper.WxAppinfoMapper; | |||
| import com.iformall.mapper.WxMerchantBUserMapper; | |||
| import com.iformall.mapper.WxMsgValidationcodeMapper; | |||
| import com.iformall.service.WxMerchantBUserService; | |||
| import org.apache.log4j.Logger; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| import java.util.stream.Collectors; | |||
| @Service | |||
| public class WxMerchantBUserServiceImpl implements WxMerchantBUserService { | |||
| private Logger logger = Logger.getLogger(WxMerchantBUserServiceImpl.class); | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxAppinfoMapper wxAppinfoMapper; | |||
| @@ -92,7 +93,7 @@ public class WxMerchantBUserServiceImpl implements WxMerchantBUserService { | |||
| bUser.setPhone(phone); | |||
| bUser.setStatus(EnumMerchantBUserStatus.VALID.getCode()); | |||
| List<WxMerchantBUser> list = wxMerchantBUserMapper.findList(bUser); | |||
| return list.size()>=1?true:false; | |||
| return list.size() >= 1 ? true : false; | |||
| } | |||
| @Override | |||
| @@ -106,20 +107,20 @@ public class WxMerchantBUserServiceImpl implements WxMerchantBUserService { | |||
| Date currentdate = new Date(); | |||
| wxmsgvalidationcodelist = wxmsgvalidationcodelist.stream().filter(validationcode -> | |||
| validationcode.getExpiretime().after(currentdate)).collect(Collectors.toList()); | |||
| if(wxmsgvalidationcodelist.size()>0){ | |||
| if (wxmsgvalidationcodelist.size() > 0) { | |||
| //更新 | |||
| WxMerchantBUser bUser = new WxMerchantBUser(); | |||
| bUser.setTenantId(appinfo.getTenantId()); | |||
| bUser.setPhone(phone); | |||
| bUser.setAppId(appId); | |||
| List<WxMerchantBUser> list = wxMerchantBUserMapper.findList(bUser); | |||
| if(list.size()>0){ | |||
| if (list.size() > 0) { | |||
| bUser = list.get(0); | |||
| bUser.setBUserPwd(pwd); | |||
| try{ | |||
| try { | |||
| wxMerchantBUserMapper.updateByPrimaryKeySelective(bUser); | |||
| }catch (Exception e){ | |||
| } catch (Exception e) { | |||
| logger.error("db failed: 商户-" + bUser.getId() + ", e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | |||
| } | |||
| @@ -8,6 +8,8 @@ import com.iformall.enums.*; | |||
| import com.iformall.mapper.*; | |||
| import com.iformall.service.WxMerchantService; | |||
| import com.iformall.service.WxProfitSharingReceiverService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import org.springframework.transaction.annotation.Transactional; | |||
| @@ -18,6 +20,7 @@ import java.util.stream.Collectors; | |||
| @Service | |||
| public class WxMerchantServiceImpl implements WxMerchantService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxMerchantMapper wxMerchantMapper; | |||
| @@ -8,6 +8,8 @@ import com.iformall.domain.po.WxShop; | |||
| import com.iformall.mapper.WxMerchantShopMapper; | |||
| import com.iformall.mapper.WxShopMapper; | |||
| import com.iformall.service.WxMerchantShopService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @@ -16,6 +18,7 @@ import java.util.List; | |||
| @Service | |||
| public class WxMerchantShopServiceImpl implements WxMerchantShopService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxMerchantShopMapper wxMerchantShopMapper; | |||
| @@ -15,12 +15,15 @@ import com.iformall.service.WxMerchantTradeDailyService; | |||
| import com.iformall.service.WxMallService; | |||
| import com.iformall.service.WxMerchantBUserService; | |||
| import com.iformall.service.WxMerchantService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxMerchantTradeDailyServiceImpl implements WxMerchantTradeDailyService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxMerchantTradeDailyMapper wxMerchantTradeDailyMapper; | |||
| @@ -13,6 +13,8 @@ import com.iformall.mapper.WxMsgConfigMapper; | |||
| import com.iformall.mapper.WxMsgModelMapper; | |||
| import com.iformall.mapper.WxMsgValidationcodeModelMapper; | |||
| import com.iformall.service.WxMsgCallbackService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @@ -22,6 +24,7 @@ import java.util.Map; | |||
| @Service | |||
| public class WxMsgCallbackServiceImpl implements WxMsgCallbackService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxMsgCallbackMapper wxMsgCallbackMapper; | |||
| @@ -5,12 +5,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxMsgConfig; | |||
| import com.iformall.mapper.WxMsgConfigMapper; | |||
| import com.iformall.service.WxMsgConfigService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxMsgConfigServiceImpl implements WxMsgConfigService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxMsgConfigMapper wxMsgConfigMapper; | |||
| @@ -16,6 +16,8 @@ import com.iformall.utils.AesUtil; | |||
| import com.iformall.utils.HMACSHA256; | |||
| import com.iformall.utils.HttpUtil; | |||
| import com.iformall.utils.RsaUtil; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @@ -23,6 +25,7 @@ import java.util.*; | |||
| @Service | |||
| public class WxMsgModelServiceImpl implements WxMsgModelService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxMsgModelMapper wxMsgModelMapper; | |||
| @@ -21,6 +21,8 @@ import com.iformall.utils.AesUtil; | |||
| import com.iformall.utils.HMACSHA256; | |||
| import com.iformall.utils.HttpUtil; | |||
| import com.iformall.utils.RsaUtil; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @@ -29,6 +31,7 @@ import java.util.*; | |||
| @Service | |||
| public class WxMsgServiceImpl implements WxMsgService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxMsgMapper wxMsgMapper; | |||
| @@ -7,12 +7,15 @@ import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxMsgSignature; | |||
| import com.iformall.mapper.WxMsgSignatureMapper; | |||
| import com.iformall.service.WxMsgSignatureService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxMsgSignatureServiceImpl implements WxMsgSignatureService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxMsgSignatureMapper wxMsgSignatureMapper; | |||
| @@ -16,6 +16,8 @@ import com.iformall.utils.AesUtil; | |||
| import com.iformall.utils.HMACSHA256; | |||
| import com.iformall.utils.HttpUtil; | |||
| import com.iformall.utils.RsaUtil; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @@ -23,6 +25,7 @@ import java.util.*; | |||
| @Service | |||
| public class WxMsgValidationcodeModelServiceImpl implements WxMsgValidationcodeModelService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxMsgValidationcodeModelMapper wxMsgValidationcodeModelMapper; | |||
| @@ -14,7 +14,8 @@ import com.iformall.utils.AesUtil; | |||
| import com.iformall.utils.HMACSHA256; | |||
| import com.iformall.utils.HttpUtil; | |||
| import com.iformall.utils.RsaUtil; | |||
| import org.apache.log4j.Logger; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @@ -24,9 +25,7 @@ import java.util.stream.Collectors; | |||
| @Service | |||
| public class WxMsgValidationcodeServiceImpl implements WxMsgValidationcodeService { | |||
| private Logger logger = Logger.getLogger(WxMsgValidationcodeServiceImpl.class); | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxMsgValidationcodeMapper wxMsgValidationcodeMapper; | |||
| @@ -14,7 +14,8 @@ import com.iformall.service.WxCUserService; | |||
| import com.iformall.service.WxOrderService; | |||
| import com.iformall.service.WxPayOrderService; | |||
| import com.iformall.utils.RedisLock; | |||
| import org.apache.log4j.Logger; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import org.springframework.transaction.annotation.Propagation; | |||
| @@ -27,7 +28,7 @@ import java.util.List; | |||
| @Service | |||
| public class WxOrderServiceImpl implements WxOrderService { | |||
| private Logger logger = Logger.getLogger(getClass()); | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| RedisLock redisLock; | |||
| @@ -6,12 +6,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxPark; | |||
| import com.iformall.mapper.WxParkMapper; | |||
| import com.iformall.service.WxParkService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxParkServiceImpl implements WxParkService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxParkMapper wxParkMapper; | |||
| @@ -5,12 +5,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxPayAccount; | |||
| import com.iformall.mapper.WxPayAccountMapper; | |||
| import com.iformall.service.WxPayAccountService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxPayAccountServiceImpl implements WxPayAccountService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxPayAccountMapper wxPayAccountMapper; | |||
| @@ -1,13 +1,11 @@ | |||
| package com.iformall.service.impl; | |||
| import java.text.ParseException; | |||
| import java.util.*; | |||
| import com.alibaba.fastjson.JSON; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.*; | |||
| @@ -17,19 +15,24 @@ import com.iformall.mapper.*; | |||
| import com.iformall.pay.*; | |||
| import com.iformall.service.WxOrderService; | |||
| import com.iformall.service.WxPayOrderService; | |||
| import com.iformall.utils.*; | |||
| import com.iformall.utils.BeanUtils; | |||
| import com.iformall.utils.MapUtil; | |||
| import com.iformall.utils.Utility; | |||
| import com.iformall.utils.XmlUtil; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.apache.log4j.Logger; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| import org.springframework.transaction.annotation.Propagation; | |||
| import org.springframework.transaction.annotation.Transactional; | |||
| import java.text.ParseException; | |||
| import java.util.*; | |||
| @Service | |||
| public class WxPayOrderServiceImpl implements WxPayOrderService { | |||
| private Logger logger = Logger.getLogger(getClass()); | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxAppinfoMapper wxAppinfoMapper; | |||
| @@ -148,7 +151,7 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { | |||
| record.setShare(isShare.getCode()); | |||
| if (isShare == EnumPayShare.YES) { | |||
| // 分账金额 | |||
| Double dChargeFee = Math.ceil(record.getPayAmount()*1.0D*payAccount.getRate()/1000); | |||
| Double dChargeFee = Math.ceil(record.getPayAmount() * 1.0D * payAccount.getRate() / 1000); | |||
| Integer share_amount = record.getPayAmount() - dChargeFee.intValue(); | |||
| record.setShareAmount(share_amount); | |||
| } | |||
| @@ -184,7 +187,7 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { | |||
| wxPayOrderP.setProduct_id(String.valueOf(order.getId())); // 订单ID | |||
| wxPayOrderP.setTime_start(Utility.getDataFormatStringYYYYMMDDHHmmss(currentDate)); | |||
| Date futureDate = new Date(); | |||
| futureDate.setTime(currentDate.getTime() + 15*60*1000); | |||
| futureDate.setTime(currentDate.getTime() + 15 * 60 * 1000); | |||
| wxPayOrderP.setTime_expire(Utility.getDataFormatStringYYYYMMDDHHmmss(futureDate)); // 15分钟后结束 | |||
| Map<String, String> payOrderMap = BeanUtils.toStringMap(wxPayOrderP); | |||
| wxPayOrderP.setSign(WxPayment.createSign(payOrderMap, payAccount.getApiKey())); | |||
| @@ -217,7 +220,7 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { | |||
| returnMap.put("nonceStr", noncestr); | |||
| returnMap.put("package", "prepay_id=" + prepay_id); | |||
| returnMap.put("paySign", signAgent); | |||
| logger.info("back to UI: " +returnMap.toString()); | |||
| logger.info("back to UI: " + returnMap.toString()); | |||
| return new ResultData(Result.SUCCESS, "创建支付订单成功", returnMap); | |||
| } else { | |||
| String errMsg = ""; | |||
| @@ -257,10 +260,10 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { | |||
| wxPayOrderSP.setProduct_id(String.valueOf(order.getId())); // 订单ID | |||
| wxPayOrderSP.setTime_start(Utility.getDataFormatStringYYYYMMDDHHmmss(currentDate)); | |||
| Date futureDate = new Date(); | |||
| futureDate.setTime(currentDate.getTime() + 15*60*1000); | |||
| futureDate.setTime(currentDate.getTime() + 15 * 60 * 1000); | |||
| wxPayOrderSP.setTime_expire(Utility.getDataFormatStringYYYYMMDDHHmmss(futureDate)); // 15分钟后结束 | |||
| wxPayOrderSP.setSign_type("HMAC-SHA256"); | |||
| if(isShare == EnumPayShare.YES) { | |||
| if (isShare == EnumPayShare.YES) { | |||
| wxPayOrderSP.setProfit_sharing("Y"); | |||
| } | |||
| Map<String, String> payOrderMap = BeanUtils.toStringMap(wxPayOrderSP); | |||
| @@ -296,7 +299,7 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { | |||
| returnMap.put("package", "prepay_id=" + prepay_id); | |||
| returnMap.put("paySign", signAgent); | |||
| returnMap.put("signType", "HMAC-SHA256"); | |||
| logger.info("back to UI: " +returnMap.toString()); | |||
| logger.info("back to UI: " + returnMap.toString()); | |||
| return new ResultData(Result.SUCCESS, "创建支付订单成功", returnMap); | |||
| } else { | |||
| String errMsg = ""; | |||
| @@ -333,7 +336,7 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { | |||
| wxPayOrderP.setProduct_id(String.valueOf(order.getId())); // 订单ID | |||
| wxPayOrderP.setTime_start(Utility.getDataFormatStringYYYYMMDDHHmmss(currentDate)); | |||
| Date futureDate = new Date(); | |||
| futureDate.setTime(currentDate.getTime() + 15*60*1000); | |||
| futureDate.setTime(currentDate.getTime() + 15 * 60 * 1000); | |||
| wxPayOrderP.setTime_expire(Utility.getDataFormatStringYYYYMMDDHHmmss(futureDate)); // 15分钟后结束 | |||
| wxPayOrderP.setSign(WxPayment.createSign(BeanUtils.toStringMap(wxPayOrderP), payAccount.getApiKey())); | |||
| Map<String, String> returnMap = BeanUtils.toStringMap(wxPayOrderP); | |||
| @@ -347,9 +350,9 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { | |||
| } | |||
| // TODO | |||
| /** | |||
| * 微信订单查询 | |||
| * | |||
| */ | |||
| @Override | |||
| public ResultData payOrderQuery(WxAppinfo appInfo, WxPayOrder record) { | |||
| @@ -414,7 +417,7 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { | |||
| } | |||
| } catch (RuntimeException e) { | |||
| throw new MallinkException(ErrorCode.PAY_ORDER_ERROR.getCode(), e.getMessage()); | |||
| } catch (Exception e){ | |||
| } catch (Exception e) { | |||
| throw new MallinkException(ErrorCode.PAY_ORDER_ERROR.getCode(), e.getMessage()); | |||
| } | |||
| } else { | |||
| @@ -480,7 +483,7 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { | |||
| } | |||
| } catch (RuntimeException e) { | |||
| throw new MallinkException(ErrorCode.PAY_ORDER_ERROR.getCode(), e.getMessage()); | |||
| } catch (Exception e){ | |||
| } catch (Exception e) { | |||
| throw new MallinkException(ErrorCode.PAY_ORDER_ERROR.getCode(), e.getMessage()); | |||
| } | |||
| } | |||
| @@ -829,7 +832,7 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { | |||
| payOrderQ.setTenantId(order.getTenantId()); | |||
| payOrderQ.setPayOrderStatus(EnumPayStatus.PAY_WAY_WAIT.getCode()); | |||
| List<WxPayOrder> payOrders = wxPayOrderMapper.select(payOrderQ); | |||
| for(WxPayOrder payOrder: payOrders) { | |||
| for (WxPayOrder payOrder : payOrders) { | |||
| payOrderClose(appInfo, payOrder); | |||
| } | |||
| } | |||
| @@ -910,10 +913,10 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { | |||
| wxPayOrderMapper.deleteByPrimaryKey(id); | |||
| } | |||
| public static void main(String [] args) { | |||
| public static void main(String[] args) { | |||
| Integer v = 50; | |||
| Integer rate = 6; | |||
| Double dChargeFee = Math.ceil(v*1.0D*6/1000); | |||
| Double dChargeFee = Math.ceil(v * 1.0D * 6 / 1000); | |||
| Integer share_amount = v - dChargeFee.intValue(); | |||
| System.out.println("share value " + share_amount); | |||
| } | |||
| @@ -20,7 +20,8 @@ import com.iformall.pay.WxProfitSharingQueryP; | |||
| import com.iformall.service.WxProfitSharingOrderService; | |||
| import com.iformall.utils.BeanUtils; | |||
| import com.iformall.utils.Utility; | |||
| import org.apache.log4j.Logger; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @@ -30,7 +31,7 @@ import org.springframework.transaction.annotation.Transactional; | |||
| @Service | |||
| public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderService { | |||
| private Logger logger = Logger.getLogger(getClass()); | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxProfitSharingOrderMapper wxProfitSharingOrderMapper; | |||
| @@ -1,18 +1,20 @@ | |||
| package com.iformall.service.impl; | |||
| import java.util.*; | |||
| import com.alibaba.fastjson.JSON; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.WxAppinfo; | |||
| import com.iformall.domain.po.WxMerchant; | |||
| import com.iformall.domain.po.WxPayAccount; | |||
| import com.iformall.domain.po.WxProfitSharingReceiver; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.enums.EnumAppType; | |||
| import com.iformall.enums.EnumProfitSharingReceiverStatus; | |||
| import com.iformall.enums.EnumProfitSharingReceiverType; | |||
| import com.iformall.enums.EnumProfitSharingType; | |||
| import com.iformall.mapper.WxAppinfoMapper; | |||
| import com.iformall.mapper.WxPayAccountMapper; | |||
| import com.iformall.mapper.WxProfitSharingReceiverMapper; | |||
| @@ -22,17 +24,18 @@ import com.iformall.pay.WxProfitSharingReceiverP; | |||
| import com.iformall.service.WxProfitSharingReceiverService; | |||
| import com.iformall.utils.BeanUtils; | |||
| import com.iformall.utils.Utility; | |||
| import org.apache.log4j.Logger; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| import java.util.Date; | |||
| import java.util.Map; | |||
| @Service | |||
| public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiverService { | |||
| private Logger logger = Logger.getLogger(WxCouponOrderServiceImpl.class); | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| final JSONObject errorMap = JSON.parseObject("{" + | |||
| "\"SYSTEMERROR\":{\"detail\":\"接口返回错误\",\"reason\":\"系统超时\",\"resolution\":\"系统异常,请用相同参数重新调用\"}," + | |||
| @@ -44,7 +47,6 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv | |||
| "\"USER_NOTEXIST\":{\"detail\":\"分账接受方不存在\",\"reason\":\"分账接受方不存在\",\"resolution\":\"请确认分账接收方类型或者账号无误后重试\"}}"); | |||
| @Autowired | |||
| WxProfitSharingReceiverMapper wxProfitSharingReceiverMapper; | |||
| @Autowired | |||
| @@ -67,7 +69,7 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv | |||
| if (record.getId() == null) { | |||
| //record.setId(UUID.randomUUID().toString().replaceAll("-", "")); | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| record.setId(idWorker.nextId()); | |||
| record.setId(idWorker.nextId()); | |||
| wxProfitSharingReceiverMapper.insertSelective(record); | |||
| } else { | |||
| wxProfitSharingReceiverMapper.updateByPrimaryKeySelective(record); | |||
| @@ -125,16 +127,16 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv | |||
| JSONObject receiverJSON = new JSONObject(); | |||
| receiverJSON.put("type",EnumProfitSharingReceiverType.getEnum(receiver.getReceiverType()).getMessage()); | |||
| receiverJSON.put("account",receiver.getReceiverAccount()); | |||
| receiverJSON.put("name",receiver.getTrueName()); | |||
| receiverJSON.put("type", EnumProfitSharingReceiverType.getEnum(receiver.getReceiverType()).getMessage()); | |||
| receiverJSON.put("account", receiver.getReceiverAccount()); | |||
| receiverJSON.put("name", receiver.getTrueName()); | |||
| wxProfitSharingReceiverP.setReceiver(receiverJSON.toJSONString()); | |||
| String response; | |||
| try { | |||
| wxProfitSharingReceiverP.setSign(WxPayment.createSignHMAC(BeanUtils.toStringMap(wxProfitSharingReceiverP), payAccount.getApiKey())); | |||
| response = WxProfitSharing.addReceiver(BeanUtils.toStringMap(wxProfitSharingReceiverP)); | |||
| }catch (Exception e) { | |||
| } catch (Exception e) { | |||
| logger.error(ErrorCode.PROFIT_SHARING_RECEIVER_ADD_FAILED.getMessage() + e.getMessage()); | |||
| return new ResultData(ErrorCode.PROFIT_SHARING_RECEIVER_ADD_FAILED, e.getMessage()); | |||
| } | |||
| @@ -151,7 +153,7 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv | |||
| return new ResultData(ErrorCode.PROFIT_SHARING_RECEIVER_ADD_FAILED.getCode(), returnMap.get("err_code_des")); | |||
| } | |||
| if (!WxPayment.verifyNotifyHMAC(returnMap,payAccount.getApiKey())){ | |||
| if (!WxPayment.verifyNotifyHMAC(returnMap, payAccount.getApiKey())) { | |||
| logger.error(ErrorCode.PROFIT_SHARING_RECEIVER_ADD_FAILED.getMessage() + "verifyNotifyHMAC"); | |||
| return new ResultData(ErrorCode.PROFIT_SHARING_RECEIVER_ADD_FAILED.getCode(), ErrorCode.PROFIT_SHARING_RECEIVER_ADD_FAILED.getMessage()); | |||
| } | |||
| @@ -191,15 +193,15 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv | |||
| wxProfitSharingReceiverP.setSign_type("HMAC-SHA256"); | |||
| JSONObject receiverJSON = new JSONObject(); | |||
| receiverJSON.put("type",EnumProfitSharingReceiverType.getEnum(receiver.getReceiverType()).getMessage()); | |||
| receiverJSON.put("account",receiver.getReceiverAccount()); | |||
| receiverJSON.put("type", EnumProfitSharingReceiverType.getEnum(receiver.getReceiverType()).getMessage()); | |||
| receiverJSON.put("account", receiver.getReceiverAccount()); | |||
| wxProfitSharingReceiverP.setReceiver(receiverJSON.toJSONString()); | |||
| String response; | |||
| try { | |||
| wxProfitSharingReceiverP.setSign(WxPayment.createSignHMAC(BeanUtils.toStringMap(wxProfitSharingReceiverP), payAccount.getApiKey())); | |||
| response = WxProfitSharing.delReceiver(BeanUtils.toStringMap(wxProfitSharingReceiverP)); | |||
| }catch (Exception e) { | |||
| } catch (Exception e) { | |||
| logger.error(ErrorCode.PROFIT_SHARING_RECEIVER_DEL_FAILED.getMessage() + e.getMessage()); | |||
| return new ResultData(ErrorCode.PROFIT_SHARING_RECEIVER_DEL_FAILED, e.getMessage()); | |||
| } | |||
| @@ -222,7 +224,7 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv | |||
| return new ResultData(ErrorCode.PROFIT_SHARING_RECEIVER_DEL_FAILED.getCode(), returnMap.get("result_msg")); | |||
| } | |||
| if (!WxPayment.verifyNotifyHMAC(returnMap,payAccount.getApiKey())){ | |||
| if (!WxPayment.verifyNotifyHMAC(returnMap, payAccount.getApiKey())) { | |||
| logger.error(ErrorCode.PROFIT_SHARING_RECEIVER_DEL_FAILED.getMessage()); | |||
| return new ResultData(ErrorCode.PROFIT_SHARING_RECEIVER_DEL_FAILED.getCode(), "verifyNotifyHMAC"); | |||
| } | |||
| @@ -5,12 +5,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxProfitSharingResult; | |||
| import com.iformall.mapper.WxProfitSharingResultMapper; | |||
| import com.iformall.service.WxProfitSharingResultService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxProfitSharingResultServiceImpl implements WxProfitSharingResultService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxProfitSharingResultMapper wxProfitSharingResultMapper; | |||
| @@ -1,12 +1,11 @@ | |||
| package com.iformall.service.impl; | |||
| import java.util.*; | |||
| import com.alibaba.fastjson.JSON; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| import com.github.pagehelper.PageHelper; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.IdWorker; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.*; | |||
| @@ -24,24 +23,26 @@ import com.iformall.utils.CipherUtil; | |||
| import com.iformall.utils.Utility; | |||
| import com.iformall.utils.XmlUtil; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.apache.log4j.Logger; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| import org.springframework.transaction.annotation.Propagation; | |||
| import org.springframework.transaction.annotation.Transactional; | |||
| import java.util.*; | |||
| @Service | |||
| public class WxRefundOrderServiceImpl implements WxRefundOrderService { | |||
| private Logger logger = Logger.getLogger(getClass()); | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxAppinfoMapper wxAppinfoMapper; | |||
| @Autowired | |||
| @Autowired | |||
| WxRefundOrderMapper wxRefundOrderMapper; | |||
| @Autowired | |||
| @Autowired | |||
| WxOrderMapper wxOrderMapper; | |||
| @Autowired | |||
| @@ -232,8 +233,8 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { | |||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | |||
| public ResultData createRefundOrder(boolean isReal, WxAppinfo appInfo, Long couponOrderId, EnumRefundWay refundWay, Long bUserId) { | |||
| WxCouponOrder wxCouponOrder = wxCouponOrderMapper.selectByPrimaryKey(couponOrderId); | |||
| if(wxCouponOrder == null){ | |||
| logger.error("券ID不存在:"+ couponOrderId); | |||
| if (wxCouponOrder == null) { | |||
| logger.error("券ID不存在:" + couponOrderId); | |||
| throw new MallinkException(ErrorCode.COUPON_ORDER_IS_NULL); | |||
| } | |||
| @@ -241,8 +242,8 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { | |||
| if (refundWay == EnumRefundWay.B) { | |||
| logger.info("B端发起退款: bUserId-" + bUserId); | |||
| if (bUserId == null || bUserId ==0 ) { | |||
| logger.error("B端用户不存在:"+ bUserId); | |||
| if (bUserId == null || bUserId == 0) { | |||
| logger.error("B端用户不存在:" + bUserId); | |||
| throw new MallinkException(ErrorCode.USER_IS_EMPTY); | |||
| } | |||
| // B端用户退款检查一下商户 | |||
| @@ -375,7 +376,7 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { | |||
| // 退款订单 | |||
| try { | |||
| int sqlRow = wxRefundOrderMapper.insertSelective(record); | |||
| if(sqlRow != 1) { | |||
| if (sqlRow != 1) { | |||
| logger.error("退款订单数据库插入出错: " + record.toString()); | |||
| throw new MallinkException(ErrorCode.DB_FAIL); | |||
| } | |||
| @@ -610,6 +611,7 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { | |||
| /** | |||
| * 微信退款查询 | |||
| * | |||
| * @param appInfo | |||
| * @param record | |||
| */ | |||
| @@ -660,8 +662,9 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { | |||
| /** | |||
| * 微信退款结果通知 | |||
| * @param paramMap 异步通知参数 | |||
| * @param payWay 支付方式 | |||
| * | |||
| * @param paramMap 异步通知参数 | |||
| * @param payWay 支付方式 | |||
| * @return | |||
| */ | |||
| @Override | |||
| @@ -675,23 +678,23 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { | |||
| // 普通商户号 | |||
| WxAppinfo appinfo = wxAppinfoMapper.findByAppId(appId); | |||
| if (appinfo == null) { | |||
| logger.error("未找到appid信息:"+appId); | |||
| logger.error("未找到appid信息:" + appId); | |||
| throw new MallinkException(ErrorCode.APP_ID_NOT_FOUND); | |||
| } | |||
| WxPayAccount payAccount = wxPayAccountMapper.selectByPrimaryKey(appinfo.getPayId()); | |||
| if (payAccount == null) { | |||
| logger.error("未找到mch_id信息:"+mchId); | |||
| logger.error("未找到mch_id信息:" + mchId); | |||
| throw new MallinkException(ErrorCode.MCH_INFO_NOT_FOUND); | |||
| } | |||
| if (!mchId.equalsIgnoreCase(payAccount.getMchId())) { | |||
| logger.error("mch_id不对应:"+mchId + ",account:" + payAccount.getMchId()); | |||
| logger.error("mch_id不对应:" + mchId + ",account:" + payAccount.getMchId()); | |||
| throw new MallinkException(ErrorCode.MCH_INFO_NOT_EQUAL); | |||
| } | |||
| String partnerKey = payAccount.getApiKey(); | |||
| try { | |||
| if (payWay == EnumPayWay.PAY_WAY_WEAPP) { | |||
| if (!"SUCCESS".equals(paramMap.get("return_code"))) { | |||
| logger.warn("notify refund, wxpay status not success, paramMap: "+paramMap.toString()+ ", payWay:" + payWay.toString()); | |||
| logger.warn("notify refund, wxpay status not success, paramMap: " + paramMap.toString() + ", payWay:" + payWay.toString()); | |||
| SortedMap resultMap = new TreeMap(); | |||
| resultMap.put("return_code", "FAIL"); | |||
| resultMap.put("return_msg", "订单状态码非SUCCESS"); | |||
| @@ -706,15 +709,15 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { | |||
| Long payOrderId = Long.valueOf(payOrderNo); | |||
| WxPayOrder payOrder = wxPayOrderMapper.selectByPrimaryKey(payOrderId); | |||
| if (payOrder == null) { | |||
| logger.warn("notify refund, wxpay check pay order not exists, paramMap: "+paramMap.toString()+ ", payWay:" + payWay.toString()); | |||
| logger.warn("notify refund, wxpay check pay order not exists, paramMap: " + paramMap.toString() + ", payWay:" + payWay.toString()); | |||
| SortedMap resultMap = new TreeMap(); | |||
| resultMap.put("return_code", "FAIL"); | |||
| resultMap.put("return_msg", "支付订单不存在"); | |||
| return XmlUtil.getRequestXml(resultMap); | |||
| } | |||
| // 验证支付金额 | |||
| if(!reqMap.get("total_fee").equals(payOrder.getPayAmount().toString())) { | |||
| logger.warn("notify refund, wxpay check total_fee is invalid, paramMap: "+paramMap.toString()+ ", payWay:" + payWay.toString()); | |||
| if (!reqMap.get("total_fee").equals(payOrder.getPayAmount().toString())) { | |||
| logger.warn("notify refund, wxpay check total_fee is invalid, paramMap: " + paramMap.toString() + ", payWay:" + payWay.toString()); | |||
| SortedMap resultMap = new TreeMap(); | |||
| resultMap.put("return_code", "FAIL"); | |||
| resultMap.put("return_msg", "支付订单总金额不一致"); | |||
| @@ -724,23 +727,23 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { | |||
| Long refundOrderId = Long.valueOf(refundIdStr); | |||
| WxRefundOrder refundOrder = wxRefundOrderMapper.selectByPrimaryKey(refundOrderId); | |||
| if (refundOrder == null) { | |||
| logger.warn("notify refund, wxpay check pay order not exists, paramMap: "+paramMap.toString()+ ", payWay:" + payWay.toString()); | |||
| logger.warn("notify refund, wxpay check pay order not exists, paramMap: " + paramMap.toString() + ", payWay:" + payWay.toString()); | |||
| SortedMap resultMap = new TreeMap(); | |||
| resultMap.put("return_code", "FAIL"); | |||
| resultMap.put("return_msg", "退款订单不存在"); | |||
| return XmlUtil.getRequestXml(resultMap); | |||
| } | |||
| // 验证支付金额 | |||
| if(!reqMap.get("total_fee").equals(refundOrder.getTotalFee().toString())) { | |||
| logger.warn("notify refund, wxpay check total_fee is invalid, paramMap: "+paramMap.toString()+ ", payWay:" + payWay.toString()); | |||
| if (!reqMap.get("total_fee").equals(refundOrder.getTotalFee().toString())) { | |||
| logger.warn("notify refund, wxpay check total_fee is invalid, paramMap: " + paramMap.toString() + ", payWay:" + payWay.toString()); | |||
| SortedMap resultMap = new TreeMap(); | |||
| resultMap.put("return_code", "FAIL"); | |||
| resultMap.put("return_msg", "订单总金额不一致"); | |||
| return XmlUtil.getRequestXml(resultMap); | |||
| } | |||
| // 验证退款金额 | |||
| if(!reqMap.get("refund_fee").equals(refundOrder.getRefundFee().toString())) { | |||
| logger.warn("notify refund, wxpay check refund_fee is invalid, paramMap: "+paramMap.toString()+ ", payWay:" + payWay.toString()); | |||
| if (!reqMap.get("refund_fee").equals(refundOrder.getRefundFee().toString())) { | |||
| logger.warn("notify refund, wxpay check refund_fee is invalid, paramMap: " + paramMap.toString() + ", payWay:" + payWay.toString()); | |||
| SortedMap resultMap = new TreeMap(); | |||
| resultMap.put("return_code", "FAIL"); | |||
| resultMap.put("return_msg", "退款总金额不一致"); | |||
| @@ -749,40 +752,40 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { | |||
| // 处理支付成功 | |||
| handleRefundSuccess(refundOrder, reqMap.get("transaction_id"), reqMap.get("refund_id")); | |||
| logger.info("notify refund, wxpay checksign success, paramMap:{}, paramMap: "+paramMap.toString()+ ", payWay:" + payWay.toString()); | |||
| logger.info("notify refund, wxpay checksign success, paramMap:{}, paramMap: " + paramMap.toString() + ", payWay:" + payWay.toString()); | |||
| SortedMap resultMap = new TreeMap(); | |||
| resultMap.put("return_code", "SUCCESS"); | |||
| resultMap.put("return_msg", "OK"); | |||
| return XmlUtil.getRequestXml(resultMap); | |||
| } | |||
| } catch (RuntimeException e) { | |||
| logger.warn("notify refund paramMap: "+paramMap.toString()+ ", payWay:" + payWay.toString() + ", e:" + e.getMessage()); | |||
| logger.warn("notify refund paramMap: " + paramMap.toString() + ", payWay:" + payWay.toString() + ", e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.REFUND_ORDER_ERROR.getCode(), e.getMessage()); | |||
| } catch (Exception e) { | |||
| logger.warn("notify refund, paramMap: "+paramMap.toString()+ ", payWay:" + payWay.toString() + ", e:" + e.getMessage()); | |||
| logger.warn("notify refund, paramMap: " + paramMap.toString() + ", payWay:" + payWay.toString() + ", e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.REFUND_ORDER_ERROR.getCode(), e.getMessage()); | |||
| } | |||
| } else { | |||
| // 服务号回调 | |||
| WxAppinfo appinfo = wxAppinfoMapper.findByAppId(subAppId); | |||
| if (appinfo == null) { | |||
| logger.error("未找到appid信息:"+appId); | |||
| logger.error("未找到appid信息:" + appId); | |||
| throw new MallinkException(ErrorCode.APP_ID_NOT_FOUND); | |||
| } | |||
| WxPayAccount payAccount = wxPayAccountMapper.selectByPrimaryKey(appinfo.getPayId()); | |||
| if (payAccount == null) { | |||
| logger.error("未找到mch_id信息:"+mchId); | |||
| logger.error("未找到mch_id信息:" + mchId); | |||
| throw new MallinkException(ErrorCode.MCH_INFO_NOT_FOUND); | |||
| } | |||
| if (!mchId.equalsIgnoreCase(payAccount.getMchId())) { | |||
| logger.error("mch_id不对应:"+mchId + ",account:" + payAccount.getMchId()); | |||
| logger.error("mch_id不对应:" + mchId + ",account:" + payAccount.getMchId()); | |||
| throw new MallinkException(ErrorCode.MCH_INFO_NOT_EQUAL); | |||
| } | |||
| String partnerKey = payAccount.getApiKey(); | |||
| try { | |||
| if (payWay == EnumPayWay.PAY_WAY_WEAPP) { | |||
| if (!"SUCCESS".equals(paramMap.get("return_code"))) { | |||
| logger.warn("notify order, wxpay status not success, paramMap: "+paramMap.toString()+ ", payWay:" + payWay.toString()); | |||
| logger.warn("notify order, wxpay status not success, paramMap: " + paramMap.toString() + ", payWay:" + payWay.toString()); | |||
| SortedMap resultMap = new TreeMap(); | |||
| resultMap.put("return_code", "FAIL"); | |||
| resultMap.put("return_msg", "订单状态码非SUCCESS"); | |||
| @@ -804,15 +807,15 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { | |||
| Long payOrderId = Long.valueOf(payOrderNo); | |||
| WxPayOrder payOrder = wxPayOrderMapper.selectByPrimaryKey(payOrderId); | |||
| if (payOrder == null) { | |||
| logger.warn("notify refund, wxpay check pay order not exists, paramMap: "+paramMap.toString()+ ", payWay:" + payWay.toString()); | |||
| logger.warn("notify refund, wxpay check pay order not exists, paramMap: " + paramMap.toString() + ", payWay:" + payWay.toString()); | |||
| SortedMap resultMap = new TreeMap(); | |||
| resultMap.put("return_code", "FAIL"); | |||
| resultMap.put("return_msg", "支付订单不存在"); | |||
| return XmlUtil.getRequestXml(resultMap); | |||
| } | |||
| // 验证支付金额 | |||
| if(!reqMap.get("total_fee").equals(payOrder.getPayAmount().toString())) { | |||
| logger.warn("notify refund, wxpay check total_fee is invalid, paramMap: "+paramMap.toString()+ ", payWay:" + payWay.toString()); | |||
| if (!reqMap.get("total_fee").equals(payOrder.getPayAmount().toString())) { | |||
| logger.warn("notify refund, wxpay check total_fee is invalid, paramMap: " + paramMap.toString() + ", payWay:" + payWay.toString()); | |||
| SortedMap resultMap = new TreeMap(); | |||
| resultMap.put("return_code", "FAIL"); | |||
| resultMap.put("return_msg", "支付订单总金额不一致"); | |||
| @@ -822,23 +825,23 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { | |||
| Long refundOrderId = Long.valueOf(refundIdStr); | |||
| WxRefundOrder refundOrder = wxRefundOrderMapper.selectByPrimaryKey(refundOrderId); | |||
| if (refundOrder == null) { | |||
| logger.warn("notify refund, wxpay check pay order not exists, paramMap: "+paramMap.toString()+ ", payWay:" + payWay.toString()); | |||
| logger.warn("notify refund, wxpay check pay order not exists, paramMap: " + paramMap.toString() + ", payWay:" + payWay.toString()); | |||
| SortedMap resultMap = new TreeMap(); | |||
| resultMap.put("return_code", "FAIL"); | |||
| resultMap.put("return_msg", "退款订单不存在"); | |||
| return XmlUtil.getRequestXml(resultMap); | |||
| } | |||
| // 验证支付金额 | |||
| if(!reqMap.get("total_fee").equals(refundOrder.getTotalFee().toString())) { | |||
| logger.warn("notify refund, wxpay check total_fee is invalid, paramMap: "+paramMap.toString()+ ", payWay:" + payWay.toString()); | |||
| if (!reqMap.get("total_fee").equals(refundOrder.getTotalFee().toString())) { | |||
| logger.warn("notify refund, wxpay check total_fee is invalid, paramMap: " + paramMap.toString() + ", payWay:" + payWay.toString()); | |||
| SortedMap resultMap = new TreeMap(); | |||
| resultMap.put("return_code", "FAIL"); | |||
| resultMap.put("return_msg", "订单总金额不一致"); | |||
| return XmlUtil.getRequestXml(resultMap); | |||
| } | |||
| // 验证退款金额 | |||
| if(!reqMap.get("refund_fee").equals(refundOrder.getRefundFee().toString())) { | |||
| logger.warn("notify refund, wxpay check refund_fee is invalid, paramMap: "+paramMap.toString()+ ", payWay:" + payWay.toString()); | |||
| if (!reqMap.get("refund_fee").equals(refundOrder.getRefundFee().toString())) { | |||
| logger.warn("notify refund, wxpay check refund_fee is invalid, paramMap: " + paramMap.toString() + ", payWay:" + payWay.toString()); | |||
| SortedMap resultMap = new TreeMap(); | |||
| resultMap.put("return_code", "FAIL"); | |||
| resultMap.put("return_msg", "退款总金额不一致"); | |||
| @@ -847,17 +850,17 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { | |||
| // 处理支付成功 | |||
| handleRefundSuccess(refundOrder, reqMap.get("transaction_id"), reqMap.get("refund_id")); | |||
| logger.info("notify refund, wxpay checksign success, paramMap:{}, paramMap: "+reqMap.toString()+ ", payWay:" + payWay.toString()); | |||
| logger.info("notify refund, wxpay checksign success, paramMap:{}, paramMap: " + reqMap.toString() + ", payWay:" + payWay.toString()); | |||
| SortedMap resultMap = new TreeMap(); | |||
| resultMap.put("return_code", "SUCCESS"); | |||
| resultMap.put("return_msg", "OK"); | |||
| return XmlUtil.getRequestXml(resultMap); | |||
| } | |||
| } catch (RuntimeException e) { | |||
| logger.warn("notify refund, wepay checksign error, paramMap: "+paramMap.toString()+ ", payWay:" + payWay.toString() + ", e:" + e.getMessage()); | |||
| logger.warn("notify refund, wepay checksign error, paramMap: " + paramMap.toString() + ", payWay:" + payWay.toString() + ", e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.REFUND_ORDER_ERROR); | |||
| } catch (Exception e) { | |||
| logger.warn("notify refund, paramMap: "+paramMap.toString()+ ", payWay:" + payWay.toString() + ", e:" + e.getMessage()); | |||
| logger.warn("notify refund, paramMap: " + paramMap.toString() + ", payWay:" + payWay.toString() + ", e:" + e.getMessage()); | |||
| throw new MallinkException(ErrorCode.REFUND_ORDER_ERROR.getCode(), e.getMessage()); | |||
| } | |||
| } | |||
| @@ -886,7 +889,7 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { | |||
| WxOrder order = wxOrderMapper.selectByPrimaryKey(refundOrder.getOrderId()); | |||
| if (order == null) { | |||
| logger.error("pay success handle, order " + refundOrder.getOrderId() +" not found , refundId : " + refundOrder.getId()); | |||
| logger.error("pay success handle, order " + refundOrder.getOrderId() + " not found , refundId : " + refundOrder.getId()); | |||
| throw new MallinkException(ErrorCode.ORDER_IS_NOT_FIND); | |||
| } | |||
| @@ -946,7 +949,7 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { | |||
| if (record.getId() == null) { | |||
| //record.setId(UUID.randomUUID().toString().replaceAll("-", "")); | |||
| final IdWorker idWorker = IdWorker.get(); | |||
| record.setId(idWorker.nextId()); | |||
| record.setId(idWorker.nextId()); | |||
| wxRefundOrderMapper.insertSelective(record); | |||
| } else { | |||
| wxRefundOrderMapper.updateByPrimaryKeySelective(record); | |||
| @@ -6,11 +6,14 @@ import com.iformall.common.IdWorker; | |||
| import com.iformall.domain.po.WxRentContract; | |||
| import com.iformall.mapper.WxRentContractMapper; | |||
| import com.iformall.service.WxRentContractService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @Service | |||
| public class WxRentContractServiceImpl implements WxRentContractService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxRentContractMapper wxRentContractMapper; | |||
| @@ -5,12 +5,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxScoreHistory; | |||
| import com.iformall.mapper.WxScoreHistoryMapper; | |||
| import com.iformall.service.WxScoreHistoryService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxScoreHistoryServiceImpl implements WxScoreHistoryService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxScoreHistoryMapper wxScoreHistoryMapper; | |||
| @@ -10,12 +10,15 @@ import com.iformall.mapper.WxScoreRulesMapper; | |||
| import com.iformall.service.WxCUserBasicInfoService; | |||
| import com.iformall.service.WxCUserService; | |||
| import com.iformall.service.WxScoreRulesService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxScoreRulesServiceImpl implements WxScoreRulesService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxScoreRulesMapper wxScoreRulesMapper; | |||
| @@ -5,12 +5,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxScoreValidityPeriod; | |||
| import com.iformall.mapper.WxScoreValidityPeriodMapper; | |||
| import com.iformall.service.WxScoreValidityPeriodService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxScoreValidityPeriodServiceImpl implements WxScoreValidityPeriodService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxScoreValidityPeriodMapper wxScoreValidityPeriodMapper; | |||
| @@ -10,12 +10,15 @@ import com.iformall.domain.po.WxShop; | |||
| import com.iformall.enums.EnumShopStatus; | |||
| import com.iformall.mapper.WxShopMapper; | |||
| import com.iformall.service.WxShopService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxShopServiceImpl implements WxShopService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxShopMapper wxShopMapper; | |||
| @@ -6,12 +6,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxTags; | |||
| import com.iformall.mapper.WxTagsMapper; | |||
| import com.iformall.service.WxTagsService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxTagsServiceImpl implements WxTagsService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxTagsMapper wxTagsMapper; | |||
| @@ -5,12 +5,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxTemplateMsg; | |||
| import com.iformall.mapper.WxTemplateMsgMapper; | |||
| import com.iformall.service.WxTemplateMsgService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxTemplateMsgServiceImpl implements WxTemplateMsgService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxTemplateMsgMapper wxTemplateMsgMapper; | |||
| @@ -6,12 +6,15 @@ import com.github.pagehelper.PageInfo; | |||
| import com.iformall.domain.po.WxUserChannel; | |||
| import com.iformall.mapper.WxUserChannelMapper; | |||
| import com.iformall.service.WxUserChannelService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxUserChannelServiceImpl implements WxUserChannelService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxUserChannelMapper wxUserChannelMapper; | |||
| @@ -5,6 +5,8 @@ import com.iformall.domain.po.WxCouponOrder; | |||
| import com.iformall.mapper.WxCouponMapper; | |||
| import com.iformall.mapper.WxCouponOrderMapper; | |||
| import com.iformall.service.WxUserCouponService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| @@ -18,6 +20,7 @@ import java.util.stream.Collectors; | |||
| */ | |||
| @Service | |||
| public class WxUserCouponServiceImpl implements WxUserCouponService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| private WxCouponOrderMapper wxCouponOrderMapper; | |||
| @@ -7,12 +7,15 @@ import com.iformall.domain.po.WxUserVisit; | |||
| import com.iformall.domain.vo.TouchUsersReportVo; | |||
| import com.iformall.mapper.WxUserVisitMapper; | |||
| import com.iformall.service.WxUserVisitService; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import com.iformall.common.IdWorker; | |||
| @Service | |||
| public class WxUserVisitServiceImpl implements WxUserVisitService { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| WxUserVisitMapper wxUserVisitMapper; | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.utils; | |||
| import org.apache.log4j.Logger; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.data.redis.core.StringRedisTemplate; | |||
| import org.springframework.stereotype.Component; | |||
| @@ -14,7 +15,7 @@ import org.springframework.util.StringUtils; | |||
| */ | |||
| @Component | |||
| public class RedisLock { | |||
| private org.apache.log4j.Logger logger = Logger.getLogger(getClass()); | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| private StringRedisTemplate stringRedisTemplate; | |||