fix: license生成修复
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package org.agt.module.license.dal.dataobject.license;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
@@ -84,21 +85,25 @@ public class LicenseProviderDO extends BaseDO {
|
||||
/**
|
||||
* 授权文件路径-legacy(含文件名),扩容或续期时带入
|
||||
*/
|
||||
private String oldFilePath_0;
|
||||
@TableField(value = "old_file_path_1")
|
||||
private String oldFilePath0;
|
||||
|
||||
/**
|
||||
* 授权文件路径-45G(含文件名),扩容或续期时带入
|
||||
*/
|
||||
private String oldFilePath_1;
|
||||
@TableField(value = "old_file_path_1")
|
||||
private String oldFilePath1;
|
||||
|
||||
/**
|
||||
* 授权文件路径-legacy(含文件名),新生产授权文件
|
||||
*/
|
||||
private String newFilePath_0;
|
||||
@TableField(value = "new_file_path_0")
|
||||
private String newFilePath0;
|
||||
/**
|
||||
* 授权文件路径-45G(含文件名),新生产授权文件
|
||||
*/
|
||||
private String newFilePath_1;
|
||||
@TableField(value = "new_file_path_1")
|
||||
private String newFilePath1;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
||||
@@ -113,7 +113,7 @@ public class LicenseServiceImpl implements LicenseService {
|
||||
templateParams.put("customer", customerDO.getName());
|
||||
templateParams.put("project", projectDO.getName());
|
||||
templateParams.put("sn", updateReqVO.getSerialNo());
|
||||
templateParams.put("url", "http://192.168.9.50/license/generate?id=" + updateReqVO.getId());
|
||||
templateParams.put("url", "http://192.168.9.50#/license/generate?id=" + updateReqVO.getId());
|
||||
|
||||
// 2. 发送邮件
|
||||
mailSendApi.sendSingleMailToAdmin(new MailSendSingleToUserReqDTO()
|
||||
@@ -153,7 +153,7 @@ public class LicenseServiceImpl implements LicenseService {
|
||||
neLabels.add(label);
|
||||
}
|
||||
licenseProviderDO.setNeList(StrUtil.join(",", neLabels));
|
||||
licenseProviderDO.setActivationCode(updateReqVO.getActivationCode());
|
||||
licenseProviderDO.setActivationCode(neCodeVO.getActivationCode());
|
||||
licenseProviderDO.setOperationType(1);
|
||||
licenseProviderDO.setState(1);
|
||||
licenseProviderDO.setRemark(updateReqVO.getRemark());
|
||||
@@ -184,7 +184,7 @@ public class LicenseServiceImpl implements LicenseService {
|
||||
|
||||
try {
|
||||
System.out.println("线程开始睡眠...");
|
||||
Thread.sleep(2000); // 暂停2000毫秒,即2秒
|
||||
Thread.sleep(8000); // 暂停2000毫秒,即2秒
|
||||
System.out.println("线程醒来!");
|
||||
} catch (InterruptedException e) {
|
||||
log.error("睡眠失败");
|
||||
@@ -195,7 +195,7 @@ public class LicenseServiceImpl implements LicenseService {
|
||||
if (licenseProviderDO.getState() != 3) {
|
||||
// continue;
|
||||
}
|
||||
String newFilePath1 = licenseProviderDO.getNewFilePath_1();
|
||||
String newFilePath1 = licenseProviderDO.getNewFilePath1();
|
||||
|
||||
List<Integer> neList = neCodeVO.getNeList();
|
||||
List<String> neLabels = new ArrayList<>();
|
||||
@@ -224,6 +224,7 @@ public class LicenseServiceImpl implements LicenseService {
|
||||
// 上传到文件服务
|
||||
byte[] fileContent = null;
|
||||
try {
|
||||
log.info("下载License文件路径为:{}", newFilePath1);
|
||||
fileContent = FileUtil.readBytes(newFilePath1);
|
||||
} catch (Exception e) {
|
||||
log.error("读取文件失败", e);
|
||||
|
||||
Reference in New Issue
Block a user