Merge branch 'prod' into test
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
package com.czg.controller.admin;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.czg.account.dto.table.ShopTableAddDTO;
|
||||
import com.czg.account.dto.table.ShopTableBindDTO;
|
||||
import com.czg.account.dto.table.ShopTableClearDTO;
|
||||
import com.czg.account.dto.table.ShopTableDTO;
|
||||
import com.czg.account.dto.table.*;
|
||||
import com.czg.account.entity.ShopTable;
|
||||
import com.czg.account.service.ShopTableService;
|
||||
import com.czg.account.vo.ShopTableVO;
|
||||
@@ -15,6 +12,7 @@ import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.mybatisflex.core.update.UpdateChain;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
@@ -93,6 +91,24 @@ public class ShopTableController {
|
||||
return CzgResult.success(shopTableService.updateInfo(StpKit.USER.getLoginIdAsLong(), shopTableDTO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量台桌配置
|
||||
* 权限标识: shopTable:edit
|
||||
* @return 是否成功
|
||||
*/
|
||||
@PutMapping
|
||||
public CzgResult<Boolean> editBatch(@RequestBody @Validated ShopTableEditBatchDTO shopTableDTO) {
|
||||
UpdateChain<ShopTable> query = shopTableService.updateChain().eq(ShopTable::getShopId, StpKit.USER.getShopId());
|
||||
if (shopTableDTO.getClearTime() != null) {
|
||||
query.eq(ShopTable::getClearTime, shopTableDTO.getClearTime());
|
||||
}
|
||||
|
||||
if (shopTableDTO.getAutoClear() != null) {
|
||||
query.eq(ShopTable::getAutoClear, shopTableDTO.getAutoClear());
|
||||
}
|
||||
return CzgResult.success(query.update());
|
||||
}
|
||||
|
||||
/**
|
||||
* 台桌清台
|
||||
* 权限标识: shopTable:clear
|
||||
|
||||
@@ -36,7 +36,7 @@ public class UMemberPointsController {
|
||||
*/
|
||||
@GetMapping("pointsBasicSetting")
|
||||
public CzgResult<PointsBasicSettingDTO> getPointsBasicSetting() {
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
Long shopId = StpKit.USER.getShopId();
|
||||
PointsBasicSetting entity = pointsBasicSettingService.getById(shopId);
|
||||
PointsBasicSettingDTO data = BeanUtil.copyProperties(entity, PointsBasicSettingDTO.class);
|
||||
return CzgResult.success(data);
|
||||
|
||||
Reference in New Issue
Block a user