| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.zy.common.utils.HttpHandler; |
| | | import com.zy.system.entity.LicenseInfos; |
| | | import com.zy.system.entity.license.*; |
| | |
| | | response = requestRemoteLicense(buildLegacyPayload(serverInfos)); |
| | | } |
| | | if (isSuccess(response)) { |
| | | String licenseTime = response.getString("licenseTime"); |
| | | |
| | | long count = licenseInfosService.count(new QueryWrapper<LicenseInfos>() |
| | | .eq("request_code", requestCode) |
| | | .eq("license_time", licenseTime) |
| | | ); |
| | | if (count > 1) { |
| | | return; |
| | | } |
| | | |
| | | LicenseInfos licenseInfos = new LicenseInfos(); |
| | | licenseInfos.setLicense(response.getString("data")); |
| | | licenseInfos.setCreateTime(new Date()); |