Commit bd3fb096 by lilei

提取之前切换数据源查询案件

parent 74106a68
package org.springblade.founder.asj.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import org.apache.ibatis.annotations.Mapper;
import org.springblade.founder.asj.entity.*;
import org.springblade.founder.flwsfj.entity.TbStAsjFlws;
......@@ -14,7 +15,10 @@ import java.util.Map;
@Component
@Mapper
public interface AjDetailMapper {
public TbStAsj getTbStAsjByAsjbh(String asjbh);
@DS("db1")
public TbStAsj getAsjByAsjbh(String asjbh);
public List<TbXwZbfzxyr> getFzxyrxxByAsjbh(Map map);
public Integer getFzxyrxxByAsjbhTotalCount(String asjbh);
......
......@@ -204,8 +204,17 @@
from TB_ST_ASJ asj LEFT JOIN tb_xw_asjcz asjcz on asj.asjbh=asjcz.asjbh
WHERE asj.asjbh=#{asjbh,jdbcType=VARCHAR}
and asj.xxsc_pdbz='0'
</select>
<select id="getAsjByAsjbh" resultType="org.springblade.founder.asj.entity.TbStAsj" parameterType="java.lang.String">
select
asj.xxrsksj as xxrsksj,
asj.asjbh as asjbh
from TB_ST_ASJ asj LEFT JOIN tb_xw_asjcz asjcz on asj.asjbh=asjcz.asjbh
WHERE asj.asjbh=#{asjbh,jdbcType=VARCHAR}
and asj.xxsc_pdbz='0'
</select>
<select id="getFzxyrxxByAsjbh" parameterType="java.util.Map" resultType="org.springblade.founder.asj.entity.TbXwZbfzxyr">
select
xyr.XXZJBH,
......
......@@ -190,8 +190,8 @@ public class StAsjXxtqService {
query.setXxscPdbz("0");
StAsj data = stAsjService.getOne(Condition.getQueryWrapper(query));
String token = getToken();
TbStAsj tbStAsjByAsjbh = ajDetailMapper.getTbStAsjByAsjbh(asjbh);
if (tbStAsjByAsjbh==null){
TbStAsj tbStAsj = getTbStAsj(asjbh);
if (tbStAsj==null){
getSysjjcUrl(asjbh,token);
}
if(data!=null){
......@@ -220,8 +220,8 @@ public class StAsjXxtqService {
List<XwZbfzxyr> finalData = new ArrayList<>();
String errorMsg = "";
String token = getToken();
TbStAsj tbStAsjByAsjbh = ajDetailMapper.getTbStAsjByAsjbh(asjbh);
if (tbStAsjByAsjbh!=null){
TbStAsj tbStAsj = getTbStAsj(asjbh);
if (tbStAsj==null){
getSysjjcUrl(asjbh,token);
}
if(data!=null && !data.isEmpty()){
......@@ -307,8 +307,8 @@ public class StAsjXxtqService {
List<XwRybh> finalData = new ArrayList<>();
String errorMsg = "";
String token = getToken();
TbStAsj tbStAsjByAsjbh = ajDetailMapper.getTbStAsjByAsjbh(asjbh);
if (tbStAsjByAsjbh!=null){
TbStAsj tbStAsj = getTbStAsj(asjbh);
if (tbStAsj==null){
getSysjjcUrl(asjbh,token);
}
if(data!=null && !data.isEmpty()){
......@@ -569,11 +569,12 @@ public class StAsjXxtqService {
lxr = "<br/>请联系赵跃 :18781955078";
break;
}
return lxr;
}
private TbStAsj getTbStAsj(String asjbh){
return ajDetailMapper.getTbStAsjByAsjbh(asjbh);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment