|
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.fdkankan.ucenter.common.ResultData;
|
|
|
import com.fdkankan.ucenter.common.utils.AuthLicenseUtil;
|
|
|
import com.fdkankan.ucenter.util.DateUserUtil;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.joda.time.DateTime;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -36,9 +37,17 @@ public class AuthLicenseController {
|
|
|
JSONObject licenseInfo = jsonObject.getJSONObject("licenseInfo");
|
|
|
JSONObject snInfo = licenseInfo.getJSONObject("snInfo");
|
|
|
String endDate = snInfo.getStr("endDate");
|
|
|
+ String sn = snInfo.getStr("sn");
|
|
|
Date date = DateUserUtil.getDate(endDate);
|
|
|
Long days = DateUserUtil.between(date,new Date());
|
|
|
snInfo.set("expirationDays",days);
|
|
|
+ if(StringUtils.isNotBlank(sn)){
|
|
|
+ String snPassWord = "***";
|
|
|
+ if(sn.length() > 6){
|
|
|
+ snPassWord = sn.substring(0, 3) + "******" + sn.substring(sn.length()-3, sn.length());
|
|
|
+ }
|
|
|
+ snInfo.set("sn", snPassWord);
|
|
|
+ }
|
|
|
return ResultData.ok(jsonObject);
|
|
|
}
|
|
|
|