Commit 7c75febc authored by yexiong.wang's avatar yexiong.wang

edit

parent 0e94179c
......@@ -21,9 +21,11 @@ import cn.quantgroup.customer.service.http.IHttpService;
import cn.quantgroup.customer.util.IdUtil;
import cn.quantgroup.user.retbean.XUser;
import cn.quantgroup.user.vo.UserSysResult;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.google.common.reflect.TypeToken;
import com.google.gson.Gson;
import com.querydsl.core.types.dsl.BooleanExpression;
import com.querydsl.core.types.dsl.Expressions;
import lombok.extern.slf4j.Slf4j;
......@@ -39,11 +41,8 @@ import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.transaction.Transactional;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.*;
import static cn.quantgroup.customer.constant.Constant.GSON;
import java.util.List;
@Slf4j
@Service
......@@ -68,7 +67,7 @@ public class VccServiceImpl implements IVccService {
@Override
public JsonResult queryPage(UserPreRepayInfoQuery query) throws Exception{
String url = talosHttp + "/vcc/offline_pre_repay/query_page";
JSONObject param = JSONObject.parseObject(GSON.toJson(query));
JSONObject param = JSONObject.parseObject(JSON.toJSONString(query));
log.info("queryPage | 开始请求talos获取预还款的详情,param={}",param);
String post = httpService.post(url, param);
log.info("queryPage | 请求talos结束,param={},result={}",param,post);
......@@ -83,7 +82,7 @@ public class VccServiceImpl implements IVccService {
}
JSONObject data = jsonObject.getJSONObject("data");
JSONArray list = data.getJSONArray("list");
List<QueryPreOfflineRepayVo> voList = GSON.fromJson(list.toString(), new TypeToken<List<QueryPreOfflineRepayVo>>() {
List<QueryPreOfflineRepayVo> voList = new Gson().fromJson(list.toString(), new TypeToken<List<QueryPreOfflineRepayVo>>() {
}.getType());
for (int i = 0;i<voList.size();i++){
if (1 == query.getRepayType()){
......@@ -93,7 +92,7 @@ public class VccServiceImpl implements IVccService {
List<OfflineRepaySubmitRecord> byUserIdEqualsAndRepayTypeEquals = offlineRepaySubmitRecordRepo.findByUserIdEqualsAndRepayTypeEquals(voList.get(i).getUserId(), 1);
if (!CollectionUtils.isEmpty(byUserIdEqualsAndRepayTypeEquals)){
for (OfflineRepaySubmitRecord record:byUserIdEqualsAndRepayTypeEquals){
List<ApplyBill> billList = GSON.fromJson(record.getBills(), new TypeToken<List<ApplyBill>>() {
List<ApplyBill> billList = new Gson().fromJson(record.getBills(), new TypeToken<List<ApplyBill>>() {
}.getType());
log.info("billList={},applyBill={}",billList,applyBill);
if (billList.contains(applyBill)){
......@@ -151,7 +150,7 @@ public class VccServiceImpl implements IVccService {
List<OfflineRepaySubmitRecord> byUserIdEqualsAndRepayTypeEquals = offlineRepaySubmitRecordRepo.findByUserIdEqualsAndRepayTypeEqualsAndApprovalStatusNot(param.getUserId(), 1,2);
if (!CollectionUtils.isEmpty(byUserIdEqualsAndRepayTypeEquals)){
for (OfflineRepaySubmitRecord record:byUserIdEqualsAndRepayTypeEquals){
List<ApplyBill> billList = GSON.fromJson(record.getBills(), new TypeToken<List<ApplyBill>>() {
List<ApplyBill> billList = new Gson().fromJson(record.getBills(), new TypeToken<List<ApplyBill>>() {
}.getType());
if (!Collections.disjoint(list,billList)){
log.error("saveSubmitRecord | 提交时发现已经提交过了,请确认,newBills={},existBills={}",list.toString(),billList.toString());
......@@ -195,7 +194,7 @@ public class VccServiceImpl implements IVccService {
}
OfflineRepaySubmitParam param = new OfflineRepaySubmitParam();
BeanUtils.copyProperties(bySerialNoEquals,param);
List<ApplyBill> billList = GSON.fromJson(bySerialNoEquals.getBills(), new TypeToken<List<ApplyBill>>() {
List<ApplyBill> billList = new Gson().fromJson(bySerialNoEquals.getBills(), new TypeToken<List<ApplyBill>>() {
}.getType());
param.setList(billList);
String[] split = bySerialNoEquals.getCredentialsAddress().split(",");
......@@ -238,7 +237,7 @@ public class VccServiceImpl implements IVccService {
// }
if ( 1 == bySerialNoEquals.getRepayType()){
//月还账单
List<ApplyBill> billList = GSON.fromJson(bySerialNoEquals.getBills(), new TypeToken<List<ApplyBill>>() {
List<ApplyBill> billList = new Gson().fromJson(bySerialNoEquals.getBills(), new TypeToken<List<ApplyBill>>() {
}.getType());
StringBuilder stringBuilder = new StringBuilder();
for (ApplyBill applyBill:billList){
......@@ -331,7 +330,7 @@ public class VccServiceImpl implements IVccService {
submitRecordVo.setApprovalStatusName(ApprovalStatus.getDescByValue(submitRecordVo.getApprovalStatus()));
if ( 1 == submitRecordVo.getRepayType()) {
//月还账单
List<ApplyBill> billList = GSON.fromJson(submitRecordVo.getBills(), new TypeToken<List<ApplyBill>>() {
List<ApplyBill> billList = new Gson().fromJson(submitRecordVo.getBills(), new TypeToken<List<ApplyBill>>() {
}.getType());
StringBuilder stringBuilder = new StringBuilder();
for (ApplyBill applyBill : billList) {
......
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