店铺扩展数据 初始化四条数据
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import cn.ysk.cashier.exception.BadRequestException;
|
||||
import cn.ysk.cashier.mybatis.entity.TbShopExtend;
|
||||
import cn.ysk.cashier.mybatis.service.TbShopExtendService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@@ -51,8 +53,11 @@ public class TbShopExtendController {
|
||||
@PutMapping
|
||||
@ApiOperation("通过id修改")
|
||||
public ResponseEntity<Object> update(@RequestBody TbShopExtend tbShopExtend) {
|
||||
tbShopExtend.setUpdateTime(new Date());
|
||||
tbShopExtendService.updateById(tbShopExtend);
|
||||
if (tbShopExtend.getId() != null) {
|
||||
tbShopExtendService.updateById(tbShopExtend);
|
||||
} else {
|
||||
tbShopExtendService.saveInfo(tbShopExtend);
|
||||
}
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user