设备,型号功能模块
This commit is contained in:
parent
5839f04950
commit
f3e32ffae7
|
@ -1,5 +1,6 @@
|
||||||
package com.ruoyi.bst.floor.domain;
|
package com.ruoyi.bst.floor.domain;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.validate.ValidGroup;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
@ -25,12 +26,12 @@ public class Floor extends BaseEntity
|
||||||
|
|
||||||
@Excel(name = "分区ID")
|
@Excel(name = "分区ID")
|
||||||
@ApiModelProperty("分区ID")
|
@ApiModelProperty("分区ID")
|
||||||
@NotNull(message = "分区ID不能为空")
|
@NotNull(message = "分区ID不能为空",groups = {ValidGroup.Create.class})
|
||||||
private Long storeId;
|
private Long storeId;
|
||||||
|
|
||||||
@Excel(name = "楼层名称")
|
@Excel(name = "楼层名称")
|
||||||
@ApiModelProperty("楼层名称")
|
@ApiModelProperty("楼层名称")
|
||||||
@NotBlank(message = "楼层名称不能为空")
|
@NotBlank(message = "楼层名称不能为空",groups = {ValidGroup.Create.class})
|
||||||
private String floorName;
|
private String floorName;
|
||||||
|
|
||||||
@Excel(name = "楼层图片")
|
@Excel(name = "楼层图片")
|
||||||
|
|
|
@ -75,14 +75,17 @@ public class Store extends BaseEntity
|
||||||
|
|
||||||
@Excel(name = "省")
|
@Excel(name = "省")
|
||||||
@ApiModelProperty("省")
|
@ApiModelProperty("省")
|
||||||
|
@NotBlank(message = "省不能为空",groups = {ValidGroup.Create.class})
|
||||||
private String province;
|
private String province;
|
||||||
|
|
||||||
@Excel(name = "市")
|
@Excel(name = "市")
|
||||||
@ApiModelProperty("市")
|
@ApiModelProperty("市")
|
||||||
|
@NotBlank(message = "市不能为空",groups = {ValidGroup.Create.class})
|
||||||
private String city;
|
private String city;
|
||||||
|
|
||||||
@Excel(name = "区、县")
|
@Excel(name = "区、县")
|
||||||
@ApiModelProperty("区、县")
|
@ApiModelProperty("区、县")
|
||||||
|
@NotBlank(message = "区、县不能为空",groups = {ValidGroup.Create.class})
|
||||||
private String county;
|
private String county;
|
||||||
|
|
||||||
@Excel(name = "门店照片")
|
@Excel(name = "门店照片")
|
||||||
|
|
|
@ -10,11 +10,13 @@ import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.core.validate.ValidGroup;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.system.user.service.UserValidator;
|
import com.ruoyi.system.user.service.UserValidator;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
@ -81,7 +83,7 @@ public class BoothController extends BaseController
|
||||||
@PreAuthorize("@ss.hasPermi('bst:booth:add')")
|
@PreAuthorize("@ss.hasPermi('bst:booth:add')")
|
||||||
@Log(title = "卡座", businessType = BusinessType.INSERT)
|
@Log(title = "卡座", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody Booth booth)
|
public AjaxResult add(@RequestBody @Validated(ValidGroup.Create.class) Booth booth)
|
||||||
{
|
{
|
||||||
// 判断用户能否选择分区
|
// 判断用户能否选择分区
|
||||||
if (!partValidator.canCheckForPart(booth.getPartId())) {
|
if (!partValidator.canCheckForPart(booth.getPartId())) {
|
||||||
|
@ -96,7 +98,7 @@ public class BoothController extends BaseController
|
||||||
@PreAuthorize("@ss.hasPermi('bst:booth:edit')")
|
@PreAuthorize("@ss.hasPermi('bst:booth:edit')")
|
||||||
@Log(title = "卡座", businessType = BusinessType.UPDATE)
|
@Log(title = "卡座", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody Booth booth)
|
public AjaxResult edit(@RequestBody @Validated(ValidGroup.Update.class) Booth booth)
|
||||||
{
|
{
|
||||||
if (!boothValidator.canEdit(booth.getBoothId())) {
|
if (!boothValidator.canEdit(booth.getBoothId())) {
|
||||||
return AjaxResult.error("您没有权限修改ID为" + booth.getBoothId() + "的卡座");
|
return AjaxResult.error("您没有权限修改ID为" + booth.getBoothId() + "的卡座");
|
||||||
|
|
|
@ -10,10 +10,12 @@ import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.core.validate.ValidGroup;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
@ -80,7 +82,7 @@ public class FloorController extends BaseController
|
||||||
@PreAuthorize("@ss.hasPermi('bst:floor:add')")
|
@PreAuthorize("@ss.hasPermi('bst:floor:add')")
|
||||||
@Log(title = "楼层列表", businessType = BusinessType.INSERT)
|
@Log(title = "楼层列表", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody Floor floor)
|
public AjaxResult add(@RequestBody @Validated(ValidGroup.Create.class) Floor floor)
|
||||||
{
|
{
|
||||||
// 判断能否选择店铺
|
// 判断能否选择店铺
|
||||||
if (!storeValidator.canCheckForStore(floor.getStoreId())) {
|
if (!storeValidator.canCheckForStore(floor.getStoreId())) {
|
||||||
|
@ -95,7 +97,7 @@ public class FloorController extends BaseController
|
||||||
@PreAuthorize("@ss.hasPermi('bst:floor:edit')")
|
@PreAuthorize("@ss.hasPermi('bst:floor:edit')")
|
||||||
@Log(title = "楼层列表", businessType = BusinessType.UPDATE)
|
@Log(title = "楼层列表", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody Floor floor)
|
public AjaxResult edit(@RequestBody @Validated(ValidGroup.Update.class) Floor floor)
|
||||||
{
|
{
|
||||||
if (!floorValidator.canEdit(floor.getFloorId())) {
|
if (!floorValidator.canEdit(floor.getFloorId())) {
|
||||||
return AjaxResult.error("您没有权限修改ID为" + floor.getFloorId() + "的楼层");
|
return AjaxResult.error("您没有权限修改ID为" + floor.getFloorId() + "的楼层");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user