|
|
@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSON; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.zdxt.enforcementcode.common.commonenum.PlatformTypeEnums; |
|
|
import com.zdxt.enforcementcode.common.commonenum.PlatformTypeEnums; |
|
|
|
|
|
import com.zdxt.enforcementcode.common.config.RuoYiConfig; |
|
|
import com.zdxt.enforcementcode.common.util.*; |
|
|
import com.zdxt.enforcementcode.common.util.*; |
|
|
import com.zdxt.enforcementcode.domain.EnterpriseInformation; |
|
|
import com.zdxt.enforcementcode.domain.EnterpriseInformation; |
|
|
import com.zdxt.enforcementcode.domain.EnterpriseUser; |
|
|
import com.zdxt.enforcementcode.domain.EnterpriseUser; |
|
|
@ -97,11 +98,14 @@ public class AppEnterpriseLoginServiceImpl implements IAppEnterpriseLoginService |
|
|
|
|
|
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|
|
|
|
|
|
@Value("${sjdm.profile}") |
|
|
// @Value("${sjdm.profile}")
|
|
|
private String filePath; |
|
|
// private String filePath;
|
|
|
|
|
|
//
|
|
|
|
|
|
// @Value("${sjdm.qr_code_url}")
|
|
|
|
|
|
// private String qrCodeUrl;
|
|
|
|
|
|
|
|
|
@Value("${sjdm.qr_code_url}") |
|
|
@Autowired |
|
|
private String qrCodeUrl; |
|
|
RuoYiConfig ruoYiConfig; |
|
|
|
|
|
|
|
|
@Value("${siq.mock.enabled:false}") |
|
|
@Value("${siq.mock.enabled:false}") |
|
|
private boolean mockEnabled; |
|
|
private boolean mockEnabled; |
|
|
@ -430,9 +434,9 @@ public class AppEnterpriseLoginServiceImpl implements IAppEnterpriseLoginService |
|
|
jsonMap.put("type", "zfjd"); |
|
|
jsonMap.put("type", "zfjd"); |
|
|
String text = JSON.toJSONString(jsonMap); |
|
|
String text = JSON.toJSONString(jsonMap); |
|
|
//这里设置自定义网站url
|
|
|
//这里设置自定义网站url
|
|
|
String logoPath = qrCodeUrl; |
|
|
String logoPath = ruoYiConfig.getFile().getQrCodeUrl(); |
|
|
try { |
|
|
try { |
|
|
File encode = QRCodeUtil.encodeFile(text, logoPath, filePath, true); |
|
|
File encode = QRCodeUtil.encodeFile(text, logoPath, ruoYiConfig.getFile().getUploadPath(), true); |
|
|
MultipartFile multipartFile = QRCodeUtil.getMultipartFile(encode); |
|
|
MultipartFile multipartFile = QRCodeUtil.getMultipartFile(encode); |
|
|
String upload = fileUploadApi.upload(multipartFile); |
|
|
String upload = fileUploadApi.upload(multipartFile); |
|
|
|
|
|
|
|
|
@ -523,9 +527,13 @@ public class AppEnterpriseLoginServiceImpl implements IAppEnterpriseLoginService |
|
|
*/ |
|
|
*/ |
|
|
private JSONObject getMockSiqUserInfo(String code) { |
|
|
private JSONObject getMockSiqUserInfo(String code) { |
|
|
JSONObject userInfo = new JSONObject(); |
|
|
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("userId", "100001"); |
|
|
userInfo.put("account", "test001" + (code != null ? code.hashCode() % 1000 : 1)); |
|
|
userInfo.put("account", account); |
|
|
userInfo.put("userName", "测试用户"); |
|
|
userInfo.put("userName", "测试用户"); |
|
|
userInfo.put("phone", IdCardCryptoUtil.symmetricEncryptIdCard(secretKey, "13800138000")); |
|
|
userInfo.put("phone", IdCardCryptoUtil.symmetricEncryptIdCard(secretKey, "13800138000")); |
|
|
|
|
|
|
|
|
|