Commit 76e87203 by guojuxing

LicenseCode调整

parent 9e20f8a4
......@@ -8,6 +8,7 @@ import com.gic.authcenter.security.core.constant.DataResourceEnum;
import com.gic.authcenter.security.core.dto.AuthcenterUserDetails;
import com.gic.enterprise.constants.Constants;
import com.gic.enterprise.dto.*;
import com.gic.enterprise.utils.LicenseUtils;
import com.gic.marketing.api.service.sms.SmsOuterApiService;
import com.gic.member.config.api.dto.OwnerMemberCardDTO;
import com.gic.member.config.api.service.MemberCardApiService;
......@@ -203,17 +204,18 @@ public class EnterpriseController {
listResult.forEach(e -> {
List<ApplicationLicenseDTO> tempLicense = licenseMap.get(Long.valueOf(e.getEnterpriseId()));
if (CollectionUtils.isNotEmpty(tempLicense)) {
Set<String> licenseCodeSet = new HashSet<>(Arrays.asList("165165", "member_card", "wxapp", "wxfwh"));
Set<String> licenseCodeSet = new HashSet<>(Arrays.asList(LicenseUtils.STORE_LICENSE_CODE,
LicenseUtils.MEMBER_CARD_LICENSE_CODE, LicenseUtils.WECHAT_LICENSE_CODE, LicenseUtils.SERVICE_CARD_LICENSE_CODE));
Map<String, Integer> showLicenseMap = new HashMap<>(8);
tempLicense.forEach(license -> {
if (licenseCodeSet.contains(license.getLicenseCode())) {
showLicenseMap.put(license.getLicenseCode(), license.getQuantity());
}
});
Integer memberCardNum = showLicenseMap.get("member_card") == null ? 0 : showLicenseMap.get("member_card");
Integer wxfwhNum = showLicenseMap.get("wxfwh") == null ? 0 : showLicenseMap.get("wxfwh");
Integer wxappNum = showLicenseMap.get("wxapp") == null ? 0 : showLicenseMap.get("wxapp");
Integer storeNum = showLicenseMap.get("165165") == null ? 0 : showLicenseMap.get("165165");
Integer memberCardNum = showLicenseMap.get(LicenseUtils.MEMBER_CARD_LICENSE_CODE) == null ? 0 : showLicenseMap.get(LicenseUtils.MEMBER_CARD_LICENSE_CODE);
Integer wxfwhNum = showLicenseMap.get(LicenseUtils.SERVICE_CARD_LICENSE_CODE) == null ? 0 : showLicenseMap.get(LicenseUtils.SERVICE_CARD_LICENSE_CODE);
Integer wxappNum = showLicenseMap.get(LicenseUtils.WECHAT_LICENSE_CODE) == null ? 0 : showLicenseMap.get(LicenseUtils.WECHAT_LICENSE_CODE);
Integer storeNum = showLicenseMap.get(LicenseUtils.STORE_LICENSE_CODE) == null ? 0 : showLicenseMap.get(LicenseUtils.STORE_LICENSE_CODE);
e.setServiceInfo(memberCardNum + "-" + wxfwhNum + "-" + wxappNum + "-" + storeNum);
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment