Commit 83bf9e9f by 袁伟铭

调整接口

parent 68d2f615
......@@ -18,4 +18,6 @@ public interface OpenFeign {
@PostMapping(value = "/marriage/search")
ResultVo marriageSearch(@RequestBody Map<String, Object> paramsMap);
@PostMapping(value = "/naturalPerson/search")
ResultVo naturalPersonSearch(@RequestBody Map<String, Object> paramsMap);
}
......@@ -203,7 +203,7 @@ public interface IApiLogic extends IApiCommon {
*/
ApiResp getCremationStatsList(ApiForm form);
/*↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓门户接口↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓*/
/*↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓开放接口↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓*/
/**
* 婚姻搜索接口
......@@ -212,4 +212,12 @@ public interface IApiLogic extends IApiCommon {
* @return
*/
ApiResp marriageSearch(ApiForm form);
/**
* 自然人搜索接口
*
* @param form
* @return
*/
ApiResp naturalPersonSearch(ApiForm form);
}
......@@ -154,4 +154,9 @@ public class ApiV100Logic extends BaseApiLogic implements IApiLogic {
}
return ApiUtils.toApiResp(form, openFeign.marriageSearch(paramsMap));
}
@Override
public ApiResp naturalPersonSearch(ApiForm form) {
return ApiUtils.toApiResp(form, openFeign.naturalPersonSearch(form.getParamsMap()));
}
}
......@@ -52,7 +52,12 @@ public class DBName {
public final static String GXSHJZ = "gxshjz";
/**
* 资源目录管理
* Oracle资源目录管理
*/
public final static String RESOURCE = "resource";
public final static String OZY = "ozy";
/**
* Oracle中台
*/
public final static String OZT = "ozt";
}
......@@ -45,9 +45,11 @@ jdbc.gxshjz.url: jdbc:mysql://47.107.148.253:3306/gx-shjz?characterEncoding=utf8
jdbc.resource.url: jdbc:mysql://47.107.148.253:3306/mz_resource?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
ojdbc.driver-class-name: oracle.jdbc.driver.OracleDriver
ojdbc.username: zy
ojdbc.password: 123456
ojdbc.mzzt.url: jdbc:oracle:thin:@//127.0.0.1:1522/XEPDB1
ojdbc.zy.username: zy
ojdbc.zy.password: 123456
ojdbc.zt.username: zt
ojdbc.zt.password: 123456
#jwt
jwt:
......
......@@ -45,9 +45,11 @@ jdbc.gxshjz.url: jdbc:mysql://192.168.0.193:3306/gx-shjz?characterEncoding=utf8&
jdbc.resource.url: jdbc:mysql://192.168.0.193:3306/mz_resource?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
ojdbc.driver-class-name: oracle.jdbc.driver.OracleDriver
ojdbc.username: zy
ojdbc.password: LSZ192125mcm
ojdbc.mzzt.url: jdbc:oracle:thin:@//192.168.0.31:1521/mzzt
ojdbc.zy.username: zy
ojdbc.zy.password: LSZ192125mcm
ojdbc.zt.username: zt
ojdbc.zt.password: LSZ192125mcm
#jwt
jwt:
......
package com.zq.open.controller.api;
import cn.hutool.core.util.IdcardUtil;
import com.zq.common.utils.AssertUtils;
import com.zq.common.vo.ResultVo;
import com.zq.open.service.NaturalPersonService;
import com.zq.open.vo.NaturalPersonSearchVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api(tags = "自然人相关接口")
@RequiredArgsConstructor
@RestController
@RequestMapping(value = "/open/api/naturalPerson")
public class NaturalPersonApi {
private final NaturalPersonService naturalPersonService;
@ApiOperation("自然人信息搜素接口")
@PostMapping(value = "/search")
public ResultVo search(@RequestBody NaturalPersonSearchVo vo) {
AssertUtils.hasText(vo.getIdCard(), "缺少身份号");
AssertUtils.isTrue(IdcardUtil.isValidCard(vo.getIdCard()), "身份号不正确");
return ResultVo.success(naturalPersonService.search(vo));
}
}
package com.zq.open.dao;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zq.common.constant.DBName;
import com.zq.open.entity.NaturalPerson;
import org.springframework.stereotype.Repository;
/**
* @author wilmiam
* @since 2021/9/26 17:33
*/
@DS(DBName.OZT)
@Repository
public interface NaturalPersonDao extends BaseMapper<NaturalPerson> {
}
package com.zq.open.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @author wilmiam
* @since 2021/9/26 17:33
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "NATURAL_PERSON")
public class NaturalPerson {
/**
* 主键
*/
@ApiModelProperty("主键")
@TableId(type = IdType.AUTO)
private Long id;
/**
* 姓名
*/
@ApiModelProperty("姓名")
private String name;
/**
* 身份证号
*/
@ApiModelProperty("身份证号")
private String idCard;
/**
* 创建时间
*/
@ApiModelProperty("创建时间")
private Date createTime;
/**
* 更新时间
*/
@ApiModelProperty("更新时间")
private Date updateTime;
}
package com.zq.open.service;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zq.common.utils.AssertUtils;
import com.zq.open.dao.NaturalPersonDao;
import com.zq.open.entity.NaturalPerson;
import com.zq.open.vo.NaturalPersonSearchVo;
import com.zq.open.vo.NaturalPersonVo;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
* @author wilmiam
* @since 2021/9/26 17:42
*/
@Service
@RequiredArgsConstructor
public class NaturalPersonService {
private final NaturalPersonDao naturalPersonDao;
public NaturalPersonVo search(NaturalPersonSearchVo vo) {
NaturalPerson naturalPerson = naturalPersonDao.selectOne(Wrappers.lambdaQuery(NaturalPerson.builder().name(vo.getName()).idCard(vo.getIdCard()).build()));
AssertUtils.notNull(naturalPerson, "查询为空");
return NaturalPersonVo.builder().name(naturalPerson.getName()).idCard(naturalPerson.getIdCard()).build();
}
}
package com.zq.open.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author wilmiam
* @since 2021/9/23 11:20
*/
@Data
public class NaturalPersonSearchVo {
@ApiModelProperty("姓名")
private String name;
@ApiModelProperty("身份证号码")
private String idCard;
}
package com.zq.open.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author wilmiam
* @since 2021/9/26 17:33
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class NaturalPersonVo {
/**
* 姓名
*/
@ApiModelProperty("姓名")
private String name;
/**
* 身份证号
*/
@ApiModelProperty("身份证号")
private String idCard;
}
......@@ -33,6 +33,12 @@ spring:
username: ${jdbc.username}
password: ${jdbc.password}
driver-class-name: ${jdbc.driver-class-name}
ozt:
type: com.alibaba.druid.pool.DruidDataSource
url: ${ojdbc.mzzt.url}
username: ${ojdbc.zt.username}
password: ${ojdbc.zt.password}
driver-class-name: ${ojdbc.driver-class-name}
druid:
# 初始连接数
initial-size: 10
......
......@@ -15,5 +15,5 @@ eureka:
instance-id: ${spring.cloud.client.ip-address}:${server.port}
client:
service-url:
defaultZone: http://admin:123456@127.0.0.1:8800/eureka/
# defaultZone: http://admin:123456@192.168.0.191:8800/eureka/
# defaultZone: http://admin:123456@127.0.0.1:8800/eureka/
defaultZone: http://admin:123456@192.168.0.191:8800/eureka/
......@@ -214,6 +214,14 @@ public class CategoryInterfaceService {
categoryInterface.setUpdateTime(DateUtil.date());
categoryInterfaceDao.updateById(categoryInterface);
List<InterfaceAttach> interfaceAttachList = interfaceAttachDao.selectList(Wrappers.lambdaQuery(InterfaceAttach.builder().businessId(categoryInterface.getId()).build()));
interfaceAttachList.forEach(interfaceAttach -> {
interfaceAttach.setCascadeguid("");
interfaceAttach.setUpdateTime(DateUtil.date());
interfaceAttachDao.updateById(interfaceAttach);
});
}
}
}
......
......@@ -30,8 +30,8 @@ spring:
master:
type: com.alibaba.druid.pool.DruidDataSource
url: ${ojdbc.mzzt.url}
username: ${ojdbc.username}
password: ${ojdbc.password}
username: ${ojdbc.zy.username}
password: ${ojdbc.zy.password}
driver-class-name: ${ojdbc.driver-class-name}
druid:
# 初始连接数
......
......@@ -21,6 +21,9 @@ public class SysInfo {
@TableId(type = IdType.AUTO)
private Long id;
@ApiModelProperty("appId")
private String appId;
@ApiModelProperty("系统标识")
private String systemTag;
......
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