Merge branch 'feature' of https://gitee.com/liuyingfang/cashier-admin into feature
# Conflicts: # eladmin-system/src/main/java/cn/ysk/cashier/dto/product/TbShopCategoryQueryCriteria.java # eladmin-system/src/main/java/cn/ysk/cashier/service/impl/productimpl/TbShopCategoryServiceImpl.java
This commit is contained in:
@@ -17,18 +17,22 @@ package cn.ysk.cashier.controller.order;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.dto.order.TbOrderInfoDto;
|
||||
import cn.ysk.cashier.dto.order.TbOrderInfoQueryCriteria;
|
||||
import cn.ysk.cashier.pojo.order.TbOrderInfo;
|
||||
import cn.ysk.cashier.service.order.TbOrderInfoService;
|
||||
import cn.ysk.cashier.dto.order.TbOrderInfoQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import cn.ysk.cashier.vo.TbOrderPayCountVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
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;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
@@ -50,13 +54,20 @@ public class TbOrderInfoController {
|
||||
tbOrderInfoService.download(tbOrderInfoService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@PostMapping("/date")
|
||||
@Log("查询订单")
|
||||
@ApiOperation("查询订单")
|
||||
public ResponseEntity<Object> queryTbOrderInfo(TbOrderInfoQueryCriteria criteria, Pageable pageable){
|
||||
public ResponseEntity<Object> queryTbOrderInfo(@RequestBody TbOrderInfoQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbOrderInfoService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/payCount")
|
||||
@Log("通过shopId查询支付统计")
|
||||
@ApiOperation("通过shopId查询支付统计")
|
||||
public List<TbOrderPayCountVo> queryTbOrderPayCount(String shopId){
|
||||
return tbOrderInfoService.queryTbOrderPayCount(shopId);
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
@Log("通过Id查询订单")
|
||||
@ApiOperation("通过Id查询订单")
|
||||
|
||||
@@ -46,7 +46,6 @@ public class TbProductStockDetailController {
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbProductStockDetail:list')")
|
||||
public void exportTbProductStockDetail(HttpServletResponse response, TbProductStockDetailQueryCriteria criteria) throws IOException {
|
||||
tbProductStockDetailService.download(tbProductStockDetailService.queryAll(criteria), response);
|
||||
}
|
||||
@@ -54,7 +53,6 @@ public class TbProductStockDetailController {
|
||||
@GetMapping
|
||||
@Log("查询/product/Stock")
|
||||
@ApiOperation("查询/product/Stock")
|
||||
@PreAuthorize("@el.check('tbProductStockDetail:list')")
|
||||
public ResponseEntity<Object> queryTbProductStockDetail(TbProductStockDetailQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbProductStockDetailService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
@@ -80,7 +78,6 @@ public class TbProductStockDetailController {
|
||||
@PostMapping
|
||||
@Log("新增/product/Stock")
|
||||
@ApiOperation("新增/product/Stock")
|
||||
@PreAuthorize("@el.check('tbProductStockDetail:add')")
|
||||
public ResponseEntity<Object> createTbProductStockDetail(@Validated @RequestBody TbProductStockDetail resources){
|
||||
return new ResponseEntity<>(tbProductStockDetailService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
@@ -88,7 +85,6 @@ public class TbProductStockDetailController {
|
||||
@PutMapping
|
||||
@Log("修改/product/Stock")
|
||||
@ApiOperation("修改/product/Stock")
|
||||
@PreAuthorize("@el.check('tbProductStockDetail:edit')")
|
||||
public ResponseEntity<Object> updateTbProductStockDetail(@Validated @RequestBody TbProductStockDetail resources){
|
||||
tbProductStockDetailService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
@@ -97,7 +93,6 @@ public class TbProductStockDetailController {
|
||||
@DeleteMapping
|
||||
@Log("删除/product/Stock")
|
||||
@ApiOperation("删除/product/Stock")
|
||||
@PreAuthorize("@el.check('tbProductStockDetail:del')")
|
||||
public ResponseEntity<Object> deleteTbProductStockDetail(@RequestBody Long[] ids) {
|
||||
tbProductStockDetailService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
|
||||
@@ -16,26 +16,30 @@
|
||||
package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.shop.TbShopInfo;
|
||||
import cn.ysk.cashier.service.shop.TbShopInfoService;
|
||||
import cn.ysk.cashier.config.security.security.TokenProvider;
|
||||
import cn.ysk.cashier.config.security.service.OnlineUserService;
|
||||
import cn.ysk.cashier.dto.shop.TbShopInfoDto;
|
||||
import cn.ysk.cashier.dto.shop.TbShopInfoQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import cn.ysk.cashier.pojo.shop.TbShopInfo;
|
||||
import cn.ysk.cashier.service.shop.TbShopInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
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;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2023-11-07
|
||||
**/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/shop/list管理")
|
||||
@@ -43,6 +47,8 @@ import javax.servlet.http.HttpServletResponse;
|
||||
public class TbShopInfoController {
|
||||
|
||||
private final TbShopInfoService tbShopInfoService;
|
||||
private final OnlineUserService onlineUserService;
|
||||
private final TokenProvider tokenProvider;
|
||||
|
||||
// @Log("导出数据")
|
||||
// @ApiOperation("导出数据")
|
||||
@@ -75,6 +81,16 @@ public class TbShopInfoController {
|
||||
return new ResponseEntity<>(tbShopInfoService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@ApiOperation("修改商户密码")
|
||||
@PostMapping(value = "/shop/upPass")
|
||||
public ResponseEntity<Object> upShopPass(HttpServletRequest request, @RequestBody String username,String password) throws Exception {
|
||||
tbShopInfoService.upShopPass(username,password);
|
||||
//根据token踢出用户
|
||||
// onlineUserService.logout(tokenProvider.getToken(request));
|
||||
log.info("修改商户密码成功。");
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/shop/list")
|
||||
@ApiOperation("修改/shop/list")
|
||||
|
||||
Reference in New Issue
Block a user