菜谱数据保护
This commit is contained in:
parent
be83f08860
commit
4c6d26ddea
|
|
@ -124,7 +124,7 @@ public class CookRecipeController extends BaseController {
|
|||
//@RequiresPermissions("cook:recipe:add")
|
||||
@SysLog(title = "菜品计划信息", businessType = OperaType.INSERT, logType = 1,module = "菜谱管理->新增菜品计划信息")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody CookRecipeDTO cookRecipeDTO) {
|
||||
public AjaxResult add(@RequestBody @Valid CookRecipeDTO cookRecipeDTO) {
|
||||
try {
|
||||
return toAjax(cookRecipeService.insertCookRecipe(cookRecipeDTO));
|
||||
} catch (Exception e) {
|
||||
|
|
@ -140,7 +140,7 @@ public class CookRecipeController extends BaseController {
|
|||
//@RequiresPermissions("cook:recipe:edit")
|
||||
@SysLog(title = "菜品计划信息", businessType = OperaType.UPDATE, logType = 1,module = "菜谱管理->修改菜品计划信息")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody CookRecipeDTO cookRecipeDTO) {
|
||||
public AjaxResult edit(@RequestBody @Valid CookRecipeDTO cookRecipeDTO) {
|
||||
try {
|
||||
return toAjax(cookRecipeService.updateCookRecipe(cookRecipeDTO));
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -129,16 +129,19 @@ public class CookDishes extends BaseEntity {
|
|||
/** 每份重量(g) */
|
||||
@Excel(name = "每份重量(g)")
|
||||
@ApiModelProperty(value = "每份重量(g)")
|
||||
@Max(value = 999999L, message = "每份重量超过限制")
|
||||
private BigDecimal weight;
|
||||
|
||||
/** 大份份量 */
|
||||
@Excel(name = "大份份量")
|
||||
@ApiModelProperty(value = "大份份量")
|
||||
@Max(value = 999999L, message = "大份份量超过限制")
|
||||
private BigDecimal largeWeight;
|
||||
|
||||
/** 小份份量 */
|
||||
@Excel(name = "小份份量")
|
||||
@ApiModelProperty(value = "小份份量")
|
||||
@Max(value = 999999L, message = "小份份量超过限制")
|
||||
private BigDecimal littleWeight;
|
||||
|
||||
/** 质量偏差(g) */
|
||||
|
|
@ -149,25 +152,25 @@ public class CookDishes extends BaseEntity {
|
|||
/** 菜品基础单价(分) */
|
||||
@Excel(name = "菜品基础单价(分)")
|
||||
@ApiModelProperty(value = "菜品基础单价(分)")
|
||||
@Max(value = 999999L, message = "菜品价格超过限制")
|
||||
@Max(value = 9999L, message = "菜品价格超过限制")
|
||||
private Long price;
|
||||
|
||||
/** 单位价格 */
|
||||
@Excel(name = "单位价格")
|
||||
@ApiModelProperty(value = "单位价格")
|
||||
@Max(value = 999999L, message = "菜品单价超过限制")
|
||||
@Max(value = 9999L, message = "菜品单价超过限制")
|
||||
private Long unitPrice;
|
||||
|
||||
/** 大份单价 */
|
||||
@Excel(name = "大份单价")
|
||||
@ApiModelProperty(value = "大份单价")
|
||||
@Max(value = 999999L, message = "菜品单价超过限制")
|
||||
@Max(value = 9999L, message = "菜品单价超过限制")
|
||||
private Long largePrice;
|
||||
|
||||
/** 小份单价 */
|
||||
@Excel(name = "小份单价")
|
||||
@ApiModelProperty(value = "小份单价")
|
||||
@Max(value = 999999L, message = "菜品单价超过限制")
|
||||
@Max(value = 9999L, message = "菜品单价超过限制")
|
||||
private Long littlePrice;
|
||||
|
||||
/** 菜品图片url */
|
||||
|
|
@ -328,7 +331,7 @@ public class CookDishes extends BaseEntity {
|
|||
/** 成本价 */
|
||||
@Excel(name = "成本价")
|
||||
@ApiModelProperty(value = "成本价")
|
||||
@Max(value = 999999L, message = "菜品成本价超过限制")
|
||||
@Max(value = 9999L, message = "菜品成本价超过限制")
|
||||
private Long materialCost;
|
||||
|
||||
/** 毛利 */
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import io.swagger.annotations.ApiModelProperty;
|
|||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
|
||||
/**
|
||||
* 菜品计划菜品关联对象 cook_recipe_dishes
|
||||
*
|
||||
|
|
@ -35,11 +37,13 @@ public class CookRecipeDishesDTO extends BaseEntity {
|
|||
/** 菜品单价 */
|
||||
@Excel(name = "菜品单价")
|
||||
@ApiModelProperty(value = "菜品单价")
|
||||
@Max(value = 9999L, message = "菜品单价超过限制")
|
||||
private Long price;
|
||||
|
||||
/** 菜品售价(优惠价) */
|
||||
@Excel(name = "菜品售价(优惠价)")
|
||||
@ApiModelProperty(value = "菜品售价(优惠价)")
|
||||
@Max(value = 9999L, message = "菜品售价超过限制")
|
||||
private Long salePrice;
|
||||
|
||||
/** 规格类型(1-标准,2-大份,3-小份,4-50g,5-100g) */
|
||||
|
|
@ -50,11 +54,13 @@ public class CookRecipeDishesDTO extends BaseEntity {
|
|||
/** 供应数量 */
|
||||
@Excel(name = "供应数量")
|
||||
@ApiModelProperty(value = "供应数量")
|
||||
@Max(value = 9999L, message = "供应数量超过限制")
|
||||
private Long supplyNum;
|
||||
|
||||
/** 销售数量 */
|
||||
@Excel(name = "销售数量")
|
||||
@ApiModelProperty(value = "销售数量")
|
||||
@Max(value = 9999L, message = "销售数量超过限制")
|
||||
private Long saleNum;
|
||||
|
||||
/** 剩余数量 */
|
||||
|
|
@ -65,6 +71,7 @@ public class CookRecipeDishesDTO extends BaseEntity {
|
|||
/** 个人限购数量 */
|
||||
@Excel(name = "个人限购数量")
|
||||
@ApiModelProperty(value = "个人限购数量")
|
||||
@Max(value = 9999L, message = "个人限购数量超过限制")
|
||||
private Long limitNum;
|
||||
|
||||
/** 厨师id */
|
||||
|
|
|
|||
Loading…
Reference in New Issue