台桌批量生成桌码接口

This commit is contained in:
张松
2025-02-18 16:18:11 +08:00
parent d323ac3ef9
commit d4035a4d0f
2 changed files with 38 additions and 42 deletions

View File

@@ -7,6 +7,7 @@ import com.czg.account.dto.table.ShopTableDTO;
import com.czg.account.entity.ShopTable;
import com.czg.account.service.ShopTableService;
import com.czg.annotation.SaAdminCheckPermission;
import com.czg.exception.ApiNotPrintException;
import com.czg.resp.CzgResult;
import com.czg.sa.StpKit;
import com.czg.utils.PageUtil;
@@ -36,12 +37,11 @@ public class ShopTableController {
*/
@SaAdminCheckPermission("shopTable:code")
@PostMapping("/code")
public CzgResult<Page<ShopTable>> createCode(@RequestParam Integer num, HttpServletResponse response) throws IOException {
public void createCode(@RequestParam Integer num, HttpServletResponse response) throws IOException {
if (num > 100) {
return CzgResult.failure("单次最多可获取100个");
throw new ApiNotPrintException("单次最多可获取100个");
}
shopTableService.createQrCode(StpKit.USER.getShopId(), num, response);
return CzgResult.success();
}
/**