Authored by wujiexiang

Merge branch 'dev-detectnotpass' into hotfix-20190826

... ... @@ -8,6 +8,7 @@ import com.yohoufo.order.service.IInviteSettlementService;
import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator;
import com.yohoufo.order.service.support.codegenerator.bean.CodeMeta;
import com.yohoufo.order.utils.NamedThreadFactory;
import com.yohoufo.order.utils.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -51,7 +52,7 @@ public class OrderStatusFlowService {
buyerOrderStatusFlow.setOrderCode(orderCode);
buyerOrderStatusFlow.setStatus(status);
buyerOrderStatusFlow.setCreateTime(DateUtil.getCurrentTimeSecond());
buyerOrderStatusFlow.setRemark(remark);
buyerOrderStatusFlow.setRemark(StringUtils.substring(remark, 256));
logger.info("OrderStatusFlowService add execute , buyerOrderStatusFlow {} ", buyerOrderStatusFlow);
buyerOrderStatusFlowMapper.insert(buyerOrderStatusFlow);
});
... ...
package com.yohoufo.order.utils;
public final class StringUtils {
/**
* 截取字符长度,从0到maxLength
*
* @param text
* @param maxLength
* @return
*/
public static String substring(String text, int maxLength) {
if (text != null && text.length() > maxLength) {
return text.substring(0, maxLength);
} else {
return text;
}
}
}
\ No newline at end of file
... ...