实名认证
parent
cca3fa44b3
commit
5bf6e92242
File diff suppressed because one or more lines are too long
|
@ -16,7 +16,7 @@ import lombok.NoArgsConstructor;
|
||||||
@Builder
|
@Builder
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class Shuju {
|
public class ShuJu {
|
||||||
private Long id;
|
private Long id;
|
||||||
private String name;
|
private String name;
|
||||||
private String phone;
|
private String phone;
|
|
@ -1,36 +1,36 @@
|
||||||
package com.muyu.cloud.mart.controller;
|
package com.muyu.cloud.mart.controller;
|
||||||
|
|
||||||
import cn.hutool.db.PageResult;
|
import com.muyu.cloud.mart.service.ShuJuService;
|
||||||
import com.dtflys.forest.annotation.Post;
|
|
||||||
import com.muyu.cloud.mart.service.DataMillionService;
|
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.common.core.web.controller.BaseController;
|
import com.muyu.common.core.web.controller.BaseController;
|
||||||
import com.muyu.domain.DataMillion;
|
import com.muyu.domain.req.ShuJu;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author:chaiyapeng
|
* @Author:chaiyapeng
|
||||||
* @Package:com.muyu.cloud.mart.controller
|
* @Package:com.muyu.cloud.mart.controller
|
||||||
* @Project:cloud-port
|
* @Project:cloud-port
|
||||||
* @name:DataMillion
|
* @name:ShuJuController
|
||||||
* @Date:2024/9/4 12:02
|
* @Date:2024/9/8 9:26
|
||||||
* 数据源接口
|
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("million")
|
@RequestMapping("shuju")
|
||||||
public class DataMillionController extends BaseController {
|
@AllArgsConstructor
|
||||||
@Autowired
|
public class ShuJuController extends BaseController {
|
||||||
private DataMillionService dataMillionService;
|
|
||||||
|
|
||||||
@PostMapping("findMillionList")
|
@Resource
|
||||||
public Result<List<DataMillion>> findMillionList(@RequestBody DataMillion dataMillion){
|
private ShuJuService shuJuService;
|
||||||
return dataMillionService.findMillionList(dataMillion);
|
|
||||||
|
@PostMapping("findShuJuList")
|
||||||
|
public Result<List<ShuJu>> findShuJuList(@RequestBody ShuJu shuJu){
|
||||||
|
return shuJuService.findShuJuList(shuJu);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,19 +0,0 @@
|
||||||
package com.muyu.cloud.mart.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.muyu.domain.DataMillion;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author:chaiyapeng
|
|
||||||
* @Package:com.muyu.cloud.mart.mapper
|
|
||||||
* @Project:cloud-port
|
|
||||||
* @name:DataMillionMapper
|
|
||||||
* @Date:2024/9/4 12:03
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface DataMillionMapper extends BaseMapper<DataMillion> {
|
|
||||||
List<DataMillion> findMillionList(DataMillion dataMillion);
|
|
||||||
}
|
|
|
@ -23,5 +23,5 @@ public interface MarketMapper extends BaseMapper<Market> {
|
||||||
|
|
||||||
void addIpPlace(IpPlace ipPlace);
|
void addIpPlace(IpPlace ipPlace);
|
||||||
|
|
||||||
void addIdCard(IdCard idCard1);
|
void addIdCard(IdCard idCard1) ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.muyu.cloud.mart.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.muyu.domain.req.ShuJu;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author:chaiyapeng
|
||||||
|
* @Package:com.muyu.cloud.mart.mapper
|
||||||
|
* @Project:cloud-port
|
||||||
|
* @name:ShujuMapper
|
||||||
|
* @Date:2024/9/8 9:24
|
||||||
|
*/
|
||||||
|
public interface ShuJuMapper extends BaseMapper<ShuJu> {
|
||||||
|
List<ShuJu> findShuJuList(ShuJu shuJu);
|
||||||
|
}
|
|
@ -2,7 +2,7 @@ package com.muyu.cloud.mart.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
import com.muyu.domain.DataMillion;
|
import com.muyu.domain.req.ShuJu;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -10,10 +10,9 @@ import java.util.List;
|
||||||
* @Author:chaiyapeng
|
* @Author:chaiyapeng
|
||||||
* @Package:com.muyu.cloud.mart.service
|
* @Package:com.muyu.cloud.mart.service
|
||||||
* @Project:cloud-port
|
* @Project:cloud-port
|
||||||
* @name:DataMillionService
|
* @name:ShuJuService
|
||||||
* @Date:2024/9/4 12:04
|
* @Date:2024/9/8 9:28
|
||||||
*/
|
*/
|
||||||
public interface DataMillionService extends IService<DataMillion> {
|
public interface ShuJuService extends IService<ShuJu> {
|
||||||
|
Result<List<ShuJu>> findShuJuList(ShuJu shuJu);
|
||||||
Result<List<DataMillion>> findMillionList(DataMillion dataMillion);
|
|
||||||
}
|
}
|
|
@ -1,62 +0,0 @@
|
||||||
package com.muyu.cloud.mart.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.muyu.cloud.mart.mapper.DataMillionMapper;
|
|
||||||
import com.muyu.cloud.mart.service.DataMillionService;
|
|
||||||
import com.muyu.common.core.domain.Result;
|
|
||||||
import com.muyu.domain.DataMillion;
|
|
||||||
import lombok.extern.log4j.Log4j2;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @Author:chaiyapeng
|
|
||||||
* @Package:com.muyu.cloud.mart.service.impl
|
|
||||||
* @Project:cloud-port
|
|
||||||
* @name:DataMillionServiceImpl
|
|
||||||
* @Date:2024/9/4 12:04
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
@Log4j2
|
|
||||||
public class DataMillionServiceImpl extends ServiceImpl<DataMillionMapper, DataMillion> implements DataMillionService {
|
|
||||||
@Autowired
|
|
||||||
private DataMillionMapper dataMillionMapper;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Result<List<DataMillion>> findMillionList(DataMillion dataMillion) {
|
|
||||||
List<DataMillion> list = dataMillionMapper.findMillionList(dataMillion);
|
|
||||||
return Result.success(list);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.muyu.cloud.mart.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.Mark;
|
||||||
|
import com.muyu.cloud.mart.mapper.ShuJuMapper;
|
||||||
|
import com.muyu.cloud.mart.service.ShuJuService;
|
||||||
|
import com.muyu.cloud.mart.utils.MobileLocation;
|
||||||
|
import com.muyu.common.core.domain.Result;
|
||||||
|
import com.muyu.domain.PhonePlace;
|
||||||
|
import com.muyu.domain.req.ShuJu;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author:chaiyapeng
|
||||||
|
* @Package:com.muyu.cloud.mart.service.impl
|
||||||
|
* @Project:cloud-port
|
||||||
|
* @name:ShuJuServiceImpl
|
||||||
|
* @Date:2024/9/8 9:28
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ShuJuServiceImpl extends ServiceImpl<ShuJuMapper, ShuJu> implements ShuJuService {
|
||||||
|
@Resource
|
||||||
|
private ShuJuMapper shuJuMapper;
|
||||||
|
@Override
|
||||||
|
public Result findShuJuList(ShuJu shuJu) {
|
||||||
|
List<ShuJu> list = shuJuMapper.findShuJuList(shuJu);
|
||||||
|
if (list.size()==0){
|
||||||
|
//如果查询不到数据就去第三方查询
|
||||||
|
PhonePlace phonePlace = MobileLocation.queryMobileLocation(shuJu.getPhone());
|
||||||
|
return Result.success(phonePlace);
|
||||||
|
}
|
||||||
|
return Result.success(list);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,9 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE mapper
|
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.muyu.cloud.mart.mapper.DataMillionMapper">
|
|
||||||
|
|
||||||
|
|
||||||
<select id="findMillionList" resultType="com.muyu.domain.req.Shuju"></select>
|
|
||||||
</mapper>
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.muyu.cloud.mart.mapper.ShuJuMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="findShuJuList" resultType="com.muyu.domain.req.ShuJu">
|
||||||
|
select *from shuju
|
||||||
|
<where>
|
||||||
|
<if test="name!=null and name!='' ">
|
||||||
|
and name like '%${name}%'
|
||||||
|
</if>
|
||||||
|
<if test="phone!=null and phone!='' ">
|
||||||
|
and phone like '%${phone}%'
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
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