Bläddra i källkod

Merge branch 'develop' of http://git.kdan.cc:8865/Server_Service/pdf_tech_back_end into develop

Bob 2 år sedan
förälder
incheckning
cc35939149

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 10 - 4
pdf-tech-common/src/main/java/constant/CommonConstant.java


+ 3 - 3
pdf-tech-core/src/main/java/cn/kdan/pdf/tech/core/enums/CaptchaActionEnum.java

@@ -25,8 +25,8 @@ public enum CaptchaActionEnum {
                     "</p>\n" +
                     "<span style=\"font-size:16px;font-family:Arial;\"><span style=\"font-size:16px;\"><span style=\"font-size:16px;font-family:Arial;\">Your account can’t be accessed without this verification code, even if you didn’t submit this request.</span></span><span style=\"font-size:16px;\"></span></span>"),
     //忘记密码
-    FORGET_PASSWORD("1", "忘记密码", "Reset Your PDF Technologies Account Password", "<span style=\"font-size:16px;font-family:Arial;\"><span style=\"font-size:16px;\">Hello,<br />\n" +
-            "We have received a request to reset the password for your </span><span style=\"font-size:16px;color:#FF0000;\">PDF Technologies Account.</span><span style=\"font-size:16px;\"> If you are not aware of such a request please delete this email.<br />\n" +
+    FORGET_PASSWORD("1", "忘记密码", "Reset Your PDF Tech Account Password", "<span style=\"font-size:16px;font-family:Arial;\"><span style=\"font-size:16px;\">Hello,<br />\n" +
+            "We have received a request to reset the password for your </span><span style=\"font-size:16px;color:#FF0000;\">PDF Tech Account.</span><span style=\"font-size:16px;\"> If you are not aware of such a request please delete this email.<br />\n" +
             "Please use the below password to log in to Admin Console and change your password.<br />\n" +
             "Email: %s<br />\n" +
             "Password: </span><span style=\"font-size:16px;color:#FF0000;\">%s</span><span style=\"font-size:16px;\"><br />\n" +
@@ -79,7 +79,7 @@ public enum CaptchaActionEnum {
             "</p>"),
     ASSIGN_LICENSE_CODE("5", "账号被授权", "Your organization administrator has updated your PDF Tech licenses", "<p>\n" +
             "\t<span style=\"font-size:16px;font-family:Arial;\"><span style=\"font-size:16px;font-family:Arial;\"><span style=\"font-size:10pt;font-family:Arial;\"><span style=\"font-size:16px;\">Dear </span><span style=\"font-size:16px;color:#0000FF;\">%s</span><span style=\"font-size:10pt;\"><span style=\"font-size:16px;\">,</span><br />\n" +
-            "<span style=\"font-size:16px;\">Your PDF Technologies licenses have been updated by your organization's administrator.</span><br />\n" +
+            "<span style=\"font-size:16px;\">Your PDF Tech licenses have been updated by your organization's administrator.</span><br />\n" +
             "<span style=\"font-size:16px;\">Currently, you have licenses for the product(s) below:</span><br />\n" +
             "</span><span style=\"font-size:10pt;color:#0000FF;\"><br />\n" +
             "</span><span style=\"font-size:16px;font-weight:bold;color:#0000FF;\">%s</span></span></span></span>\n" +

+ 9 - 4
pdf-tech-core/src/main/java/cn/kdan/pdf/tech/core/service/impl/VppLicenseCodeServiceImpl.java

@@ -189,11 +189,16 @@ public class VppLicenseCodeServiceImpl implements VppLicenseCodeService {
                 String text = "";
                 String appUrl = "";
                 String userWay = "";
+                List<String> havingUseWayList = new ArrayList<>();
                 for (LicenseCodes code : codes) {
                     Products product = productService.getById(code.getProductId());
                     text = text  + String.format(CommonConstant.codeInfoTemplate,code.getCdkey(),product.getName());
                     appUrl = StringUtils.isEmpty(appUrl) ? appUrl + getAdminLink(product.getCode()) : appUrl;
-                    userWay = userWay + getProductUseWayTemplate(product.getCode());
+                    //如果不是同一个产品的序列码则添加使用方式
+                    if(!havingUseWayList.contains(product.getCode())){
+                        userWay = userWay + getProductUseWayTemplate(product.getCode(),product.getName());
+                        havingUseWayList.add(product.getCode());
+                    }
                 }
                 VppMember vppMember = vppMemberService.getById(key);
                 //用户邮箱 序列码 对应产品主页 公司超管邮箱
@@ -224,12 +229,12 @@ public class VppLicenseCodeServiceImpl implements VppLicenseCodeService {
      * @param productCode 产品code
      * @return String
      */
-    private String getProductUseWayTemplate (String productCode){
+    private String getProductUseWayTemplate (String productCode,String productName){
         if(productCode.contains("pdfreaderpro.mac")){
-            return MessageFormat.format(CommonConstant.pdfReaderProMac, ssoUrl, ssoUrl);
+            return MessageFormat.format(CommonConstant.pdfReaderProMac, productName,ssoUrl, ssoUrl);
         }
         if(productCode.contains("pdfreaderpro.windows")){
-            return MessageFormat.format(CommonConstant.pdfReaderProWindows, ssoUrl, ssoUrl);
+            return MessageFormat.format(CommonConstant.pdfReaderProWindows, productName,ssoUrl, ssoUrl);
         }
         return "";
     }