员工权限完善
This commit is contained in:
@@ -6,6 +6,7 @@ import com.czg.account.entity.HandoverRecord;
|
||||
import com.czg.account.service.HandoverRecordService;
|
||||
import com.czg.account.vo.HandoverProductListVo;
|
||||
import com.czg.account.vo.HandoverTotalVo;
|
||||
import com.czg.annotation.SaStaffCheckPermission;
|
||||
import com.czg.enums.YesNoEnum;
|
||||
import com.czg.log.annotation.OperationLog;
|
||||
import com.czg.resp.CzgResult;
|
||||
@@ -37,6 +38,7 @@ public class HandoverRecordController {
|
||||
*/
|
||||
@GetMapping("page")
|
||||
@OperationLog("交班记录-分页")
|
||||
@SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
|
||||
//@SaAdminCheckPermission("handoverRecord:page")
|
||||
public CzgResult<Page<HandoverRecordDTO>> page(@RequestParam(required = false) String beginDate, @RequestParam(required = false) String endDate) {
|
||||
Page<HandoverRecordDTO> page = handoverRecordService.getHandoverRecordPage(beginDate, endDate);
|
||||
@@ -50,6 +52,7 @@ public class HandoverRecordController {
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
@OperationLog("交班记录-查看")
|
||||
@SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
|
||||
//@SaAdminCheckPermission("handoverRecord:info")
|
||||
public CzgResult<List<HandoverProductListVo>> info(@PathVariable Long id) {
|
||||
List<HandoverProductListVo> data = handoverRecordService.getHandoverProductListById(id);
|
||||
@@ -64,6 +67,7 @@ public class HandoverRecordController {
|
||||
@ResponseExcel(name = "交班售出商品明细")
|
||||
@GetMapping("/export/{id}")
|
||||
@OperationLog("交班记录-导出")
|
||||
@SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
|
||||
//@SaAdminCheckPermission("handoverRecord:export")
|
||||
public List<HandoverProductListVo> export(@PathVariable Long id) {
|
||||
return handoverRecordService.getHandoverProductListById(id);
|
||||
@@ -74,6 +78,7 @@ public class HandoverRecordController {
|
||||
*/
|
||||
@GetMapping("total")
|
||||
@OperationLog("收银机-交班数据统计")
|
||||
@SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
|
||||
//@SaAdminCheckPermission("handoverRecord:total")
|
||||
public CzgResult<HandoverTotalVo> total() {
|
||||
HandoverTotalVo data = handoverRecordService.totalHandoverData();
|
||||
@@ -87,6 +92,7 @@ public class HandoverRecordController {
|
||||
*/
|
||||
@PostMapping("handover")
|
||||
@OperationLog("收银机-交班/关班")
|
||||
@SaStaffCheckPermission("yun_xu_jiao_ban")
|
||||
//@SaAdminCheckPermission("handoverRecord:handover")
|
||||
public CzgResult<Long> handover(@RequestParam Integer isPrint) {
|
||||
Long id = handoverRecordService.handover();
|
||||
@@ -101,6 +107,7 @@ public class HandoverRecordController {
|
||||
*/
|
||||
@PostMapping("/network/print/{id}")
|
||||
@OperationLog("收银机-交班/关班")
|
||||
@SaStaffCheckPermission("yun_xu_cha_kan_suo_you_jiao_ban_ji_lu")
|
||||
//@SaAdminCheckPermission("handoverRecord:networkPrint")
|
||||
public CzgResult<Void> handover(@PathVariable Long id) {
|
||||
handoverRecordService.printHandoverReceipt(id, YesNoEnum.YES.value());
|
||||
@@ -122,4 +129,4 @@ public class HandoverRecordController {
|
||||
return CzgResult.success(data);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ public class ShopUserController {
|
||||
*/
|
||||
@SaAdminCheckPermission("shopUser:summary")
|
||||
@GetMapping("/summary")
|
||||
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
public CzgResult<ShopUserSummaryDTO> summary(Integer isVip) {
|
||||
return CzgResult.success(shopUserService.getSummary(StpKit.USER.getShopId(), isVip));
|
||||
}
|
||||
@@ -64,6 +65,7 @@ public class ShopUserController {
|
||||
*/
|
||||
@SaAdminCheckPermission("shopUser:flow")
|
||||
@GetMapping("/flow")
|
||||
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
public CzgResult<Page<ShopUserFlow>> flow(@RequestParam Integer userId, String bizCode) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper().eq(ShopUserFlow::getShopId, StpKit.USER.getShopId())
|
||||
.eq(ShopUserFlow::getUserId, userId);
|
||||
@@ -80,6 +82,7 @@ public class ShopUserController {
|
||||
* @param isVip 0 非vip 1 vip
|
||||
* @return 用户列表
|
||||
*/
|
||||
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
@SaAdminCheckPermission("shopUser:list")
|
||||
@GetMapping
|
||||
public CzgResult<Page<ShopUser>> list(String key, Integer isVip) {
|
||||
@@ -92,6 +95,7 @@ public class ShopUserController {
|
||||
* @param userId 用户id
|
||||
* @return 用户详情
|
||||
*/
|
||||
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
@SaAdminCheckPermission("shopUser:detail")
|
||||
@GetMapping("/detail")
|
||||
public CzgResult<ShopUser> detail(Integer id, Integer userId) {
|
||||
@@ -106,6 +110,7 @@ public class ShopUserController {
|
||||
*
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
@SaAdminCheckPermission("shopUser:add")
|
||||
@PostMapping
|
||||
public CzgResult<Boolean> add(@RequestBody @Validated ShopUserAddDTO shopUserAddDTO) {
|
||||
@@ -117,6 +122,7 @@ public class ShopUserController {
|
||||
*
|
||||
* @return 是否成功
|
||||
*/
|
||||
@SaStaffCheckPermission("yun_xu_guan_li_hui_yuan_xin_xi")
|
||||
@SaAdminCheckPermission("shopUser:edit")
|
||||
@PutMapping
|
||||
public CzgResult<Boolean> edit(@RequestBody @Validated ShopUserEditDTO shopUserEditDTO) {
|
||||
|
||||
Reference in New Issue
Block a user