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