|
@@ -27,6 +27,7 @@ import com.ejlchina.searcher.util.MapBuilder;
|
|
|
import com.ejlchina.searcher.util.MapUtils;
|
|
import com.ejlchina.searcher.util.MapUtils;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
@@ -83,7 +84,7 @@ public class CmsCorpFollowActiveCodeController {
|
|
|
* 创建活动活码
|
|
* 创建活动活码
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("/post/active/code")
|
|
@PostMapping("/post/active/code")
|
|
|
- public Result<String> postActiveCode(@RequestBody CorpFollowActiveCode activeCode) throws Exception {
|
|
|
|
|
|
|
+ public Result<String> postActiveCode(@RequestBody @Validated CorpFollowActiveCode activeCode) throws Exception {
|
|
|
long adminId = StpUtil.getLoginIdAsLong();
|
|
long adminId = StpUtil.getLoginIdAsLong();
|
|
|
corpFollowService.postActiveCode(adminId, activeCode);
|
|
corpFollowService.postActiveCode(adminId, activeCode);
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
@@ -93,7 +94,7 @@ public class CmsCorpFollowActiveCodeController {
|
|
|
* 编辑活动活码
|
|
* 编辑活动活码
|
|
|
*/
|
|
*/
|
|
|
@PutMapping("/update/active/code")
|
|
@PutMapping("/update/active/code")
|
|
|
- public Result<String> upActiveCode(@RequestBody CorpFollowActiveCode activeCode) throws Exception {
|
|
|
|
|
|
|
+ public Result<String> upActiveCode(@RequestBody @Validated CorpFollowActiveCode activeCode) throws Exception {
|
|
|
corpFollowService.upActiveCode(activeCode);
|
|
corpFollowService.upActiveCode(activeCode);
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
}
|
|
}
|