Commit e5a1f2e0 by yangyang

西藏单点登录处理提交

parent 217234d8
package com.founder.servicebase.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.ApiController;
import com.founder.commonutils.model.newPublicEntity.MapRestResult;
......@@ -98,7 +99,11 @@ public class SysUserController extends ApiController {
String IV = "map_vues" + today;
// 用于api测试接口
if("text".equals(user.getIdentitycard())){
user.setIdentitycard(AesEncryptUtil.encrypt("430000000000000000", KEY, IV).trim());
// 从库中取一个身份证 进行单点登录用于测试接口是否通
SysUser one = sysUserService.getOne(new LambdaQueryWrapper<SysUser >()
.eq(SysUser ::getScbz, "0")
.last("limit 1"));
user.setIdentitycard(AesEncryptUtil.encrypt(one.getIdentitycard(), KEY, IV).trim());
}
String identityCard = desEncrypt(user.getIdentitycard(), KEY, IV).trim();
QueryWrapper queryWrapper = new QueryWrapper();
......
package com.founder.publicapi.controller.SkInterface;
import cn.hutool.json.JSONObject;
import com.alibaba.fastjson.JSON;
import com.founder.commonutils.model.newPublicEntity.Car;
import com.founder.commonutils.model.newPublicEntity.MapRestResult;
import com.founder.commonutils.model.newPublicEntity.PeopleInfo;
import com.founder.commonutils.model.newPublicEntity.Phone;
import com.founder.commonutils.model.vo.response.SkRelatedResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.mongodb.core.MongoTemplate;
......@@ -15,6 +15,7 @@ import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
......@@ -72,10 +73,13 @@ public class GlgxInterface {
peopleInfo.setChildren(peopleInfos);
// 返回结果数据 与前端一致
map.put("result", JSON.toJSONString(peopleInfo));
map.put("objecttype",objectType);
map.put("objectvalue",objectValue);
return MapRestResult.build(200,"成功获取身份信息!",1,map);
List<SkRelatedResultVO> newList = new ArrayList<>();
SkRelatedResultVO skRelatedResultVO = new SkRelatedResultVO();
skRelatedResultVO.setObjecttype(objectType);
skRelatedResultVO.setObjectvalue(objectValue);
skRelatedResultVO.setResult(JSON.toJSONString(peopleInfo));
newList.add(skRelatedResultVO);
return MapRestResult.build(200,"成功获取身份信息!",1,newList);
}else if(objectType.equals("03")){
//手机号能够了查到身份证号还有车牌号
Query query = new Query();
......@@ -116,10 +120,13 @@ public class GlgxInterface {
peopleInfo.setChildren(peopleInfos);
// 返回结果数据 与前端一致
map.put("objecttype",objectType);
map.put("objectvalue",objectValue);
map.put("result",JSON.toJSONString(peopleInfo));
return MapRestResult.build(200,"成功获取身份信息!",1,map);
List<SkRelatedResultVO> newList = new ArrayList<>();
SkRelatedResultVO skRelatedResultVO = new SkRelatedResultVO();
skRelatedResultVO.setObjecttype(objectType);
skRelatedResultVO.setObjectvalue(objectValue);
skRelatedResultVO.setResult(JSON.toJSONString(peopleInfo));
newList.add(skRelatedResultVO);
return MapRestResult.build(200,"成功获取身份信息!",1,newList);
}else if(objectType.equals("02")){
//身份证号查询出来车牌号还有手机号
Query query = new Query();
......@@ -162,10 +169,13 @@ public class GlgxInterface {
self.setChildren(peopleInfos);
// 返回结果数据 与前端一致
map.put("objecttype",objectType);
map.put("objectvalue",objectValue);
map.put("result",JSON.toJSONString(self));
return MapRestResult.build(200,"成功获取手机号码信息!",1,map);
List<SkRelatedResultVO> newList = new ArrayList<>();
SkRelatedResultVO skRelatedResultVO = new SkRelatedResultVO();
skRelatedResultVO.setObjecttype(objectType);
skRelatedResultVO.setObjectvalue(objectValue);
skRelatedResultVO.setResult(JSON.toJSONString(self));
newList.add(skRelatedResultVO);
return MapRestResult.build(200,"成功获取手机号码信息!",1, newList);
}else{
return MapRestResult.error("无法查询此标识号类型");
}
......
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