|
@@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
+import javax.validation.constraints.NotBlank;
|
|
import javax.validation.constraints.NotEmpty;
|
|
import javax.validation.constraints.NotEmpty;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -44,7 +45,7 @@ public class CommercialController {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@DeleteMapping("/deleteCommercial")
|
|
@DeleteMapping("/deleteCommercial")
|
|
- public R deleteCommercial(@NotEmpty String[] commercialIds){
|
|
|
|
|
|
+ public R deleteCommercial(@NotEmpty(message = "待删除商户Id不能为空") String[] commercialIds){
|
|
String s = commericalService.deleteCommercial(commercialIds);
|
|
String s = commericalService.deleteCommercial(commercialIds);
|
|
return R.ok(s);
|
|
return R.ok(s);
|
|
}
|
|
}
|
|
@@ -55,7 +56,7 @@ public class CommercialController {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@GetMapping("/getCommercial")
|
|
@GetMapping("/getCommercial")
|
|
- public R getCommercial(String commercialId){
|
|
|
|
|
|
+ public R getCommercial(@NotBlank(message = "商户Id不能为空") String commercialId){
|
|
Commercial commercial = commericalService.getCommercial(commercialId);
|
|
Commercial commercial = commericalService.getCommercial(commercialId);
|
|
return R.ok(commercial);
|
|
return R.ok(commercial);
|
|
}
|
|
}
|