|
@@ -88,6 +88,10 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
private final OrderRefundService refundService;
|
|
|
|
|
|
private final String keyPrefix = "device:history:";
|
|
|
+ /**
|
|
|
+ * 质检商户code
|
|
|
+ */
|
|
|
+ public static final String QA_MERC_CODE = "10001";
|
|
|
|
|
|
|
|
|
@Override
|
|
@@ -351,6 +355,7 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
List<DeviceInfo> deviceInfos = this.listByIds(deviceIds);
|
|
|
for (DeviceInfo deviceInfo : deviceInfos) {
|
|
|
int refMercId = deviceInfo.getMercId().intValue();
|
|
|
+ String refMercCode = deviceInfo.getMercCode();
|
|
|
// 只有解绑后,才能给顶级商户授权
|
|
|
if (refMercId != -1 && refMercId != mercId.intValue()) {
|
|
|
StrBuilder sb = StrBuilder.create();
|
|
@@ -361,8 +366,12 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
.append(deviceInfo.getMercName())
|
|
|
.append("]绑定,请先进行解绑!")
|
|
|
.toString();
|
|
|
- //已关联别商户
|
|
|
- return R.fail(errMsg, Boolean.FALSE);
|
|
|
+ //非质检商户需要进行判断,质检商户跳过
|
|
|
+ if (!QA_MERC_CODE.equals(refMercCode)) {
|
|
|
+ //已关联别商户
|
|
|
+ return R.fail(errMsg, Boolean.FALSE);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
//绑定关系
|
|
|
deviceInfo.setMercId(mercId).setMercCode(mercCode).setAlgorithmId(algorithmId).setMercName(mercName);
|