更改目录结构
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.BotButtonConfig;
|
||||
import cn.ysk.cashier.service.BotButtonConfigService;
|
||||
import cn.ysk.cashier.dto.BotButtonConfigQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author admin
|
||||
* @date 2023-10-31
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "buttonConfig管理")
|
||||
@RequestMapping("/api/botButtonConfig")
|
||||
public class BotButtonConfigController {
|
||||
|
||||
private final BotButtonConfigService botButtonConfigService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('botButtonConfig:list')")
|
||||
public void exportBotButtonConfig(HttpServletResponse response, BotButtonConfigQueryCriteria criteria) throws IOException {
|
||||
botButtonConfigService.download(botButtonConfigService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询buttonConfig")
|
||||
@ApiOperation("查询buttonConfig")
|
||||
@PreAuthorize("@el.check('botButtonConfig:list')")
|
||||
public ResponseEntity<Object> queryBotButtonConfig(BotButtonConfigQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(botButtonConfigService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增buttonConfig")
|
||||
@ApiOperation("新增buttonConfig")
|
||||
@PreAuthorize("@el.check('botButtonConfig:add')")
|
||||
public ResponseEntity<Object> createBotButtonConfig(@Validated @RequestBody BotButtonConfig resources){
|
||||
return new ResponseEntity<>(botButtonConfigService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改buttonConfig")
|
||||
@ApiOperation("修改buttonConfig")
|
||||
@PreAuthorize("@el.check('botButtonConfig:edit')")
|
||||
public ResponseEntity<Object> updateBotButtonConfig(@Validated @RequestBody BotButtonConfig resources){
|
||||
botButtonConfigService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除buttonConfig")
|
||||
@ApiOperation("删除buttonConfig")
|
||||
@PreAuthorize("@el.check('botButtonConfig:del')")
|
||||
public ResponseEntity<Object> deleteBotButtonConfig(@RequestBody Integer[] ids) {
|
||||
botButtonConfigService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.BotConfig;
|
||||
import cn.ysk.cashier.service.BotConfigService;
|
||||
import cn.ysk.cashier.dto.BotConfigQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author admin
|
||||
* @date 2023-10-31
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "botConfig管理")
|
||||
@RequestMapping("/api/botConfig")
|
||||
public class BotConfigController {
|
||||
|
||||
private final BotConfigService botConfigService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('botConfig:list')")
|
||||
public void exportBotConfig(HttpServletResponse response, BotConfigQueryCriteria criteria) throws IOException {
|
||||
botConfigService.download(botConfigService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询botConfig")
|
||||
@ApiOperation("查询botConfig")
|
||||
@PreAuthorize("@el.check('botConfig:list')")
|
||||
public ResponseEntity<Object> queryBotConfig(BotConfigQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(botConfigService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增botConfig")
|
||||
@ApiOperation("新增botConfig")
|
||||
@PreAuthorize("@el.check('botConfig:add')")
|
||||
public ResponseEntity<Object> createBotConfig(@Validated @RequestBody BotConfig resources){
|
||||
return new ResponseEntity<>(botConfigService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改botConfig")
|
||||
@ApiOperation("修改botConfig")
|
||||
@PreAuthorize("@el.check('botConfig:edit')")
|
||||
public ResponseEntity<Object> updateBotConfig(@Validated @RequestBody BotConfig resources){
|
||||
botConfigService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除botConfig")
|
||||
@ApiOperation("删除botConfig")
|
||||
@PreAuthorize("@el.check('botConfig:del')")
|
||||
public ResponseEntity<Object> deleteBotConfig(@RequestBody Integer[] ids) {
|
||||
botConfigService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.BotUser;
|
||||
import cn.ysk.cashier.service.BotUserService;
|
||||
import cn.ysk.cashier.dto.BotUserQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author admin
|
||||
* @date 2023-10-30
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "BotUserController管理")
|
||||
@RequestMapping("/api/botUser")
|
||||
public class BotUserController {
|
||||
|
||||
private final BotUserService botUserService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('botUser:list')")
|
||||
public void exportBotUser(HttpServletResponse response, BotUserQueryCriteria criteria) throws IOException {
|
||||
botUserService.download(botUserService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询BotUserController")
|
||||
@ApiOperation("查询BotUserController")
|
||||
@PreAuthorize("@el.check('botUser:list')")
|
||||
public ResponseEntity<Object> queryBotUser(BotUserQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(botUserService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增BotUserController")
|
||||
@ApiOperation("新增BotUserController")
|
||||
@PreAuthorize("@el.check('botUser:add')")
|
||||
public ResponseEntity<Object> createBotUser(@Validated @RequestBody BotUser resources){
|
||||
return new ResponseEntity<>(botUserService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改BotUserController")
|
||||
@ApiOperation("修改BotUserController")
|
||||
@PreAuthorize("@el.check('botUser:edit')")
|
||||
public ResponseEntity<Object> updateBotUser(@Validated @RequestBody BotUser resources){
|
||||
botUserService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除BotUserController")
|
||||
@ApiOperation("删除BotUserController")
|
||||
@PreAuthorize("@el.check('botUser:del')")
|
||||
public ResponseEntity<Object> deleteBotUser(@RequestBody Integer[] ids) {
|
||||
botUserService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.BotUserFlow;
|
||||
import cn.ysk.cashier.service.BotUserFlowService;
|
||||
import cn.ysk.cashier.dto.BotUserFlowQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author admin
|
||||
* @date 2023-10-30
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "accountFlow管理")
|
||||
@RequestMapping("/api/botUserFlow")
|
||||
public class BotUserFlowController {
|
||||
|
||||
private final BotUserFlowService botUserFlowService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('botUserFlow:list')")
|
||||
public void exportBotUserFlow(HttpServletResponse response, BotUserFlowQueryCriteria criteria) throws IOException {
|
||||
botUserFlowService.download(botUserFlowService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询accountFlow")
|
||||
@ApiOperation("查询accountFlow")
|
||||
@PreAuthorize("@el.check('botUserFlow:list')")
|
||||
public ResponseEntity<Object> queryBotUserFlow(BotUserFlowQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(botUserFlowService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增accountFlow")
|
||||
@ApiOperation("新增accountFlow")
|
||||
@PreAuthorize("@el.check('botUserFlow:add')")
|
||||
public ResponseEntity<Object> createBotUserFlow(@Validated @RequestBody BotUserFlow resources){
|
||||
return new ResponseEntity<>(botUserFlowService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改accountFlow")
|
||||
@ApiOperation("修改accountFlow")
|
||||
@PreAuthorize("@el.check('botUserFlow:edit')")
|
||||
public ResponseEntity<Object> updateBotUserFlow(@Validated @RequestBody BotUserFlow resources){
|
||||
botUserFlowService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除accountFlow")
|
||||
@ApiOperation("删除accountFlow")
|
||||
@PreAuthorize("@el.check('botUserFlow:del')")
|
||||
public ResponseEntity<Object> deleteBotUserFlow(@RequestBody Integer[] ids) {
|
||||
botUserFlowService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.TbRenewalsPayLog;
|
||||
import cn.ysk.cashier.service.TbRenewalsPayLogService;
|
||||
import cn.ysk.cashier.dto.TbRenewalsPayLogQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2023-11-07
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/shop/renewals管理")
|
||||
@RequestMapping("/api/tbRenewalsPayLog")
|
||||
public class TbRenewalsPayLogController {
|
||||
|
||||
private final TbRenewalsPayLogService tbRenewalsPayLogService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbRenewalsPayLog:list')")
|
||||
public void exportTbRenewalsPayLog(HttpServletResponse response, TbRenewalsPayLogQueryCriteria criteria) throws IOException {
|
||||
tbRenewalsPayLogService.download(tbRenewalsPayLogService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询/shop/renewals")
|
||||
@ApiOperation("查询/shop/renewals")
|
||||
@PreAuthorize("@el.check('tbRenewalsPayLog:list')")
|
||||
public ResponseEntity<Object> queryTbRenewalsPayLog(TbRenewalsPayLogQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbRenewalsPayLogService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/shop/renewals")
|
||||
@ApiOperation("新增/shop/renewals")
|
||||
@PreAuthorize("@el.check('tbRenewalsPayLog:add')")
|
||||
public ResponseEntity<Object> createTbRenewalsPayLog(@Validated @RequestBody TbRenewalsPayLog resources){
|
||||
return new ResponseEntity<>(tbRenewalsPayLogService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/shop/renewals")
|
||||
@ApiOperation("修改/shop/renewals")
|
||||
@PreAuthorize("@el.check('tbRenewalsPayLog:edit')")
|
||||
public ResponseEntity<Object> updateTbRenewalsPayLog(@Validated @RequestBody TbRenewalsPayLog resources){
|
||||
tbRenewalsPayLogService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/shop/renewals")
|
||||
@ApiOperation("删除/shop/renewals")
|
||||
@PreAuthorize("@el.check('tbRenewalsPayLog:del')")
|
||||
public ResponseEntity<Object> deleteTbRenewalsPayLog(@RequestBody Integer[] ids) {
|
||||
tbRenewalsPayLogService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.TbShopPayType;
|
||||
import cn.ysk.cashier.service.TbShopPayTypeService;
|
||||
import cn.ysk.cashier.dto.TbShopPayTypeQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2023-11-03
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/merchant/system/paytype管理")
|
||||
@RequestMapping("/api/tbShopPayType")
|
||||
public class TbShopPayTypeController {
|
||||
|
||||
private final TbShopPayTypeService tbShopPayTypeService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
public void exportTbShopPayType(HttpServletResponse response, TbShopPayTypeQueryCriteria criteria) throws IOException {
|
||||
tbShopPayTypeService.download(tbShopPayTypeService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询/merchant/system/paytype")
|
||||
@ApiOperation("查询/merchant/system/paytype")
|
||||
public ResponseEntity<Object> queryTbShopPayType(TbShopPayTypeQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbShopPayTypeService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/merchant/system/paytype")
|
||||
@ApiOperation("新增/merchant/system/paytype")
|
||||
public ResponseEntity<Object> createTbShopPayType(@Validated @RequestBody TbShopPayType resources){
|
||||
return new ResponseEntity<>(tbShopPayTypeService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/merchant/system/paytype")
|
||||
@ApiOperation("修改/merchant/system/paytype")
|
||||
public ResponseEntity<Object> updateTbShopPayType(@Validated @RequestBody TbShopPayType resources){
|
||||
tbShopPayTypeService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/merchant/system/paytype")
|
||||
@ApiOperation("删除/merchant/system/paytype")
|
||||
public ResponseEntity<Object> deleteTbShopPayType(@RequestBody Integer[] ids) {
|
||||
tbShopPayTypeService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.TbUserInfo;
|
||||
import cn.ysk.cashier.service.TbUserInfoService;
|
||||
import cn.ysk.cashier.dto.TbUserInfoQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2023-11-13
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/userInfo/list管理")
|
||||
@RequestMapping("/api/tbUserInfo")
|
||||
public class TbUserInfoController {
|
||||
|
||||
private final TbUserInfoService tbUserInfoService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbUserInfo:list')")
|
||||
public void exportTbUserInfo(HttpServletResponse response, TbUserInfoQueryCriteria criteria) throws IOException {
|
||||
tbUserInfoService.download(tbUserInfoService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询/userInfo/list")
|
||||
@ApiOperation("查询/userInfo/list")
|
||||
public ResponseEntity<Object> queryTbUserInfo(TbUserInfoQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbUserInfoService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/userInfo/list")
|
||||
@ApiOperation("新增/userInfo/list")
|
||||
public ResponseEntity<Object> createTbUserInfo(@Validated @RequestBody TbUserInfo resources){
|
||||
return new ResponseEntity<>(tbUserInfoService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/userInfo/list")
|
||||
@ApiOperation("修改/userInfo/list")
|
||||
public ResponseEntity<Object> updateTbUserInfo(@Validated @RequestBody TbUserInfo resources){
|
||||
tbUserInfoService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/userInfo/list")
|
||||
@ApiOperation("删除/userInfo/list")
|
||||
public ResponseEntity<Object> deleteTbUserInfo(@RequestBody Integer[] ids) {
|
||||
tbUserInfoService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.order;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.order.TbCashierCart;
|
||||
import cn.ysk.cashier.service.order.TbCashierCartService;
|
||||
import cn.ysk.cashier.dto.order.TbCashierCartQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-03-02
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/cashierCart管理")
|
||||
@RequestMapping("/api/tbCashierCart")
|
||||
public class TbCashierCartController {
|
||||
|
||||
private final TbCashierCartService tbCashierCartService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
public void exportTbCashierCart(HttpServletResponse response, TbCashierCartQueryCriteria criteria) throws IOException {
|
||||
tbCashierCartService.download(tbCashierCartService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询/cashierCart")
|
||||
@ApiOperation("查询/cashierCart")
|
||||
public ResponseEntity<Object> queryTbCashierCart(TbCashierCartQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbCashierCartService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/cashierCart")
|
||||
@ApiOperation("新增/cashierCart")
|
||||
public ResponseEntity<Object> createTbCashierCart(@Validated @RequestBody TbCashierCart resources){
|
||||
return new ResponseEntity<>(tbCashierCartService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/cashierCart")
|
||||
@ApiOperation("修改/cashierCart")
|
||||
public ResponseEntity<Object> updateTbCashierCart(@Validated @RequestBody TbCashierCart resources){
|
||||
tbCashierCartService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/cashierCart")
|
||||
@ApiOperation("删除/cashierCart")
|
||||
public ResponseEntity<Object> deleteTbCashierCart(@RequestBody Integer[] ids) {
|
||||
tbCashierCartService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.order;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.order.TbOrderDetail;
|
||||
import cn.ysk.cashier.service.order.TbOrderDetailService;
|
||||
import cn.ysk.cashier.dto.order.TbOrderDetailQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-03-02
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/orderDetail管理")
|
||||
@RequestMapping("/api/tbOrderDetail")
|
||||
public class TbOrderDetailController {
|
||||
|
||||
private final TbOrderDetailService tbOrderDetailService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
public void exportTbOrderDetail(HttpServletResponse response, TbOrderDetailQueryCriteria criteria) throws IOException {
|
||||
tbOrderDetailService.download(tbOrderDetailService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询/orderDetail")
|
||||
@ApiOperation("查询/orderDetail")
|
||||
public ResponseEntity<Object> queryTbOrderDetail(TbOrderDetailQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbOrderDetailService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/orderDetail")
|
||||
@ApiOperation("新增/orderDetail")
|
||||
public ResponseEntity<Object> createTbOrderDetail(@Validated @RequestBody TbOrderDetail resources){
|
||||
return new ResponseEntity<>(tbOrderDetailService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/orderDetail")
|
||||
@ApiOperation("修改/orderDetail")
|
||||
public ResponseEntity<Object> updateTbOrderDetail(@Validated @RequestBody TbOrderDetail resources){
|
||||
tbOrderDetailService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/orderDetail")
|
||||
@ApiOperation("删除/orderDetail")
|
||||
public ResponseEntity<Object> deleteTbOrderDetail(@RequestBody Integer[] ids) {
|
||||
tbOrderDetailService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.order;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
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 lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-03-02
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/orderInfo管理")
|
||||
@RequestMapping("/api/tbOrderInfo")
|
||||
public class TbOrderInfoController {
|
||||
|
||||
private final TbOrderInfoService tbOrderInfoService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
public void exportTbOrderInfo(HttpServletResponse response, TbOrderInfoQueryCriteria criteria) throws IOException {
|
||||
tbOrderInfoService.download(tbOrderInfoService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询/orderInfo")
|
||||
@ApiOperation("查询/orderInfo")
|
||||
public ResponseEntity<Object> queryTbOrderInfo(TbOrderInfoQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbOrderInfoService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
@Log("查询/orderInfo")
|
||||
@ApiOperation("查询/orderInfo")
|
||||
public Object queryTbOrderInfo(@PathVariable("id") Integer id){
|
||||
return tbOrderInfoService.findById(id);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/orderInfo")
|
||||
@ApiOperation("新增/orderInfo")
|
||||
public ResponseEntity<Object> createTbOrderInfo(@Validated @RequestBody TbOrderInfo resources){
|
||||
return new ResponseEntity<>(tbOrderInfoService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/orderInfo")
|
||||
@ApiOperation("修改/orderInfo")
|
||||
public ResponseEntity<Object> updateTbOrderInfo(@Validated @RequestBody TbOrderInfo resources){
|
||||
tbOrderInfoService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/orderInfo")
|
||||
@ApiOperation("删除/orderInfo")
|
||||
public ResponseEntity<Object> deleteTbOrderInfo(@RequestBody Integer[] ids) {
|
||||
tbOrderInfoService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.product;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.vo.TbProductVo;
|
||||
import cn.ysk.cashier.service.product.TbProductService;
|
||||
import cn.ysk.cashier.dto.product.TbProductQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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 java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2023-12-11
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/product管理")
|
||||
@RequestMapping("/api/tbProduct")
|
||||
public class TbProductController {
|
||||
|
||||
private final TbProductService tbProductService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbProduct:list')")
|
||||
public void exportTbProduct(HttpServletResponse response, TbProductQueryCriteria criteria) throws IOException {
|
||||
tbProductService.download(tbProductService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询/product")
|
||||
@ApiOperation("查询/product")
|
||||
public ResponseEntity<Object> queryTbProduct(TbProductQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbProductService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/{product}")
|
||||
@Log("查询/product")
|
||||
@ApiOperation("查询/product")
|
||||
public Object queryTbProductInfo(@PathVariable("product") Integer product)throws Exception{
|
||||
return tbProductService.findByProductId(product);
|
||||
}
|
||||
@GetMapping ("/productList")
|
||||
@Log("查询/product")
|
||||
@ApiOperation("查询/product")
|
||||
public Object queryTbProductInfo(@RequestParam List<String> productList){
|
||||
return tbProductService.findByProductList(productList);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/product")
|
||||
@ApiOperation("新增/product")
|
||||
public ResponseEntity<Object> createTbProduct(@Validated @RequestBody TbProductVo resources){
|
||||
return new ResponseEntity<>(tbProductService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/product")
|
||||
@ApiOperation("修改/product")
|
||||
public ResponseEntity<Object> updateTbProduct(@Validated @RequestBody TbProductVo resources){
|
||||
tbProductService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/product")
|
||||
@ApiOperation("删除/product")
|
||||
public ResponseEntity<Object> deleteTbProduct(@RequestBody Integer[] ids) {
|
||||
tbProductService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.product;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.service.product.TbProductService;
|
||||
import cn.ysk.cashier.dto.product.TbProductQueryCriteria;
|
||||
import cn.ysk.cashier.pojo.product.TbProductGroup;
|
||||
import cn.ysk.cashier.service.product.TbProductGroupService;
|
||||
import cn.ysk.cashier.dto.product.TbProductGroupQueryCriteria;
|
||||
import cn.ysk.cashier.vo.AddProduct;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2023-12-16
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "product/group管理")
|
||||
@RequestMapping("/api/tbProductGroup")
|
||||
public class TbProductGroupController {
|
||||
|
||||
private final TbProductGroupService tbProductGroupService;
|
||||
|
||||
@Resource
|
||||
private TbProductService tbProductService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbProductGroup:list')")
|
||||
public void exportTbProductGroup(HttpServletResponse response, TbProductGroupQueryCriteria criteria) throws IOException {
|
||||
tbProductGroupService.download(tbProductGroupService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询product/group")
|
||||
@ApiOperation("查询product/group")
|
||||
public ResponseEntity<Object> queryTbProductGroup(TbProductGroupQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbProductGroupService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/{productGroup}")
|
||||
@Log("查询product/group")
|
||||
@ApiOperation("查询product/group")
|
||||
public ResponseEntity<Object> queryTbProductGroup(@PathVariable("productGroup") Integer productGroup){
|
||||
return new ResponseEntity<>(tbProductGroupService.findByIdProduct(productGroup),HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@Log("新增product/group")
|
||||
@ApiOperation("新增product/group")
|
||||
public ResponseEntity<Object> createTbProductGroup(@Validated @RequestBody TbProductGroup resources){
|
||||
return new ResponseEntity<>(tbProductGroupService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改product/group")
|
||||
@ApiOperation("修改product/group")
|
||||
public ResponseEntity<Object> updateTbProductGroup(@Validated @RequestBody TbProductGroup resources){
|
||||
tbProductGroupService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除product/group")
|
||||
@ApiOperation("删除product/group")
|
||||
public ResponseEntity<Object> deleteTbProductGroup(@RequestBody Integer[] ids) {
|
||||
tbProductGroupService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
/**
|
||||
*添加商品(商品列表)
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/addProduct")
|
||||
public ResponseEntity<Object> ProductList(TbProductQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbProductService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品分类增加商品
|
||||
* @param addProduct
|
||||
* @param userName
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/addProductInfo")
|
||||
public ResponseEntity<Object> addProductInfo(@RequestBody AddProduct addProduct,@RequestAttribute(value = "userName", required = false) String userName){
|
||||
return new ResponseEntity<>(tbProductGroupService.updateProductIds(addProduct,userName),HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.product;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.product.TbProductSku;
|
||||
import cn.ysk.cashier.dto.product.TbProductSkuQueryCriteria;
|
||||
import cn.ysk.cashier.service.product.TbProductSkuService;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-01-03
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/product/sku管理")
|
||||
@RequestMapping("/api/tbProductSku")
|
||||
public class TbProductSkuController {
|
||||
|
||||
private final TbProductSkuService tbProductSkuService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbProductSku:list')")
|
||||
public void exportTbProductSku(HttpServletResponse response, TbProductSkuQueryCriteria criteria) throws IOException {
|
||||
tbProductSkuService.download(tbProductSkuService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询/product/sku")
|
||||
@ApiOperation("查询/product/sku")
|
||||
@PreAuthorize("@el.check('tbProductSku:list')")
|
||||
public ResponseEntity<Object> queryTbProductSku(TbProductSkuQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbProductSkuService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/product/sku")
|
||||
@ApiOperation("新增/product/sku")
|
||||
@PreAuthorize("@el.check('tbProductSku:add')")
|
||||
public ResponseEntity<Object> createTbProductSku(@Validated @RequestBody TbProductSku resources){
|
||||
return new ResponseEntity<>(tbProductSkuService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/product/sku")
|
||||
@ApiOperation("修改/product/sku")
|
||||
@PreAuthorize("@el.check('tbProductSku:edit')")
|
||||
public ResponseEntity<Object> updateTbProductSku(@Validated @RequestBody TbProductSku resources){
|
||||
tbProductSkuService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/product/sku")
|
||||
@ApiOperation("删除/product/sku")
|
||||
@PreAuthorize("@el.check('tbProductSku:del')")
|
||||
public ResponseEntity<Object> deleteTbProductSku(@RequestBody Integer[] ids) {
|
||||
tbProductSkuService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.product;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.product.TbProductSkuResult;
|
||||
import cn.ysk.cashier.service.product.TbProductSkuResultService;
|
||||
import cn.ysk.cashier.dto.product.TbProductSkuResultQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-02-08
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/skuResult管理")
|
||||
@RequestMapping("/api/tbProductSkuResult")
|
||||
public class TbProductSkuResultController {
|
||||
|
||||
private final TbProductSkuResultService tbProductSkuResultService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbProductSkuResult:list')")
|
||||
public void exportTbProductSkuResult(HttpServletResponse response, TbProductSkuResultQueryCriteria criteria) throws IOException {
|
||||
tbProductSkuResultService.download(tbProductSkuResultService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询/skuResult")
|
||||
@ApiOperation("查询/skuResult")
|
||||
@PreAuthorize("@el.check('tbProductSkuResult:list')")
|
||||
public ResponseEntity<Object> queryTbProductSkuResult(TbProductSkuResultQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbProductSkuResultService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/skuResult")
|
||||
@ApiOperation("新增/skuResult")
|
||||
@PreAuthorize("@el.check('tbProductSkuResult:add')")
|
||||
public ResponseEntity<Object> createTbProductSkuResult(@Validated @RequestBody TbProductSkuResult resources){
|
||||
return new ResponseEntity<>(tbProductSkuResultService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/skuResult")
|
||||
@ApiOperation("修改/skuResult")
|
||||
@PreAuthorize("@el.check('tbProductSkuResult:edit')")
|
||||
public ResponseEntity<Object> updateTbProductSkuResult(@Validated @RequestBody TbProductSkuResult resources){
|
||||
tbProductSkuResultService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/skuResult")
|
||||
@ApiOperation("删除/skuResult")
|
||||
@PreAuthorize("@el.check('tbProductSkuResult:del')")
|
||||
public ResponseEntity<Object> deleteTbProductSkuResult(@RequestBody Integer[] ids) {
|
||||
tbProductSkuResultService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.product;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.product.TbProductSpec;
|
||||
import cn.ysk.cashier.service.product.TbProductSpecService;
|
||||
import cn.ysk.cashier.dto.product.SpecDto;
|
||||
import cn.ysk.cashier.dto.product.TbProductSpecQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-01-03
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "product/spec管理")
|
||||
@RequestMapping("/api/tbProductSpec")
|
||||
public class TbProductSpecController {
|
||||
|
||||
private final TbProductSpecService tbProductSpecService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbProductSpec:list')")
|
||||
public void exportTbProductSpec(HttpServletResponse response, TbProductSpecQueryCriteria criteria) throws IOException {
|
||||
tbProductSpecService.download(tbProductSpecService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询product/spec")
|
||||
@ApiOperation("查询product/spec")
|
||||
public ResponseEntity<Object> queryTbProductSpec(TbProductSpecQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbProductSpecService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增product/spec")
|
||||
@ApiOperation("新增product/spec")
|
||||
public ResponseEntity<Object> createTbProductSpec(@Validated @RequestBody SpecDto resources){
|
||||
return new ResponseEntity<>(tbProductSpecService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改product/spec")
|
||||
@ApiOperation("修改product/spec")
|
||||
public ResponseEntity<Object> updateTbProductSpec(@Validated @RequestBody TbProductSpec resources){
|
||||
tbProductSpecService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除product/spec")
|
||||
@ApiOperation("删除product/spec")
|
||||
public ResponseEntity<Object> deleteTbProductSpec(@RequestBody Integer[] ids) {
|
||||
tbProductSpecService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.product;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.product.TbProductStockDetail;
|
||||
import cn.ysk.cashier.service.product.TbProductStockDetailService;
|
||||
import cn.ysk.cashier.dto.product.TbProductStockDetailQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-01-19
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/product/Stock管理")
|
||||
@RequestMapping("/api/tbProductStockDetail")
|
||||
public class TbProductStockDetailController {
|
||||
|
||||
private final TbProductStockDetailService tbProductStockDetailService;
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@PostMapping("/stock")
|
||||
@Log("查询/product/Stock")
|
||||
@ApiOperation("查询/product/Stock")
|
||||
// @PreAuthorize("@el.check('tbProductStockDetail:list')")
|
||||
public ResponseEntity<Object> queryPage(@RequestBody TbProductStockDetailQueryCriteria criteria){
|
||||
return new ResponseEntity<>(tbProductStockDetailService.queryPage(criteria),HttpStatus.OK);
|
||||
}
|
||||
@GetMapping("/sum")
|
||||
@Log("查询/product/Stock")
|
||||
public ResponseEntity<Object> sumType(TbProductStockDetailQueryCriteria criteria){
|
||||
return new ResponseEntity<>(tbProductStockDetailService.sumStockNumber(criteria.getProductId()),HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 出库/入库
|
||||
* @param resources
|
||||
* @return
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.product;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.product.TbProductStockOperate;
|
||||
import cn.ysk.cashier.service.TbProductStockOperateService;
|
||||
import cn.ysk.cashier.dto.product.OutAndOnDto;
|
||||
import cn.ysk.cashier.dto.product.TbProductStockOperateQueryCriteria;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-01-25
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/product/StockOperate管理")
|
||||
@RequestMapping("/api/tbProductStockOperate")
|
||||
public class TbProductStockOperateController {
|
||||
|
||||
private final TbProductStockOperateService tbProductStockOperateService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbProductStockOperate:list')")
|
||||
public void exportTbProductStockOperate(HttpServletResponse response, TbProductStockOperateQueryCriteria criteria) throws IOException {
|
||||
tbProductStockOperateService.download(tbProductStockOperateService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@PostMapping("/list")
|
||||
public ResponseEntity<Object> queryTbProductStockOperate(@RequestBody TbProductStockOperateQueryCriteria criteria){
|
||||
return new ResponseEntity<>(tbProductStockOperateService.queryAllPage(criteria),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
public ResponseEntity<Object> queryById(@PathVariable Integer id){
|
||||
return new ResponseEntity<>(tbProductStockOperateService.findById(id),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/nullify/{id}")
|
||||
public ResponseEntity<Object> nullify(@PathVariable Integer id){
|
||||
tbProductStockOperateService.nullify(id);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/product/StockOperate")
|
||||
@ApiOperation("新增/product/StockOperate")
|
||||
@PreAuthorize("@el.check('tbProductStockOperate:add')")
|
||||
public ResponseEntity<Object> createTbProductStockOperate(@Validated @RequestBody TbProductStockOperate resources){
|
||||
return new ResponseEntity<>(tbProductStockOperateService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PostMapping("/outAndOn")
|
||||
@Log("新增/product/StockOperate")
|
||||
@ApiOperation("新增/product/StockOperate")
|
||||
// @PreAuthorize("@el.check('tbProductStockOperate:add')")
|
||||
public ResponseEntity<Object> createOutAndONOperate(@RequestBody OutAndOnDto outAndOnDto){
|
||||
return new ResponseEntity<>(tbProductStockOperateService.createOutAndONOperate(outAndOnDto),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/product/StockOperate")
|
||||
@ApiOperation("修改/product/StockOperate")
|
||||
@PreAuthorize("@el.check('tbProductStockOperate:edit')")
|
||||
public ResponseEntity<Object> updateTbProductStockOperate(@Validated @RequestBody TbProductStockOperate resources){
|
||||
tbProductStockOperateService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/product/StockOperate")
|
||||
@ApiOperation("删除/product/StockOperate")
|
||||
@PreAuthorize("@el.check('tbProductStockOperate:del')")
|
||||
public ResponseEntity<Object> deleteTbProductStockOperate(@RequestBody Integer[] ids) {
|
||||
tbProductStockOperateService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.product;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.product.TbShopCategory;
|
||||
import cn.ysk.cashier.service.product.TbShopCategoryService;
|
||||
import cn.ysk.cashier.dto.product.TbShopCategoryQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-01-08
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "product/category管理")
|
||||
@RequestMapping("/api/tbShopCategory")
|
||||
public class TbShopCategoryController {
|
||||
|
||||
private final TbShopCategoryService tbShopCategoryService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbShopCategory:list')")
|
||||
public void exportTbShopCategory(HttpServletResponse response, TbShopCategoryQueryCriteria criteria) throws IOException {
|
||||
tbShopCategoryService.download(tbShopCategoryService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询product/category")
|
||||
@ApiOperation("查询product/category")
|
||||
public ResponseEntity<Object> queryTbShopCategory(TbShopCategoryQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbShopCategoryService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增product/category")
|
||||
@ApiOperation("新增product/category")
|
||||
public ResponseEntity<Object> createTbShopCategory(@Validated @RequestBody TbShopCategory resources){
|
||||
return new ResponseEntity<>(tbShopCategoryService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改product/category")
|
||||
@ApiOperation("修改product/category")
|
||||
public ResponseEntity<Object> updateTbShopCategory(@Validated @RequestBody TbShopCategory resources){
|
||||
tbShopCategoryService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除product/category")
|
||||
@ApiOperation("删除product/category")
|
||||
public ResponseEntity<Object> deleteTbShopCategory(@RequestBody Integer[] ids) {
|
||||
|
||||
tbShopCategoryService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.shop.TbMerchantAccount;
|
||||
import cn.ysk.cashier.service.shop.TbMerchantAccountService;
|
||||
import cn.ysk.cashier.dto.shop.TbMerchantAccountQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-02-08
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/merchant/account管理")
|
||||
@RequestMapping("/api/tbMerchantAccount")
|
||||
public class TbMerchantAccountController {
|
||||
|
||||
private final TbMerchantAccountService tbMerchantAccountService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbMerchantAccount:list')")
|
||||
public void exportTbMerchantAccount(HttpServletResponse response, TbMerchantAccountQueryCriteria criteria) throws IOException {
|
||||
tbMerchantAccountService.download(tbMerchantAccountService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询/merchant/account")
|
||||
@ApiOperation("查询/merchant/account")
|
||||
@PreAuthorize("@el.check('tbMerchantAccount:list')")
|
||||
public ResponseEntity<Object> queryTbMerchantAccount(TbMerchantAccountQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbMerchantAccountService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/merchant/account")
|
||||
@ApiOperation("新增/merchant/account")
|
||||
@PreAuthorize("@el.check('tbMerchantAccount:add')")
|
||||
public ResponseEntity<Object> createTbMerchantAccount(@Validated @RequestBody TbMerchantAccount resources){
|
||||
return new ResponseEntity<>(tbMerchantAccountService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/merchant/account")
|
||||
@ApiOperation("修改/merchant/account")
|
||||
@PreAuthorize("@el.check('tbMerchantAccount:edit')")
|
||||
public ResponseEntity<Object> updateTbMerchantAccount(@Validated @RequestBody TbMerchantAccount resources){
|
||||
tbMerchantAccountService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/merchant/account")
|
||||
@ApiOperation("删除/merchant/account")
|
||||
@PreAuthorize("@el.check('tbMerchantAccount:del')")
|
||||
public ResponseEntity<Object> deleteTbMerchantAccount(@RequestBody Integer[] ids) {
|
||||
tbMerchantAccountService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.shop.TbMerchantRegister;
|
||||
import cn.ysk.cashier.service.shop.TbMerchantRegisterService;
|
||||
import cn.ysk.cashier.dto.shop.TbMerchantRegisterDto;
|
||||
import cn.ysk.cashier.dto.shop.TbMerchantRegisterQueryCriteria;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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.*;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-02-23
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/shop/register管理")
|
||||
@RequestMapping("/api/tbMerchantRegister")
|
||||
public class TbMerchantRegisterController {
|
||||
|
||||
private final TbMerchantRegisterService tbMerchantRegisterService;
|
||||
|
||||
// @Log("导出数据")
|
||||
// @ApiOperation("导出数据")
|
||||
// @GetMapping(value = "/download")
|
||||
// @PreAuthorize("@el.check('tbMerchantRegister:list')")
|
||||
// public void exportTbMerchantRegister(HttpServletResponse response, TbMerchantRegisterQueryCriteria criteria) throws IOException {
|
||||
// tbMerchantRegisterService.download(tbMerchantRegisterService.queryAll(criteria), response);
|
||||
// }
|
||||
|
||||
@PostMapping("/list")
|
||||
@Log("查询/shop/register")
|
||||
@ApiOperation("查询/shop/register")
|
||||
@PreAuthorize("@el.check('tbMerchantRegister:list')")
|
||||
public ResponseEntity<Object> queryTbMerchantRegister(@RequestBody TbMerchantRegisterQueryCriteria criteria){
|
||||
return new ResponseEntity<>(tbMerchantRegisterService.queryAll(criteria),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/shop/register")
|
||||
@ApiOperation("新增/shop/register")
|
||||
@PreAuthorize("@el.check('tbMerchantRegister:add')")
|
||||
public ResponseEntity<Object> createTbMerchantRegister(@Validated @RequestBody TbMerchantRegisterDto resources){
|
||||
return new ResponseEntity<>(tbMerchantRegisterService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/shop/register")
|
||||
@ApiOperation("修改/shop/register")
|
||||
@PreAuthorize("@el.check('tbMerchantRegister:edit')")
|
||||
public ResponseEntity<Object> updateTbMerchantRegister(@Validated @RequestBody TbMerchantRegister resources){
|
||||
tbMerchantRegisterService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/shop/register")
|
||||
@ApiOperation("删除/shop/register")
|
||||
@PreAuthorize("@el.check('tbMerchantRegister:del')")
|
||||
public ResponseEntity<Object> deleteTbMerchantRegister(@RequestBody Integer[] ids) {
|
||||
tbMerchantRegisterService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.shop.TbMerchantThirdApply;
|
||||
import cn.ysk.cashier.service.shop.TbMerchantThirdApplyService;
|
||||
import cn.ysk.cashier.dto.shop.TbMerchantThirdApplyDto;
|
||||
import cn.ysk.cashier.dto.shop.TbMerchantThirdApplyQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-02-02
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/shop/thirdApply管理")
|
||||
@RequestMapping("/api/tbMerchantThirdApply")
|
||||
public class TbMerchantThirdApplyController {
|
||||
|
||||
private final TbMerchantThirdApplyService tbMerchantThirdApplyService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbMerchantThirdApply:list')")
|
||||
public void exportTbMerchantThirdApply(HttpServletResponse response, TbMerchantThirdApplyQueryCriteria criteria) throws IOException {
|
||||
tbMerchantThirdApplyService.download(tbMerchantThirdApplyService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询/shop/thirdApply")
|
||||
@ApiOperation("查询/shop/thirdApply")
|
||||
|
||||
public ResponseEntity<Object> queryTbMerchantThirdApply(TbMerchantThirdApplyQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbMerchantThirdApplyService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/{merchantId}")
|
||||
public ResponseEntity<Object> queryTbMerchantThirdApply(@PathVariable Integer merchantId){
|
||||
TbMerchantThirdApplyDto byShopId = tbMerchantThirdApplyService.findByShopId(merchantId);
|
||||
if (byShopId == null){
|
||||
return new ResponseEntity<>(new TbMerchantThirdApplyDto(),HttpStatus.OK);
|
||||
}
|
||||
return new ResponseEntity<>(byShopId,HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/shop/thirdApply")
|
||||
@ApiOperation("新增/shop/thirdApply")
|
||||
@PreAuthorize("@el.check('tbMerchantThirdApply:add')")
|
||||
public ResponseEntity<Object> createTbMerchantThirdApply(@Validated @RequestBody TbMerchantThirdApply resources){
|
||||
return new ResponseEntity<>(tbMerchantThirdApplyService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/shop/thirdApply")
|
||||
@ApiOperation("修改/shop/thirdApply")
|
||||
@PreAuthorize("@el.check('tbMerchantThirdApply:edit')")
|
||||
public ResponseEntity<Object> updateTbMerchantThirdApply(@Validated @RequestBody TbMerchantThirdApply resources){
|
||||
tbMerchantThirdApplyService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/shop/thirdApply")
|
||||
@ApiOperation("删除/shop/thirdApply")
|
||||
@PreAuthorize("@el.check('tbMerchantThirdApply:del')")
|
||||
public ResponseEntity<Object> deleteTbMerchantThirdApply(@RequestBody Integer[] ids) {
|
||||
tbMerchantThirdApplyService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.shop.TbPlussShopStaff;
|
||||
import cn.ysk.cashier.service.shop.TbPlussShopStaffService;
|
||||
import cn.ysk.cashier.dto.shop.TbPlussShopStaffQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-03-01
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/shop/shopStaff管理")
|
||||
@RequestMapping("/api/tbPlussShopStaff")
|
||||
public class TbPlussShopStaffController {
|
||||
|
||||
private final TbPlussShopStaffService tbPlussShopStaffService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
public void exportTbPlussShopStaff(HttpServletResponse response, TbPlussShopStaffQueryCriteria criteria) throws IOException {
|
||||
tbPlussShopStaffService.download(tbPlussShopStaffService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询/shop/shopStaff")
|
||||
@ApiOperation("查询/shop/shopStaff")
|
||||
public ResponseEntity<Object> queryTbPlussShopStaff(TbPlussShopStaffQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbPlussShopStaffService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/shop/shopStaff")
|
||||
@ApiOperation("新增/shop/shopStaff")
|
||||
public ResponseEntity<Object> createTbPlussShopStaff(@Validated @RequestBody TbPlussShopStaff resources){
|
||||
return new ResponseEntity<>(tbPlussShopStaffService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/shop/shopStaff")
|
||||
@ApiOperation("修改/shop/shopStaff")
|
||||
public ResponseEntity<Object> updateTbPlussShopStaff(@Validated @RequestBody TbPlussShopStaff resources){
|
||||
tbPlussShopStaffService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/shop/shopStaff")
|
||||
@ApiOperation("删除/shop/shopStaff")
|
||||
public ResponseEntity<Object> deleteTbPlussShopStaff(@RequestBody Integer[] ids) {
|
||||
tbPlussShopStaffService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import lombok.Data;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @description /
|
||||
* @author lyf
|
||||
* @date 2024-02-28
|
||||
**/
|
||||
@Entity
|
||||
@Data
|
||||
@Table(name="tb_print_machine")
|
||||
public class TbPrintMachine implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "`id`")
|
||||
@ApiModelProperty(value = "id")
|
||||
private Integer id;
|
||||
|
||||
@Column(name = "`name`",nullable = false)
|
||||
@NotBlank
|
||||
@ApiModelProperty(value = "设备名称")
|
||||
private String name;
|
||||
|
||||
@Column(name = "`type`")
|
||||
@ApiModelProperty(value = "printer")
|
||||
private String type;
|
||||
|
||||
@Column(name = "`connection_type`")
|
||||
@ApiModelProperty(value = "现在打印机支持USB 和 网络、蓝牙")
|
||||
private String connectionType;
|
||||
|
||||
@Column(name = "`address`")
|
||||
@ApiModelProperty(value = "ip地址")
|
||||
private String address;
|
||||
|
||||
@Column(name = "`port`")
|
||||
@ApiModelProperty(value = "端口")
|
||||
private String port;
|
||||
|
||||
@Column(name = "`sub_type`")
|
||||
@ApiModelProperty(value = "打印类型(分类)")
|
||||
private String subType;
|
||||
|
||||
@Column(name = "`status`")
|
||||
@ApiModelProperty(value = "状态 online")
|
||||
private Integer status;
|
||||
|
||||
@Column(name = "`shop_id`")
|
||||
@ApiModelProperty(value = "店铺Id")
|
||||
private String shopId;
|
||||
|
||||
@Column(name = "`category_ids`")
|
||||
@ApiModelProperty(value = "分类Id")
|
||||
private String categoryIds;
|
||||
|
||||
@Column(name = "`content_type`")
|
||||
@ApiModelProperty(value = "现在打印机支持USB 和 网络两种")
|
||||
private String contentType;
|
||||
|
||||
@Column(name = "`config`")
|
||||
@ApiModelProperty(value = "主配置")
|
||||
private String config;
|
||||
|
||||
@Column(name = "`created_at`")
|
||||
@ApiModelProperty(value = "createdAt")
|
||||
private Long createdAt;
|
||||
|
||||
@Column(name = "`updated_at`")
|
||||
@ApiModelProperty(value = "updatedAt")
|
||||
private Long updatedAt;
|
||||
|
||||
@Column(name = "`category_list`")
|
||||
@ApiModelProperty(value = "分类")
|
||||
private String categoryList;
|
||||
|
||||
@Column(name = "`sort`")
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@Column(name = "`vendor_id`")
|
||||
@ApiModelProperty(value = "Android打印机需要标识设备ID ")
|
||||
private String vendorId;
|
||||
|
||||
@Column(name = "`product_id`")
|
||||
@ApiModelProperty(value = "Android打印机需要标识设备ID ")
|
||||
private String productId;
|
||||
|
||||
public void copy(TbPrintMachine source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.service.shop.TbPrintMachineService;
|
||||
import cn.ysk.cashier.dto.shop.PrintMachineDto;
|
||||
import cn.ysk.cashier.dto.shop.TbPrintMachineQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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.*;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-02-28
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/shop/print管理")
|
||||
@RequestMapping("/api/tbPrintMachine")
|
||||
public class TbPrintMachineController {
|
||||
|
||||
private final TbPrintMachineService tbPrintMachineService;
|
||||
|
||||
// @Log("导出数据")
|
||||
// @ApiOperation("导出数据")
|
||||
// @GetMapping(value = "/download")
|
||||
// public void exportTbPrintMachine(HttpServletResponse response, TbPrintMachineQueryCriteria criteria) throws IOException {
|
||||
// tbPrintMachineService.download(tbPrintMachineService.queryAll(criteria), response);
|
||||
// }
|
||||
|
||||
@GetMapping
|
||||
@Log("查询/shop/print")
|
||||
@ApiOperation("查询/shop/print")
|
||||
public ResponseEntity<Object> queryTbPrintMachine(TbPrintMachineQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbPrintMachineService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/shop/print")
|
||||
@ApiOperation("新增/shop/print")
|
||||
public ResponseEntity<Object> createTbPrintMachine(@Validated @RequestBody PrintMachineDto resources){
|
||||
return new ResponseEntity<>(tbPrintMachineService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
@GetMapping("/{id}")
|
||||
public ResponseEntity<Object> createTbPrintMachine(@PathVariable Integer id){
|
||||
return new ResponseEntity<>(tbPrintMachineService.findById(id),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/shop/print")
|
||||
@ApiOperation("修改/shop/print")
|
||||
public ResponseEntity<Object> updateTbPrintMachine(@Validated @RequestBody PrintMachineDto resources){
|
||||
tbPrintMachineService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/shop/print")
|
||||
@ApiOperation("删除/shop/print")
|
||||
public ResponseEntity<Object> deleteTbPrintMachine(@RequestBody Integer[] ids) {
|
||||
tbPrintMachineService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.shop.TbReceiptSales;
|
||||
import cn.ysk.cashier.dto.shop.TbReceiptSalesQueryCriteria;
|
||||
import cn.ysk.cashier.service.shop.TbReceiptSalesService;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-01-08
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/shop/receiptSales管理")
|
||||
@RequestMapping("/api/tbReceiptSales")
|
||||
public class TbReceiptSalesController {
|
||||
|
||||
private final TbReceiptSalesService tbReceiptSalesService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbReceiptSales:list')")
|
||||
public void exportTbReceiptSales(HttpServletResponse response, TbReceiptSalesQueryCriteria criteria) throws IOException {
|
||||
tbReceiptSalesService.download(tbReceiptSalesService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询/shop/receiptSales")
|
||||
@ApiOperation("查询/shop/receiptSales")
|
||||
@PreAuthorize("@el.check('tbReceiptSales:list')")
|
||||
public ResponseEntity<Object> queryTbReceiptSales(TbReceiptSalesQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbReceiptSalesService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/{shopId}")
|
||||
@Log("查询/shop/receiptSales")
|
||||
@ApiOperation("查询/shop/receiptSales")
|
||||
@PreAuthorize("@el.check('tbReceiptSales:info')")
|
||||
public Object queryTbReceiptSalesInfo(@PathVariable("shopId")Integer shopId){
|
||||
|
||||
return tbReceiptSalesService.findById(shopId);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/shop/receiptSales")
|
||||
@ApiOperation("新增/shop/receiptSales")
|
||||
@PreAuthorize("@el.check('tbReceiptSales:add')")
|
||||
public ResponseEntity<Object> createTbReceiptSales(@Validated @RequestBody TbReceiptSales resources){
|
||||
return new ResponseEntity<>(tbReceiptSalesService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/shop/receiptSales")
|
||||
@ApiOperation("修改/shop/receiptSales")
|
||||
@PreAuthorize("@el.check('tbReceiptSales:edit')")
|
||||
public ResponseEntity<Object> updateTbReceiptSales(@Validated @RequestBody TbReceiptSales resources){
|
||||
tbReceiptSalesService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/shop/receiptSales")
|
||||
@ApiOperation("删除/shop/receiptSales")
|
||||
@PreAuthorize("@el.check('tbReceiptSales:del')")
|
||||
public ResponseEntity<Object> deleteTbReceiptSales(@RequestBody Integer[] ids) {
|
||||
tbReceiptSalesService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.shop.TbShopArea;
|
||||
import cn.ysk.cashier.service.shop.TbShopAreaService;
|
||||
import cn.ysk.cashier.dto.shop.TbShopAreaQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-01-31
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/shop/area管理")
|
||||
@RequestMapping("/api/tbShopArea")
|
||||
public class TbShopAreaController {
|
||||
|
||||
private final TbShopAreaService tbShopAreaService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbShopArea:list')")
|
||||
public void exportTbShopArea(HttpServletResponse response, TbShopAreaQueryCriteria criteria) throws IOException {
|
||||
tbShopAreaService.download(tbShopAreaService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询/shop/area")
|
||||
@ApiOperation("查询/shop/area")
|
||||
public ResponseEntity<Object> queryTbShopArea(TbShopAreaQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbShopAreaService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/shop/area")
|
||||
@ApiOperation("新增/shop/area")
|
||||
public ResponseEntity<Object> createTbShopArea(@Validated @RequestBody TbShopArea resources){
|
||||
return new ResponseEntity<>(tbShopAreaService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/shop/area")
|
||||
@ApiOperation("修改/shop/area")
|
||||
public ResponseEntity<Object> updateTbShopArea(@Validated @RequestBody TbShopArea resources){
|
||||
tbShopAreaService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/shop/area")
|
||||
@ApiOperation("删除/shop/area")
|
||||
public ResponseEntity<Object> deleteTbShopArea(@RequestBody Integer[] ids) {
|
||||
tbShopAreaService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.shop.TbShopCashSpread;
|
||||
import cn.ysk.cashier.service.shop.TbShopCashSpreadService;
|
||||
import cn.ysk.cashier.dto.shop.TbShopCashSpreadQueryCriteria;
|
||||
import cn.ysk.cashier.utils.StringUtils;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-01-05
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/shop/spread管理")
|
||||
@RequestMapping("/api/tbShopCashSpread")
|
||||
public class TbShopCashSpreadController {
|
||||
|
||||
private final TbShopCashSpreadService tbShopCashSpreadService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbShopCashSpread:list')")
|
||||
public void exportTbShopCashSpread(HttpServletResponse response, TbShopCashSpreadQueryCriteria criteria) throws IOException {
|
||||
tbShopCashSpreadService.download(tbShopCashSpreadService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询/shop/spread")
|
||||
@ApiOperation("查询/shop/spread")
|
||||
@PreAuthorize("@el.check('tbShopCashSpread:list')")
|
||||
public ResponseEntity<Object> queryTbShopCashSpread(TbShopCashSpreadQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbShopCashSpreadService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
@GetMapping("/{shopId}")
|
||||
@Log("查询/shop/spread/info")
|
||||
@ApiOperation("查询/shop/spread/info")
|
||||
@PreAuthorize("@el.check('tbShopCashSpread:info')")
|
||||
public Object queryTbShopCashSpreadInfo(@PathVariable("shopId") Integer shopId){
|
||||
TbShopCashSpread byShopId = tbShopCashSpreadService.findByShopId(shopId);
|
||||
String screenConfig = byShopId.getScreenConfig();
|
||||
return StringUtils.stringChangeMap(screenConfig);
|
||||
}
|
||||
@PostMapping
|
||||
@Log("新增/shop/spread")
|
||||
@ApiOperation("新增/shop/spread")
|
||||
@PreAuthorize("@el.check('tbShopCashSpread:add')")
|
||||
public ResponseEntity<Object> createTbShopCashSpread(@Validated @RequestBody TbShopCashSpread resources){
|
||||
return new ResponseEntity<>(tbShopCashSpreadService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/shop/spread")
|
||||
@ApiOperation("修改/shop/spread")
|
||||
@PreAuthorize("@el.check('tbShopCashSpread:edit')")
|
||||
public ResponseEntity<Object> updateTbShopCashSpread(@Validated @RequestBody TbShopCashSpread resources){
|
||||
Integer update = tbShopCashSpreadService.update(resources);
|
||||
if (update>0){
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
|
||||
}
|
||||
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
|
||||
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/shop/spread")
|
||||
@ApiOperation("删除/shop/spread")
|
||||
@PreAuthorize("@el.check('tbShopCashSpread:del')")
|
||||
public ResponseEntity<Object> deleteTbShopCashSpread(@RequestBody String[] ids) {
|
||||
tbShopCashSpreadService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.shop.TbShopCurrency;
|
||||
import cn.ysk.cashier.service.shop.TbShopCurrencyService;
|
||||
import cn.ysk.cashier.dto.shop.TbShopCurrencyQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-01-05
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/shop/currency管理")
|
||||
@RequestMapping("/api/tbShopCurrency")
|
||||
public class TbShopCurrencyController {
|
||||
|
||||
private final TbShopCurrencyService tbShopCurrencyService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbShopCurrency:list')")
|
||||
public void exportTbShopCurrency(HttpServletResponse response, TbShopCurrencyQueryCriteria criteria) throws IOException {
|
||||
tbShopCurrencyService.download(tbShopCurrencyService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询/shop/currency")
|
||||
@ApiOperation("查询/shop/currency")
|
||||
@PreAuthorize("@el.check('tbShopCurrency:list')")
|
||||
public ResponseEntity<Object> queryTbShopCurrency(TbShopCurrencyQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbShopCurrencyService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/{shopId}")
|
||||
@Log("查询/shop/currency/info")
|
||||
@ApiOperation("查询/shop/currency/info")
|
||||
@PreAuthorize("@el.check('tbShopCurrency:info')")
|
||||
public Object queryTbShopCurrencyInfo(@PathVariable("shopId") String shopId){
|
||||
return tbShopCurrencyService.findByShopId(shopId);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/shop/currency")
|
||||
@ApiOperation("新增/shop/currency")
|
||||
@PreAuthorize("@el.check('tbShopCurrency:add')")
|
||||
public ResponseEntity<Object> createTbShopCurrency(@Validated @RequestBody TbShopCurrency resources){
|
||||
return new ResponseEntity<>(tbShopCurrencyService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/shop/currency")
|
||||
@ApiOperation("修改/shop/currency")
|
||||
@PreAuthorize("@el.check('tbShopCurrency:edit')")
|
||||
public ResponseEntity<Object> updateTbShopCurrency(@Validated @RequestBody TbShopCurrency resources){
|
||||
tbShopCurrencyService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/shop/currency")
|
||||
@ApiOperation("删除/shop/currency")
|
||||
@PreAuthorize("@el.check('tbShopCurrency:del')")
|
||||
public ResponseEntity<Object> deleteTbShopCurrency(@RequestBody Integer[] ids) {
|
||||
tbShopCurrencyService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
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.dto.shop.TbShopInfoDto;
|
||||
import cn.ysk.cashier.dto.shop.TbShopInfoQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2023-11-07
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/shop/list管理")
|
||||
@RequestMapping("/api/tbShopInfo")
|
||||
public class TbShopInfoController {
|
||||
|
||||
private final TbShopInfoService tbShopInfoService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbShopInfo:list')")
|
||||
public void exportTbShopInfo(HttpServletResponse response, TbShopInfoQueryCriteria criteria) throws IOException {
|
||||
tbShopInfoService.download(tbShopInfoService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询/shop/list")
|
||||
@ApiOperation("查询/shop/list")
|
||||
@PreAuthorize("@el.check('tbShopInfo:list')")
|
||||
public ResponseEntity<Object> queryTbShopInfo(TbShopInfoQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbShopInfoService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/{shopId}")
|
||||
@Log("查询/shop/list")
|
||||
@ApiOperation("查询/shop/list")
|
||||
@PreAuthorize("@el.check('tbShopInfo:info')")
|
||||
public Object queryInfo(@PathVariable("shopId") Integer shopId){
|
||||
return tbShopInfoService.findById(shopId);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/shop/list")
|
||||
@ApiOperation("新增/shop/list")
|
||||
@PreAuthorize("@el.check('tbShopInfo:add')")
|
||||
public ResponseEntity<Object> createTbShopInfo(@Validated @RequestBody TbShopInfoDto resources){
|
||||
return new ResponseEntity<>(tbShopInfoService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/shop/list")
|
||||
@ApiOperation("修改/shop/list")
|
||||
@PreAuthorize("@el.check('tbShopInfo:edit')")
|
||||
public ResponseEntity<Object> updateTbShopInfo(@Validated @RequestBody TbShopInfo resources){
|
||||
tbShopInfoService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/shop/list")
|
||||
@ApiOperation("删除/shop/list")
|
||||
@PreAuthorize("@el.check('tbShopInfo:del')")
|
||||
public ResponseEntity<Object> deleteTbShopInfo(@RequestBody Integer[] ids) {
|
||||
tbShopInfoService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.shop.TbShopPurveyor;
|
||||
import cn.ysk.cashier.service.shop.TbShopPurveyorService;
|
||||
import cn.ysk.cashier.dto.shop.TbShopPurveyorQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-01-22
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/shop/purveyor管理")
|
||||
@RequestMapping("/api/tbShopPurveyor")
|
||||
public class TbShopPurveyorController {
|
||||
|
||||
private final TbShopPurveyorService tbShopPurveyorService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbShopPurveyor:list')")
|
||||
public void exportTbShopPurveyor(HttpServletResponse response, TbShopPurveyorQueryCriteria criteria) throws IOException {
|
||||
tbShopPurveyorService.download(tbShopPurveyorService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询/shop/purveyor")
|
||||
@ApiOperation("查询/shop/purveyor")
|
||||
public ResponseEntity<Object> queryTbShopPurveyor(TbShopPurveyorQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbShopPurveyorService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/shop/purveyor")
|
||||
@ApiOperation("新增/shop/purveyor")
|
||||
public ResponseEntity<Object> createTbShopPurveyor(@Validated @RequestBody TbShopPurveyor resources){
|
||||
return new ResponseEntity<>(tbShopPurveyorService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/shop/purveyor")
|
||||
@ApiOperation("修改/shop/purveyor")
|
||||
public ResponseEntity<Object> updateTbShopPurveyor(@Validated @RequestBody TbShopPurveyor resources){
|
||||
tbShopPurveyorService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/shop/purveyor")
|
||||
@ApiOperation("删除/shop/purveyor")
|
||||
public ResponseEntity<Object> deleteTbShopPurveyor(@RequestBody Integer[] ids) {
|
||||
tbShopPurveyorService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.shop.TbShopPurveyorTransact;
|
||||
import cn.ysk.cashier.service.shop.TbShopPurveyorTransactService;
|
||||
import cn.ysk.cashier.dto.shop.TbShopPurveyorTransactQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-01-23
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/shop/purveyorTransact管理")
|
||||
@RequestMapping("/api/tbShopPurveyorTransact")
|
||||
public class TbShopPurveyorTransactController {
|
||||
|
||||
private final TbShopPurveyorTransactService tbShopPurveyorTransactService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbShopPurveyorTransact:list')")
|
||||
public void exportTbShopPurveyorTransact(HttpServletResponse response, TbShopPurveyorTransactQueryCriteria criteria) throws IOException {
|
||||
tbShopPurveyorTransactService.download(tbShopPurveyorTransactService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 进货账目
|
||||
* @param criteria
|
||||
* @param pageable
|
||||
* @return
|
||||
*/
|
||||
@GetMapping
|
||||
@Log("查询/shop/purveyorTransact")
|
||||
@ApiOperation("查询/shop/purveyorTransact")
|
||||
public ResponseEntity<Object> queryTbShopPurveyorTransactSum(TbShopPurveyorTransactQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbShopPurveyorTransactService.queryTransactDate(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
/**
|
||||
* 进货账目详情
|
||||
* @param criteria
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/info")
|
||||
@Log("查询/shop/purveyorTransact")
|
||||
public ResponseEntity<Object> queryPurveyorTransact(@RequestBody TbShopPurveyorTransactQueryCriteria criteria){
|
||||
return new ResponseEntity<>(tbShopPurveyorTransactService.queryPurveyorTransact(criteria),HttpStatus.OK);
|
||||
}
|
||||
|
||||
/**
|
||||
* 汇总
|
||||
* @param criteria
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/sum")
|
||||
public ResponseEntity<Object> queryTransactSum( TbShopPurveyorTransactQueryCriteria criteria){
|
||||
return new ResponseEntity<>(tbShopPurveyorTransactService.queryTransactSum(criteria),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/shop/purveyorTransact")
|
||||
@ApiOperation("新增/shop/purveyorTransact")
|
||||
public ResponseEntity<Object> createTbShopPurveyorTransact(@Validated @RequestBody TbShopPurveyorTransact resources){
|
||||
return new ResponseEntity<>(tbShopPurveyorTransactService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/shop/purveyorTransact")
|
||||
@ApiOperation("修改/shop/purveyorTransact")
|
||||
public ResponseEntity<Object> updateTbShopPurveyorTransact(@Validated @RequestBody TbShopPurveyorTransact resources){
|
||||
tbShopPurveyorTransactService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/shop/purveyorTransact")
|
||||
@ApiOperation("删除/shop/purveyorTransact")
|
||||
public ResponseEntity<Object> deleteTbShopPurveyorTransact(@RequestBody Integer[] ids) {
|
||||
tbShopPurveyorTransactService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.shop.TbShopTable;
|
||||
import cn.ysk.cashier.service.shop.TbShopTableService;
|
||||
import cn.ysk.cashier.dto.shop.TbShopTableQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-01-18
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/shop/table管理")
|
||||
@RequestMapping("/api/tbShopTable")
|
||||
public class TbShopTableController {
|
||||
|
||||
private final TbShopTableService tbShopTableService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbShopTable:list')")
|
||||
public void exportTbShopTable(HttpServletResponse response, TbShopTableQueryCriteria criteria) throws IOException {
|
||||
tbShopTableService.download(tbShopTableService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询/shop/table")
|
||||
@ApiOperation("查询/shop/table")
|
||||
public ResponseEntity<Object> queryTbShopTable(TbShopTableQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbShopTableService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/shop/table")
|
||||
@ApiOperation("新增/shop/table")
|
||||
public ResponseEntity<Object> createTbShopTable(@Validated @RequestBody TbShopTable resources){
|
||||
return new ResponseEntity<>(tbShopTableService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PostMapping("/qrcode")
|
||||
public ResponseEntity<Object> bindingQRcode(@RequestBody TbShopTable resources){
|
||||
tbShopTableService.binding(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/shop/table")
|
||||
@ApiOperation("修改/shop/table")
|
||||
public ResponseEntity<Object> updateTbShopTable(@Validated @RequestBody TbShopTable resources){
|
||||
tbShopTableService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/shop/table")
|
||||
@ApiOperation("删除/shop/table")
|
||||
public ResponseEntity<Object> deleteTbShopTable(@RequestBody Integer[] ids) {
|
||||
tbShopTableService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.shop.TbShopUnit;
|
||||
import cn.ysk.cashier.service.shop.TbShopUnitService;
|
||||
import cn.ysk.cashier.dto.shop.TbShopUnitQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-01-02
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/shop/unit管理")
|
||||
@RequestMapping("/api/tbShopUnit")
|
||||
public class TbShopUnitController {
|
||||
|
||||
private final TbShopUnitService tbShopUnitService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbShopUnit:list')")
|
||||
public void exportTbShopUnit(HttpServletResponse response, TbShopUnitQueryCriteria criteria) throws IOException {
|
||||
tbShopUnitService.download(tbShopUnitService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询/shop/unit")
|
||||
@ApiOperation("查询/shop/unit")
|
||||
public ResponseEntity<Object> queryTbShopUnit(TbShopUnitQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbShopUnitService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/shop/unit")
|
||||
@ApiOperation("新增/shop/unit")
|
||||
public ResponseEntity<Object> createTbShopUnit(@Validated @RequestBody TbShopUnit resources)throws Exception{
|
||||
return new ResponseEntity<>(tbShopUnitService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/shop/unit")
|
||||
@ApiOperation("修改/shop/unit")
|
||||
public ResponseEntity<Object> updateTbShopUnit(@Validated @RequestBody TbShopUnit resources){
|
||||
tbShopUnitService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/shop/unit")
|
||||
@ApiOperation("删除/shop/unit")
|
||||
public ResponseEntity<Object> deleteTbShopUnit(@RequestBody Integer[] ids) {
|
||||
tbShopUnitService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Zheng Jie
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package cn.ysk.cashier.controller.shop;
|
||||
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.pojo.shop.TbShopUser;
|
||||
import cn.ysk.cashier.service.shop.TbShopUserService;
|
||||
import cn.ysk.cashier.dto.shop.TbShopUserQueryCriteria;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @website https://eladmin.vip
|
||||
* @author lyf
|
||||
* @date 2024-03-01
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "/shop/user管理")
|
||||
@RequestMapping("/api/tbShopUser")
|
||||
public class TbShopUserController {
|
||||
|
||||
private final TbShopUserService tbShopUserService;
|
||||
|
||||
@Log("导出数据")
|
||||
@ApiOperation("导出数据")
|
||||
@GetMapping(value = "/download")
|
||||
@PreAuthorize("@el.check('tbShopUser:list')")
|
||||
public void exportTbShopUser(HttpServletResponse response, TbShopUserQueryCriteria criteria) throws IOException {
|
||||
tbShopUserService.download(tbShopUserService.queryAll(criteria), response);
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
@Log("查询/shop/user")
|
||||
@ApiOperation("查询/shop/user")
|
||||
@PreAuthorize("@el.check('tbShopUser:list')")
|
||||
public ResponseEntity<Object> queryTbShopUser(TbShopUserQueryCriteria criteria, Pageable pageable){
|
||||
return new ResponseEntity<>(tbShopUserService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Log("新增/shop/user")
|
||||
@ApiOperation("新增/shop/user")
|
||||
@PreAuthorize("@el.check('tbShopUser:add')")
|
||||
public ResponseEntity<Object> createTbShopUser(@Validated @RequestBody TbShopUser resources){
|
||||
return new ResponseEntity<>(tbShopUserService.create(resources),HttpStatus.CREATED);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Log("修改/shop/user")
|
||||
@ApiOperation("修改/shop/user")
|
||||
@PreAuthorize("@el.check('tbShopUser:edit')")
|
||||
public ResponseEntity<Object> updateTbShopUser(@Validated @RequestBody TbShopUser resources){
|
||||
tbShopUserService.update(resources);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Log("删除/shop/user")
|
||||
@ApiOperation("删除/shop/user")
|
||||
@PreAuthorize("@el.check('tbShopUser:del')")
|
||||
public ResponseEntity<Object> deleteTbShopUser(@RequestBody Integer[] ids) {
|
||||
tbShopUserService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user