|
@@ -7,6 +7,7 @@ import cn.kdan.pdf.tech.core.constant.VppLicenseCodeConstant;
|
|
|
import cn.kdan.pdf.tech.core.constant.VppMemberConstant;
|
|
|
import cn.kdan.pdf.tech.core.enums.CaptchaActionEnum;
|
|
|
import cn.kdan.pdf.tech.core.enums.LicenseCodeStatusEnum;
|
|
|
+import cn.kdan.pdf.tech.core.enums.ProductNameEnum;
|
|
|
import cn.kdan.pdf.tech.core.mapper.ext.ExtVppLicenseCodeMapper;
|
|
|
import cn.kdan.pdf.tech.core.model.*;
|
|
|
import cn.kdan.pdf.tech.core.pojo.vo.VppLicenseCodeVO;
|
|
@@ -132,7 +133,9 @@ public class VppLicenseCodeServiceImpl implements VppLicenseCodeService {
|
|
|
VppMember member = vppMemberService.getCurrentUser();
|
|
|
List<String> teamIds = new ArrayList<>();
|
|
|
handleTeamIds(teamId, member, teamIds);
|
|
|
- return licenseCodeMapper.listWithInfo(productId, teamIds, status, queryString);
|
|
|
+ List<VppLicenseCodeVO> vppLicenseCodeVOS = licenseCodeMapper.listWithInfo(productId, teamIds, status, queryString);
|
|
|
+ vppLicenseCodeVOS.forEach(c -> c.setProductName(ProductNameEnum.getEnumByDatabaseName(c.getProductName()).viewName()));
|
|
|
+ return vppLicenseCodeVOS;
|
|
|
}
|
|
|
|
|
|
private void handleTeamIds(String teamId, VppMember member, List<String> teamIds) {
|
|
@@ -419,9 +422,15 @@ public class VppLicenseCodeServiceImpl implements VppLicenseCodeService {
|
|
|
if (StringUtils.isEmpty(productName)) {
|
|
|
continue;
|
|
|
}
|
|
|
- log.info("查询产品{};{}", productName.trim(), DateUtil.date().toString("yyyy-MM-dd HH:mm:ss:SSS"));
|
|
|
+ // 产品名称转换
|
|
|
+ ProductNameEnum productNameEnum = ProductNameEnum.getEnumByViewName(productName.trim());
|
|
|
+ if (ObjectUtils.isEmpty(productNameEnum)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ log.info("用户传入产品名:{},转换为:{}", productName.trim(), productNameEnum.databaseName());
|
|
|
+ log.info("查询产品{};{}", productNameEnum.databaseName(), DateUtil.date().toString("yyyy-MM-dd HH:mm:ss:SSS"));
|
|
|
// 查询产品
|
|
|
- Products product = productService.getByName(productName.trim());
|
|
|
+ Products product = productService.getByName(productNameEnum.databaseName());
|
|
|
if (null == product) {
|
|
|
continue;
|
|
|
}
|