实名认证
parent
5bf6e92242
commit
f8be305c15
File diff suppressed because one or more lines are too long
|
@ -29,6 +29,11 @@ public class ShuJuController extends BaseController {
|
||||||
@Resource
|
@Resource
|
||||||
private ShuJuService shuJuService;
|
private ShuJuService shuJuService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测试连接数据源
|
||||||
|
* @param shuJu
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@PostMapping("findShuJuList")
|
@PostMapping("findShuJuList")
|
||||||
public Result<List<ShuJu>> findShuJuList(@RequestBody ShuJu shuJu){
|
public Result<List<ShuJu>> findShuJuList(@RequestBody ShuJu shuJu){
|
||||||
return shuJuService.findShuJuList(shuJu);
|
return shuJuService.findShuJuList(shuJu);
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package com.muyu.cloud.mart.mapper;
|
package com.muyu.cloud.mart.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.muyu.domain.IpPlace;
|
||||||
|
import com.muyu.domain.PhonePlace;
|
||||||
import com.muyu.domain.req.ShuJu;
|
import com.muyu.domain.req.ShuJu;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -14,4 +16,8 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public interface ShuJuMapper extends BaseMapper<ShuJu> {
|
public interface ShuJuMapper extends BaseMapper<ShuJu> {
|
||||||
List<ShuJu> findShuJuList(ShuJu shuJu);
|
List<ShuJu> findShuJuList(ShuJu shuJu);
|
||||||
|
|
||||||
|
void addPhonePlace(PhonePlace phonePlace);
|
||||||
|
|
||||||
|
void addIpPlace(IpPlace ipPlace);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.Mark;
|
import com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.Mark;
|
||||||
import com.muyu.cloud.mart.mapper.ShuJuMapper;
|
import com.muyu.cloud.mart.mapper.ShuJuMapper;
|
||||||
import com.muyu.cloud.mart.service.ShuJuService;
|
import com.muyu.cloud.mart.service.ShuJuService;
|
||||||
|
import com.muyu.cloud.mart.utils.IPLocation;
|
||||||
import com.muyu.cloud.mart.utils.MobileLocation;
|
import com.muyu.cloud.mart.utils.MobileLocation;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
|
import com.muyu.domain.IpPlace;
|
||||||
import com.muyu.domain.PhonePlace;
|
import com.muyu.domain.PhonePlace;
|
||||||
import com.muyu.domain.req.ShuJu;
|
import com.muyu.domain.req.ShuJu;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -29,10 +31,19 @@ public class ShuJuServiceImpl extends ServiceImpl<ShuJuMapper, ShuJu> implements
|
||||||
public Result findShuJuList(ShuJu shuJu) {
|
public Result findShuJuList(ShuJu shuJu) {
|
||||||
List<ShuJu> list = shuJuMapper.findShuJuList(shuJu);
|
List<ShuJu> list = shuJuMapper.findShuJuList(shuJu);
|
||||||
if (list.size()==0){
|
if (list.size()==0){
|
||||||
//如果查询不到数据就去第三方查询
|
if (shuJu.getPhone()!=null){
|
||||||
|
//如果查询不到手机号就去第三方查询
|
||||||
PhonePlace phonePlace = MobileLocation.queryMobileLocation(shuJu.getPhone());
|
PhonePlace phonePlace = MobileLocation.queryMobileLocation(shuJu.getPhone());
|
||||||
|
shuJuMapper.addPhonePlace(phonePlace);
|
||||||
return Result.success(phonePlace);
|
return Result.success(phonePlace);
|
||||||
}
|
}
|
||||||
|
if (shuJu.getIp()!=null){
|
||||||
|
//如果查询不到ip就去第三方查询
|
||||||
|
IpPlace ipPlace = IPLocation.queryIPLocation(shuJu.getIp());
|
||||||
|
shuJuMapper.addIpPlace(ipPlace);
|
||||||
|
return Result.success(ipPlace);
|
||||||
|
}
|
||||||
|
}
|
||||||
return Result.success(list);
|
return Result.success(list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,18 @@
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.muyu.cloud.mart.mapper.ShuJuMapper">
|
<mapper namespace="com.muyu.cloud.mart.mapper.ShuJuMapper">
|
||||||
|
<insert id="addPhonePlace">
|
||||||
|
insert into phone_place
|
||||||
|
(province,city,areacode,zip,company,tel)
|
||||||
|
values
|
||||||
|
(#{province},#{city},#{areacode},#{zip},#{company},#{tel})
|
||||||
|
</insert>
|
||||||
|
<insert id="addIpPlace">
|
||||||
|
insert into ip_place
|
||||||
|
(country,province,city,district,isp,ip)
|
||||||
|
values
|
||||||
|
(#{country},#{province},#{city},#{district},#{isp},#{ip})
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
<select id="findShuJuList" resultType="com.muyu.domain.req.ShuJu">
|
<select id="findShuJuList" resultType="com.muyu.domain.req.ShuJu">
|
||||||
|
@ -14,6 +26,9 @@
|
||||||
<if test="phone!=null and phone!='' ">
|
<if test="phone!=null and phone!='' ">
|
||||||
and phone like '%${phone}%'
|
and phone like '%${phone}%'
|
||||||
</if>
|
</if>
|
||||||
|
<if test="ip!=null and ip!='' ">
|
||||||
|
and ip like '%${ip}%'
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -50,6 +50,9 @@ public class RealNameServiceImpl implements BasicApi<RealNameReq, RealNameResp>
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
//主从辅
|
//主从辅
|
||||||
|
if (realNameSet.size() < 10) {
|
||||||
|
return aliRemoteService.realName(realNameReq);
|
||||||
|
}
|
||||||
throw new RuntimeException("线路正在抢修中!!!");
|
throw new RuntimeException("线路正在抢修中!!!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
114854
logs/cloud-etl/error.log
114854
logs/cloud-etl/error.log
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue