| @@ -338,7 +338,6 @@ public class WxCUserBasicInfoController extends BaseController { | |||||
| basicInfo.undateFinalTenantId(ifParentUpdateTenantInfo()); | basicInfo.undateFinalTenantId(ifParentUpdateTenantInfo()); | ||||
| wxCUserBasicInfoService.exportData(ifParentUpdateTenantInfo(),basicInfo, request, response); | wxCUserBasicInfoService.exportData(ifParentUpdateTenantInfo(),basicInfo, request, response); | ||||
| } | } | ||||
| @RequestMapping("/exportTemplate") | @RequestMapping("/exportTemplate") | ||||
| @@ -4,7 +4,7 @@ spring: | |||||
| include: rabbitMQ | include: rabbitMQ | ||||
| # JDBC | # JDBC | ||||
| datasource: | datasource: | ||||
| url: jdbc:mysql://202.165.179.86:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true&allowMultiQueries=true | |||||
| url: jdbc:mysql://101.200.130.134:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true&allowMultiQueries=true | |||||
| username: root | username: root | ||||
| password: fm2020test | password: fm2020test | ||||
| type: com.alibaba.druid.pool.DruidDataSource | type: com.alibaba.druid.pool.DruidDataSource | ||||
| @@ -27,7 +27,7 @@ spring: | |||||
| #date-format: yyyy-MM-dd HH:mm:ss | #date-format: yyyy-MM-dd HH:mm:ss | ||||
| # REDIS | # REDIS | ||||
| redis: | redis: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 6379 | port: 6379 | ||||
| password: iF0rm@2l2ol9 | password: iF0rm@2l2ol9 | ||||
| timeout: 3600 | timeout: 3600 | ||||
| @@ -87,10 +87,10 @@ spring: | |||||
| retry-times-when-send-failed: 2 | retry-times-when-send-failed: 2 | ||||
| # RABBITMQ | # RABBITMQ | ||||
| rabbitmq: | rabbitmq: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 5672 | port: 5672 | ||||
| username: fumao | username: fumao | ||||
| password: f9l98&*%%u7flt33 | |||||
| password: f9l98 | |||||
| publisher-confirms: true | publisher-confirms: true | ||||
| publisher-returns: false | publisher-returns: false | ||||
| virtual-host: / | virtual-host: / | ||||
| @@ -144,7 +144,7 @@ wechat: | |||||
| componentToken: formall2018 | componentToken: formall2018 | ||||
| componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN | componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN | ||||
| redis: | redis: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 6379 | port: 6379 | ||||
| password: iF0rm@2l2ol9 | password: iF0rm@2l2ol9 | ||||
| timeout: 3600 | timeout: 3600 | ||||
| @@ -76,10 +76,11 @@ public class BaseController { | |||||
| } | } | ||||
| public WxMerchantBUser getUser() { | public WxMerchantBUser getUser() { | ||||
| Long userId = getBuser().getUserId(); | |||||
| WxBuser buser = getBuser(); | |||||
| Long userId = buser.getUserId(); | |||||
| WxMerchantBUser user = wxMerchantBUserService.getById(userId); | WxMerchantBUser user = wxMerchantBUserService.getById(userId); | ||||
| if (user == null) { | if (user == null) { | ||||
| throw new MallinkException(ErrorCode.USER_IS_EMPTY); | |||||
| throw new MallinkException(ErrorCode.USER_IS_EMPTY.getCode(),"BUser[id:"+buser.getId()+",userId:"+userId+"]未查询到WxMerchantBUser。请联系管理员或者重新登陆."); | |||||
| } | } | ||||
| return user; | return user; | ||||
| } | } | ||||
| @@ -88,7 +89,7 @@ public class BaseController { | |||||
| Long id = getBuserId(); | Long id = getBuserId(); | ||||
| WxBuser user = wxBuserService.getById(id); | WxBuser user = wxBuserService.getById(id); | ||||
| if (user == null) { | if (user == null) { | ||||
| throw new MallinkException(ErrorCode.USER_IS_EMPTY); | |||||
| throw new MallinkException(ErrorCode.USER_IS_EMPTY.getCode(),"BUser[id:"+id+"]未查询到记录, 请重新登陆,并完全授权微信个人信息以及手机号授权."); | |||||
| } | } | ||||
| return user; | return user; | ||||
| } | } | ||||
| @@ -122,13 +122,14 @@ public class WxMerchantController extends BaseController { | |||||
| if (mUser != null) { | if (mUser != null) { | ||||
| return new ResultData(mUser.getOpenId()); | return new ResultData(mUser.getOpenId()); | ||||
| } else { | } else { | ||||
| return new ResultData(ErrorCode.USER_IS_EMPTY.getCode(),phone+"请在C端完成授权手机号操作。"); | |||||
| return new ResultData(ErrorCode.USER_IS_EMPTY.getCode(),"请用绑定["+phone+"]的微信在C端完成授权手机号操作。"); | |||||
| } | } | ||||
| }catch(Exception e) { | }catch(Exception e) { | ||||
| return new ResultData(ErrorCode.USER_IS_EMPTY.getCode(),phone+"匹配C端用户失败,该情况可能是未在C端授权手机号或者用户C端数据存在多个微信对应统一手机号异常数据。"); | return new ResultData(ErrorCode.USER_IS_EMPTY.getCode(),phone+"匹配C端用户失败,该情况可能是未在C端授权手机号或者用户C端数据存在多个微信对应统一手机号异常数据。"); | ||||
| } | } | ||||
| }else { | |||||
| return new ResultData(ErrorCode.USER_NO_PERMISSION.getCode(),"当前微信["+buser.getOpenId()+"]在B端授权的手机号["+buser.getPhone()+"]不是商户的联系手机号,不能操作."); | |||||
| } | } | ||||
| return new ResultData(ErrorCode.USER_NO_PERMISSION); | |||||
| } | } | ||||
| public boolean hasPermission() { | public boolean hasPermission() { | ||||
| @@ -4,7 +4,7 @@ spring: | |||||
| include: rabbitMQ | include: rabbitMQ | ||||
| # JDBC | # JDBC | ||||
| datasource: | datasource: | ||||
| url: jdbc:mysql://202.165.179.86:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true | |||||
| url: jdbc:mysql://101.200.130.134:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true | |||||
| username: root | username: root | ||||
| password: fm2020test | password: fm2020test | ||||
| type: com.alibaba.druid.pool.DruidDataSource | type: com.alibaba.druid.pool.DruidDataSource | ||||
| @@ -26,7 +26,7 @@ spring: | |||||
| #date-format: yyyy-MM-dd HH:mm:ss | #date-format: yyyy-MM-dd HH:mm:ss | ||||
| # REDIS | # REDIS | ||||
| redis: | redis: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 6379 | port: 6379 | ||||
| password: iF0rm@2l2ol9 | password: iF0rm@2l2ol9 | ||||
| timeout: 3600 | timeout: 3600 | ||||
| @@ -85,10 +85,10 @@ spring: | |||||
| retry-times-when-send-failed: 2 | retry-times-when-send-failed: 2 | ||||
| # RABBITMQ | # RABBITMQ | ||||
| rabbitmq: | rabbitmq: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 5672 | port: 5672 | ||||
| username: fumao | username: fumao | ||||
| password: f9l98&*%%u7flt33 | |||||
| password: f9l98 | |||||
| publisher-confirms: true | publisher-confirms: true | ||||
| publisher-returns: false | publisher-returns: false | ||||
| virtual-host: / | virtual-host: / | ||||
| @@ -140,7 +140,7 @@ wechat: | |||||
| componentToken: formall2018 | componentToken: formall2018 | ||||
| componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN | componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN | ||||
| redis: | redis: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 6379 | port: 6379 | ||||
| password: iF0rm@2l2ol9 | password: iF0rm@2l2ol9 | ||||
| timeout: 3600 | timeout: 3600 | ||||
| @@ -327,29 +327,36 @@ public class WxCarController extends BaseController { | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "广场停车场类型非法."); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "广场停车场类型非法."); | ||||
| } | } | ||||
| // Integer used = ParkCacheUtils.getCarCouponUseCacheLock(redisTemplate, vendor.getMessage(), carNumber); | |||||
| // if (null != used && 1 == used.intValue()) { | |||||
| // return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "已经使用过停车券,不能叠加使用."); | |||||
| // } | |||||
| Integer used = ParkCacheUtils.getCarCouponUseCacheLock(redisTemplate, vendor.getMessage(), carNumber); | |||||
| if (park.getVendorType().equals(EnumCarVendor.CAR_ETCP.getCode())) { | if (park.getVendorType().equals(EnumCarVendor.CAR_ETCP.getCode())) { | ||||
| ResultData result = etcpHelper.getCoupon(paramMap, park, userCar,carNumber); | |||||
| ParkCacheUtils.setCarCouponUsedCacheLock(redisTemplate, vendor.getMessage(), carNumber); | |||||
| return result; | |||||
| if (null != used && used.intValue() < 1) { | |||||
| ResultData result = etcpHelper.getCoupon(paramMap, park, userCar,carNumber); | |||||
| if (result.code == Result.SUCCESS) { | |||||
| ParkCacheUtils.setCarCouponUsedCacheLock(redisTemplate, vendor.getMessage(), carNumber); | |||||
| } | |||||
| return result; | |||||
| } | |||||
| return new ResultData(Result.SUCCESS,"已经使用过优惠券, 不能重复使用."); | |||||
| } else { | } else { | ||||
| WxCoupon coupon = couponService.getById(userCar.getCouponId()); | WxCoupon coupon = couponService.getById(userCar.getCouponId()); | ||||
| if (coupon == null) { | if (coupon == null) { | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "券为空"); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "券为空"); | ||||
| } | } | ||||
| try { | try { | ||||
| ResultData rs = parkFactory.getParkService(park.getVendorType()).useCoupon(paramMap, park, userCar, coupon, carNumber); | |||||
| if (rs.code == Result.SUCCESS) { | |||||
| etcpHelper.updateWxCouponOrderUsed(userCar, park); | |||||
| ParkCacheUtils.setCarCouponUsedCacheLock(redisTemplate, vendor.getMessage(), carNumber); | |||||
| return new ResultData(); | |||||
| }else { | |||||
| return new ResultData(rs.code,rs.message); | |||||
| } | |||||
| if (null != used && used.intValue() < 1) { | |||||
| ResultData rs = parkFactory.getParkService(park.getVendorType()).useCoupon(paramMap, park, userCar, coupon, carNumber); | |||||
| if (rs.code == Result.SUCCESS) { | |||||
| etcpHelper.updateWxCouponOrderUsed(userCar, park); | |||||
| ParkCacheUtils.setCarCouponUsedCacheLock(redisTemplate, vendor.getMessage(), carNumber); | |||||
| return new ResultData(); | |||||
| }else { | |||||
| return new ResultData(rs.code,rs.message); | |||||
| } | |||||
| } | |||||
| return new ResultData(Result.SUCCESS,"已经使用过优惠券, 不能重复使用."); | |||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("park getCoupon error",e); | logger.error("park getCoupon error",e); | ||||
| return new ResultData(Result.ERROR,e.getMessage()); | return new ResultData(Result.ERROR,e.getMessage()); | ||||
| @@ -4,7 +4,7 @@ spring: | |||||
| include: rabbitMQ | include: rabbitMQ | ||||
| # JDBC | # JDBC | ||||
| datasource: | datasource: | ||||
| url: jdbc:mysql://202.165.179.86:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true | |||||
| url: jdbc:mysql://101.200.130.134:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true | |||||
| username: root | username: root | ||||
| password: fm2020test | password: fm2020test | ||||
| type: com.alibaba.druid.pool.DruidDataSource | type: com.alibaba.druid.pool.DruidDataSource | ||||
| @@ -27,7 +27,7 @@ spring: | |||||
| # REDIS | # REDIS | ||||
| redis: | redis: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 6379 | port: 6379 | ||||
| password: iF0rm@2l2ol9 | password: iF0rm@2l2ol9 | ||||
| timeout: 3600 | timeout: 3600 | ||||
| @@ -85,10 +85,10 @@ spring: | |||||
| retry-times-when-send-failed: 2 | retry-times-when-send-failed: 2 | ||||
| # RABBITMQ | # RABBITMQ | ||||
| rabbitmq: | rabbitmq: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 5672 | port: 5672 | ||||
| username: fumao | username: fumao | ||||
| password: f9l98&*%%u7flt33 | |||||
| password: f9l98 | |||||
| publisher-confirms: true | publisher-confirms: true | ||||
| publisher-returns: false | publisher-returns: false | ||||
| virtual-host: / | virtual-host: / | ||||
| @@ -136,7 +136,7 @@ wechat: | |||||
| componentToken: formall2018 | componentToken: formall2018 | ||||
| componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN | componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN | ||||
| redis: | redis: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 6379 | port: 6379 | ||||
| password: iF0rm@2l2ol9 | password: iF0rm@2l2ol9 | ||||
| timeout: 3600 | timeout: 3600 | ||||
| @@ -4,7 +4,7 @@ spring: | |||||
| include: rabbitMQ | include: rabbitMQ | ||||
| # JDBC | # JDBC | ||||
| datasource: | datasource: | ||||
| url: jdbc:mysql://202.165.179.86:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true | |||||
| url: jdbc:mysql://101.200.130.134:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true | |||||
| username: root | username: root | ||||
| password: fm2020test | password: fm2020test | ||||
| type: com.alibaba.druid.pool.DruidDataSource | type: com.alibaba.druid.pool.DruidDataSource | ||||
| @@ -27,7 +27,7 @@ spring: | |||||
| #date-format: yyyy-MM-dd HH:mm:ss | #date-format: yyyy-MM-dd HH:mm:ss | ||||
| # REDIS | # REDIS | ||||
| redis: | redis: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 6379 | port: 6379 | ||||
| password: iF0rm@2l2ol9 | password: iF0rm@2l2ol9 | ||||
| timeout: 3600 | timeout: 3600 | ||||
| @@ -86,10 +86,10 @@ spring: | |||||
| retry-times-when-send-failed: 2 | retry-times-when-send-failed: 2 | ||||
| # RABBITMQ | # RABBITMQ | ||||
| rabbitmq: | rabbitmq: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 5672 | port: 5672 | ||||
| username: fumao | username: fumao | ||||
| password: f9l98&*%%u7flt33 | |||||
| password: f9l98 | |||||
| publisher-confirms: true | publisher-confirms: true | ||||
| publisher-returns: false | publisher-returns: false | ||||
| virtual-host: / | virtual-host: / | ||||
| @@ -142,7 +142,7 @@ wechat: | |||||
| componentToken: formall2018 | componentToken: formall2018 | ||||
| componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN | componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN | ||||
| redis: | redis: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 6379 | port: 6379 | ||||
| password: iF0rm@2l2ol9 | password: iF0rm@2l2ol9 | ||||
| timeout: 3600 | timeout: 3600 | ||||
| @@ -4,7 +4,7 @@ spring: | |||||
| include: rabbitMQ | include: rabbitMQ | ||||
| # JDBC | # JDBC | ||||
| datasource: | datasource: | ||||
| url: jdbc:mysql://202.165.179.86:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true | |||||
| url: jdbc:mysql://101.200.130.134:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true | |||||
| username: root | username: root | ||||
| password: fm2020test | password: fm2020test | ||||
| type: com.alibaba.druid.pool.DruidDataSource | type: com.alibaba.druid.pool.DruidDataSource | ||||
| @@ -28,7 +28,7 @@ spring: | |||||
| # REDIS | # REDIS | ||||
| redis: | redis: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 6379 | port: 6379 | ||||
| password: iF0rm@2l2ol9 | password: iF0rm@2l2ol9 | ||||
| timeout: 3600 | timeout: 3600 | ||||
| @@ -85,10 +85,10 @@ spring: | |||||
| retry-another-broker-when-not-store-ok: false | retry-another-broker-when-not-store-ok: false | ||||
| retry-times-when-send-failed: 2 | retry-times-when-send-failed: 2 | ||||
| rabbitmq: | rabbitmq: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 5672 | port: 5672 | ||||
| username: fumao | username: fumao | ||||
| password: f9l98&*%%u7flt33 | |||||
| password: f9l98 | |||||
| publisher-confirms: true | publisher-confirms: true | ||||
| publisher-returns: false | publisher-returns: false | ||||
| virtual-host: / | virtual-host: / | ||||
| @@ -136,7 +136,7 @@ wechat: | |||||
| componentToken: formall2018 | componentToken: formall2018 | ||||
| componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN | componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN | ||||
| redis: | redis: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 6379 | port: 6379 | ||||
| password: iF0rm@2l2ol9 | password: iF0rm@2l2ol9 | ||||
| timeout: 3600 | timeout: 3600 | ||||
| @@ -4,7 +4,7 @@ spring: | |||||
| include: rabbitMQ | include: rabbitMQ | ||||
| # JDBC | # JDBC | ||||
| datasource: | datasource: | ||||
| url: jdbc:mysql://202.165.179.86:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true | |||||
| url: jdbc:mysql://101.200.130.134:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true | |||||
| username: root | username: root | ||||
| password: fm2020test | password: fm2020test | ||||
| type: com.alibaba.druid.pool.DruidDataSource | type: com.alibaba.druid.pool.DruidDataSource | ||||
| @@ -26,7 +26,7 @@ spring: | |||||
| #date-format: yyyy-MM-dd HH:mm:ss | #date-format: yyyy-MM-dd HH:mm:ss | ||||
| # REDIS | # REDIS | ||||
| redis: | redis: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 6379 | port: 6379 | ||||
| password: iF0rm@2l2ol9 | password: iF0rm@2l2ol9 | ||||
| timeout: 3600 | timeout: 3600 | ||||
| @@ -85,10 +85,10 @@ spring: | |||||
| retry-times-when-send-failed: 2 | retry-times-when-send-failed: 2 | ||||
| # RABBITMQ | # RABBITMQ | ||||
| rabbitmq: | rabbitmq: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 5672 | port: 5672 | ||||
| username: fumao | username: fumao | ||||
| password: f9l98&*%%u7flt33 | |||||
| password: f9l98 | |||||
| publisher-confirms: true | publisher-confirms: true | ||||
| publisher-returns: false | publisher-returns: false | ||||
| virtual-host: / | virtual-host: / | ||||
| @@ -140,7 +140,7 @@ wechat: | |||||
| componentToken: formall2018 | componentToken: formall2018 | ||||
| componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN | componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN | ||||
| redis: | redis: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 6379 | port: 6379 | ||||
| password: iF0rm@2l2ol9 | password: iF0rm@2l2ol9 | ||||
| timeout: 3600 | timeout: 3600 | ||||
| @@ -48,21 +48,10 @@ public class WxCUserTagsSchedule { | |||||
| wxCUserBasicInfo.setFinalTenantId(mall.getParentTenantId()); | wxCUserBasicInfo.setFinalTenantId(mall.getParentTenantId()); | ||||
| } | } | ||||
| Date curDate = new Date(); | Date curDate = new Date(); | ||||
| Calendar startC = Calendar.getInstance(); | |||||
| startC.setTime(curDate); | |||||
| startC.add(Calendar.DAY_OF_YEAR, -30); | |||||
| Calendar endC = Calendar.getInstance(); | |||||
| endC.setTime(curDate); | |||||
| endC.add(Calendar.DAY_OF_YEAR, -5); | |||||
| //5天内未扫描的,且只扫描1个月内未扫描的 | |||||
| wxCUserBasicInfo.setScanStartTime(startC.getTime()); | |||||
| wxCUserBasicInfo.setScanEndTime(endC.getTime()); | |||||
| //活跃时间在10天内的 | //活跃时间在10天内的 | ||||
| Calendar startA = Calendar.getInstance(); | Calendar startA = Calendar.getInstance(); | ||||
| startA.setTime(curDate); | startA.setTime(curDate); | ||||
| startA.add(Calendar.DAY_OF_YEAR, -10); | |||||
| startA.add(Calendar.DAY_OF_YEAR, -1); | |||||
| wxCUserBasicInfo.setActiveStartTime(startA.getTime()); | wxCUserBasicInfo.setActiveStartTime(startA.getTime()); | ||||
| wxCUserBasicInfo.setActiveEndTime(curDate); | wxCUserBasicInfo.setActiveEndTime(curDate); | ||||
| int pageIndex = 1; | int pageIndex = 1; | ||||
| @@ -4,7 +4,7 @@ spring: | |||||
| include: rabbitMQ | include: rabbitMQ | ||||
| # JDBC | # JDBC | ||||
| datasource: | datasource: | ||||
| url: jdbc:mysql://202.165.179.86:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true | |||||
| url: jdbc:mysql://101.200.130.134:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true | |||||
| username: root | username: root | ||||
| password: fm2020test | password: fm2020test | ||||
| type: com.alibaba.druid.pool.DruidDataSource | type: com.alibaba.druid.pool.DruidDataSource | ||||
| @@ -28,7 +28,7 @@ spring: | |||||
| # REDIS | # REDIS | ||||
| redis: | redis: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 6379 | port: 6379 | ||||
| password: iF0rm@2l2ol9 | password: iF0rm@2l2ol9 | ||||
| timeout: 3600 | timeout: 3600 | ||||
| @@ -85,10 +85,10 @@ spring: | |||||
| retry-another-broker-when-not-store-ok: false | retry-another-broker-when-not-store-ok: false | ||||
| retry-times-when-send-failed: 2 | retry-times-when-send-failed: 2 | ||||
| rabbitmq: | rabbitmq: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 5672 | port: 5672 | ||||
| username: fumao | username: fumao | ||||
| password: f9l98&*%%u7flt33 | |||||
| password: f9l98 | |||||
| publisher-confirms: true | publisher-confirms: true | ||||
| publisher-returns: false | publisher-returns: false | ||||
| virtual-host: / | virtual-host: / | ||||
| @@ -136,7 +136,7 @@ wechat: | |||||
| componentToken: formall2018 | componentToken: formall2018 | ||||
| componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN | componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN | ||||
| redis: | redis: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 6379 | port: 6379 | ||||
| password: iF0rm@2l2ol9 | password: iF0rm@2l2ol9 | ||||
| timeout: 3600 | timeout: 3600 | ||||
| @@ -110,13 +110,6 @@ public class WxCUserBasicInfo extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "状态0正常1锁定", name = "status") | @io.swagger.annotations.ApiModelProperty(value = "状态0正常1锁定", name = "status") | ||||
| private Integer status; | private Integer status; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "标签扫描时间", name = "tagScanTime") | |||||
| private Date tagScanTime; | |||||
| @TableField(exist = false) | |||||
| private Date scanStartTime; | |||||
| @TableField(exist = false) | |||||
| private Date scanEndTime; | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| @Excel(name="标签",width = 50,orderNum = "10") | @Excel(name="标签",width = 50,orderNum = "10") | ||||
| @@ -17,12 +17,16 @@ public class WxCUserTags extends BaseTenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="c端用户id",name="userId") | @io.swagger.annotations.ApiModelProperty(value="c端用户id",name="userId") | ||||
| private Long userId; | private Long userId; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private List<Long> userIds; | |||||
| private List<Long> userIdList; | |||||
| @io.swagger.annotations.ApiModelProperty(value="",name="tags") | @io.swagger.annotations.ApiModelProperty(value="",name="tags") | ||||
| private String tags; | private String tags; | ||||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | ||||
| private Date createDate; | private Date createDate; | ||||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | ||||
| private Date updateDate; | private Date updateDate; | ||||
| @@ -1,9 +1,15 @@ | |||||
| package com.iformall.mapper; | package com.iformall.mapper; | ||||
| import java.util.Date; | |||||
| import java.util.List; | |||||
| import org.apache.ibatis.annotations.Param; | |||||
| import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
| import com.iformall.domain.po.WxCardTransferInfo; | import com.iformall.domain.po.WxCardTransferInfo; | ||||
| public interface WxCardTransferInfoMapper extends CommonMapper<WxCardTransferInfo, Long> { | public interface WxCardTransferInfoMapper extends CommonMapper<WxCardTransferInfo, Long> { | ||||
| void cardDefer(@Param("expiredTime")Date expiredTime,@Param("couponOrderIds")List<Long> couponOrderIds); | |||||
| } | } | ||||
| @@ -84,4 +84,6 @@ public interface WxCouponOrderMapper extends CommonMapper<WxCouponOrder, Long> { | |||||
| //卡延期,将过期的状态变为使用中 | //卡延期,将过期的状态变为使用中 | ||||
| void cardDefer(@Param("couponId")Long couponId,@Param("expireTime")Date expireTime); | void cardDefer(@Param("couponId")Long couponId,@Param("expireTime")Date expireTime); | ||||
| //查询待延期的idList | |||||
| List<Long> cardDeferCouponOrderId(@Param("couponId")Long couponId); | |||||
| } | } | ||||
| @@ -1232,10 +1232,13 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc | |||||
| basicInfo.undateFinalTenantId(tenantInfo); | basicInfo.undateFinalTenantId(tenantInfo); | ||||
| } | } | ||||
| list = wxCUserBasicInfoMapper.findVoList(basicInfo); | list = wxCUserBasicInfoMapper.findVoList(basicInfo); | ||||
| if (null == list || list.size() <= 0 ) { | |||||
| return null; | |||||
| } | |||||
| List<Long> userIds = wxCUserBasicInfoMapper.findVoIdsList(basicInfo); | List<Long> userIds = wxCUserBasicInfoMapper.findVoIdsList(basicInfo); | ||||
| if (null != userIds ) { | |||||
| if (null != userIds && userIds.size() > 0 ) { | |||||
| WxCUserTags tq = new WxCUserTags(); | WxCUserTags tq = new WxCUserTags(); | ||||
| tq.setUserIds(userIds); | |||||
| tq.setUserIdList(userIds); | |||||
| List<WxCUserTags> userTagList = wxCUserTagsMapper.findList(tq); | List<WxCUserTags> userTagList = wxCUserTagsMapper.findList(tq); | ||||
| if (null != userTagList) { | if (null != userTagList) { | ||||
| List<WxTags> tagList = wxTagsMapper.findListAll(); | List<WxTags> tagList = wxTagsMapper.findListAll(); | ||||
| @@ -1253,7 +1256,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc | |||||
| } | } | ||||
| } | } | ||||
| if (null != list ) { | |||||
| if (null != list && list.size() > 0 ) { | |||||
| List<Object> retList = new ArrayList<Object>(); | List<Object> retList = new ArrayList<Object>(); | ||||
| retList.addAll(list); | retList.addAll(list); | ||||
| return retList; | return retList; | ||||
| @@ -81,6 +81,9 @@ public class WxCouponServiceImpl implements WxCouponService { | |||||
| @Autowired | @Autowired | ||||
| WxCouponOrderMapper wxCouponOrderMapper; | WxCouponOrderMapper wxCouponOrderMapper; | ||||
| @Autowired | |||||
| WxCardTransferInfoMapper wxCardTransferInfoMapper; | |||||
| @Autowired | @Autowired | ||||
| @Qualifier("couponChannelRedisTemplate") | @Qualifier("couponChannelRedisTemplate") | ||||
| @@ -765,11 +768,17 @@ public class WxCouponServiceImpl implements WxCouponService { | |||||
| wxCouponChannelMapper.cardDefer(id, validEndDate); | wxCouponChannelMapper.cardDefer(id, validEndDate); | ||||
| //更新coupon_order的状态,已过期的变为使用中 5-->4 | //更新coupon_order的状态,已过期的变为使用中 5-->4 | ||||
| List<Long> couponOrderIds = wxCouponOrderMapper.cardDeferCouponOrderId(id); | |||||
| wxCouponOrderMapper.cardDefer(id,validEndDate); | wxCouponOrderMapper.cardDefer(id,validEndDate); | ||||
| //更新coupon_passwd | //更新coupon_passwd | ||||
| couponPasswordMapper.updateExpiredTime(id, validEndDate); | couponPasswordMapper.updateExpiredTime(id, validEndDate); | ||||
| //更新wx_card_transfer_info | |||||
| if (null != couponOrderIds && couponOrderIds.size() > 0 ) { | |||||
| wxCardTransferInfoMapper.cardDefer(validEndDate, couponOrderIds); | |||||
| } | |||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| @@ -540,7 +540,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| return wxProfitSharingReceiverService.updateReceiver(wxMerchant, receiver,payWay); | return wxProfitSharingReceiverService.updateReceiver(wxMerchant, receiver,payWay); | ||||
| } | } | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("db failed: 账户操作失败, e:" + e.getMessage()); | |||||
| logger.error("db failed: 账户操作失败, e:" + e.getMessage(),e); | |||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | ||||
| } | } | ||||
| return new ResultData(Result.SUCCESS, "操作成功"); | return new ResultData(Result.SUCCESS, "操作成功"); | ||||
| @@ -79,7 +79,7 @@ public class WxOrderGroupServiceImpl implements WxOrderGroupService { | |||||
| if (!grouppeopleLock) { | if (!grouppeopleLock) { | ||||
| throw new MallinkException(ErrorCode.ORDER_GROUP_COOPERATING_FAILD.getCode(),"参团锁定失败,请稍后再试。"); | throw new MallinkException(ErrorCode.ORDER_GROUP_COOPERATING_FAILD.getCode(),"参团锁定失败,请稍后再试。"); | ||||
| } | } | ||||
| //此处拼团数量应从订单总数查询,支付成功的就算一个,没支付成功的不算 | |||||
| //此处拼团数量应从订单总数查询,支付成功的就算一个,没支付成功的不算. 提高拼团的成功率 | |||||
| int ordercount = wxOrderService.countGroupOrder(order.getOrderGroupId(),true); | int ordercount = wxOrderService.countGroupOrder(order.getOrderGroupId(),true); | ||||
| Integer remainPeople = wxCoupon.getPressLimitNum()-ordercount-1; | Integer remainPeople = wxCoupon.getPressLimitNum()-ordercount-1; | ||||
| //Integer remainPeople = wxOrderGroup.getRemainPeople()-1; | //Integer remainPeople = wxOrderGroup.getRemainPeople()-1; | ||||
| @@ -142,6 +142,8 @@ public class WxOrderGroupServiceImpl implements WxOrderGroupService { | |||||
| logger.error("更新订单信息失败", e); | logger.error("更新订单信息失败", e); | ||||
| throw new MallinkException(ErrorCode.ORDER_GROUP_COOPERATING_FAILD); | throw new MallinkException(ErrorCode.ORDER_GROUP_COOPERATING_FAILD); | ||||
| } | } | ||||
| //此时会出现临界情况,remainPeople是已支付的数量 | |||||
| //此时如果最后的位置,同时多个人点了,去支付,最先支付的会把后面的取消掉。 | |||||
| if (remainPeople == 0) { | if (remainPeople == 0) { | ||||
| actionAfterOrderGroupSuccess(order, orderGroupId); | actionAfterOrderGroupSuccess(order, orderGroupId); | ||||
| } | } | ||||
| @@ -191,6 +193,13 @@ public class WxOrderGroupServiceImpl implements WxOrderGroupService { | |||||
| * @param orderGroupId | * @param orderGroupId | ||||
| */ | */ | ||||
| private void actionAfterOrderGroupSuccess(WxOrder order, Long orderGroupId) { | private void actionAfterOrderGroupSuccess(WxOrder order, Long orderGroupId) { | ||||
| //拼团完成,只能执行一次。 | |||||
| boolean isFirstSet = redisLock.setOrderGroupComplateLock(orderGroupId); | |||||
| //如果没有设置成功,则不是第一次处理,后续的忽略,防止并发 | |||||
| if (!isFirstSet) { | |||||
| return; | |||||
| } | |||||
| // 拼团完成 | // 拼团完成 | ||||
| // 得到所有拼团的order | // 得到所有拼团的order | ||||
| WxOrder wxOrder = new WxOrder(); | WxOrder wxOrder = new WxOrder(); | ||||
| @@ -224,7 +233,10 @@ public class WxOrderGroupServiceImpl implements WxOrderGroupService { | |||||
| //去库存 | //去库存 | ||||
| wxOrderService.updateOrderStatus(temp); | wxOrderService.updateOrderStatus(temp); | ||||
| //拼团取消 | //拼团取消 | ||||
| temp.setOrderStatus(EnumOrderStatus.ORDER_STATUS_COOPERATING_BREAK.getCode()); | |||||
| //temp.setOrderStatus(EnumOrderStatus.ORDER_STATUS_COOPERATING_BREAK.getCode()); | |||||
| //拼团取消。定时会处理退款 | |||||
| temp.setOrderStatus(EnumOrderStatus.ORDER_STATUS_COOPERATING_CANCEL.getCode()); | |||||
| wxOrderMapper.updateById(temp); | wxOrderMapper.updateById(temp); | ||||
| } | } | ||||
| } | } | ||||
| @@ -145,4 +145,14 @@ public class RedisLock { | |||||
| } | } | ||||
| return false; | return false; | ||||
| } | } | ||||
| public boolean setOrderGroupComplateLock(long orderGroupId) { | |||||
| String longstr = stringRedisTemplate.opsForValue().get("orderGroup:complete:"+String.valueOf(orderGroupId)); | |||||
| if (Long.parseLong(longstr) >= 1L) { | |||||
| return false; | |||||
| } | |||||
| Long rs = stringRedisTemplate.opsForValue().increment("orderGroup:complete:"+String.valueOf(orderGroupId), 1); | |||||
| return rs <= 1L; | |||||
| } | |||||
| } | } | ||||
| @@ -26,13 +26,12 @@ | |||||
| <result column="act_record" jdbcType="INTEGER" property="actRecord"/> | <result column="act_record" jdbcType="INTEGER" property="actRecord"/> | ||||
| <result column="score_date" jdbcType="TIMESTAMP" property="scoreDate"/> | <result column="score_date" jdbcType="TIMESTAMP" property="scoreDate"/> | ||||
| <result column="status" jdbcType="INTEGER" property="status"/> | <result column="status" jdbcType="INTEGER" property="status"/> | ||||
| <result column="tag_scan_time" jdbcType="TIMESTAMP" property="tagScanTime"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| distinct wcubi.`id`,wcubi.`phone`,wcubi.`birthdate`,wcubi.`education`,wcubi.`sex`,wcubi.`email`, | distinct wcubi.`id`,wcubi.`phone`,wcubi.`birthdate`,wcubi.`education`,wcubi.`sex`,wcubi.`email`, | ||||
| wcubi.`address`,wcubi.`poins`,wcubi.`tag_id`,wcubi.`create_date`,wcubi.`update_date`, | wcubi.`address`,wcubi.`poins`,wcubi.`tag_id`,wcubi.`create_date`,wcubi.`update_date`, | ||||
| wcubi.`final_tenant_id`,wcubi.`name`,wcubi.`nick_name`,wcubi.`tag_scan_time`, | |||||
| wcubi.`final_tenant_id`,wcubi.`name`,wcubi.`nick_name`, | |||||
| wcubi.`avatar_url`,wcubi.`credit`,wcubi.`active_time`,wcubi.`login_count`,wcubi.`act_record` | wcubi.`avatar_url`,wcubi.`credit`,wcubi.`active_time`,wcubi.`login_count`,wcubi.`act_record` | ||||
| ,(select level from wx_level_config | ,(select level from wx_level_config | ||||
| where poins >= points and tenant_id=wcubi.final_tenant_id | where poins >= points and tenant_id=wcubi.final_tenant_id | ||||
| @@ -40,7 +39,7 @@ | |||||
| </sql> | </sql> | ||||
| <sql id="allSimpleColumns"> | <sql id="allSimpleColumns"> | ||||
| `id`,`phone`,`birthdate`,`education`,`sex`,`email`,`address`,`poins`,`tag_id`,`tag_scan_time`, | |||||
| `id`,`phone`,`birthdate`,`education`,`sex`,`email`,`address`,`poins`,`tag_id`, | |||||
| `create_date`,`update_date`,`tenant_id`,`parent_tenant_id`,`name`,`nick_name`,`credit`,`active_time`,`act_record` | `create_date`,`update_date`,`tenant_id`,`parent_tenant_id`,`name`,`nick_name`,`credit`,`active_time`,`act_record` | ||||
| </sql> | </sql> | ||||
| @@ -108,11 +107,7 @@ | |||||
| </if> | </if> | ||||
| <if test=" null != startTime and null!=endTime"> | <if test=" null != startTime and null!=endTime"> | ||||
| and wcubi.`create_date` between #{startTime} and #{endTime} | and wcubi.`create_date` between #{startTime} and #{endTime} | ||||
| </if> | |||||
| <if test=" null != scanStartTime and null!=scanEndTime"> | |||||
| and wcubi.`tag_scan_time` between #{scanStartTime} and #{scanEndTime} | |||||
| </if> | |||||
| </if> | |||||
| <if test=" null != activeStartTime and null!=activeEndTime"> | <if test=" null != activeStartTime and null!=activeEndTime"> | ||||
| and wcubi.`active_time` between #{activeStartTime} and #{activeEndTime} | and wcubi.`active_time` between #{activeStartTime} and #{activeEndTime} | ||||
| @@ -210,10 +205,6 @@ | |||||
| </if> | </if> | ||||
| <if test=" null != basicInfo.startTime and null != basicInfo.endTime"> | <if test=" null != basicInfo.startTime and null != basicInfo.endTime"> | ||||
| and wcubi.`create_date` between #{basicInfo.startTime} and #{basicInfo.endTime} | and wcubi.`create_date` between #{basicInfo.startTime} and #{basicInfo.endTime} | ||||
| </if> | |||||
| <if test=" null != basicInfo.scanStartTime and null!=basicInfo.scanEndTime"> | |||||
| and wcubi.`tag_scan_time` between #{basicInfo.scanStartTime} and #{basicInfo.scanEndTime} | |||||
| </if> | </if> | ||||
| <if test=" null != basicInfo.activeStartTime and null!=basicInfo.activeEndTime"> | <if test=" null != basicInfo.activeStartTime and null!=basicInfo.activeEndTime"> | ||||
| @@ -406,7 +397,7 @@ | |||||
| <sql id="allColumnsOfScoreList"> | <sql id="allColumnsOfScoreList"> | ||||
| distinct cub.id,cub.phone,cub.birthdate,cub.education,cub.sex,cub.email,cub.address,cub.poins,cub.tag_id, | distinct cub.id,cub.phone,cub.birthdate,cub.education,cub.sex,cub.email,cub.address,cub.poins,cub.tag_id, | ||||
| cub.create_date,cub.update_date,cub.name,cub.level,cub.nick_name,cub.score_date,cub.final_tenant_id,cub.tag_scan_time | |||||
| cub.create_date,cub.update_date,cub.name,cub.level,cub.nick_name,cub.score_date,cub.final_tenant_id | |||||
| </sql> | </sql> | ||||
| <select id="findListByScore" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultMap="BaseResultMap"> | <select id="findListByScore" parameterType="com.iformall.domain.dto.WxCUserBasicInfoDto" resultMap="BaseResultMap"> | ||||
| @@ -621,12 +612,11 @@ | |||||
| <result column="credit" jdbcType="INTEGER" property="credit"/> | <result column="credit" jdbcType="INTEGER" property="credit"/> | ||||
| <result column="tags" jdbcType="VARCHAR" property="tags"/> | <result column="tags" jdbcType="VARCHAR" property="tags"/> | ||||
| <result column="active_time" jdbcType="TIMESTAMP" property="activeTime"/> | <result column="active_time" jdbcType="TIMESTAMP" property="activeTime"/> | ||||
| <result column="tag_scan_time" jdbcType="TIMESTAMP" property="tagScanTime"/> | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allVoColumns"> | <sql id="allVoColumns"> | ||||
| distinct cu.`id`,cu.`phone`,cu.`birthdate`,cu.`education`,cu.`sex`,cu.`email`,cu.`address`,cu.`poins`,cu.`tag_id`, | distinct cu.`id`,cu.`phone`,cu.`birthdate`,cu.`education`,cu.`sex`,cu.`email`,cu.`address`,cu.`poins`,cu.`tag_id`, | ||||
| cu.`create_date`,cu.`update_date`,cu.`name`,cu.`level`,cu.`nick_name`,cu.`tag_scan_time`, | |||||
| cu.`create_date`,cu.`update_date`,cu.`name`,cu.`level`,cu.`nick_name`, | |||||
| cut.`tags`,cu.`credit`,cu.`active_time`,cu.`act_record`,cu.`final_tenant_id` | cut.`tags`,cu.`credit`,cu.`active_time`,cu.`act_record`,cu.`final_tenant_id` | ||||
| </sql> | </sql> | ||||
| @@ -692,10 +682,6 @@ | |||||
| and cu.`create_date` between #{startTime} and #{endTime} | and cu.`create_date` between #{startTime} and #{endTime} | ||||
| </if> | </if> | ||||
| <if test=" null != scanStartTime and null!=scanEndTime"> | |||||
| and wcubi.`tag_scan_time` between #{scanStartTime} and #{scanEndTime} | |||||
| </if> | |||||
| <if test=" null != activeStartTime and null!=activeEndTime"> | <if test=" null != activeStartTime and null!=activeEndTime"> | ||||
| and wcubi.`active_time` between #{activeStartTime} and #{activeEndTime} | and wcubi.`active_time` between #{activeStartTime} and #{activeEndTime} | ||||
| </if> | </if> | ||||
| @@ -772,10 +758,6 @@ | |||||
| and cu.`create_date` between #{basicInfo.startTime} and #{basicInfo.endTime} | and cu.`create_date` between #{basicInfo.startTime} and #{basicInfo.endTime} | ||||
| </if> | </if> | ||||
| <if test=" null != basicInfo.scanStartTime and null!=basicInfo.scanEndTime"> | |||||
| and wcubi.`tag_scan_time` between #{basicInfo.scanStartTime} and #{basicInfo.scanEndTime} | |||||
| </if> | |||||
| <if test=" null != basicInfo.activeStartTime and null!=basicInfo.activeEndTime"> | <if test=" null != basicInfo.activeStartTime and null!=basicInfo.activeEndTime"> | ||||
| and wcubi.`active_time` between #{basicInfo.activeStartTime} and #{basicInfo.activeEndTime} | and wcubi.`active_time` between #{basicInfo.activeStartTime} and #{basicInfo.activeEndTime} | ||||
| </if> | </if> | ||||
| @@ -47,10 +47,10 @@ | |||||
| </if> | </if> | ||||
| <if test=" null != userIds "> | |||||
| and user_id in | |||||
| <foreach collection="userIds" index="index" item="userIdItem" open="(" separator="," close=")"> | |||||
| #{userIdItem} | |||||
| <if test=" null != userIdList "> | |||||
| and `user_id` in | |||||
| <foreach collection="userIdList" index="index" item="uItem" open="(" separator="," close=")"> | |||||
| #{uItem} | |||||
| </foreach> | </foreach> | ||||
| </if> | </if> | ||||
| @@ -2,4 +2,10 @@ | |||||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||
| <mapper namespace="com.iformall.mapper.WxCardTransferInfoMapper"> | <mapper namespace="com.iformall.mapper.WxCardTransferInfoMapper"> | ||||
| <update id="cardDefer" parameterType="map"> | |||||
| update wx_card_transfer_info set expired_time = #{expiredTime},update_date=now() where coupon_order_id in | |||||
| <foreach collection="couponOrderIds" index="index" item="sItem" open="(" separator="," close=")"> | |||||
| #{sItem} | |||||
| </foreach> | |||||
| </update> | |||||
| </mapper> | </mapper> | ||||
| @@ -1395,7 +1395,11 @@ | |||||
| </select> | </select> | ||||
| <update id="cardDefer" parameterType="map"> | <update id="cardDefer" parameterType="map"> | ||||
| update wx_coupon_order set coupon_order_status = 4,update_date = now(), expired_time= #{expireTime} where coupon_id = #{couponId} and coupon_order_status = 5 | |||||
| update wx_coupon_order set coupon_order_status = 4,update_date = now(), expired_time= #{expireTime} where coupon_id = #{couponId} and coupon_order_status in (4, 5) | |||||
| </update> | </update> | ||||
| <select id="cardDeferCouponOrderId" parameterType="java.lang.Long" resultType="java.lang.Long"> | |||||
| select id from wx_coupon_order where coupon_id = #{couponId} and coupon_order_status in (4, 5) | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||
| @@ -3,7 +3,7 @@ spring: | |||||
| include: rabbitMQ | include: rabbitMQ | ||||
| # JDBC | # JDBC | ||||
| datasource: | datasource: | ||||
| url: jdbc:mysql://202.165.179.86:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true | |||||
| url: jdbc:mysql://101.200.130.134:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true | |||||
| username: root | username: root | ||||
| password: fm2020test | password: fm2020test | ||||
| type: com.alibaba.druid.pool.DruidDataSource | type: com.alibaba.druid.pool.DruidDataSource | ||||
| @@ -26,7 +26,7 @@ spring: | |||||
| #date-format: yyyy-MM-dd HH:mm:ss | #date-format: yyyy-MM-dd HH:mm:ss | ||||
| # REDIS | # REDIS | ||||
| redis: | redis: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 6379 | port: 6379 | ||||
| password: iF0rm@2l2ol9 | password: iF0rm@2l2ol9 | ||||
| timeout: 3600 | timeout: 3600 | ||||
| @@ -85,10 +85,10 @@ spring: | |||||
| retry-times-when-send-failed: 2 | retry-times-when-send-failed: 2 | ||||
| # RABBITMQ | # RABBITMQ | ||||
| rabbitmq: | rabbitmq: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 5672 | port: 5672 | ||||
| username: fumao | username: fumao | ||||
| password: f9l98&*%%u7flt33 | |||||
| password: f9l98 | |||||
| publisher-confirms: true | publisher-confirms: true | ||||
| publisher-returns: false | publisher-returns: false | ||||
| virtual-host: / | virtual-host: / | ||||
| @@ -137,7 +137,7 @@ wechat: | |||||
| componentToken: formall2018 | componentToken: formall2018 | ||||
| componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN | componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN | ||||
| redis: | redis: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 6379 | port: 6379 | ||||
| password: iF0rm@2l2ol9 | password: iF0rm@2l2ol9 | ||||
| timeout: 3600 | timeout: 3600 | ||||
| @@ -4,7 +4,7 @@ spring: | |||||
| include: rabbitMQ | include: rabbitMQ | ||||
| # JDBC | # JDBC | ||||
| datasource: | datasource: | ||||
| url: jdbc:mysql://202.165.179.86:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true | |||||
| url: jdbc:mysql://101.200.130.134:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true | |||||
| username: root | username: root | ||||
| password: fm2020test | password: fm2020test | ||||
| type: com.alibaba.druid.pool.DruidDataSource | type: com.alibaba.druid.pool.DruidDataSource | ||||
| @@ -28,7 +28,7 @@ spring: | |||||
| # REDIS | # REDIS | ||||
| redis: | redis: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 6379 | port: 6379 | ||||
| password: iF0rm@2l2ol9 | password: iF0rm@2l2ol9 | ||||
| timeout: 3600 | timeout: 3600 | ||||
| @@ -85,10 +85,10 @@ spring: | |||||
| retry-another-broker-when-not-store-ok: false | retry-another-broker-when-not-store-ok: false | ||||
| retry-times-when-send-failed: 2 | retry-times-when-send-failed: 2 | ||||
| rabbitmq: | rabbitmq: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 5672 | port: 5672 | ||||
| username: fumao | username: fumao | ||||
| password: f9l98&*%%u7flt33 | |||||
| password: f9l98 | |||||
| publisher-confirms: true | publisher-confirms: true | ||||
| publisher-returns: false | publisher-returns: false | ||||
| virtual-host: / | virtual-host: / | ||||
| @@ -136,7 +136,7 @@ wechat: | |||||
| componentToken: formall2018 | componentToken: formall2018 | ||||
| componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN | componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN | ||||
| redis: | redis: | ||||
| host: 202.165.179.86 | |||||
| host: 101.200.130.134 | |||||
| port: 6379 | port: 6379 | ||||
| password: iF0rm@2l2ol9 | password: iF0rm@2l2ol9 | ||||
| timeout: 3600 | timeout: 3600 | ||||