bug 6359
This commit is contained in:
parent
f3a17982b2
commit
68f64358e2
|
|
@ -2,6 +2,8 @@ package com.bonus.canteen.core.supermarket.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
import com.bonus.common.log.enums.OperaType;
|
import com.bonus.common.log.enums.OperaType;
|
||||||
//import com.bonus.canteen.core.supermarket.common.annotation.PreventRepeatSubmit;
|
//import com.bonus.canteen.core.supermarket.common.annotation.PreventRepeatSubmit;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
|
@ -89,7 +91,7 @@ public class SupermarketInfoController extends BaseController {
|
||||||
//@RequiresPermissions("supermarket:info:add")
|
//@RequiresPermissions("supermarket:info:add")
|
||||||
@SysLog(title = "超市", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增超市")
|
@SysLog(title = "超市", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增超市")
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody SupermarketInfo supermarketInfo) {
|
public AjaxResult add(@RequestBody @Valid SupermarketInfo supermarketInfo) {
|
||||||
try {
|
try {
|
||||||
return toAjax(supermarketInfoService.insertSupermarketInfo(supermarketInfo));
|
return toAjax(supermarketInfoService.insertSupermarketInfo(supermarketInfo));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
@ -105,7 +107,7 @@ public class SupermarketInfoController extends BaseController {
|
||||||
//@RequiresPermissions("supermarket:info:edit")
|
//@RequiresPermissions("supermarket:info:edit")
|
||||||
@SysLog(title = "超市", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改超市")
|
@SysLog(title = "超市", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改超市")
|
||||||
@PostMapping("/edit")
|
@PostMapping("/edit")
|
||||||
public AjaxResult edit(@RequestBody SupermarketInfo supermarketInfo) {
|
public AjaxResult edit(@RequestBody @Valid SupermarketInfo supermarketInfo) {
|
||||||
try {
|
try {
|
||||||
return toAjax(supermarketInfoService.updateSupermarketInfo(supermarketInfo));
|
return toAjax(supermarketInfoService.updateSupermarketInfo(supermarketInfo));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,9 @@ import lombok.Data;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import com.bonus.common.core.web.domain.BaseEntity;
|
import com.bonus.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Max;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 超市对象 supermarket_info
|
* 超市对象 supermarket_info
|
||||||
*
|
*
|
||||||
|
|
@ -77,10 +80,12 @@ public class SupermarketInfo extends BaseEntity {
|
||||||
|
|
||||||
/** 最少配送时间(分) */
|
/** 最少配送时间(分) */
|
||||||
@Excel(name = "最少配送时间", readConverterExp = "分=")
|
@Excel(name = "最少配送时间", readConverterExp = "分=")
|
||||||
|
@Max(value = 9999L, message = "最少配送时间超过限制")
|
||||||
private Long minDeliveryTime;
|
private Long minDeliveryTime;
|
||||||
|
|
||||||
/** 选择时间间隔(分) */
|
/** 选择时间间隔(分) */
|
||||||
@Excel(name = "选择时间间隔", readConverterExp = "分=")
|
@Excel(name = "选择时间间隔", readConverterExp = "分=")
|
||||||
|
@Max(value = 9999L, message = "时间间隔超过限制")
|
||||||
private Long selectTimeInterval;
|
private Long selectTimeInterval;
|
||||||
|
|
||||||
/** 配送费(元) */
|
/** 配送费(元) */
|
||||||
|
|
@ -98,6 +103,7 @@ public class SupermarketInfo extends BaseEntity {
|
||||||
|
|
||||||
/** 退单限制时间(分) */
|
/** 退单限制时间(分) */
|
||||||
@Excel(name = "退单限制时间", readConverterExp = "分=")
|
@Excel(name = "退单限制时间", readConverterExp = "分=")
|
||||||
|
@Max(value = 9999L, message = "退单限制时间超过限制")
|
||||||
private Long refundLimitTime;
|
private Long refundLimitTime;
|
||||||
|
|
||||||
/** 是否关联出入库(1是2否) */
|
/** 是否关联出入库(1是2否) */
|
||||||
|
|
@ -108,6 +114,7 @@ public class SupermarketInfo extends BaseEntity {
|
||||||
/** 流水号前缀 */
|
/** 流水号前缀 */
|
||||||
@Excel(name = "流水号前缀")
|
@Excel(name = "流水号前缀")
|
||||||
@ApiModelProperty(value = "流水号前缀")
|
@ApiModelProperty(value = "流水号前缀")
|
||||||
|
@Size(min = 0, max = 20, message = "流水号前缀长度不能超过20个字符")
|
||||||
private String mealCode;
|
private String mealCode;
|
||||||
|
|
||||||
/** 是否启用收款码(1是2否) */
|
/** 是否启用收款码(1是2否) */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue