diff --git a/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsImportServiceImpl.java b/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsImportServiceImpl.java index 3976dd6d5..73f3f3398 100644 --- a/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsImportServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsImportServiceImpl.java @@ -205,7 +205,7 @@ public class GoodsImportServiceImpl implements GoodsImportService { goodsImportDTO.setCategory(category); goodsImportDTO.setTemplate(templateId); goodsImportDTO.setGoodsUnit(objects.get(4).toString().substring(objects.get(4).toString().indexOf("-") + 1)); - goodsImportDTO.setRelease(objects.get(5).toString().equals("上架")); + goodsImportDTO.setRelease("上架".equals(objects.get(5).toString())); List goodsGalleryList = new ArrayList<>(); goodsGalleryList.add(objects.get(6).toString()); diff --git a/framework/src/main/java/cn/lili/modules/payment/kit/plugin/wechat/WechatPlugin.java b/framework/src/main/java/cn/lili/modules/payment/kit/plugin/wechat/WechatPlugin.java index 997628a1c..cd1f0bb1d 100644 --- a/framework/src/main/java/cn/lili/modules/payment/kit/plugin/wechat/WechatPlugin.java +++ b/framework/src/main/java/cn/lili/modules/payment/kit/plugin/wechat/WechatPlugin.java @@ -158,7 +158,7 @@ public class WechatPlugin implements Payment { } Config config =null; - if(setting.getPublicType().equals("CERT")){ + if("CERT".equals(setting.getPublicType())){ config=this.getCertificateConfig(setting); }else { config=this.getPublicKeyConfig(setting); @@ -221,7 +221,7 @@ public class WechatPlugin implements Payment { } Config config =null; - if(setting.getPublicType().equals("CERT")){ + if("CERT".equals(setting.getPublicType())){ config=this.getCertificateConfig(setting); }else { config=this.getPublicKeyConfig(setting); @@ -280,7 +280,7 @@ public class WechatPlugin implements Payment { } Config config =null; - if(setting.getPublicType().equals("CERT")){ + if("CERT".equals(setting.getPublicType())){ config=this.getCertificateConfig(setting); }else { config=this.getPublicKeyConfig(setting); @@ -341,7 +341,7 @@ public class WechatPlugin implements Payment { } Config config =null; - if(setting.getPublicType().equals("CERT")){ + if("CERT".equals(setting.getPublicType())){ config=this.getCertificateConfig(setting); }else { config=this.getPublicKeyConfig(setting); @@ -410,7 +410,7 @@ public class WechatPlugin implements Payment { WechatPaymentSetting setting = wechatPaymentSetting(); Config config =null; - if(setting.getPublicType().equals("CERT")){ + if("CERT".equals(setting.getPublicType())){ config=this.getCertificateConfig(setting); }else { config=this.getPublicKeyConfig(setting); @@ -511,7 +511,7 @@ public class WechatPlugin implements Payment { WechatPaymentSetting setting = wechatPaymentSetting(); Config config =null; - if(setting.getPublicType().equals("CERT")){ + if("CERT".equals(setting.getPublicType())){ config=this.getCertificateConfig(setting); }else { config=this.getPublicKeyConfig(setting); @@ -572,7 +572,7 @@ public class WechatPlugin implements Payment { WechatPaymentSetting setting = wechatPaymentSetting(); NotificationConfig config=null; - if(setting.getPublicType().equals("CERT")) { + if("CERT".equals(setting.getPublicType())){ config = new RSAAutoCertificateConfig.Builder() .merchantId(setting.getMchId()) .privateKey(setting.getApiclientKey()) @@ -631,7 +631,7 @@ public class WechatPlugin implements Payment { WechatPaymentSetting setting = wechatPaymentSetting(); Config config =null; - if(setting.getPublicType().equals("CERT")){ + if("CERT".equals(setting.getPublicType())){ config=this.getCertificateConfig(setting); }else { config=this.getPublicKeyConfig(setting); @@ -669,7 +669,7 @@ public class WechatPlugin implements Payment { WechatPaymentSetting setting = wechatPaymentSetting(); NotificationConfig config=null; - if(setting.getPublicType().equals("CERT")) { + if("CERT".equals(setting.getPublicType())){ config = new RSAAutoCertificateConfig.Builder() .merchantId(setting.getMchId()) .privateKey(setting.getApiclientKey()) @@ -756,11 +756,11 @@ public class WechatPlugin implements Payment { * @param outOrderNo 订单号 */ private void updateOrderPayNo(PayParam payParam,String outOrderNo ){ - if(payParam.getOrderType().equals("ORDER")){ + if("ORDER".equals(payParam.getOrderType())){ orderService.update(new LambdaUpdateWrapper() .eq(Order::getSn,payParam.getSn()) .set(Order::getPayOrderNo,outOrderNo)); - }else if(payParam.getOrderType().equals("TRADE")){ + }else if("TRADE".equals(payParam.getOrderType())){ orderService.update(new LambdaUpdateWrapper() .eq(Order::getTradeSn,payParam.getSn()) .set(Order::getPayOrderNo,outOrderNo)); diff --git a/framework/src/main/java/cn/lili/modules/search/serviceimpl/EsGoodsIndexServiceImpl.java b/framework/src/main/java/cn/lili/modules/search/serviceimpl/EsGoodsIndexServiceImpl.java index 01165b29b..4eef0be4a 100644 --- a/framework/src/main/java/cn/lili/modules/search/serviceimpl/EsGoodsIndexServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/search/serviceimpl/EsGoodsIndexServiceImpl.java @@ -248,9 +248,9 @@ public class EsGoodsIndexServiceImpl extends BaseElasticsearchService implements List promotionGoods = skuValidPromotions.stream() .filter(j -> (CharSequenceUtil.isNotEmpty(j.getSkuId()) && j.getSkuId().equals(goodsSku.getId())) || - (j.getScopeType().equals(PromotionsScopeTypeEnum.ALL.name()) && j.getStoreId().equals("0")) || + (j.getScopeType().equals(PromotionsScopeTypeEnum.ALL.name()) && "0".equals(j.getStoreId())) || (j.getScopeType().equals(PromotionsScopeTypeEnum.ALL.name()) && j.getStoreId().equals(esGoodsIndex.getStoreId())) || - (j.getScopeType().equals(PromotionsScopeTypeEnum.PORTION_GOODS_CATEGORY.name()) && j.getStoreId().equals("0") && j.getScopeId().contains(goodsSku.getCategoryPath()))|| + (j.getScopeType().equals(PromotionsScopeTypeEnum.PORTION_GOODS_CATEGORY.name()) && "0".equals(j.getStoreId()) && j.getScopeId().contains(goodsSku.getCategoryPath()))|| (j.getScopeType().equals(PromotionsScopeTypeEnum.PORTION_GOODS_CATEGORY.name()) && j.getStoreId().equals(goodsSku.getStoreId()) && j.getScopeId().contains(goodsSku.getCategoryPath())) ) .collect(Collectors.toList()); diff --git a/framework/src/main/java/cn/lili/modules/sms/impl/SmsUtilAliImplService.java b/framework/src/main/java/cn/lili/modules/sms/impl/SmsUtilAliImplService.java index 1f994e7e5..6747d66aa 100644 --- a/framework/src/main/java/cn/lili/modules/sms/impl/SmsUtilAliImplService.java +++ b/framework/src/main/java/cn/lili/modules/sms/impl/SmsUtilAliImplService.java @@ -123,7 +123,7 @@ public class SmsUtilAliImplService implements SmsUtil { @Override public boolean verifyCode(String mobile, VerificationEnums verificationEnums, String uuid, String code) { Object result = cache.get(cacheKey(verificationEnums, mobile, uuid)); - if (code.equals(result) || code.equals("0")) { + if (code.equals(result) || "0".equals( code)) { //校验之后,删除 cache.remove(cacheKey(verificationEnums, mobile, uuid)); return true;