Commit e4f7eafb authored by youjj's avatar youjj

修改实名认证和旅游线路标签

parent e0c44221
...@@ -48,7 +48,7 @@ public class TourTagBiz extends BaseBiz<TourTagMapper,TourTag> { ...@@ -48,7 +48,7 @@ public class TourTagBiz extends BaseBiz<TourTagMapper,TourTag> {
public PageDataVO<TourTag> findAll(Map map) { public PageDataVO<TourTag> findPage(Map map) {
TourTag tag = new TourTag(); TourTag tag = new TourTag();
tag.setIsDel(0); tag.setIsDel(0);
return PageDataVO.pageInfo((Integer)map.get("page"),(Integer)map.get("limit"),() -> mapper.findAllByIsDel(tag)); return PageDataVO.pageInfo((Integer)map.get("page"),(Integer)map.get("limit"),() -> mapper.findAllByIsDel(tag));
......
...@@ -39,7 +39,7 @@ public class TourTagController extends BaseController<TourTagBiz,TourTag> { ...@@ -39,7 +39,7 @@ public class TourTagController extends BaseController<TourTagBiz,TourTag> {
} }
PageDataVO<TourTag> all = tagBiz.findAll(BeanUtil.beanToMap(dto)); PageDataVO<TourTag> all = tagBiz.findPage(BeanUtil.beanToMap(dto));
return ObjectRestResponse.succ(all); return ObjectRestResponse.succ(all);
......
package com.xxfc.platform.universal.utils; package com.xxfc.platform.universal.utils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpResponse; import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair; import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient; import org.apache.http.client.HttpClient;
......
...@@ -3,7 +3,7 @@ package com.xxfc.platform.universal.controller; ...@@ -3,7 +3,7 @@ package com.xxfc.platform.universal.controller;
import com.alibaba.druid.util.StringUtils; import com.alibaba.druid.util.StringUtils;
import com.github.wxiaoqi.security.admin.feign.UserFeign; import com.github.wxiaoqi.security.admin.feign.UserFeign;
import com.github.wxiaoqi.security.admin.feign.dto.UserDTO; import com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.util.process.ResultCode; import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.xxfc.platform.universal.entity.IdInformation; import com.xxfc.platform.universal.entity.IdInformation;
...@@ -44,24 +44,28 @@ public class CertificationController { ...@@ -44,24 +44,28 @@ public class CertificationController {
String token = request.getHeader("Authorization"); String token = request.getHeader("Authorization");
System.out.println(token);
if (StringUtils.isEmpty(token)) { if (StringUtils.isEmpty(token)) {
ObjectRestResponse.createFailedResult(ResultCode.RSTOKEN_NULL_CODE,"token为空"); ObjectRestResponse.createFailedResult(ResultCode.RSTOKEN_NULL_CODE,"token为空");
} }
//获得用户信息 //获得用户信息
ObjectRestResponse<UserDTO> userDTOObjectRestResponse= userFeign.userinfoByToken(token); ObjectRestResponse<AppUserDTO> appUserDTOObjectRestResponse= userFeign.userDetailByToken(token);
if (userDTOObjectRestResponse==null||userDTOObjectRestResponse.getData()==null||userDTOObjectRestResponse.getData().getId()==0) { System.out.println(appUserDTOObjectRestResponse.getData());
if (appUserDTOObjectRestResponse==null||appUserDTOObjectRestResponse.getData()==null||appUserDTOObjectRestResponse.getData().getId()==0) {
return ObjectRestResponse.createFailedResult(ResultCode.GET_APPUSER_FAILED_CODE,"获取用户失败"); return ObjectRestResponse.createFailedResult(ResultCode.GET_APPUSER_FAILED_CODE,"获取用户失败");
} }
UserDTO userDTO = userDTOObjectRestResponse.getData(); AppUserDTO appUserDTO = appUserDTOObjectRestResponse.getData();
idInformation.setUserLonginId(userDTO.getId()); idInformation.setUserLonginId(appUserDTO.getUserid());
//获取用户认证信息 //获取用户认证信息
...@@ -79,49 +83,21 @@ public class CertificationController { ...@@ -79,49 +83,21 @@ public class CertificationController {
Integer type = idInformation.getCertificateType(); Integer type = idInformation.getCertificateType();
if (type==0||am==0){ try {
return certificationService.stringCertificate(idInformation); if (type==0&&am==0){
} return certificationService.stringCertificate(idInformation);
}
if (type==0||am==1){ if (type==0&&am==1){
return certificationService.imageCertificate(idInformation); return certificationService.imageCertificate(idInformation);
}
} catch (Exception e) {
e.printStackTrace();
} }
return ObjectRestResponse.createFailedResult(ResultCode.SUCCESS_CODE,"该证件件或方式,暂时不能进行实名认证"); return ObjectRestResponse.createFailedResult(ResultCode.SUCCESS_CODE,"错误");
} }
//
// //请求参数jsone对象后台Map接收
// //字段
// // frontImage:正面身份证照片地址,
// // backImage:反面身份证照片地址
// @PostMapping("/image")
// public ObjectRestResponse imageCertificate(@RequestBody IdInformation idInformation, HttpServletRequest request) {
//
//
// String token = request.getHeader("Authorization");
// Integer uid = certificationService.getUid(token);
//
// idInformation.setUserLonginId(uid);
//
// Map resultMap= certificationService.imageCertificate(idInformation);
// ObjectRestResponse orr = new ObjectRestResponse().rel((Boolean) resultMap.get("rel"));
//
// if (!(Boolean) resultMap.get("rel")){
// return (ObjectRestResponse) orr.data(resultMap.get("data")).msg("FAILED").status(ResultCode.FAILED_CODE);
//
// }
// return orr;
// }
} }
...@@ -367,7 +367,10 @@ public class CertificationService { ...@@ -367,7 +367,10 @@ public class CertificationService {
StatusLine statusLine = response.getStatusLine(); StatusLine statusLine = response.getStatusLine();
int statusCode = statusLine.getStatusCode(); int statusCode = statusLine.getStatusCode();
//状态码: 200 正常;400 URL无效;401 appCode错误; 403 次数用完; 500 API网管错误 /**
* 状态码: 200 正常;400 URL无效;401 appCode错误; 403 次数用完; 500 API网管错误
*/
//获取response的body //获取response的body
if (statusCode == 200) { if (statusCode == 200) {
return EntityUtils.toString(response.getEntity()); return EntityUtils.toString(response.getEntity());
...@@ -410,8 +413,9 @@ public class CertificationService { ...@@ -410,8 +413,9 @@ public class CertificationService {
int statusCode = statusLine.getStatusCode(); int statusCode = statusLine.getStatusCode();
System.out.println(statusCode); System.out.println(statusCode);
/**
//状态码: 200 正常;400 URL无效;401 appCode错误; 403 次数用完; 500 API网管错误 * 状态码: 200 正常;400 URL无效;401 appCode错误; 403 次数用完; 500 API网管错误
*/
//获取response的body //获取response的body
if (statusCode == 200) { if (statusCode == 200) {
return EntityUtils.toString(response.getEntity()); return EntityUtils.toString(response.getEntity());
...@@ -437,7 +441,7 @@ public class CertificationService { ...@@ -437,7 +441,7 @@ public class CertificationService {
//保存认证信息 //保存认证信息
try { try {
idInformationMapper.addIdInformation(idInformation); idInformationMapper.addIdInformation(idInformation);
}catch (Exception e){ } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return false; return false;
} }
......
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