super权限无法获取问题处理,拼团表单校验问题,购物车渲染流程优化

This commit is contained in:
Chopper
2021-08-11 12:18:42 +08:00
parent 45e65e71e1
commit f9a18ffbe1
20 changed files with 171 additions and 42 deletions

View File

@@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
@@ -66,7 +67,7 @@ public class PintuanStoreController {
@PostMapping(consumes = "application/json", produces = "application/json")
@ApiOperation(value = "添加拼团活动")
public ResultMessage<String> addPintuan(@RequestBody PintuanVO pintuan) {
public ResultMessage<String> addPintuan(@RequestBody @Validated PintuanVO pintuan) {
AuthUser currentUser = UserContext.getCurrentUser();
pintuan.setStoreId(currentUser.getStoreId());
pintuan.setStoreName(currentUser.getStoreName());
@@ -78,7 +79,7 @@ public class PintuanStoreController {
@PutMapping(consumes = "application/json", produces = "application/json")
@ApiOperation(value = "修改拼团活动")
public ResultMessage<String> editPintuan(@RequestBody PintuanVO pintuan) {
public ResultMessage<String> editPintuan(@RequestBody @Validated PintuanVO pintuan) {
AuthUser currentUser = UserContext.getCurrentUser();
pintuan.setStoreId(currentUser.getStoreId());
pintuan.setStoreName(currentUser.getStoreName());