Commit 6e3b23c9 authored by 黎博's avatar 黎博

rename quantgroup to qg

parent 44cc8abc
package cn.quantgroup.qaplatform; package cn.qg.qaplatform;
import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication @SpringBootApplication
@MapperScan(value = "cn.quantgroup.qaplatform.dao") @MapperScan(value = "cn.qg.qaplatform.dao")
public class QaPlatformApplication { public class QaPlatformApplication {
public static void main(String[] args) { public static void main(String[] args) {
......
package cn.quantgroup.qaplatform.common; package cn.qg.qaplatform.common;
import cn.quantgroup.qaplatform.common.enums.ErrorType; import cn.qg.qaplatform.common.enums.ErrorType;
import lombok.Data; import lombok.Data;
/** /**
......
package cn.quantgroup.qaplatform.common; package cn.qg.qaplatform.common;
import cn.quantgroup.qaplatform.common.enums.Namespace; import cn.qg.qaplatform.common.enums.Namespace;
import cn.quantgroup.qaplatform.config.DynamicDataSource; import cn.qg.qaplatform.config.DynamicDataSource;
import com.alibaba.druid.pool.DruidDataSource; import com.alibaba.druid.pool.DruidDataSource;
......
package cn.quantgroup.qaplatform.common.aspect; package cn.qg.qaplatform.common.aspect;
import cn.quantgroup.qaplatform.utils.JsonTransUtils; import cn.qg.qaplatform.utils.JsonTransUtils;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import org.aspectj.lang.JoinPoint; import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.Signature;
import org.aspectj.lang.annotation.AfterReturning; import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before; import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -31,12 +29,11 @@ import java.util.Map; ...@@ -31,12 +29,11 @@ import java.util.Map;
*/ */
@Aspect @Aspect
@Component @Component
public class LogAspect { public class HttpLogAspect {
private Logger logger = LoggerFactory.getLogger(LogAspect.class); private static final Logger logger = LoggerFactory.getLogger(HttpLogAspect.class);
private Map<String, Object> logMap = new HashMap<>();
@Pointcut("execution(public * cn.quantgroup.qaplatform.controller..*.*(..))") @Pointcut("execution(public * cn.qg.qaplatform.controller..*.*(..))")
public void apiLog() {} public void httpRequestLog() {}
/** /**
* 前置通知:在连接点之前执行的通知 * 前置通知:在连接点之前执行的通知
...@@ -44,20 +41,15 @@ public class LogAspect { ...@@ -44,20 +41,15 @@ public class LogAspect {
* @param joinPoint * @param joinPoint
* @throws Throwable * @throws Throwable
*/ */
@Before("apiLog()") @Before("httpRequestLog()")
public void doBefore(JoinPoint joinPoint) throws JsonProcessingException { public void doBefore(JoinPoint joinPoint) throws JsonProcessingException {
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = servletRequestAttributes.getRequest(); HttpServletRequest request = attributes.getRequest();
Signature signature = joinPoint.getSignature(); logger.info("url:{}", request.getRequestURL());
MethodSignature methodSignature = (MethodSignature) signature; logger.info("method:{}", request.getMethod());
Method method = methodSignature.getMethod(); logger.info("ip:{}", request.getRemoteAddr());
logMap.put("url", request.getRequestURL().toString()); logger.info("class_method={}", joinPoint.getSignature().getDeclaringTypeName() + "." + joinPoint.getSignature().getName());
logMap.put("method", request.getMethod()); logger.info("args:{}", joinPoint.getArgs());
logMap.put("host", request.getRemoteAddr());
logMap.put("class", joinPoint.getSignature().getDeclaringTypeName() + "." + joinPoint.getSignature().getName());
logMap.put("requestParams", getParameter(method, joinPoint.getArgs()));
// 记录下请求内容
logger.info("请求信息:" + JsonTransUtils.mapToJson(logMap));
} }
/** /**
...@@ -66,10 +58,10 @@ public class LogAspect { ...@@ -66,10 +58,10 @@ public class LogAspect {
* @param ret * @param ret
* @throws Throwable * @throws Throwable
*/ */
@AfterReturning(returning = "ret", pointcut = "apiLog()") @AfterReturning(returning = "ret", pointcut = "httpRequestLog()")
public void doAfterReturning(Object ret) throws Throwable { public void doAfterReturning(Object ret) throws Throwable {
// 处理完请求,返回内容 // 处理完请求,返回内容
logger.info("返回结果:" + JsonTransUtils.objToJson(ret)); logger.info("response:" + JsonTransUtils.objToJson(ret));
} }
/** /**
......
package cn.quantgroup.qaplatform.common.enums; package cn.qg.qaplatform.common.enums;
/** /**
* 定义错误类别 * 定义错误类别
......
package cn.quantgroup.qaplatform.common.enums; package cn.qg.qaplatform.common.enums;
/** /**
* 借款状态枚举 * 借款状态枚举
......
package cn.quantgroup.qaplatform.common.enums; package cn.qg.qaplatform.common.enums;
public enum Namespace { public enum Namespace {
......
package cn.quantgroup.qaplatform.config; package cn.qg.qaplatform.config;
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder; import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
......
package cn.quantgroup.qaplatform.config; package cn.qg.qaplatform.config;
import cn.quantgroup.qaplatform.utils.SpringUtils; import cn.qg.qaplatform.utils.SpringUtils;
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
import java.util.Map; import java.util.Map;
......
package cn.quantgroup.qaplatform.controller; package cn.qg.qaplatform.controller;
import cn.quantgroup.qaplatform.common.JsonResult; import cn.qg.qaplatform.service.QueryLoanUserDataService;
import cn.quantgroup.qaplatform.service.QueryBasicLoanStatusDataService; import cn.qg.qaplatform.common.JsonResult;
import cn.quantgroup.qaplatform.service.QueryLoanUserDataService; import cn.qg.qaplatform.service.QueryBasicLoanStatusDataService;
import cn.quantgroup.qaplatform.utils.page.PageResult; import cn.qg.qaplatform.utils.page.PageResult;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
......
package cn.quantgroup.qaplatform.dao; package cn.qg.qaplatform.dao;
import cn.quantgroup.qaplatform.domain.LoanUser; import cn.qg.qaplatform.domain.LoanUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
......
package cn.quantgroup.qaplatform.domain; package cn.qg.qaplatform.domain;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
/** /**
* 贷款用户实体类 * 捞数据返回的用户实体类
*/ */
@Data @Data
public class LoanUser { public class LoanUser {
......
package cn.quantgroup.qaplatform.service; package cn.qg.qaplatform.service;
import cn.quantgroup.qaplatform.domain.LoanUser; import cn.qg.qaplatform.domain.LoanUser;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
......
package cn.quantgroup.qaplatform.service; package cn.qg.qaplatform.service;
import cn.quantgroup.qaplatform.utils.page.PageResult; import cn.qg.qaplatform.utils.page.PageResult;
/** /**
* 多个状态结合查询 * 多个状态结合查询
......
package cn.quantgroup.qaplatform.utils; package cn.qg.qaplatform.utils;
import cn.quantgroup.qaplatform.common.enums.Namespace; import cn.qg.qaplatform.common.enums.Namespace;
import org.apache.commons.dbutils.QueryRunner;
import java.sql.*; import java.sql.*;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -13,6 +14,7 @@ import java.util.Map; ...@@ -13,6 +14,7 @@ import java.util.Map;
* 数据库连接工具类 * 数据库连接工具类
*/ */
public class DBUtils { public class DBUtils {
public static QueryRunner queryRunner = new QueryRunner();
private String JDBC_DRIVER = "com.mysql.jdbc.Driver"; private String JDBC_DRIVER = "com.mysql.jdbc.Driver";
private String db_url = ""; private String db_url = "";
...@@ -61,25 +63,51 @@ public class DBUtils { ...@@ -61,25 +63,51 @@ public class DBUtils {
* @return * @return
*/ */
public Map queryForMap(String sql) throws SQLException { public Map queryForMap(String sql) throws SQLException {
ResultSet resultSet = null; Map resultMap = new HashMap();
try { try {
resultSet = this.stmt.executeQuery(sql); this.connect();
ResultSet resultSet = this.stmt.executeQuery(sql);
resultMap = resultSetToMap(resultSet);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} finally {
if (this.conn != null && this.conn.isValid(0)) {
this.conn.close();
this.conn = null;
} }
return resultSetToMap(resultSet); }
return resultMap;
} }
public List queryForList(String sql) throws SQLException { public List queryForList(String sql) throws SQLException {
ResultSet resultSet = null; List resultList = new ArrayList();
try { try {
resultSet = this.stmt.executeQuery(sql); this.connect();
ResultSet resultSet = this.stmt.executeQuery(sql);
resultList = resultSetToList(resultSet);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} finally {
this.closeConnection();
}
return resultList;
}
/**
* 插入数据
* @param sql
*/
public int insert(String sql) throws SQLException {
int num = 0;
try {
this.connect();
num = this.stmt.executeUpdate(sql);
} catch (SQLException e) {
e.printStackTrace();
} finally {
this.closeConnection();
} }
return resultSetToList(resultSet); return num;
} }
/** /**
...@@ -128,9 +156,7 @@ public class DBUtils { ...@@ -128,9 +156,7 @@ public class DBUtils {
String phone = "13712345678"; String phone = "13712345678";
String sql = "select id, uuid from user where phone_no=" + phone; String sql = "select id, uuid from user where phone_no=" + phone;
DBUtils dbUtils = new DBUtils(namespace, database, "qa", "qatest"); DBUtils dbUtils = new DBUtils(namespace, database, "qa", "qatest");
dbUtils.connect();
Map resultMap = dbUtils.queryForMap(sql); Map resultMap = dbUtils.queryForMap(sql);
System.out.println(resultMap); System.out.println(resultMap);
dbUtils.closeConnection();
} }
} }
package cn.quantgroup.qaplatform.utils; package cn.qg.qaplatform.utils;
import sun.misc.BASE64Decoder; import sun.misc.BASE64Decoder;
......
package cn.quantgroup.qaplatform.utils; package cn.qg.qaplatform.utils;
import sun.misc.MessageUtils; import sun.misc.MessageUtils;
......
package cn.quantgroup.qaplatform.utils; package cn.qg.qaplatform.utils;
import com.alibaba.fastjson.JSONException;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpEntity; import org.apache.http.HttpEntity;
...@@ -27,35 +28,57 @@ public class HttpClientUtils { ...@@ -27,35 +28,57 @@ public class HttpClientUtils {
private static CloseableHttpClient client = HttpClients.createDefault(); private static CloseableHttpClient client = HttpClients.createDefault();
public static JSONObject doGet(String url) { /**
JSONObject result = new JSONObject(); * 不带参数的GET请求
*
* @param url 请求的url
* @return json
*/
public static JSONObject doGetReturnJson(String url) {
JSONObject jsonResult = new JSONObject();
HttpGet get = new HttpGet(url); HttpGet get = new HttpGet(url);
Map<String, Object> resultMap = new HashMap<>();
try { try {
CloseableHttpResponse response = client.execute(get); CloseableHttpResponse response = client.execute(get);
HttpEntity httpEntity = response.getEntity(); HttpEntity httpEntity = response.getEntity();
String respStr = EntityUtils.toString(httpEntity, "utf-8"); String respStr = EntityUtils.toString(httpEntity, "utf-8");
result = JSONObject.parseObject(respStr); jsonResult = JSONObject.parseObject(respStr);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
return result; return jsonResult;
} }
public static void doGetWithoutResponse(String url) { /**
* 不带参数的GET请求
* @param url 请求的url
* @return html代码
*/
public static String doGetReturnHtml(String url) {
String strResult = null;
HttpGet get = new HttpGet(url); HttpGet get = new HttpGet(url);
Map<String, Object> resultMap = new HashMap<>();
try { try {
CloseableHttpResponse response = client.execute(get); CloseableHttpResponse response = client.execute(get);
HttpEntity httpEntity = response.getEntity();
strResult = EntityUtils.toString(httpEntity, "utf-8");
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
return strResult;
} }
public static JSONObject doGet(String url, Map<String, Object> params) throws URISyntaxException { /**
// HttpGet get = new HttpGet(url); * 带参数的GET请求
JSONObject result = new JSONObject(); *
* @param url 请求url
* @param params 请求参数
* @param headers 请求头
* @throws URISyntaxException
* @return
*/
public static String doGetReturnHtml(String url, Map<String, Object> params, Map<String, Object> headers) throws URISyntaxException {
URIBuilder uriBuilder = new URIBuilder(url); URIBuilder uriBuilder = new URIBuilder(url);
String strResult = null;
// 设置请求参数
if (params != null && !params.isEmpty()) { if (params != null && !params.isEmpty()) {
Set<String> keySet = params.keySet(); Set<String> keySet = params.keySet();
for (String key : keySet) { for (String key : keySet) {
...@@ -63,21 +86,35 @@ public class HttpClientUtils { ...@@ -63,21 +86,35 @@ public class HttpClientUtils {
} }
} }
HttpGet get = new HttpGet(uriBuilder.build()); HttpGet get = new HttpGet(uriBuilder.build());
String respStr = null; // 设置请求头
if (headers != null && !headers.isEmpty()) {
Set<String> keySet = headers.keySet();
for (String s : keySet) {
get.addHeader(s, headers.get(s).toString());
}
}
try { try {
CloseableHttpResponse response = client.execute(get); CloseableHttpResponse response = client.execute(get);
HttpEntity httpEntity = response.getEntity(); HttpEntity httpEntity = response.getEntity();
respStr = EntityUtils.toString(httpEntity, "utf-8"); strResult = EntityUtils.toString(httpEntity, "utf-8");
result = JSONObject.parseObject(respStr);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
return result; return strResult;
} }
public static JSONObject doGet(String url, Map<String, Object> params, Map<String, Object> headers) throws URISyntaxException { /**
JSONObject result = new JSONObject(); * 带参数的GET请求
* @param url url
* @param params 参数
* @param headers 请求头
* @return json
* @throws URISyntaxException
*/
public static JSONObject doGetReturnJson(String url, Map<String, Object> params, Map<String, Object> headers) throws URISyntaxException {
JSONObject jsonResult = new JSONObject();
URIBuilder uriBuilder = new URIBuilder(url); URIBuilder uriBuilder = new URIBuilder(url);
// 设置参数
if (params != null && !params.isEmpty()) { if (params != null && !params.isEmpty()) {
Set<String> keySet = params.keySet(); Set<String> keySet = params.keySet();
for (String key : keySet) { for (String key : keySet) {
...@@ -85,7 +122,6 @@ public class HttpClientUtils { ...@@ -85,7 +122,6 @@ public class HttpClientUtils {
} }
} }
HttpGet get = new HttpGet(uriBuilder.build()); HttpGet get = new HttpGet(uriBuilder.build());
String respStr = null;
if (headers != null && !headers.isEmpty()) { if (headers != null && !headers.isEmpty()) {
Set<String> keySet = headers.keySet(); Set<String> keySet = headers.keySet();
for (String s : keySet) { for (String s : keySet) {
...@@ -95,17 +131,22 @@ public class HttpClientUtils { ...@@ -95,17 +131,22 @@ public class HttpClientUtils {
try { try {
CloseableHttpResponse response = client.execute(get); CloseableHttpResponse response = client.execute(get);
HttpEntity httpEntity = response.getEntity(); HttpEntity httpEntity = response.getEntity();
respStr = EntityUtils.toString(httpEntity, "utf-8"); String respStr = EntityUtils.toString(httpEntity, "utf-8");
result = JSONObject.parseObject(respStr); jsonResult = JSONObject.parseObject(respStr);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
return result; return jsonResult;
} }
/**
* 带参数的post请求
* @param url
* @param params
* @return
*/
public static JSONObject doPost(String url, String params) { public static JSONObject doPost(String url, String params) {
JSONObject result = new JSONObject(); JSONObject jsonResult = new JSONObject();
try { try {
HttpPost post = new HttpPost(url); HttpPost post = new HttpPost(url);
List<NameValuePair> list = new ArrayList<>(); List<NameValuePair> list = new ArrayList<>();
...@@ -121,16 +162,16 @@ public class HttpClientUtils { ...@@ -121,16 +162,16 @@ public class HttpClientUtils {
CloseableHttpResponse response = client.execute(post); CloseableHttpResponse response = client.execute(post);
HttpEntity responseEntity = response.getEntity(); HttpEntity responseEntity = response.getEntity();
String responseString = EntityUtils.toString(responseEntity, "utf-8"); String responseString = EntityUtils.toString(responseEntity, "utf-8");
result = JSONObject.parseObject(responseString); jsonResult = JSONObject.parseObject(responseString);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
return result; return jsonResult;
} }
public static JSONObject doPost(String url, Map<String, Object> params) { public static JSONObject doPost(String url, Map<String, Object> params) {
JSONObject result = new JSONObject(); JSONObject jsonResult = new JSONObject();
try { try {
HttpPost post = new HttpPost(url); HttpPost post = new HttpPost(url);
List list = new ArrayList(); List list = new ArrayList();
...@@ -146,16 +187,17 @@ public class HttpClientUtils { ...@@ -146,16 +187,17 @@ public class HttpClientUtils {
CloseableHttpResponse response = client.execute(post); CloseableHttpResponse response = client.execute(post);
HttpEntity entity = response.getEntity(); HttpEntity entity = response.getEntity();
String respEntity = EntityUtils.toString(entity, "utf-8"); String respEntity = EntityUtils.toString(entity, "utf-8");
result = JSONObject.parseObject(respEntity); jsonResult = JSONObject.parseObject(respEntity);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
return result; return jsonResult;
} }
public static JSONObject doPost(String url, Map<String, Object> params, Map<String, Object> headers) { public static JSONObject doPost(String url, Map<String, Object> params, Map<String, Object> headers) {
JSONObject result = new JSONObject(); JSONObject jsonResult = new JSONObject();
String responseString = null;
try { try {
HttpPost post = new HttpPost(url); HttpPost post = new HttpPost(url);
List list = new ArrayList(); List list = new ArrayList();
...@@ -174,14 +216,19 @@ public class HttpClientUtils { ...@@ -174,14 +216,19 @@ public class HttpClientUtils {
post.addHeader(s, headers.get(s).toString()); post.addHeader(s, headers.get(s).toString());
} }
} }
try {
CloseableHttpResponse response = client.execute(post); CloseableHttpResponse response = client.execute(post);
HttpEntity responseEntity = response.getEntity(); HttpEntity responseEntity = response.getEntity();
String responseString = EntityUtils.toString(responseEntity, "utf-8"); responseString = EntityUtils.toString(responseEntity, "utf-8");
result = JSONObject.parseObject(responseString); jsonResult = JSONObject.parseObject(responseString);
} catch (JSONException e) {
// e.printStackTrace();
jsonResult.put("content", responseString);
}
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
return result; return jsonResult;
} }
public static JSONObject doPostJson(String url, String params, String headers) { public static JSONObject doPostJson(String url, String params, String headers) {
......
package cn.quantgroup.qaplatform.utils; package cn.qg.qaplatform.utils;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
......
package cn.quantgroup.qaplatform.utils; package cn.qg.qaplatform.utils;
import java.util.Random; import java.util.Random;
......
package cn.quantgroup.qaplatform.utils; package cn.qg.qaplatform.utils;
import lombok.Getter; import lombok.Getter;
import org.springframework.beans.BeansException; import org.springframework.beans.BeansException;
......
package cn.quantgroup.qaplatform.utils.page; package cn.qg.qaplatform.utils.page;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
......
package cn.quantgroup.qaplatform.utils.page; package cn.qg.qaplatform.utils.page;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
......
...@@ -16,7 +16,7 @@ server: ...@@ -16,7 +16,7 @@ server:
# mybatis-plus 配置 # mybatis-plus 配置
mybatis-plus: mybatis-plus:
mapper-locations: classpath:mapper/*.xml mapper-locations: classpath:mapper/*.xml
type-aliases-package: cn.quantgroup.qaplatform.domain type-aliases-package: cn.qg.qaplatform.domain
configuration: configuration:
map-underscore-to-camel-case: true map-underscore-to-camel-case: true
...@@ -31,6 +31,9 @@ pagehelper: ...@@ -31,6 +31,9 @@ pagehelper:
logging: logging:
level: level:
root: info root: info
cn.quantgroup.qaplatform: debug cn.qg.qaplatform: debug
file: file:
name: /home/quant_group/logs/qa-platform.log name: /home/quant_group/logs/qa-platform.log
management:
health
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" ?> <?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" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="cn.quantgroup.qaplatform.dao.QueryBasicLoanStatusDataMapper"> <mapper namespace="cn.qg.qaplatform.dao.QueryBasicLoanStatusDataMapper">
<!-- 注册未申请 --> <!-- 注册未申请 -->
<select id="getUnApplyLoanUserUuidList" resultType="java.lang.String"> <select id="getUnApplyLoanUserUuidList" resultType="java.lang.String">
SELECT `uuid` FROM `apply_list` SELECT `uuid` FROM `apply_list`
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</select> </select>
<!-- 根据uuidList获取用户信息列表 --> <!-- 根据uuidList获取用户信息列表 -->
<select id="getUserDataListByUuidList" parameterType="java.util.List" resultType="cn.quantgroup.qaplatform.domain.LoanUser"> <select id="getUserDataListByUuidList" parameterType="java.util.List" resultType="cn.qg.qaplatform.domain.LoanUser">
SELECT `id` as userId, `phone_no` as phoneNo, `uuid`, `registered_from` as registeredFrom, `enable`, `created_at` as createdAt FROM `user` SELECT `id` as userId, `phone_no` as phoneNo, `uuid`, `registered_from` as registeredFrom, `enable`, `created_at` as createdAt FROM `user`
where `uuid` in where `uuid` in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</select> </select>
<!-- 根据userIdList获取用户信息List --> <!-- 根据userIdList获取用户信息List -->
<select id="getUserDataListByUserIdList" resultType="cn.quantgroup.qaplatform.domain.LoanUser"> <select id="getUserDataListByUserIdList" resultType="cn.qg.qaplatform.domain.LoanUser">
SELECT `id` as userId, `uuid`, `phone_no` as phoneNo, `registered_from` as registeredFrom, `enable`, `created_at` as createdAt FROM `user` SELECT `id` as userId, `uuid`, `phone_no` as phoneNo, `registered_from` as registeredFrom, `enable`, `created_at` as createdAt FROM `user`
where `id` in where `id` in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
......
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