Authored by suibianqige

--task=null --user=杨长江 订单服务配置

... ... @@ -37,4 +37,37 @@ public @interface MetaProperty {
* @return
*/
boolean readOnly() default false;
/**
* 标注属性是否是比例,如果是比例
* 前台校验0~1范围的两位小数
* 默认不是比例
* @return
*/
boolean scale() default false;
/**
* 数据类型:option:代表下拉框,可选
*
* @return
*/
String type() default "";
/**
* 仅当type类型为option且可选的值类型为int时填写
* @return
*/
int[] intOps() default {};
/**
* 仅当type类型为option且可选的值类型为String时填写
* @return
*/
String[] strOps() default {};
/**
* 仅当type类型为option时填写(可选项展示在前台的名称)
* @return
*/
String[] showStr() default {};
}
... ...
... ... @@ -13,30 +13,30 @@ import org.springframework.stereotype.Component;
@Component("buyer_bid_config")
public class BuyerBidConfig {
private BaseConfig baseConfig;
private BasConfig basConfig;
private DConfig dConfig;
@Data
private static class BaseConfig{
private static class BasConfig{
@MetaProperty()
private Integer minBidPrice;
@MetaProperty(rootGroup = "基础配置",desc = "最小求购价(元)",type = "double")
private Double minBidPrice;
@MetaProperty()
@MetaProperty(rootGroup = "基础配置",desc = "建议比例",scale = true)
private Double suggestRate;
}
@Data
private static class DConfig{
@MetaProperty()
@MetaProperty(rootGroup = "定金配置",desc = "定金比例(求购价格占比)",scale = true)
private Double rate;
@MetaProperty()
private Integer min;
@MetaProperty(rootGroup = "定金配置",desc = "最小金额(元)",type = "double")
private Double min;
@MetaProperty()
private Integer max;
@MetaProperty(rootGroup = "定金配置",desc = "最大金额(元)",type = "double")
private Double max;
}
}
... ...
... ... @@ -25,34 +25,34 @@ public class BuyerOrderFee {
@Data
private static class HkInStock{
@MetaProperty()
@MetaProperty(rootGroup = "香港现货",desc = "运费费用(元)",type = "double")
private Double shipFee;
@MetaProperty()
@MetaProperty(rootGroup = "香港现货",desc = "关税费率",scale = true)
private Double tariffRate;
}
@Data
private static class Deposit{
@MetaProperty()
@MetaProperty(rootGroup = "寄存",desc = "仓储管理费用(元)",type = "double")
private Double storageManagementFee;
}
@Data
private static class QuickDeliver{
@MetaProperty()
@MetaProperty(rootGroup = "闪购寄存",desc = "仓储管理费用(元)",type = "double")
private Double storageManagementFee;
@MetaProperty()
@MetaProperty(rootGroup = "闪购寄存",desc = "服务费用(元)",type = "double")
private Double quickDeliverServiceFee;
}
@Data
private static class FastDelivery{
@MetaProperty()
@MetaProperty(rootGroup = "急速寄存",desc = "仓储管理费用(元)",type = "double")
private Double storageManagementFee;
}
}
... ...
... ... @@ -27,7 +27,7 @@ public class BuyerOrderViolationPenalty {
@Data
private static class PullWool{
@MetaProperty()
@MetaProperty(rootGroup = "薅羊毛处罚",desc = "比例",scale = true)
private Double rate;
private MoneyRange moneyRange;
... ... @@ -35,11 +35,11 @@ public class BuyerOrderViolationPenalty {
@Data
private static class MoneyRange{
@MetaProperty()
private Integer max;
@MetaProperty(rootGroup = "薅羊毛处罚",desc = "最高金额(元)",type = "double")
private Double max;
@MetaProperty()
private Integer min;
@MetaProperty(rootGroup = "薅羊毛处罚",desc = "最低金额(元)",type = "double")
private Double min;
}
}
}
... ...
... ... @@ -20,21 +20,21 @@ public class BuyerOverseasOrderCutPolicy {
@Data
private static class TariffAmount{
@MetaProperty()
@MetaProperty(rootGroup = "关税优惠政策",desc = "优惠策略",type = "option",intOps = {0,1,2},showStr = {"无优惠","按百分比优惠","减免固定金额"})
private Integer type;
@MetaProperty()
private Integer percent;
@MetaProperty(rootGroup = "关税优惠政策",desc = "减免比例(%)/金额(元)",type = "double")
private Double percent;
}
@Data
private static class ShipFee{
@MetaProperty()
@MetaProperty(rootGroup = "运费优惠政策",desc = "优惠策略",type = "option",intOps = {0,1,2},showStr = {"无优惠","按百分比优惠","减免固定金额"})
private Integer type;
@MetaProperty()
private Integer amount;
@MetaProperty(rootGroup = "运费优惠政策",desc = "减免比例(%)/金额(元)",type = "double")
private Double amount;
}
}
... ...
... ... @@ -53,12 +53,12 @@ public class BuyerPenalty {
@Data
private static class StagedCollection{
@MetaProperty(desc = "排序",rootGroup ="预售规则", childGroup ="仓库收货前")
@MetaProperty(desc = "排序",rootGroup ="预售规则", childGroup ="仓库收货前",type = "int")
private Integer index;
private MoneyRange moneyRange;
@MetaProperty(desc = "比例",rootGroup ="预售规则", childGroup ="仓库收货前")
@MetaProperty(desc = "比例",rootGroup ="预售规则", childGroup ="仓库收货前",scale = true)
private Double rate;
private TimeRange timeRange;
... ... @@ -69,11 +69,11 @@ public class BuyerPenalty {
@Data
private static class MoneyRange{
@MetaProperty(desc = "最高罚款(元)",rootGroup ="预售规则", childGroup ="仓库收货前")
private Integer max;
@MetaProperty(desc = "最高罚款(元)",rootGroup ="预售规则", childGroup ="仓库收货前",type = "double")
private Double max;
@MetaProperty(desc = "最高罚款(元)",rootGroup ="预售规则", childGroup ="仓库收货前")
private Integer min;
@MetaProperty(desc = "最高罚款(元)",rootGroup ="预售规则", childGroup ="仓库收货前",type = "double")
private Double min;
}
/**
... ... @@ -82,10 +82,10 @@ public class BuyerPenalty {
@Data
private static class TimeRange{
@MetaProperty(desc = "最大时间(分钟)",rootGroup ="预售规则", childGroup ="仓库收货前")
@MetaProperty(desc = "最大时间(分钟)",rootGroup ="预售规则", childGroup ="仓库收货前",type = "int")
private Integer max;
@MetaProperty(desc = "最小时间(分钟)",rootGroup ="预售规则", childGroup ="仓库收货前")
@MetaProperty(desc = "最小时间(分钟)",rootGroup ="预售规则", childGroup ="仓库收货前",type = "int")
private Integer min;
}
}
... ... @@ -102,10 +102,10 @@ public class BuyerPenalty {
@Data
private static class StagedCollection{
@MetaProperty(desc = "排序",rootGroup ="预售规则" ,childGroup = "卖家发货前")
@MetaProperty(desc = "排序",rootGroup ="预售规则" ,childGroup = "卖家发货前",type = "int")
private Integer index;
@MetaProperty(desc = "比例",rootGroup ="预售规则" ,childGroup = "卖家发货前")
@MetaProperty(desc = "比例",rootGroup ="预售规则" ,childGroup = "卖家发货前",scale = true)
private Double rate;
private MoneyRange moneyRange;
... ... @@ -117,11 +117,11 @@ public class BuyerPenalty {
*/
@Data
private static class MoneyRange{
@MetaProperty(desc = "最小金额(元)",rootGroup ="预售规则" ,childGroup = "卖家发货前")
private Integer min;
@MetaProperty(desc = "最小金额(元)",rootGroup ="预售规则" ,childGroup = "卖家发货前",type = "double")
private Double min;
@MetaProperty(desc = "最大金额(元)",rootGroup ="预售规则" ,childGroup = "卖家发货前")
private Integer max;
@MetaProperty(desc = "最大金额(元)",rootGroup ="预售规则" ,childGroup = "卖家发货前",type = "double")
private Double max;
}
/**
... ... @@ -130,10 +130,10 @@ public class BuyerPenalty {
@Data
private static class TimeRange{
@MetaProperty(desc = "最小时间(分钟)",rootGroup ="预售规则" ,childGroup = "卖家发货前")
@MetaProperty(desc = "最小时间(分钟)",rootGroup ="预售规则" ,childGroup = "卖家发货前",type = "int")
private Integer min;
@MetaProperty(desc = "最大时间(分钟)",rootGroup ="预售规则" ,childGroup = "卖家发货前")
@MetaProperty(desc = "最大时间(分钟)",rootGroup ="预售规则" ,childGroup = "卖家发货前",type = "int")
private Integer max;
}
}
... ... @@ -167,10 +167,10 @@ public class BuyerPenalty {
@Data
private static class StagedCollection{
@MetaProperty(desc = "排序", rootGroup = "现货规则", childGroup = "仓库收货前")
@MetaProperty(desc = "排序", rootGroup = "现货规则", childGroup = "仓库收货前",type = "int")
private Integer index;
@MetaProperty(desc = "比例", rootGroup = "现货规则", childGroup = "仓库收货前")
@MetaProperty(desc = "比例", rootGroup = "现货规则", childGroup = "仓库收货前",scale = true)
private Double rate;
private MoneyRange moneyRange;
... ... @@ -182,11 +182,11 @@ public class BuyerPenalty {
*/
@Data
private static class MoneyRange{
@MetaProperty(desc = "最小金额(元)", rootGroup = "现货规则", childGroup = "仓库收货前")
private Integer min;
@MetaProperty(desc = "最小金额(元)", rootGroup = "现货规则", childGroup = "仓库收货前",type = "double")
private Double min;
@MetaProperty(desc = "最大金额(元)", rootGroup = "现货规则", childGroup = "仓库收货前")
private Integer max;
@MetaProperty(desc = "最大金额(元)", rootGroup = "现货规则", childGroup = "仓库收货前",type = "double")
private Double max;
}
/**
... ... @@ -195,10 +195,10 @@ public class BuyerPenalty {
@Data
private static class TimeRange{
@MetaProperty(desc = "最小时间(分钟)", rootGroup = "现货规则", childGroup = "仓库收货前")
@MetaProperty(desc = "最小时间(分钟)", rootGroup = "现货规则", childGroup = "仓库收货前",type = "int")
private Integer min;
@MetaProperty(desc = "最大时间(分钟)", rootGroup = "现货规则", childGroup = "仓库收货前")
@MetaProperty(desc = "最大时间(分钟)", rootGroup = "现货规则", childGroup = "仓库收货前",type = "int")
private Integer max;
}
}
... ... @@ -215,10 +215,10 @@ public class BuyerPenalty {
@Data
private static class StagedCollection{
@MetaProperty(desc = "排序",rootGroup = "现货规则", childGroup = "卖家发货前")
@MetaProperty(desc = "排序",rootGroup = "现货规则", childGroup = "卖家发货前",type = "int")
private Integer index;
@MetaProperty(desc = "比例",rootGroup = "现货规则", childGroup = "卖家发货前")
@MetaProperty(desc = "比例",rootGroup = "现货规则", childGroup = "卖家发货前",scale = true)
private Double rate;
private MoneyRange moneyRange;
... ... @@ -230,11 +230,11 @@ public class BuyerPenalty {
*/
@Data
private static class MoneyRange{
@MetaProperty(desc = "最小金额(元)",rootGroup = "现货规则", childGroup = "卖家发货前")
private Integer min;
@MetaProperty(desc = "最小金额(元)",rootGroup = "现货规则", childGroup = "卖家发货前",type = "double")
private Double min;
@MetaProperty(desc = "最大金额(元)",rootGroup = "现货规则", childGroup = "卖家发货前")
private Integer max;
@MetaProperty(desc = "最大金额(元)",rootGroup = "现货规则", childGroup = "卖家发货前",type = "double")
private Double max;
}
/**
... ... @@ -243,10 +243,10 @@ public class BuyerPenalty {
@Data
private static class TimeRange{
@MetaProperty(desc = "最小时间(分钟)",rootGroup = "现货规则", childGroup = "卖家发货前")
@MetaProperty(desc = "最小时间(分钟)",rootGroup = "现货规则", childGroup = "卖家发货前",type = "int")
private Integer min;
@MetaProperty(desc = "最大时间(分钟)",rootGroup = "现货规则", childGroup = "卖家发货前")
@MetaProperty(desc = "最大时间(分钟)",rootGroup = "现货规则", childGroup = "卖家发货前",type = "int")
private Integer max;
}
}
... ...
... ... @@ -7,13 +7,13 @@ import org.springframework.stereotype.Component;
/**
* @Author: 杨长江
* @Date: 2019-11-30 10:24
* @Description: 说明
* @Description: 仓库的违约费和续约费
*/
@Data
@Component(value = "depositFee")
public class DepositFee {
@MetaProperty(desc = "contract_fee",rootGroup = "违约费比例(两位小数)")
@MetaProperty(desc = "未到期的召回服务费",rootGroup = "违约费",type = "double")
private Double contract_fee;
private Renew renew;
... ... @@ -24,10 +24,10 @@ public class DepositFee {
@Data
private static class Renew {
@MetaProperty(desc = "天数",rootGroup = "首次违约")
@MetaProperty(desc = "天数",rootGroup = "续约费用",type = "int")
private Integer day;
@MetaProperty(desc = "比例",rootGroup = "首次违约")
@MetaProperty(desc = "金额",rootGroup = "续约费用",type = "double")
private Double amount;
}
... ... @@ -35,10 +35,10 @@ public class DepositFee {
@Data
private static class Expired{
@MetaProperty(desc = "天数",rootGroup = "逾期")
@MetaProperty(desc = "天数",rootGroup = "逾期费用",type = "int")
private Integer day;
@MetaProperty(desc = "比例",rootGroup = "逾期")
@MetaProperty(desc = "金额",rootGroup = "逾期费用",type = "double")
private Double amount;
}
}
... ...
... ... @@ -13,6 +13,6 @@ import org.springframework.stereotype.Component;
@Component("order_code_rule")
public class OrderCodeRule {
@MetaProperty()
@MetaProperty(rootGroup = "订单生成规则",desc = "环境")
private String env;
}
... ...
... ... @@ -25,13 +25,13 @@ public class PresaleThreshold {
@Data
private static class TimeRange{
@MetaProperty()
@MetaProperty(rootGroup = "通知卖家发货" , desc = "最小时间",type = "int")
private Integer min;
@MetaProperty()
@MetaProperty(rootGroup = "通知卖家发货" , desc = "最大时间",type = "int")
private Integer max;
@MetaProperty()
@MetaProperty(rootGroup = "通知卖家发货",desc = "时间单位",type = "option",strOps = {"h","d"},showStr = {"小时","天"})
private String timeUnit;
}
}
... ... @@ -44,13 +44,13 @@ public class PresaleThreshold {
@Data
private static class TimeRange{
@MetaProperty()
@MetaProperty(rootGroup = "自动取消" , desc = "最小时间",type = "int")
private Integer min;
@MetaProperty()
@MetaProperty(rootGroup = "自动取消" , desc = "最大时间",type = "int")
private Integer max;
@MetaProperty()
@MetaProperty(rootGroup = "自动取消",desc = "时间单位",type = "option",strOps = {"h","d"},showStr = {"小时","天"})
private String timeUnit;
}
}
... ...
... ... @@ -18,13 +18,13 @@ public class SellerBidGoodsFeeRate {
@Data
private static class InStock{
@MetaProperty()
@MetaProperty(rootGroup = "现货规则",desc = "平台服务费率",scale = true)
private Double goodsPaymentRate;
@MetaProperty()
@MetaProperty(rootGroup = "现货规则",desc = "保证金比例",scale = true)
private Double earnestMoneyRate;
@MetaProperty()
@MetaProperty(rootGroup = "现货规则",desc = "支付渠道费率",scale = true)
private Double payChannelRate;
}
}
... ...
... ... @@ -12,6 +12,7 @@ import org.springframework.stereotype.Component;
@Data
@Component("seller_earnest_money")
public class SellerEarnestMoney {
private AdvanceSale advanceSale;
private Deposit deposit;
... ... @@ -29,91 +30,91 @@ public class SellerEarnestMoney {
@Data
private static class AdvanceSale{
@MetaProperty
private Integer max;
@MetaProperty(rootGroup = "预售保证金" ,desc = "最高金额(元)",type = "double")
private Double max;
@MetaProperty
private Integer min;
@MetaProperty(rootGroup = "预售保证金" ,desc = "最低金额(元)",type = "double")
private Double min;
@MetaProperty
@MetaProperty(rootGroup = "预售保证金" ,desc = "比例",scale = true)
private Double rate;
}
@Data
private static class Deposit{
@MetaProperty
private Integer max;
@MetaProperty(rootGroup = "寄存保证金" ,desc = "最高金额(元)",type = "double")
private Double max;
@MetaProperty
private Integer min;
@MetaProperty(rootGroup = "寄存保证金" ,desc = "最低金额(元)",type = "double")
private Double min;
@MetaProperty
@MetaProperty(rootGroup = "寄存保证金" ,desc = "比例",scale = true)
private Double rate;
}
@Data
private static class InStock{
@MetaProperty
private Integer max;
@MetaProperty(rootGroup = "现货保证金" ,desc = "最高金额(元)",type = "double")
private Double max;
@MetaProperty
private Integer min;
@MetaProperty(rootGroup = "现货保证金" ,desc = "最低金额(元)",type = "double")
private Double min;
@MetaProperty
@MetaProperty(rootGroup = "现货保证金" ,desc = "比例",scale = true)
private Double rate;
}
@Data
private static class Flaw{
@MetaProperty
private Integer max;
@MetaProperty(rootGroup = "残次品保证金" ,desc = "最高金额(元)",type = "double")
private Double max;
@MetaProperty
private Integer min;
@MetaProperty(rootGroup = "残次品保证金" ,desc = "最低金额(元)",type = "double")
private Double min;
@MetaProperty
@MetaProperty(rootGroup = "残次品保证金" ,desc = "比例",scale = true)
private Double rate;
}
@Data
private static class SecondHand{
@MetaProperty
private Integer max;
@MetaProperty(rootGroup = "二手商品保证金" ,desc = "最高金额(元)",type = "double")
private Double max;
@MetaProperty
private Integer min;
@MetaProperty(rootGroup = "二手商品保证金" ,desc = "最低金额(元)",type = "double")
private Double min;
@MetaProperty
@MetaProperty(rootGroup = "二手商品保证金" ,desc = "比例",scale = true)
private Double rate;
}
@Data
private static class HkInStock{
@MetaProperty
private Integer max;
@MetaProperty(rootGroup = "香港现货保证金" ,desc = "最高金额(元)",type = "double")
private Double max;
@MetaProperty
private Integer min;
@MetaProperty(rootGroup = "香港现货保证金" ,desc = "最低金额(元)",type = "double")
private Double min;
@MetaProperty
@MetaProperty(rootGroup = "香港现货保证金" ,desc = "比例",scale = true)
private Double rate;
}
@Data
private static class FastDelivery{
@MetaProperty
private Integer max;
@MetaProperty(rootGroup = "急速保证金" ,desc = "最高金额(元)",type = "double")
private Double max;
@MetaProperty
private Integer min;
@MetaProperty(rootGroup = "急速保证金" ,desc = "最低金额(元)",type = "double")
private Double min;
@MetaProperty
@MetaProperty(rootGroup = "急速保证金" ,desc = "比例",scale = true)
private Double rate;
}
... ...
... ... @@ -24,58 +24,58 @@ public class SellerEnterThreshold {
@Data
private static class SuperEntry{
@MetaProperty
@MetaProperty(rootGroup = "超级卖家入驻" ,desc = "名称",readOnly = true)
private String entrySellerType;
@MetaProperty
private Integer goodsOnOffShelveAmount;
@MetaProperty(rootGroup = "超级卖家入驻",desc = "上下架商品阈值(元)",type = "double")
private Double goodsOnOffShelveAmount;
@MetaProperty
private Integer hiddenGoodsAmount;
@MetaProperty(rootGroup = "超级卖家入驻",desc = "隐藏商品阈值(元)",type = "double")
private Double hiddenGoodsAmount;
@MetaProperty
private Integer prepaymentAmount;
@MetaProperty(rootGroup = "超级卖家入驻",desc = "首充阈值(元)",type = "double")
private Double prepaymentAmount;
}
@Data
private static class Common {
@MetaProperty
@MetaProperty(rootGroup = "普通卖家入驻" ,desc = "名称",readOnly = true)
private String entrySellerType;
@MetaProperty
private Integer prepaymentAmount;
@MetaProperty(rootGroup = "普通卖家入驻",desc = "首充阈值(元)",type = "double")
private Double prepaymentAmount;
}
@Data
private static class LargeSettlement {
@MetaProperty
@MetaProperty(rootGroup = "大额结算卖家入驻" ,desc = "名称",readOnly = true)
private String entrySellerType;
@MetaProperty
private Integer prepaymentAmount;
@MetaProperty(rootGroup = "大额结算卖家入驻",desc = "首充阈值(元)",type = "double")
private Double prepaymentAmount;
@MetaProperty
private Integer goodsOnOffShelveAmount;
@MetaProperty(rootGroup = "大额结算卖家入驻",desc = "上下架商品阈值(元)",type = "double")
private Double goodsOnOffShelveAmount;
@MetaProperty
private Integer hiddenGoodsAmount;
@MetaProperty(rootGroup = "大额结算卖家入驻",desc = "隐藏商品阈值(元)",type = "double")
private Double hiddenGoodsAmount;
}
@Data
private static class FastDeliverySuper {
@MetaProperty
@MetaProperty(rootGroup = "急速发货卖家入驻" ,desc = "名称",readOnly = true)
private String entrySellerType;
@MetaProperty
private Integer goodsOnOffShelveAmount;
@MetaProperty(rootGroup = "急速发货卖家入驻",desc = "上下架商品阈值(元)",type = "double")
private Double goodsOnOffShelveAmount;
@MetaProperty
private Integer hiddenGoodsAmount;
@MetaProperty(rootGroup = "急速发货卖家入驻",desc = "隐藏商品阈值(元)",type = "double")
private Double hiddenGoodsAmount;
@MetaProperty
private Integer prepaymentAmount;
@MetaProperty(rootGroup = "急速发货卖家入驻",desc = "首充阈值(元)",type = "double")
private Double prepaymentAmount;
}
}
... ...
... ... @@ -7,7 +7,7 @@ import org.springframework.stereotype.Component;
/**
* @Author: 杨长江
* @Date: 2019-11-30 10:24
* @Description: 平台服务费
* @Description: 出售商品的各种费率
*/
@Data
@Component("seller_goods_fee_rate")
... ... @@ -15,8 +15,6 @@ public class SellerGoodsFeeRate {
private InStock inStock;
private Deposit deposit;
private PreSale preSale;
private Flaw flaw;
... ... @@ -32,131 +30,91 @@ public class SellerGoodsFeeRate {
@Data
private static class InStock{
@MetaProperty()
private Double appraiseFee;
@MetaProperty()
private Double packageFee;
private GoodsServiceFeeRange goodsServiceFeeRange;
@MetaProperty(rootGroup = "现货规则", desc = "平台服务费比例",scale = true)
private Double goodsPaymentRate;
@Data
private static class GoodsServiceFeeRange{
@MetaProperty(rootGroup = "现货规则", desc = "保证金比例",scale = true)
private Double earnestMoneyRate;
@MetaProperty()
private Integer min;
@MetaProperty()
private Integer max;
}
}
@Data
private static class Deposit{
@MetaProperty()
private Double appraiseFee;
@MetaProperty()
private Double packageFee;
@MetaProperty()
private Double storageManagementFee;
@MetaProperty(rootGroup = "现货规则", desc = "支付渠道费率",scale = true)
private Double payChannelRate;
}
@Data
private static class PreSale{
@MetaProperty()
private Double appraiseFee;
@MetaProperty()
private Double packageFee;
@MetaProperty(rootGroup = "预售规则", desc = "平台服务费比例",scale = true)
private Double goodsPaymentRate;
private GoodsServiceFeeRange goodsServiceFeeRange;
@MetaProperty(rootGroup = "预售规则", desc = "保证金比例",scale = true)
private Double earnestMoneyRate;
@Data
private static class GoodsServiceFeeRange{
@MetaProperty()
private Integer min;
@MetaProperty()
private Integer max;
}
@MetaProperty(rootGroup = "预售规则", desc = "支付渠道费率",scale = true)
private Double payChannelRate;
}
@Data
private static class Flaw{
@MetaProperty()
private Double appraiseFee;
@MetaProperty(rootGroup = "残次品规则", desc = "平台服务费比例",scale = true)
private Double goodsPaymentRate;
@MetaProperty(rootGroup = "残次品规则", desc = "保证金比例",scale = true)
private Double earnestMoneyRate;
@MetaProperty()
private Double packageFee;
@MetaProperty(rootGroup = "残次品规则", desc = "支付渠道费率",scale = true)
private Double payChannelRate;
}
@Data
private static class SecondHand{
@MetaProperty()
private Double appraiseFee;
@MetaProperty(rootGroup = "二手商品规则", desc = "平台服务费比例",scale = true)
private Double goodsPaymentRate;
@MetaProperty()
private Double packageFee;
@MetaProperty(rootGroup = "二手商品规则", desc = "保证金比例",scale = true)
private Double earnestMoneyRate;
@MetaProperty(rootGroup = "二手商品规则", desc = "支付渠道费率",scale = true)
private Double payChannelRate;
}
@Data
private static class HkInStock{
@MetaProperty()
private Double appraiseFee;
@MetaProperty()
private Double packageFee;
private GoodsServiceFeeRange goodsServiceFeeRange;
@MetaProperty(rootGroup = "香港现货规则", desc = "平台服务费比例",scale = true)
private Double goodsPaymentRate;
@Data
private static class GoodsServiceFeeRange{
@MetaProperty(rootGroup = "香港现货规则", desc = "保证金比例",scale = true)
private Double earnestMoneyRate;
@MetaProperty()
private Integer min;
@MetaProperty()
private Integer max;
}
@MetaProperty(rootGroup = "香港现货规则", desc = "支付渠道费率",scale = true)
private Double payChannelRate;
}
@Data
private static class QuickDeliver{
@MetaProperty()
private Double appraiseFee;
@MetaProperty(rootGroup = "闪购规则", desc = "平台服务费比例",scale = true)
private Double goodsPaymentRate;
@MetaProperty(rootGroup = "闪购规则", desc = "保证金比例",scale = true)
private Double earnestMoneyRate;
@MetaProperty()
private Double packageFee;
@MetaProperty(rootGroup = "闪购规则", desc = "支付渠道费率",scale = true)
private Double payChannelRate;
}
@Data
private static class FastDelivery{
@MetaProperty()
private Double appraiseFee;
@MetaProperty()
private Double packageFee;
private GoodsServiceFeeRange goodsServiceFeeRange;
@Data
private static class GoodsServiceFeeRange{
@MetaProperty(rootGroup = "急速规则", desc = "平台服务费比例",scale = true)
private Double goodsPaymentRate;
@MetaProperty()
private Integer min;
@MetaProperty(rootGroup = "急速规则", desc = "保证金比例",scale = true)
private Double earnestMoneyRate;
@MetaProperty()
private Integer max;
}
@MetaProperty(rootGroup = "急速规则", desc = "支付渠道费率",scale = true)
private Double payChannelRate;
}
}
... ...
... ... @@ -7,7 +7,7 @@ import org.springframework.stereotype.Component;
/**
* @Author: 杨长江
* @Date: 2019-11-30 10:24
* @Description: 说明
* @Description: 平台服务费
*/
@Data
@Component("seller_goods_platform_fee")
... ... @@ -15,6 +15,8 @@ public class SellerGoodsPlatformFee {
private InStock inStock;
private Deposit deposit;
private PreSale preSale;
private Flaw flaw;
... ... @@ -30,91 +32,131 @@ public class SellerGoodsPlatformFee {
@Data
private static class InStock{
@MetaProperty()
private Double goodsPaymentRate;
@MetaProperty(rootGroup = "现货规则",desc = "有货鉴定费(元)",type = "double")
private Double appraiseFee;
@MetaProperty(rootGroup = "现货规则",desc = "有货包装费(元)",type = "double")
private Double packageFee;
private GoodsServiceFeeRange goodsServiceFeeRange;
@MetaProperty()
private Double earnestMoneyRate;
@Data
private static class GoodsServiceFeeRange{
@MetaProperty()
private Double payChannelRate;
@MetaProperty(rootGroup = "现货规则",childGroup = "货款抽成",desc = "最低金额(元)",type = "double")
private Double min;
@MetaProperty(rootGroup = "现货规则",childGroup = "货款抽成",desc = "最高金额(元)",type = "double")
private Double max;
}
}
@Data
private static class Deposit{
@MetaProperty(rootGroup = "寄存规则",desc = "有货鉴定费(元)",type = "double")
private Double appraiseFee;
@MetaProperty(rootGroup = "寄存规则",desc = "有货包装费(元)",type = "double")
private Double packageFee;
@MetaProperty(rootGroup = "寄存规则",desc = "仓储管理费(元)",type = "double")
private Double storageManagementFee;
}
@Data
private static class PreSale{
@MetaProperty()
private Double goodsPaymentRate;
@MetaProperty(rootGroup = "预售规则",desc = "有货鉴定费(元)",type = "double")
private Double appraiseFee;
@MetaProperty(rootGroup = "预售规则",desc = "有货包装费(元)",type = "double")
private Double packageFee;
@MetaProperty()
private Double earnestMoneyRate;
private GoodsServiceFeeRange goodsServiceFeeRange;
@MetaProperty()
private Double payChannelRate;
@Data
private static class GoodsServiceFeeRange{
@MetaProperty(rootGroup = "预售规则",childGroup = "货款抽成",desc = "最低金额(元)",type = "double")
private Double min;
@MetaProperty(rootGroup = "预售规则",childGroup = "货款抽成",desc = "最高金额(元)",type = "double")
private Double max;
}
}
@Data
private static class Flaw{
@MetaProperty()
private Double goodsPaymentRate;
@MetaProperty()
private Double earnestMoneyRate;
@MetaProperty(rootGroup = "残次品规则",desc = "有货鉴定费(元)",type = "double")
private Double appraiseFee;
@MetaProperty()
private Double payChannelRate;
@MetaProperty(rootGroup = "残次品规则",desc = "有货包装费(元)",type = "double")
private Double packageFee;
}
@Data
private static class SecondHand{
@MetaProperty()
private Double goodsPaymentRate;
@MetaProperty(rootGroup = "二手商品规则",desc = "有货鉴定费(元)",type = "double")
private Double appraiseFee;
@MetaProperty()
private Double earnestMoneyRate;
@MetaProperty()
private Double payChannelRate;
@MetaProperty(rootGroup = "二手商品规则",desc = "有货包装费(元)",type = "double")
private Double packageFee;
}
@Data
private static class HkInStock{
@MetaProperty()
private Double goodsPaymentRate;
@MetaProperty(rootGroup = "香港现货规则",desc = "有货鉴定费(元)",type = "double")
private Double appraiseFee;
@MetaProperty(rootGroup = "香港现货规则",desc = "有货包装费(元)",type = "double")
private Double packageFee;
private GoodsServiceFeeRange goodsServiceFeeRange;
@MetaProperty()
private Double earnestMoneyRate;
@Data
private static class GoodsServiceFeeRange{
@MetaProperty()
private Double payChannelRate;
@MetaProperty(rootGroup = "香港现货规则",childGroup = "货款抽成",desc = "最低金额(元)",type = "double")
private Double min;
@MetaProperty(rootGroup = "香港现货规则",childGroup = "货款抽成",desc = "最高金额(元)",type = "double")
private Double max;
}
}
@Data
private static class QuickDeliver{
@MetaProperty()
private Double goodsPaymentRate;
@MetaProperty()
private Double earnestMoneyRate;
@MetaProperty(rootGroup = "闪购规则",desc = "有货鉴定费(元)",type = "double")
private Double appraiseFee;
@MetaProperty()
private Double payChannelRate;
@MetaProperty(rootGroup = "闪购规则",desc = "有货包装费(元)",type = "double")
private Double packageFee;
}
@Data
private static class FastDelivery{
@MetaProperty()
private Double goodsPaymentRate;
@MetaProperty(rootGroup = "急速规则",desc = "有货鉴定费(元)",type = "double")
private Double appraiseFee;
@MetaProperty(rootGroup = "急速规则",desc = "有货包装费(元)",type = "double")
private Double packageFee;
private GoodsServiceFeeRange goodsServiceFeeRange;
@Data
private static class GoodsServiceFeeRange{
@MetaProperty()
private Double earnestMoneyRate;
@MetaProperty(rootGroup = "急速规则",childGroup = "货款抽成",desc = "最低金额(元)",type = "double")
private Double min;
@MetaProperty()
private Double payChannelRate;
@MetaProperty(rootGroup = "急速规则",childGroup = "货款抽成",desc = "最高金额(元)",type = "double")
private Double max;
}
}
}
... ...
... ... @@ -18,7 +18,7 @@ public class SellerGoodsPriceLimit {
@Data
private static class InStock{
@MetaProperty()
@MetaProperty(rootGroup = "现货规则",desc = "最低价比例",scale = true)
private Double leastRate;
}
}
... ...
... ... @@ -25,7 +25,7 @@ public class SellerPenalty {
@Data
private static class AdvanceSale{
@MetaProperty()
@MetaProperty(rootGroup = "预售处罚规则", desc = "名称",readOnly = true)
private String stockTypeName;
private TriggerCaseMap triggerCaseMap;
... ... @@ -38,7 +38,7 @@ public class SellerPenalty {
@Data
private static class BeforeSellerDeliver{
@MetaProperty()
@MetaProperty(rootGroup = "预售处罚规则",childGroup = "卖家发货前",desc = "名称",readOnly = true)
private String name;
private List<StagedCollection> stagedCollection;
... ... @@ -46,10 +46,10 @@ public class SellerPenalty {
@Data
private static class StagedCollection{
@MetaProperty()
@MetaProperty(rootGroup = "预售处罚规则",childGroup = "卖家发货前",desc = "排序",type = "int")
private Integer index;
@MetaProperty()
@MetaProperty(rootGroup = "预售处罚规则",childGroup = "卖家发货前",desc = "处罚比例",scale = true)
private Double rate;
private TimeRange timeRage;
... ... @@ -59,21 +59,21 @@ public class SellerPenalty {
@Data
private static class TimeRange{
@MetaProperty()
@MetaProperty(rootGroup = "预售处罚规则",childGroup = "卖家发货前",desc = "最大时间",type = "int")
private Integer max;
@MetaProperty()
@MetaProperty(rootGroup = "预售处罚规则",childGroup = "卖家发货前",desc = "最小时间",type = "int")
private Integer min;
}
@Data
private static class MoneyRange{
@MetaProperty()
private Integer max;
@MetaProperty(rootGroup = "预售处罚规则",childGroup = "卖家发货前",desc = "最大金额(元)",type = "double")
private Double max;
@MetaProperty()
private Integer min;
@MetaProperty(rootGroup = "预售处罚规则",childGroup = "卖家发货前",desc = "最小金额(元)",type = "double")
private Double min;
}
}
}
... ...
package com.yoho.order.model;
import com.yoho.order.annotation.MetaProperty;
import lombok.Builder;
import lombok.Data;
import java.util.List;
/**
* @Author: 杨长江
* @Date: 2019-11-30 13:01
... ... @@ -40,4 +43,29 @@ public class PropertyItem {
* 是否只读
*/
private boolean pReadOnly;
/**
* @see MetaProperty#intOps()
*/
private List<Integer> pIntOps;
/**
* @see MetaProperty#strOps()
*/
private List<String> pStrOps;
/**
* @see MetaProperty#showStr()
*/
private List<String> pShowStr;
/**
* 是否比例0~1
*/
private boolean pScale;
/**
* 类型
*/
private String pType;
}
... ...
... ... @@ -121,6 +121,11 @@ public class MetaConfigServiceImpl implements IMetaConfigService, ApplicationCon
String desc = metaProperty.desc();
String rootGroup = metaProperty.rootGroup();
String childGroup = metaProperty.childGroup();
String[] strOps = metaProperty.strOps();
String[] showStr = metaProperty.showStr();
int[] intOps = metaProperty.intOps();
String type = metaProperty.type();
boolean scale = metaProperty.scale();
boolean readOnly = metaProperty.readOnly();
// 获取该类的全限定名
String clazzName = field.getDeclaringClass().getName();
... ... @@ -148,7 +153,19 @@ public class MetaConfigServiceImpl implements IMetaConfigService, ApplicationCon
.pChildGroup(childGroup)
.pValue(field.get(o).toString())
.pReadOnly(readOnly)
.pStrOps(Arrays.asList(strOps))
.pType(type)
.pScale(scale)
.pShowStr(Arrays.asList(showStr))
.build();
if(null != intOps && intOps.length >0){
List<Integer> integerList = new ArrayList<>(4);
for (int intOp : intOps) {
integerList.add(Integer.valueOf(intOp));
}
propertyItem.setPIntOps(integerList);
}
list.add(propertyItem);
}
... ...
... ... @@ -7,12 +7,12 @@
<tr style="height: 60px" id="ttt">
<td width="20%">编码<span class="requriedInput">*</span></td>
<td width="60%">
<input id="code" name="code" readonly="readonly" class="easyui-textbox" data-options="validType:'length[1,50]'" style="width: 380px;"/></td>
<input id="code" name="code" readonly="readonly" class="easyui-textbox" data-options="validType:'length[1,50]',required:true" style="width: 380px;"/></td>
</tr>
<tr style="height: 60px">
<td width="20%">名称<span class="requriedInput">*</span></td>
<td width="60%">
<input id="title" name="title" class="easyui-textbox" data-options="validType:'length[1,400]'" style="width: 380px;"/></td>
<input id="title" name="title" class="easyui-textbox" data-options="validType:'length[1,400]',required:true" style="width: 380px;"/></td>
</tr>
<tr style="height: 60px" id="descDiv">
<td width="20%">备注</td>
... ... @@ -38,6 +38,10 @@
var items = data.data.propertyItem;
var map = {};
keyValueMap = {};
keyDoubleList = [];
keyIntList = [];
keyScaleList = [];
for(var i=0; i< items.length; i++){
var item = items[i];
... ... @@ -48,12 +52,22 @@
keyValueMap[item.pName] = item.pRootGroup + item.pChildGroup + item.pDesc ;
if(item.pType == "int"){
keyIntList.push(item.pName);
}
if(item.pType == "double"){
keyDoubleList.push(item.pName);
}
if(item.pScale == true){
keyScaleList.push(item.pName);
}
}
var list = [];
for(var key in map){
if(map[key] instanceof Array){
var rootMap = {};
var childMap = {};
for(var i=0; i < map[key].length; i++){
... ... @@ -92,11 +106,36 @@
htmlStr += "<td width='20%'>" +itemValue[j].pDesc+ "<span class='requriedInput'>*</span></td>";
htmlStr += "<td width='60%'>";
}
if(itemValue[j].pReadOnly){
htmlStr += "<input id='"+ itemValue[j].pName +"' name='"+itemValue[j].pName+"' type='hidden' value='"+itemValue[j].pValue+"' class='easyui-textbox' style='width: 380px' />"
}else {
htmlStr += "<input id='"+ itemValue[j].pName +"' name='"+itemValue[j].pName+"' value='"+itemValue[j].pValue+"' class='easyui-textbox' style='width: 380px' />"
htmlStr += "</td></tr>";
if(itemValue[j].pType == "option" && itemValue[j].pStrOps.length >0){
htmlStr += "<select class='easyui-combobox' style='width: 150px' id='" + itemValue[j].pName+"' name='"+itemValue[j].pName+"' >";
for(var p=0; p< itemValue[j].pStrOps.length; p++){
if(itemValue[j].pStrOps[p] == itemValue[j].pValue){
htmlStr += "<option value='"+ itemValue[j].pStrOps[p] +"' selected='selected'>"+ itemValue[j].pShowStr[p]+"</option>";
}else {
htmlStr += "<option value='"+ itemValue[j].pStrOps[p] +"'>"+ itemValue[j].pShowStr[p]+"</option>";
}
}
htmlStr += "</select>";
htmlStr += "</td></tr>";
}else if(itemValue[j].pType == "option" && itemValue[j].pIntOps.length >0){
htmlStr += "<select class='easyui-combobox' style='width: 150px' id='" + itemValue[j].pName+"' name='"+itemValue[j].pName+"' >";
for(var p=0; p< itemValue[j].pIntOps.length; p++){
if(itemValue[j].pIntOps[p] == itemValue[j].pValue){
htmlStr += "<option value='"+ itemValue[j].pIntOps[p] +"' selected='selected'>"+ itemValue[j].pShowStr[p]+"</option>";
}else {
htmlStr += "<option value='"+ itemValue[j].pIntOps[p] +"'>"+ itemValue[j].pShowStr[p]+"</option>";
}
}
htmlStr += "</select>";
htmlStr += "</td></tr>";
}else{
htmlStr += "<input id='"+ itemValue[j].pName +"' name='"+itemValue[j].pName+"' value='"+itemValue[j].pValue+"' class='easyui-textbox' data-options='required:true' style='width: 380px' />"
htmlStr += "</td></tr>";
}
}
}
}
... ...
... ... @@ -4,10 +4,6 @@
<meta charset="UTF-8"/>
<title>Yoho!Buy运营平台</title>
<script src="/ufoPlatform/js/include.js"></script>
<style>
.selected{background: #5bc0de; color:#fff; }
</style>
<style type="text/css">
.nav li {float:left; list-style:none;}
.nav li a{float:left;text-decoration:none;padding:0.2em 1.6em;border-right:1px solid white;color:black; font-size:14px;}
... ... @@ -42,6 +38,9 @@
<script>
var code;
var keyValueMap = {};
var keyScaleList =[];
var keyIntList =[];
var keyDoubleList =[];
$(function() {
$("#searchBtn").linkbutton({
... ... @@ -110,6 +109,9 @@
width: 40,
formatter: function (value, rowData) {
var str = "<a role='detail' dataId='"+ rowData.code + "' style='margin-left:10px;background-color: #5cb85c !important;'>编辑</a>";
if(rowData.code == "super_enter_stage_func"){
str = "<a role='detail' dataId='"+ rowData.code + "' style='margin-left:10px;opacity:0.5;background-color: #5cb85c !important;'>编辑</a>";
}
return str;
}}
]],
... ... @@ -123,6 +125,9 @@
me.datagrid("getPanel").find("a[role='detail']").linkbutton({
onClick: function () {
code = $(this).attr("dataId");
if(code == "super_enter_stage_func"){
return false;
}
editRow()
}
});
... ... @@ -154,9 +159,11 @@
delete a.title;
delete a.desc;
delete a.value;
//$('#value').val(JSON.stringify(a));
$("#metaConfigEditForm #value").val(JSON.stringify(a));
var url = contextPath + "/metaConfig/update";
var code = $('#metaConfigEditForm #code').val();
/*var code = $('#metaConfigEditForm #code').val();
if (code == '' || code == null || code == undefined) {
$.messager.alert("提示", '编码不能为空!', "error");
return false;
... ... @@ -178,57 +185,53 @@
return false;
}
}
}*/
$("#metaConfigEditForm").form("submit", {
url: url,
onSubmit: function () {
if (!$("#metaConfigEditForm").form("validate")) {
/*for(key in keyValueMap){
var val = $("#metaConfigEditForm [name = '"+key+"']").val();
if (val == '' || val == null || val == undefined) {
$.messager.alert("提示", keyValueMap[key] + '不能为空!', "error");
return false;
}
}*/
//debugger;
if(keyIntList.length > 0){
for(var i=0; i< keyIntList.length; i++){
var val = $("#metaConfigEditForm [name = '"+keyIntList[i]+"']").val();
var reg = /^\d+$ /;
if(!reg.test(val)){
$.messager.alert("提示", keyValueMap[keyIntList[i]] + '字段必须为非负整数!', "error");
return false;
}
$.messager.progress({
title: "正在执行",
msg: "正在执行,请稍后..."
});
return true;
},
success: function (data) {
$.messager.progress("close");
data = JSON.parse(data);
if (data.code == 200) {
$(div).dialog("close");
$("#noticeListTable").myDatagrid("reload");
$.messager.show({
title: "提示",
msg: title + "成功!",
height: 120
});
} else {
$.messager.alert("失败", data.message, "error");
}
}
});
/*var name = $('#metaConfigEditForm #name').val();
if (name == '' || name == null || name == undefined) {
$.messager.alert("提示", '公告名称不能为空!', "error");
return false;
}
var url = $('#metaConfigEditForm #url').val();
if (url == '' || url == null || url == undefined) {
$.messager.alert("提示", '跳转页面不能为空!', "error");
return false;
}
var orderBy = $('#metaConfigEditForm #orderBy').val();
if (orderBy == '' || orderBy == null || orderBy == undefined) {
$.messager.alert("提示", '排序不能为空!', "error");
return false;
if(keyScaleList.length > 0){
for(var i=0; i< keyScaleList.length; i++){
var val = $("#metaConfigEditForm [name = '"+keyScaleList[i]+"']").val();
var reg = /^(0(.\d{1,2})?)|(1(.0{1,2})?)$/;
if(!reg.test(val)){
$.messager.alert("提示", keyValueMap[keyIntList[i]] + '字段必须为0~1之间的两位小数!', "error");
return false;
}
}
}
var showFront = $('input[name="showFront"]:checked').val();
if (showFront == '' || showFront == null || showFront == undefined) {
$.messager.alert("提示", '请选择是否开启滚动通知!', "error");
return false;
if(keyDoubleList.length > 0){
for(var i=0; i< keyDoubleList.length; i++){
var reg = /^[0-9]+(.[0-9]{2})?$/;
var val = $("#metaConfigEditForm [name = '"+keyDoubleList[i]+"']").val();
if(!reg.test(val)){
$.messager.alert("提示", keyValueMap[keyIntList[i]] + '字段必须为数字(保留两位小数)!', "error");
return false;
}
}
}
var url = contextPath + "/usersNotice/saveOrUpdateNotice";
$("#metaConfigEditForm").form("submit", {
url: url,
onSubmit: function () {
... ... @@ -256,7 +259,7 @@
$.messager.alert("失败", data.message, "error");
}
}
});*/
});
}
});
}
... ...