应用中心
-存酒 团购卷退款
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package cn.ysk.cashier.controller;
|
||||
|
||||
import cn.ysk.cashier.service.TbPlatformDictService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "应用中心管理")
|
||||
@RequestMapping("/api/appCenter")
|
||||
public class AppCenterController {
|
||||
|
||||
private final TbPlatformDictService tbPlatformDictService;
|
||||
|
||||
@GetMapping
|
||||
@ApiOperation("获取应用中心列表")
|
||||
public ResponseEntity<Object> queryBotButtonConfig(){
|
||||
return new ResponseEntity<>(tbPlatformDictService.queryByType("appCenter"), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.dto.shop.TbShopStorageNumDto;
|
||||
import cn.ysk.cashier.dto.shop.TbShopStorageQueryCriteria;
|
||||
import cn.ysk.cashier.dto.shop.TbShopStorageRecordQueryCriteria;
|
||||
import cn.ysk.cashier.pojo.shop.TbShopStorage;
|
||||
import cn.ysk.cashier.pojo.shop.TbShopStorageRecord;
|
||||
import cn.ysk.cashier.service.shop.TbShopStorageRecordService;
|
||||
import cn.ysk.cashier.service.shop.TbShopStorageService;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "存酒管理")
|
||||
@RequestMapping("/api/storage")
|
||||
public class TbShopStorageController {
|
||||
|
||||
private final TbShopStorageService tbShopStorageService;
|
||||
private final TbShopStorageRecordService tbShopStorageRecordService;
|
||||
//
|
||||
// @ApiOperation("导出数据")
|
||||
// @GetMapping(value = "/download")
|
||||
// public void exportTbShopStorage(HttpServletResponse response, TbShopStorageQueryCriteria criteria) throws IOException {
|
||||
// tbShopStorageService.download(tbShopStorageService.queryAll(criteria), response);
|
||||
// }
|
||||
|
||||
@PostMapping("list")
|
||||
@ApiOperation("查询存酒列表")
|
||||
public ResponseEntity<Object> queryTbShopStorage(@RequestBody TbShopStorageQueryCriteria criteria){
|
||||
Pageable pageable = PageRequest.of(criteria.getPage(), criteria.getSize(),Sort.by(Sort.Direction.DESC, "id"));
|
||||
return new ResponseEntity<>(tbShopStorageService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增存酒:#resources.name")
|
||||
@ApiOperation("新增存酒")
|
||||
public ResponseEntity<Object> createTbShopStorage(@Validated @RequestBody TbShopStorage resources){
|
||||
return new ResponseEntity<>(tbShopStorageService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("存取酒")
|
||||
@ApiOperation("存取酒")
|
||||
public ResponseEntity<Object> updateTbShopStorage(@Validated @RequestBody TbShopStorageNumDto resources) {
|
||||
tbShopStorageService.updateNum(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@GetMapping("recordList")
|
||||
@ApiOperation("查询存取酒记录")
|
||||
public ResponseEntity<Object> queryTbShopStorageRecord(TbShopStorageRecordQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbShopStorageRecordService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.shop.TbShopStorageGood;
|
||||
import cn.ysk.cashier.dto.shop.TbShopStorageGoodQueryCriteria;
|
||||
import cn.ysk.cashier.service.shop.TbShopStorageGoodService;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @author ww
|
||||
* @date 2024-05-21
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "酒品管理")
|
||||
@RequestMapping("/api/tbShopStorageGood")
|
||||
public class TbShopStorageGoodController {
|
||||
|
||||
private final TbShopStorageGoodService tbShopStorageGoodService;
|
||||
|
||||
// @ApiOperation("导出酒品数据")
|
||||
// @GetMapping(value = "/download")
|
||||
// public void exportTbShopStorageGood(HttpServletResponse response, TbShopStorageGoodQueryCriteria criteria) throws IOException {
|
||||
// tbShopStorageGoodService.download(tbShopStorageGoodService.queryAll(criteria), response);
|
||||
// }
|
||||
|
||||
@PostMapping("list")
|
||||
@Log("查询酒品列表")
|
||||
@ApiOperation("查询酒品列表")
|
||||
public ResponseEntity<Object> queryTbShopStorageGood(@RequestBody TbShopStorageGoodQueryCriteria criteria){
|
||||
Pageable pageable = PageRequest.of(criteria.getPage(), criteria.getSize(), Sort.by(Sort.Direction.DESC, "id"));
|
||||
return new ResponseEntity<>(tbShopStorageGoodService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增酒品")
|
||||
@ApiOperation("新增酒品")
|
||||
public ResponseEntity<Object> createTbShopStorageGood(@Validated @RequestBody TbShopStorageGood resources){
|
||||
return new ResponseEntity<>(tbShopStorageGoodService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改酒品")
|
||||
@ApiOperation("修改酒品")
|
||||
public ResponseEntity<Object> updateTbShopStorageGood(@Validated @RequestBody TbShopStorageGood resources){
|
||||
tbShopStorageGoodService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
//
|
||||
// @DeleteMapping
|
||||
// @Log("删除酒品")
|
||||
// @ApiOperation("删除酒品")
|
||||
// public ResponseEntity<Object> deleteTbShopStorageGood(@RequestBody Integer[] ids) {
|
||||
// tbShopStorageGoodService.deleteAll(ids);
|
||||
// return new ResponseEntity<>(HttpStatus.OK);
|
||||
// }
|
||||
}
|
||||
Reference in New Issue
Block a user