From bb4f3220372702dd848675990593f26a8c9df4a5 Mon Sep 17 00:00:00 2001
From: hurui <177768073@qq.com>
Date: Wed, 7 Aug 2024 14:27:08 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/main/java/com/hfkj/dao/BsAgentMerAccountMapperExt.java | 2 +-
service/src/main/java/com/hfkj/dao/BsAgentMerMapperExt.java | 2 +-
.../main/java/com/hfkj/service/order/OrderCreateService.java | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/service/src/main/java/com/hfkj/dao/BsAgentMerAccountMapperExt.java b/service/src/main/java/com/hfkj/dao/BsAgentMerAccountMapperExt.java
index 6dc11da..61e8bb6 100644
--- a/service/src/main/java/com/hfkj/dao/BsAgentMerAccountMapperExt.java
+++ b/service/src/main/java/com/hfkj/dao/BsAgentMerAccountMapperExt.java
@@ -23,7 +23,7 @@ public interface BsAgentMerAccountMapperExt {
" FROM" +
" bs_agent_mer_account a" +
" LEFT JOIN bs_merchant b ON a.mer_no = b.mer_no" +
- " where 1 = 1" +
+ " where 1 = 1 and a.status = 1" +
" and mer_id in (select mer_id from bs_agent_mer where agent_staff_id = #{param.agentStaffId} and `status` = 1) " +
" and b.province_code = #{param.provinceCode} " +
" and b.city_code = #{param.cityCode} " +
diff --git a/service/src/main/java/com/hfkj/dao/BsAgentMerMapperExt.java b/service/src/main/java/com/hfkj/dao/BsAgentMerMapperExt.java
index 0cbb61f..3a8ff1e 100644
--- a/service/src/main/java/com/hfkj/dao/BsAgentMerMapperExt.java
+++ b/service/src/main/java/com/hfkj/dao/BsAgentMerMapperExt.java
@@ -67,7 +67,7 @@ public interface BsAgentMerMapperExt {
" LEFT JOIN bs_agent_mer b on b.mer_id = a.id and b.`status` ]]> 0" +
" and b.agent_id = #{param.agentId} " +
" where 1 = 1" +
- " and b.agent_staff_id is not null and b.mer_id in (select mer_id from bs_agent_mer where agent_staff_id = #{param.agentStaffId} and `status` ]]> 0) " +
+ " and b.agent_staff_id is not null and b.agent_staff_id = #{param.agentStaffId} and b.mer_id in (select mer_id from bs_agent_mer where agent_staff_id = #{param.agentStaffId} and `status` ]]> 0) " +
" and b.agent_staff_id is null and b.mer_id not in (select mer_id from bs_agent_mer where agent_staff_id = #{param.agentStaffId} and `status` ]]> 0) " +
") a where 1 = 1" +
" and a.provinceCode = #{param.provinceCode} " +
diff --git a/service/src/main/java/com/hfkj/service/order/OrderCreateService.java b/service/src/main/java/com/hfkj/service/order/OrderCreateService.java
index 6059b1d..38d7cb6 100644
--- a/service/src/main/java/com/hfkj/service/order/OrderCreateService.java
+++ b/service/src/main/java/com/hfkj/service/order/OrderCreateService.java
@@ -104,7 +104,7 @@ public class OrderCreateService {
if (orderChild.getAgentMerId() != null) {
// 查询代理
BsAgentMer agentMer = agentMerService.getDetail(orderChild.getAgentMerId());
- if (agentMer == null) {
+ if (agentMer == null || agentMer.getStatus() != 1) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "无法交易,代理商二维码已失效");
}
try {