Commit 4fc9bda9 by 吕明尚

logger.info换为logger.debug

parent 9ecb7eda
......@@ -96,12 +96,12 @@ public class QPServiceImplAspect {
couponLog.setMessage(outParams);
couponLog.setCreateTime(new Date());
couponLog.setNumber(TRY_NUMBER);
logger.info("优惠卷操作日志:{}", couponLog);
logger.info("开始执行新增正常日志");
logger.debug("优惠卷操作日志:{}", couponLog);
logger.debug("开始执行新增正常日志");
boolean isSaved = couponLogService.save(couponLog);
System.out.println(couponLog + "============================================================");
if (isSaved) {
logger.info("新增日志成功");
logger.debug("新增日志成功");
} else {
logger.warn("新增日志失败");
}
......@@ -142,13 +142,13 @@ public class QPServiceImplAspect {
} catch (Exception e2) {
logger.error("Error while processing exception log", e2);
} finally {
logger.info("优惠卷操作日志:{}", couponLog);
logger.info("开始执行新增错误日志");
logger.debug("优惠卷操作日志:{}", couponLog);
logger.debug("开始执行新增错误日志");
boolean i = couponLogService.save(couponLog);
if (i) {
logger.info("新增日志成功");
logger.debug("新增日志成功");
} else {
logger.info("新增日志失败");
logger.debug("新增日志失败");
}
}
}
......
......@@ -85,7 +85,7 @@ public class CouponRetryTask {
TuangouReceiptGetConsumedReponseEntity getconsumed = qpService.getconsumed(item.getCouponCode(), openShopUuid);
if (!ObjectUtils.isEmpty(getconsumed)) {
item.setCouponPayPrice(BigDecimal.valueOf(getconsumed.getDeal_price()));
logger.info("美团优惠卷购买金额为:" + item.getCouponPayPrice());
logger.debug("美团优惠卷购买金额为:" + item.getCouponPayPrice());
} else {
item.setUseStatus(UserStatusEnum.EXPIRED.getCode());
}
......@@ -95,7 +95,7 @@ public class CouponRetryTask {
JSONObject amount = certificate.getJSONObject("amount");
if (NumberUtils.isNumber(amount.getStr("pay_amount"))) {
item.setCouponPayPrice(BigDecimal.valueOf(Double.parseDouble(amount.getStr("pay_amount")) / 100));
logger.info("抖音优惠卷购买金额为:" + item.getCouponPayPrice());
logger.debug("抖音优惠卷购买金额为:" + item.getCouponPayPrice());
} else {
logger.warn("Invalid pay amount for coupon " + item.getId());
}
......@@ -123,7 +123,7 @@ public class CouponRetryTask {
TuangouReceiptGetConsumedReponseEntity getconsumed = qpService.getconsumed(item.getCouponCode(), openShopUuid);
if (!ObjectUtils.isEmpty(getconsumed)) {
item.setCouponPayPrice(BigDecimal.valueOf(getconsumed.getDeal_price()));
logger.info("美团优惠卷购买金额为:" + item.getCouponPayPrice());
logger.debug("美团优惠卷购买金额为:" + item.getCouponPayPrice());
} else {
item.setUseStatus(UserStatusEnum.EXPIRED.getCode());
}
......@@ -133,7 +133,7 @@ public class CouponRetryTask {
JSONObject amount = certificate.getJSONObject("amount");
if (NumberUtils.isNumber(amount.getStr("pay_amount"))) {
item.setCouponPayPrice(BigDecimal.valueOf(Double.parseDouble(amount.getStr("pay_amount")) / 100));
logger.info("抖音优惠卷购买金额为:" + item.getCouponPayPrice());
logger.debug("抖音优惠卷购买金额为:" + item.getCouponPayPrice());
} else {
logger.warn("Invalid pay amount for coupon " + item.getId());
}
......
......@@ -87,7 +87,7 @@ public class OrderTask {
public void autoCancel() {
String redisKey = Constants.ORDER_AUTO_CANCEL_KEY;
Long size = redisUtil.getListSize(redisKey);
logger.info("orderTask.autoCancel | size:" + size);
logger.debug("orderTask.autoCancel | size:" + size);
if (size < 1) {
return;
}
......@@ -145,7 +145,7 @@ public class OrderTask {
couponUser.setUseStatus(CouponStatusEnum.NORMAL.getValue());
consumerCouponService.updateById(couponUser);
}
logger.info(String.format("删除订单,订单号【%s】",sOrder.getOrderNo()));
logger.debug(String.format("删除订单,订单号【%s】", sOrder.getOrderNo()));
return Boolean.TRUE;
});
return execute;
......@@ -160,7 +160,7 @@ public class OrderTask {
public void refundApply() {
String redisKey = Constants.ORDER_TASK_REDIS_KEY_AFTER_REFUND_BY_USER;
Long size = redisUtil.getListSize(redisKey);
logger.info("OrderTask.refundApply | size:" + size);
logger.debug("OrderTask.refundApply | size:" + size);
if (size < 1) {
return;
}
......@@ -207,10 +207,10 @@ public class OrderTask {
try {
execute = transactionTemplate.execute(e -> {
orderService.updateById(tempOrder);
logger.info("=================开始处理优惠券退款=================");
logger.info("=================" + sOrder.getId() + "=================");
logger.info("=================" + sOrder.getCouponId() + "=================");
logger.info("=================================================");
logger.debug("=================开始处理优惠券退款=================");
logger.debug("=================" + sOrder.getId() + "=================");
logger.debug("=================" + sOrder.getCouponId() + "=================");
logger.debug("=================================================");
// 退优惠券
if (ObjectUtil.isNotNull(sOrder.getCouponId())) {
SConsumerCoupon couponUser = consumerCouponService.getById(sOrder.getCouponId());
......@@ -244,17 +244,17 @@ public class OrderTask {
SOrder byOrderNo = orderService.getByOrderNo(String.valueOf(orderNo));
if (ObjectUtil.isEmpty(byOrderNo)) {
redisUtil.delete(o);
logger.info("订单号为:" + jsonObject.getStr("orderNo") + "的订单不存在");
logger.debug("订单号为:" + jsonObject.getStr("orderNo") + "的订单不存在");
return;
}
if (!byOrderNo.getStatus().equals(OrderStatusEnum.UNUSED.getCode())) {
redisUtil.delete(o);
logger.info("订单号为:" + jsonObject.getStr("orderNo") + "的订单状态异常");
logger.debug("订单号为:" + jsonObject.getStr("orderNo") + "的订单状态异常");
return;
}
if (OrderStatusEnum.CANCEL.getCode().equals(byOrderNo.getStatus())) {
redisUtil.delete(o);
logger.info("订单号为:" + jsonObject.getStr("orderNo") + "的订单已取消");
logger.debug("订单号为:" + jsonObject.getStr("orderNo") + "的订单已取消");
return;
}
//时间到期前30分钟到29分
......@@ -267,7 +267,7 @@ public class OrderTask {
SStore sStore = storeService.getById(byOrderNo.getStoreId());
SRoom sRoom = roomService.getById(byOrderNo.getRoomId());
smsService.sendSmsOrderStartRemind(byOrderNo.getConsumerPhone(), sStore, sRoom);
logger.info("订单号为:" + jsonObject.getStr("orderNo") + "的订单开始预定时间到15分钟");
logger.debug("订单号为:" + jsonObject.getStr("orderNo") + "的订单开始预定时间到15分钟");
return;
}
if (expirationTime.getTime() < new Date().getTime()) {
......@@ -299,10 +299,10 @@ public class OrderTask {
room.setUpdateTime(new Date());
}
});
// logger.info("开始通电!!!!");
// logger.debug("开始通电!!!!");
//到达预定时间进行通电
// deviceOpService.openOrCloseDevice(item.getRoomId(), item.getConsumerPhone(), OpTypeEnum.GET_ELECTRIC.getCode(), false, ZERO);
// logger.info("通电完成!!!!");
// logger.debug("通电完成!!!!");
redisUtil.delete(ReceiptRdeisEnum.ORDER_NO.getValue() + item.getOrderNo());
}
});
......
......@@ -137,7 +137,7 @@ public class RedisTask {
expiredCoupons.add(coupon.getId());
}
}
logger.info("券码:{}->查询结束:{}", coupon.getCouponCode(), getconsumed);
logger.debug("券码:{}->查询结束:{}", coupon.getCouponCode(), getconsumed);
} else if (StringUtils.isNoneEmpty(coupon.getTiktokSkuId()) && coupon.getPlatformType().equals(PlatformTypeEnum.TIKTOK.getCode())) {
//抖音复验券
JSONObject object = tiktokService.certificateGet(coupon.getEncryptedCode());
......@@ -248,7 +248,7 @@ public class RedisTask {
sOrder = isOrderService.getByOrderNo(jsonObject.getStr("orderNo"));
if (ObjectUtils.isEmpty(sOrder)) {
redisUtil.delete(o);
logger.info("订单号为:{}的订单不存在", jsonObject.getStr("orderNo"));
logger.debug("订单号为:{}的订单不存在", jsonObject.getStr("orderNo"));
throw new BaseException("订单不存在!");
}
}
......@@ -260,7 +260,7 @@ public class RedisTask {
DateUtil.format(new Date(), DatePattern.NORM_DATETIME_PATTERN),
DateUtil.format(DateUtil.offsetMinute(new Date(), 1), DatePattern.NORM_DATETIME_PATTERN), "1",
DeviceOpSourceEnum.DEVICE_SOURCE_20.getCode());
logger.info("订单号为:" + sOrder.getOrderNo() + "的订单距离结束时间还有15分钟");
logger.debug("订单号为:" + sOrder.getOrderNo() + "的订单距离结束时间还有15分钟");
// 从门店集合中判断门店id相同的门店对象
SOrder finalSOrder = sOrder;
SStore sStore = sStoreList.stream().filter(item -> item.getId().equals(finalSOrder.getStoreId())).findFirst().orElse(null);
......@@ -270,7 +270,7 @@ public class RedisTask {
smsService.sendSmsOrderEndRemind(sOrder.getConsumerPhone(), sStore, sRoom);
//推送订单结束消息
wechatNewService.sendMiniSubscribeMessage(sOrder, MessageReminderEnum.END);
logger.info("保洁工单派单通知发送开始");
logger.debug("保洁工单派单通知发送开始");
//通知保洁人员
sConsumerService.selectListByStoreId(sOrder.getStoreId()).stream().forEach(item -> {
// 循环发送短信提示门店保洁打扫卫生
......@@ -278,7 +278,7 @@ public class RedisTask {
//公众号发送保洁工单派单通知
wechatNewService.sendPublicTemplateMessage(finalSOrder, MessageReminderEnum.CLEANING, item.getId());
});
logger.info("保洁工单派单通知发送结束");
logger.debug("保洁工单派单通知发送结束");
return;
}
//判断时间是否在5分钟到4分钟
......@@ -288,7 +288,7 @@ public class RedisTask {
DateUtil.format(new Date(), DatePattern.NORM_DATETIME_PATTERN),
DateUtil.format(DateUtil.offsetMinute(new Date(), 1), DatePattern.NORM_DATETIME_PATTERN), "1",
DeviceOpSourceEnum.DEVICE_SOURCE_20.getCode());
logger.info("订单号为:" + sOrder.getOrderNo() + "的订单距离结束时间还有5分钟");
logger.debug("订单号为:" + sOrder.getOrderNo() + "的订单距离结束时间还有5分钟");
}
//判断是否过期
if (expirationTime.getTime() < new Date().getTime()) {
......@@ -329,7 +329,7 @@ public class RedisTask {
map.put("expirationTime", date.toString());
JSONObject json = new JSONObject(map);
redisUtil.set(ReceiptRdeisEnum.ROOM_EXPIRE_TIME.getValue() + sOrder.getOrderNo(), json.toString());
logger.info("订单号为:" + sOrder.getOrderNo() + "的订单已结束,更改订单状态为已使用");
logger.debug("订单号为:" + sOrder.getOrderNo() + "的订单已结束,更改订单状态为已使用");
}
});
......@@ -375,7 +375,7 @@ public class RedisTask {
//更改订单状态
sOrder.setStatus(OrderStatusEnum.USED.getCode());
isOrderService.updateById(sOrder);
logger.info("订单号为:" + sOrder.getOrderNo() + "的订单已有续单,更改订单状态为已使用");
logger.debug("订单号为:" + sOrder.getOrderNo() + "的订单已有续单,更改订单状态为已使用");
return true;
}
return false;
......
......@@ -357,7 +357,7 @@ public class DeviceOpServiceImpl implements DeviceOpService {
// 设置消息队列
this.setRedisCache(device.getDevId(), mqttxVo);
}
logger.info("延时执行语音播报完成!");
logger.debug("延时执行语音播报完成!");
} catch (InterruptedException e) {
e.printStackTrace();
}
......@@ -400,7 +400,7 @@ public class DeviceOpServiceImpl implements DeviceOpService {
mqttxVo.setSource(source);
// 设置消息队列
this.setRedisCache(device.getDevId(), mqttxVo);
logger.info("延时执行开锁/关锁、取电/断电完成!");
logger.debug("延时执行开锁/关锁、取电/断电完成!");
} catch (InterruptedException e) {
e.printStackTrace();
}
......
......@@ -129,7 +129,7 @@ public class OrderPayServiceImpl implements OrderPayService {
CreateOrderRequestVo unifiedorderVo = getUnifiedorderVo(sOrder, userToken.getToken(), appId, mchId, signKey);
// 预下单(统一下单)
CreateOrderResponseVo responseVo = wechatNewService.payUnifiedorder(unifiedorderVo);
logger.info("CreateOrderResponseVo :", JsonConvertUtil.write2JsonStr(responseVo));
logger.debug("CreateOrderResponseVo :", JsonConvertUtil.write2JsonStr(responseVo));
// 组装前端预下单参数
ConcurrentHashMap<String, String> map = new ConcurrentHashMap<>();
map.put("appId", unifiedorderVo.getAppid());
......@@ -192,7 +192,7 @@ public class OrderPayServiceImpl implements OrderPayService {
SaobeiMiniPayRequestVo unifiedorderVo = getSaobeiUnifiedOrderVo(sOrder, userToken.getToken(), appId, mchId, signKey);
// 预下单(统一下单)
SaobeiMiniPayResponse response = saobeiService.wechatMinipay(unifiedorderVo);
logger.info("SaobeiMiniPayResponse :", JsonConvertUtil.write2JsonStr(response));
logger.debug("SaobeiMiniPayResponse :", JsonConvertUtil.write2JsonStr(response));
// 组装前端预下单参数
ConcurrentHashMap<String, String> map = new ConcurrentHashMap<>();
map.put("appId", response.getAppId());
......@@ -279,7 +279,7 @@ public class OrderPayServiceImpl implements OrderPayService {
// SaobeiMiniPayRequestVo unifiedorderVo = getSaobeiUnifiedRechargeVo(recharge, userToken.getToken(), appId, mchId, signKey);
// // 预下单(统一下单)
// SaobeiMiniPayResponse response = saobeiService.wechatMinipay(unifiedorderVo);
// logger.info("SaobeiMiniPayResponse :", JsonConvertUtil.write2JsonStr(response));
// logger.debug("SaobeiMiniPayResponse :", JsonConvertUtil.write2JsonStr(response));
// // 组装前端预下单参数
// ConcurrentHashMap<String, String> map = new ConcurrentHashMap<>();
// map.put("appId", response.getAppId());
......
......@@ -232,8 +232,8 @@ public class QPServiceImpl implements QPService {
if (Boolean.FALSE.equals(b)) {
throw new RuntimeException("请联系管理员");
}
logger.info("code:{}", code);
logger.info("验卷准备开始");
logger.debug("code:{}", code);
logger.debug("验卷准备开始");
String o = redisUtil.get(ReceiptRdeisEnum.MT_SESSION_KEY.getValue());
JSONObject sessionKey = new JSONObject(o);
String session = (String) sessionKey.get("access_token");
......@@ -245,7 +245,7 @@ public class QPServiceImpl implements QPService {
logger.error("验卷准备失败:{}", invoke.getMsg());
throw new RuntimeException(invoke.getMsg());
}
logger.info("验卷准备结束:{}", invoke.getData().toString());
logger.debug("验卷准备结束:{}", invoke.getData().toString());
return invoke.getData();
}
......@@ -256,8 +256,8 @@ public class QPServiceImpl implements QPService {
@Override
public List<TuangouReceiptConsumeResponseEntity> consume(String code, int count, String openShopUuid, String status) {
String o = redisUtil.get(ReceiptRdeisEnum.MT_SESSION_KEY.getValue());
logger.info("code:{}", code);
logger.info("验卷开始");
logger.debug("code:{}", code);
logger.debug("验卷开始");
JSONObject sessionKey = new JSONObject(o);
String session = (String) sessionKey.get("access_token");
SConsumer user = FrontTokenComponent.getWxSConsumerEntry();
......@@ -279,7 +279,7 @@ public class QPServiceImpl implements QPService {
throw new RuntimeException(invoke.getMsg());
}
redisUtil.delete(ReceiptRdeisEnum.PREPARE.getValue() + code);
logger.info("验卷结束:{}", invoke.getData());
logger.debug("验卷结束:{}", invoke.getData());
return invoke.getData();
}
......
......@@ -79,13 +79,13 @@ public class SConsumerCenterServiceImpl extends ServiceImpl<SConsumerMapper, SCo
public LoginResponse weChatAuthorizeProgramLogin(String code, RegisterThirdSConsumerRequest request) {
//访问微信小程序的API 通过 code 来获取 用户信息
WeChatMiniAuthorizeVo response = wechatNewService.miniAuthCode(code);
logger.info("小程序登陆成功 = " + JSON.toJSONString(response));
logger.info("小程序登陆成功 = OpenId " + response.getOpenId());
logger.debug("小程序登陆成功 = " + JSON.toJSONString(response));
logger.debug("小程序登陆成功 = OpenId " + response.getOpenId());
//检测是否存在
SConsumerToken sConsumerToken = sConsumerTokenService.getByOpenid(response.getOpenId());
LoginResponse loginResponse = new LoginResponse();
if (ObjectUtil.isNotNull(sConsumerToken)) {// 已存在,正常登录
logger.info("小程序登陆成功 = Id " + sConsumerToken.getUid());
logger.debug("小程序登陆成功 = Id " + sConsumerToken.getUid());
SConsumer sConsumer = sConsumerService.getById(sConsumerToken.getUid());
if (sConsumer == null || sConsumer.getStatus() == 0) {
throw new BaseException("当前账户已禁用,请联系管理员!");
......
......@@ -945,14 +945,14 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
sConsumer.setPosition(3);
List<SConsumer> consumers = sConsumerService.selectAllocatedList(sConsumer);
if (consumers.size() > 0) {
logger.info("订单预订成功通知发送开始");
logger.debug("订单预订成功通知发送开始");
consumers.forEach(o -> {
phones.add(o.getPhone());
//公众号发送订单预订成功通知
wechatNewService.sendPublicTemplateMessage(sOrder, MessageReminderEnum.ORDER_RESERVE, o.getId());
});
smsService.sendSmsOrderPredetermine(phones, sOrder, sStore, room);
logger.info("订单预订成功通知发送结束");
logger.debug("订单预订成功通知发送结束");
}
}
return response;
......@@ -1460,14 +1460,14 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
sConsumer.setPosition(3);
List<SConsumer> consumers = sConsumerService.selectAllocatedList(sConsumer);
if (consumers.size() > 0) {
logger.info("订单预订成功通知发送开始");
logger.debug("订单预订成功通知发送开始");
consumers.forEach(o->{
phones.add(o.getPhone());
//公众号发送订单预订成功通知
wechatNewService.sendPublicTemplateMessage(sOrder, MessageReminderEnum.ORDER_RESERVE, o.getId());
});
smsService.sendSmsOrderPredetermine(phones, sOrder, sStore, sRoom);
logger.info("订单预订成功通知发送结束");
logger.debug("订单预订成功通知发送结束");
}
}
......
......@@ -792,7 +792,7 @@ public class WechatNewServiceImpl implements WechatNewService {
String accessToken = getPublicAccessToken();
String url = StrUtil.format(WeChatConstants.WECHAT_PUBLIC_MENU_CREATE_URL, accessToken);
String result = restTemplateUtil.postJsonData(url, JSONObject.parseObject(data));
logger.info("微信消息发送结果:" + result);
logger.debug("微信消息发送结果:" + result);
JSONObject jsonObject = JSONObject.parseObject(result);
if (ObjectUtil.isNull(jsonObject)) {
throw new BaseException("微信平台接口异常,没任何数据返回!");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment