From d2f0805eeedfbc47c84230da57846bd4319daf72 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Thu, 30 May 2019 09:54:04 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=95=86=E6=88=B7][=E4=BF=AE=E6=94=B9][?= =?UTF-8?q?=E5=B0=81=E9=9D=A2=E5=9B=BE=E9=97=AE=E9=A2=98]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WxMerchantServiceImpl.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java index f892e1e86..f8ab470f2 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java @@ -1,5 +1,6 @@ package com.iformall.service.impl; +import com.alibaba.fastjson.JSONArray; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.iformall.common.ErrorCode; @@ -365,7 +366,18 @@ public class WxMerchantServiceImpl implements WxMerchantService { wxMerchant.setStatus(EnumMerchantStatus.VALID.getCode()); wxMerchant.setUpdateDate(date); wxMerchant.setCreateDate(date); - + if (StringUtils.isNotBlank(wxMerchant.getCoverPicture())) { + List coverPicture = JSONArray.parseArray(wxMerchant.getCoverPicture(), String.class); + if (!coverPicture.isEmpty()) { + wxMerchant.setImgUrl(coverPicture.get(0)); + } + } else { + if (StringUtils.isNotBlank(wxMerchant.getImgUrl())) { + List strList = new ArrayList(); + strList.add(wxMerchant.getImgUrl()); + wxMerchant.setCoverPicture(JSONArray.toJSONString(strList)); + } + } wxMerchantMapper.insertSelective(wxMerchant); //关联合同