Commit e62aba11 authored by 陈家荣's avatar 陈家荣

去掉channel code存在的小数点

parent 1abe7674
...@@ -426,7 +426,7 @@ public class KolonMemberServiceImpl implements KolonMemberService { ...@@ -426,7 +426,7 @@ public class KolonMemberServiceImpl implements KolonMemberService {
}else{ }else{
MongoPiShop mongoPiShop = mongoPiShopRepository.findFirstById(shopId); MongoPiShop mongoPiShop = mongoPiShopRepository.findFirstById(shopId);
if(Util.isNotNull(mongoPiShop)){ if(Util.isNotNull(mongoPiShop)){
channelCode = mongoPiShop.shopCode; channelCode = Util.trimDecimal(mongoPiShop.shopCode);
}else{ }else{
LOGGER.warn("kolon获取门店编号出错,没有找到ID为【"+shopId+"】门店"); LOGGER.warn("kolon获取门店编号出错,没有找到ID为【"+shopId+"】门店");
} }
......
...@@ -60,4 +60,16 @@ public class Util { ...@@ -60,4 +60,16 @@ public class Util {
} }
return dateFormat.format(date); return dateFormat.format(date);
} }
/**
* 去掉小数点
* @param shopCode
* @return
*/
public static String trimDecimal(String shopCode){
if(isNotNull(shopCode) && shopCode.contains(".0")){
shopCode = shopCode.substring(0, shopCode.lastIndexOf(".0"));
}
return shopCode;
}
} }
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