bugfix 修复若干商品管理Bug;小程序商品列表不展示下架商品
This commit is contained in:
@@ -3,6 +3,7 @@ package com.cxyxiaomo.epp.PageTable.enums;
|
||||
public enum AddType {
|
||||
CAN_NOT_ADD("plainText"),
|
||||
INPUT("input"),
|
||||
INPUT_NUMBER("input-number"),
|
||||
TEXTAREA("textarea"),
|
||||
SELECT("select"),
|
||||
IMAGE("image");
|
||||
|
@@ -3,6 +3,7 @@ package com.cxyxiaomo.epp.PageTable.enums;
|
||||
public enum EditType {
|
||||
CAN_NOT_EDIT("plainText"),
|
||||
INPUT("input"),
|
||||
INPUT_NUMBER("input-number"),
|
||||
TEXTAREA("textarea"),
|
||||
SELECT("select"),
|
||||
IMAGE("image");
|
||||
|
@@ -43,11 +43,12 @@ public class FieldRuleBuilder {
|
||||
return this;
|
||||
}
|
||||
|
||||
public FieldRuleBuilder number() {
|
||||
rules.put("type", "number");
|
||||
rules.put("message", fieldDisplayName + "必须为数字");
|
||||
return this;
|
||||
}
|
||||
// public FieldRuleBuilder number() {
|
||||
// // rules.put("type", "number"); // 字符串类型的数字匹配不上
|
||||
// rules.put("regexp", "^\\d+?$");
|
||||
// rules.put("message", fieldDisplayName + "必须为数字");
|
||||
// return this;
|
||||
// }
|
||||
|
||||
public FieldRuleBuilder min(Integer min) {
|
||||
rules.put("min", min);
|
||||
@@ -61,6 +62,7 @@ public class FieldRuleBuilder {
|
||||
return this;
|
||||
}
|
||||
|
||||
// 字符串类型长度范围
|
||||
public FieldRuleBuilder minMax(Integer min, Integer max) {
|
||||
rules.put("min", min);
|
||||
rules.put("max", max);
|
||||
@@ -68,6 +70,28 @@ public class FieldRuleBuilder {
|
||||
return this;
|
||||
}
|
||||
|
||||
// 数字类型数值范围
|
||||
// public FieldRuleBuilder range(Integer min, Integer max) {
|
||||
// // rules.put("min", min);
|
||||
// // rules.put("max", max);
|
||||
// rules.put("message", fieldDisplayName + "应大于 " + min + " 且小于 " + max);
|
||||
// return this;
|
||||
// }
|
||||
|
||||
// // 数字类型数字个数
|
||||
// public FieldRuleBuilder price(Integer minLen, Integer maxLen) {
|
||||
// rules.put("regexp", "^\\d{" + minLen + "," + maxLen + "}(\\.\\d{1,2})?$");
|
||||
// rules.put("message", fieldDisplayName + "应大于等于 " + Math.pow(10, minLen - 1) + " ,小于等于 " + (Math.pow(10, maxLen) - 1) + " 且小数位数不超过 2 位");
|
||||
// return this;
|
||||
// }
|
||||
|
||||
// public FieldRuleBuilder regexp(String regexp) {
|
||||
// // rules.put("type", "regexp");
|
||||
// rules.put("pattern", regexp);
|
||||
// rules.put("message", fieldDisplayName + "输入不符合要求,请检查");
|
||||
// return this;
|
||||
// }
|
||||
|
||||
public FieldRuleBuilder length(Integer len) {
|
||||
rules.put("min", len);
|
||||
rules.put("max", len);
|
||||
|
Reference in New Issue
Block a user