Authored by wujiexiang

Merge branch 'dev-detectnotpass' into hotfix-20190826

@@ -8,6 +8,7 @@ import com.yohoufo.order.service.IInviteSettlementService; @@ -8,6 +8,7 @@ import com.yohoufo.order.service.IInviteSettlementService;
8 import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator; 8 import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator;
9 import com.yohoufo.order.service.support.codegenerator.bean.CodeMeta; 9 import com.yohoufo.order.service.support.codegenerator.bean.CodeMeta;
10 import com.yohoufo.order.utils.NamedThreadFactory; 10 import com.yohoufo.order.utils.NamedThreadFactory;
  11 +import com.yohoufo.order.utils.StringUtils;
11 import org.slf4j.Logger; 12 import org.slf4j.Logger;
12 import org.slf4j.LoggerFactory; 13 import org.slf4j.LoggerFactory;
13 import org.springframework.beans.factory.annotation.Autowired; 14 import org.springframework.beans.factory.annotation.Autowired;
@@ -51,7 +52,7 @@ public class OrderStatusFlowService { @@ -51,7 +52,7 @@ public class OrderStatusFlowService {
51 buyerOrderStatusFlow.setOrderCode(orderCode); 52 buyerOrderStatusFlow.setOrderCode(orderCode);
52 buyerOrderStatusFlow.setStatus(status); 53 buyerOrderStatusFlow.setStatus(status);
53 buyerOrderStatusFlow.setCreateTime(DateUtil.getCurrentTimeSecond()); 54 buyerOrderStatusFlow.setCreateTime(DateUtil.getCurrentTimeSecond());
54 - buyerOrderStatusFlow.setRemark(remark); 55 + buyerOrderStatusFlow.setRemark(StringUtils.substring(remark, 256));
55 logger.info("OrderStatusFlowService add execute , buyerOrderStatusFlow {} ", buyerOrderStatusFlow); 56 logger.info("OrderStatusFlowService add execute , buyerOrderStatusFlow {} ", buyerOrderStatusFlow);
56 buyerOrderStatusFlowMapper.insert(buyerOrderStatusFlow); 57 buyerOrderStatusFlowMapper.insert(buyerOrderStatusFlow);
57 }); 58 });
  1 +package com.yohoufo.order.utils;
  2 +
  3 +public final class StringUtils {
  4 +
  5 +
  6 + /**
  7 + * 截取字符长度,从0到maxLength
  8 + *
  9 + * @param text
  10 + * @param maxLength
  11 + * @return
  12 + */
  13 + public static String substring(String text, int maxLength) {
  14 + if (text != null && text.length() > maxLength) {
  15 + return text.substring(0, maxLength);
  16 + } else {
  17 + return text;
  18 + }
  19 + }
  20 +}