suntianwu il y a 3 ans
Parent
commit
51e222f3f0

+ 0 - 2
src/main/java/com/care/outcall/service/impl/KoalaOutCallServiceImpl.java

@@ -110,14 +110,12 @@ public class KoalaOutCallServiceImpl implements KoalaOutCallService {
 
         Map<String, String> koalaAccountNoAndApiSecret = this.koalaOutCallDao.getKoalaAccountNoAndApiSecretByUserId(userId);
 
-        String accountNo = koalaAccountNoAndApiSecret.get("accountNo");
         String entId = koalaAccountNoAndApiSecret.get("entId");
         String agentId = koalaAccountNoAndApiSecret.get("agentId");
         String agentPassword = koalaAccountNoAndApiSecret.get("agentPassword");
 
         Map<String, String> map = new HashMap<>();
         map.put("entId", entId);
-        map.put("accountNo", accountNo);
         map.put("agentId", agentId);
         map.put("agentPassword", agentPassword);
         return map;

+ 2 - 4
src/main/resources/mybatis/KoalaOutCallMapper.xml

@@ -5,12 +5,10 @@
     <select id="getKoalaAccountNoAndApiSecretByUserId" resultType="Map">
         select
         substring(cua.agent_id, 1, INSTR(cua.agent_id, '@') - 1) as agentId,
-        cue.account_no as accountNo,
         cua.agent_password as agentPassword,
-        cue.ent_id as entId
+        cua.ent_id as entId
         from cc_upstream_agent cua
-        left join cc_upstream_ent cue on cue.id = cua.cue_id and cue.channel_type = cua.channel_type
-        left join cc_user_relations cur on cur.other_id = cua.id and cur.channel_type = cua.channel_type
+        left join cc_user_relations cur on cur.upstream_agent_id = cua.id
         where cur.user_id = #{userId} limit 1
     </select>
     <insert id="addOptLog" parameterType="com.care.outcall.entity.KoalaLogDomain">