|
@@ -1,13 +1,16 @@
|
|
|
package com.fuint.common.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.alipay.api.domain.AuthApiDTO;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.fuint.common.dto.AccountInfo;
|
|
|
import com.fuint.common.dto.OrderGoodsDto;
|
|
|
import com.fuint.common.dto.UserOrderDto;
|
|
|
import com.fuint.common.enums.*;
|
|
|
import com.fuint.common.service.SettingService;
|
|
|
+import com.fuint.common.util.AuthUserUtil;
|
|
|
import com.fuint.common.util.HashSignUtil;
|
|
|
import com.fuint.common.util.NoteFormatter;
|
|
|
import com.fuint.common.util.PrinterUtil;
|
|
@@ -126,8 +129,9 @@ public class PrinterServiceImpl extends ServiceImpl<MtPrinterMapper, MtPrinter>
|
|
|
mtPrinter.setStatus(StatusEnum.ENABLED.getKey());
|
|
|
mtPrinter.setUpdateTime(new Date());
|
|
|
mtPrinter.setCreateTime(new Date());
|
|
|
- if (mtPrinter.getMerchantId() == null || mtPrinter.getMerchantId() < 1) {
|
|
|
- throw new BusinessCheckException("平台方帐号无法执行该操作,请使用商户帐号操作");
|
|
|
+ AccountInfo accountInfo = AuthUserUtil.get();
|
|
|
+ if (accountInfo.getStoreId() == null || accountInfo.getStoreId() < 1) {
|
|
|
+ throw new BusinessCheckException("超级管理员帐号无法执行该操作,请使用商户帐号操作");
|
|
|
}
|
|
|
|
|
|
Integer printerId = mtPrinterMapper.insert(mtPrinter);
|
|
@@ -339,8 +343,9 @@ public class PrinterServiceImpl extends ServiceImpl<MtPrinterMapper, MtPrinter>
|
|
|
if (mtPrinter == null) {
|
|
|
throw new BusinessCheckException("该打印机状态异常");
|
|
|
}
|
|
|
- if (printer.getMerchantId() == null || printer.getMerchantId() < 1) {
|
|
|
- throw new BusinessCheckException("平台方帐号无法执行该操作,请使用商户帐号操作");
|
|
|
+ AccountInfo accountInfo = AuthUserUtil.get();
|
|
|
+ if (accountInfo.getStoreId() == null || accountInfo.getStoreId() < 1) {
|
|
|
+ throw new BusinessCheckException("超级管理员帐号无法执行该操作,请使用商户帐号操作");
|
|
|
}
|
|
|
|
|
|
if (mtPrinter.getSn() != null && mtPrinter.getName() != null && !mtPrinter.getStatus().equals(StatusEnum.DISABLE.getKey())) {
|