|
@@ -9,6 +9,7 @@ import com.usky.dxtop.controller.BaseController;
|
|
import com.usky.dxtop.model.TopRadio;
|
|
import com.usky.dxtop.model.TopRadio;
|
|
import com.usky.dxtop.service.TopRadioService;
|
|
import com.usky.dxtop.service.TopRadioService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -31,7 +32,7 @@ public class TopRadioController extends BaseController {
|
|
*/
|
|
*/
|
|
@RepeatSubmit
|
|
@RepeatSubmit
|
|
@PostMapping
|
|
@PostMapping
|
|
- public AjaxResult add(@RequestBody TopRadio topRadio){
|
|
|
|
|
|
+ public AjaxResult add(@Validated @RequestBody TopRadio topRadio){
|
|
if (UserConstants.NOT_UNIQUE.equals(topRadioService.checkIdentityUnique(topRadio)))
|
|
if (UserConstants.NOT_UNIQUE.equals(topRadioService.checkIdentityUnique(topRadio)))
|
|
{
|
|
{
|
|
return AjaxResult.error("新增身份信息'" + topRadio.getIdentity() + "'失败,身份信息已存在");
|
|
return AjaxResult.error("新增身份信息'" + topRadio.getIdentity() + "'失败,身份信息已存在");
|