Commit ea76812c by guojuxing

分组策略

parent 20f37580
......@@ -32,7 +32,8 @@ public class StoreStrategyController {
private StoreStrategyApiService storeStrategyApiService;
@RequestMapping("/save-store-group-strategy")
public RestResponse saveStoreGroupStrategy(@Validated({StoreStrategyQO.SaveValidView.class}) StoreStrategyQO storeStrategyQO) {
public RestResponse saveStoreGroupStrategy(@Validated({StoreStrategyQO.SaveValidView.class, StoreStrategyQO.StoreStrateTypeValidView.class})
StoreStrategyQO storeStrategyQO) {
//分组策略类型
storeStrategyQO.setStrategyType(StoreGroupConstant.STORE_GROUP_STRATEGY_TYPE);
ServiceResponse result = storeStrategyApiService.saveStoreStrategy(transferQoToDTO(storeStrategyQO));
......
......@@ -19,6 +19,10 @@ public class StoreStrategyQO implements Serializable{
public interface SaveValidView {
}
public interface StoreStrateTypeValidView {
}
public interface RemoveValidView {
}
......@@ -80,6 +84,9 @@ public class StoreStrategyQO implements Serializable{
/**
* 策略类型,1门店状态策略, 2门店分组策略
*/
@NotNull(message = "策略类型不能为空", groups = {StoreStrateTypeValidView.class})
@Min(value = StoreGroupConstant.STORE_STRATEGY_TYPE, message = "策略类型参数值错误,小于1", groups = {StoreStrateTypeValidView.class})
@Max(value = StoreGroupConstant.STORE_GROUP_STRATEGY_TYPE, message = "策略类型参数值错误,大于2", groups = {StoreStrateTypeValidView.class})
private Integer strategyType;
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment