Browse Source

[商户][修改]:coverPicture兼容性问题

release_toaliyun_real
Stormeye Wu 7 years ago
parent
commit
0dc22ee016
1 changed files with 11 additions and 3 deletions
  1. +11
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java

+ 11
- 3
mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java View File

@@ -366,9 +366,17 @@ public class WxMerchantServiceImpl implements WxMerchantService {
wxMerchant.setStatus(EnumMerchantStatus.VALID.getCode());
wxMerchant.setUpdateDate(date);
wxMerchant.setCreateDate(date);
List<String> coverPicture = JSONArray.parseArray(wxMerchant.getCoverPicture(), String.class);
if (!coverPicture.isEmpty()) {
wxMerchant.setImgUrl(coverPicture.get(0));
if(StringUtils.isNotBlank(wxMerchant.getCoverPicture())) {
List<String> coverPicture = JSONArray.parseArray(wxMerchant.getCoverPicture(), String.class);
if (!coverPicture.isEmpty()) {
wxMerchant.setImgUrl(coverPicture.get(0));
}
} else {
if(StringUtils.isNotBlank(wxMerchant.getImgUrl())) {
List<String> strList = new ArrayList<String>();
strList.add(wxMerchant.getImgUrl());
wxMerchant.setCoverPicture(JSONArray.toJSONString(strList));
}
}
wxMerchantMapper.insertSelective(wxMerchant);



Loading…
Cancel
Save