单个门店改为列表
This commit is contained in:
@ -88,7 +88,8 @@ public class YxSystemStore implements Serializable {
|
||||
private Integer addTime;
|
||||
|
||||
/** 是否显示 */
|
||||
@Column(name = "is_show",insertable = false)
|
||||
@Column(name = "is_show")
|
||||
@NotNull
|
||||
private Integer isShow;
|
||||
|
||||
/** 是否删除 */
|
||||
|
@ -69,18 +69,23 @@ public class SystemStoreController {
|
||||
return new ResponseEntity<>(json,HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增门店")
|
||||
@ApiOperation("新增门店")
|
||||
@PreAuthorize("@el.check('yxSystemStore:add')")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody YxSystemStore resources){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
resources.setAddTime(OrderUtil.getSecondTimestampTwo());
|
||||
return new ResponseEntity<>(yxSystemStoreService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("设置门店信息")
|
||||
@ApiOperation("设置门店信息")
|
||||
@Log("修改门店")
|
||||
@ApiOperation("修改门店")
|
||||
@PreAuthorize("@el.check('yxSystemStore:edit')")
|
||||
public ResponseEntity<Object> update(@Validated @RequestBody YxSystemStore resources){
|
||||
//if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作");
|
||||
if(resources.getId() == null){
|
||||
resources.setAddTime(OrderUtil.getSecondTimestampTwo());
|
||||
yxSystemStoreService.create(resources);
|
||||
}else{
|
||||
yxSystemStoreService.update(resources);
|
||||
}
|
||||
yxSystemStoreService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user