|
|
|
@ -122,18 +122,7 @@ public class AppEnterpriseLoginServiceImpl implements IAppEnterpriseLoginService |
|
|
|
return doSiqLoginWithLock(userInfo); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 深i企模拟登录(开发/联调) |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public Map<String, Object> siqLoginMock(AppEnterpriseLoginBo bo) { |
|
|
|
log.info("---> 深i企模拟登录 userId:{}", bo.getUserId()); |
|
|
|
JSONObject userInfo = getMockSiqUserInfo(bo.getCode()); |
|
|
|
if (StringUtils.isNotEmpty(bo.getUserId())) { |
|
|
|
userInfo.put("userId", bo.getUserId()); |
|
|
|
} |
|
|
|
return doSiqLoginWithLock(userInfo); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 加锁后完成用户注册、企业关联并签发 token |
|
|
|
@ -564,41 +553,4 @@ public class AppEnterpriseLoginServiceImpl implements IAppEnterpriseLoginService |
|
|
|
|
|
|
|
return token; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取模拟的深i企用户信息(用于测试) |
|
|
|
* |
|
|
|
* @param code 授权码 |
|
|
|
* @return 模拟的用户信息JSON对象 |
|
|
|
*/ |
|
|
|
private JSONObject getMockSiqUserInfo(String code) { |
|
|
|
JSONObject userInfo = new JSONObject(); |
|
|
|
|
|
|
|
// 随机生成账号:test + 6位随机数字
|
|
|
|
String randomSuffix = String.format("%06d", (int)(Math.random() * 1000000)); |
|
|
|
String account = "test" + randomSuffix; |
|
|
|
|
|
|
|
userInfo.put("userId", "100001"); |
|
|
|
userInfo.put("account", account); |
|
|
|
userInfo.put("userName", "测试用户"); |
|
|
|
userInfo.put("phone", IdCardCryptoUtil.symmetricEncryptIdCard(secretKey, "13800138000")); |
|
|
|
|
|
|
|
userInfo.put("corpCid", "91440300662678582M"); |
|
|
|
userInfo.put("corpName", "深圳农牧美益肉业有限公司"); |
|
|
|
userInfo.put("companyOrgType", "有限责任公司"); |
|
|
|
userInfo.put("establishDate", "2010-01-15"); |
|
|
|
userInfo.put("businessScope", "安防产品、电子产品的技术开发与销售;计算机软件的技术开发;计算机系统集成;国内贸易(不含专营、专控、专卖商品及限制项目);汽车购销。(法律、行政法规、国务院决定禁止的项目除外,限制的项目须取得许可后方可经营)信息技术咨询服务。(除依法须经批准的项目外,凭营业执照依法自主开展经营活动)"); |
|
|
|
userInfo.put("regLocation", "深圳市南山区粤海街道高新区社区白石路3609号深圳湾科技生态园二区9栋B4座616"); |
|
|
|
userInfo.put("regCapital", "5000万元人民币"); |
|
|
|
userInfo.put("legalPersonName", "张三"); |
|
|
|
userInfo.put("termStart", "2004-11-12"); |
|
|
|
userInfo.put("termEnd", "2040-01-14"); |
|
|
|
|
|
|
|
log.info("返回模拟深i企用户信息: userId={}, account={}, corpName={}", |
|
|
|
userInfo.getString("userId"), |
|
|
|
userInfo.getString("account"), |
|
|
|
userInfo.getString("corpName")); |
|
|
|
|
|
|
|
return userInfo; |
|
|
|
} |
|
|
|
} |
|
|
|
|