台桌批量生成桌码接口
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user