规范长度限制
This commit is contained in:
parent
e3626a094d
commit
d25f17782b
@ -18,6 +18,8 @@ import java.util.List;
|
|||||||
@ToString
|
@ToString
|
||||||
public class CashierParam {
|
public class CashierParam {
|
||||||
|
|
||||||
|
static Long MAX_DETAIL_LENGTH = 30L;
|
||||||
|
|
||||||
@ApiModelProperty(value = "价格")
|
@ApiModelProperty(value = "价格")
|
||||||
private Double price;
|
private Double price;
|
||||||
|
|
||||||
@ -48,7 +50,7 @@ public class CashierParam {
|
|||||||
return "清单详细";
|
return "清单详细";
|
||||||
}
|
}
|
||||||
//对参数长度进行限制
|
//对参数长度进行限制
|
||||||
if (!StringUtils.isEmpty(detail) && detail.length() > 30) {
|
if (!StringUtils.isEmpty(detail) && detail.length() > MAX_DETAIL_LENGTH) {
|
||||||
detail = detail.substring(30);
|
detail = detail.substring(30);
|
||||||
}
|
}
|
||||||
return StringUtils.filterSpecialChart(detail);
|
return StringUtils.filterSpecialChart(detail);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user