Commit e3ce233e authored by libin's avatar libin

Merge branch 'master-ucc-feature' into dev

parents 8a063bda 02865cca
...@@ -5,7 +5,7 @@ import com.xxfc.platform.universal.biz.UserMessage; ...@@ -5,7 +5,7 @@ import com.xxfc.platform.universal.biz.UserMessage;
import java.util.Map; import java.util.Map;
/** /**
* 用户认证 * 用户认证接口 (使用@Primary实现的优先级提升优先级)
* @author Administrator * @author Administrator
*/ */
public interface UserAuthentication { public interface UserAuthentication {
......
...@@ -25,7 +25,7 @@ import java.util.Map; ...@@ -25,7 +25,7 @@ import java.util.Map;
*/ */
@Service @Service
@Slf4j @Slf4j
@Primary //@Primary
public class BJCYAuthentication implements UserAuthentication { public class BJCYAuthentication implements UserAuthentication {
private final String host = "http://aliyunverifyidcard.haoservice.com"; private final String host = "http://aliyunverifyidcard.haoservice.com";
private final String path = "/idcard/VerifyIdcardv2"; private final String path = "/idcard/VerifyIdcardv2";
...@@ -39,7 +39,8 @@ public class BJCYAuthentication implements UserAuthentication { ...@@ -39,7 +39,8 @@ public class BJCYAuthentication implements UserAuthentication {
private final String ret="error_code"; private final String ret="error_code";
@Override @Override
public boolean certificate(UserMessage message) { public boolean certificate(UserMessage message) {
Map<String, String> headers = new HashMap<String, String>(); return true;
/*Map<String, String> headers = new HashMap<String, String>();
headers.put(tokenHead, token); headers.put(tokenHead, token);
Map<String, String> querys = new HashMap<String, String>(); Map<String, String> querys = new HashMap<String, String>();
querys.put(cardNo, message.getIdNumber()); querys.put(cardNo, message.getIdNumber());
...@@ -66,7 +67,7 @@ public class BJCYAuthentication implements UserAuthentication { ...@@ -66,7 +67,7 @@ public class BJCYAuthentication implements UserAuthentication {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
return false; return false;*/
} }
} }
......
...@@ -12,6 +12,7 @@ import org.apache.commons.lang.StringUtils; ...@@ -12,6 +12,7 @@ import org.apache.commons.lang.StringUtils;
import org.apache.http.HttpResponse; import org.apache.http.HttpResponse;
import org.apache.http.StatusLine; import org.apache.http.StatusLine;
import org.apache.http.util.EntityUtils; import org.apache.http.util.EntityUtils;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.HashMap; import java.util.HashMap;
...@@ -24,6 +25,7 @@ import java.util.Map; ...@@ -24,6 +25,7 @@ import java.util.Map;
*/ */
@Service @Service
@Slf4j @Slf4j
@Primary
public class XCFQAuthentication implements UserAuthentication { public class XCFQAuthentication implements UserAuthentication {
private String cAppcode="acea1c8811f748b3a65815f11db357c4"; private String cAppcode="acea1c8811f748b3a65815f11db357c4";
...@@ -33,10 +35,8 @@ public class XCFQAuthentication implements UserAuthentication { ...@@ -33,10 +35,8 @@ public class XCFQAuthentication implements UserAuthentication {
*/ */
private String cHost = "https://idcert.market.alicloudapi.com"; private String cHost = "https://idcert.market.alicloudapi.com";
private String cPath = "/idcard"; private String cPath = "/idcard";
private String cMethod = "GET"; private String cMethod = "GET";
//响应:认证错误码字段名 //响应:认证错误码字段名
...@@ -45,7 +45,6 @@ public class XCFQAuthentication implements UserAuthentication { ...@@ -45,7 +45,6 @@ public class XCFQAuthentication implements UserAuthentication {
//响应:认证通过码 //响应:认证通过码
private String certifResultCode = "01"; private String certifResultCode = "01";
//请求:身份证号字段名 //请求:身份证号字段名
private String idCardName = "idCard"; private String idCardName = "idCard";
...@@ -55,11 +54,9 @@ public class XCFQAuthentication implements UserAuthentication { ...@@ -55,11 +54,9 @@ public class XCFQAuthentication implements UserAuthentication {
@Override @Override
public boolean certificate(UserMessage message) { public boolean certificate(UserMessage message) {
//map携带身份证和姓名进行认证 //map携带身份证和姓名进行认证
Map<String, String> querys = new HashMap<>(); Map<String, String> querys = new HashMap<>();
querys.put(idCardName, message.getIdNumber()); querys.put(idCardName, message.getIdNumber());
querys.put(cName, message.getName()); querys.put(cName, message.getName());
Map<String, String> headers = new HashMap<String, String>(); Map<String, String> headers = new HashMap<String, String>();
headers.put("Authorization", "APPCODE " + cAppcode); headers.put("Authorization", "APPCODE " + cAppcode);
try { try {
......
...@@ -20,6 +20,7 @@ public class BranchCompanyListDTO { ...@@ -20,6 +20,7 @@ public class BranchCompanyListDTO {
*/ */
@ApiModelProperty("分公司名称") @ApiModelProperty("分公司名称")
private String name; private String name;
private String companyName;
/** /**
* 公司封面 * 公司封面
*/ */
......
...@@ -20,6 +20,7 @@ public class BranchCompanyListVO { ...@@ -20,6 +20,7 @@ public class BranchCompanyListVO {
*/ */
@ApiModelProperty("分公司名称") @ApiModelProperty("分公司名称")
private String name; private String name;
private String companyName;
/** /**
* 公司封面 * 公司封面
*/ */
......
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
cb.town_name AS `townName`, cb.town_name AS `townName`,
bc.addr_detail AS `address`, bc.addr_detail AS `address`,
bc.NAME AS `name`, bc.NAME AS `name`,
cb.name AS `companyName`,
cb.cover, cb.cover,
bc.leader, bc.leader,
bc.leader_contact_info AS `leaderContactInfo`, bc.leader_contact_info AS `leaderContactInfo`,
......
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