From 2ba3720e1c1231bf99bd40f91c445c294b0aba06 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Thu, 25 Apr 2019 21:17:51 +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=80=89=E5=8F=96=E4=B8=80=E5=BC=A0?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E5=88=B0imgurl]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/service/impl/WxMerchantServiceImpl.java | 9 +++++++++ 1 file changed, 9 insertions(+) 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 25559d9fd..267892459 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; @@ -338,6 +339,10 @@ public class WxMerchantServiceImpl implements WxMerchantService { wxMerchant.setStatus(EnumMerchantStatus.VALID.getCode()); wxMerchant.setUpdateDate(date); wxMerchant.setCreateDate(date); + List coverPicture = JSONArray.parseArray(wxMerchant.getCoverPicture(), String.class); + if (!coverPicture.isEmpty()) { + wxMerchant.setImgUrl(coverPicture.get(0)); + } wxMerchantMapper.insertSelective(wxMerchant); //关联合同 @@ -385,6 +390,10 @@ public class WxMerchantServiceImpl implements WxMerchantService { return new ResultData(ErrorCode.MERCHANT_INFO_NOT_FOUND); } //更新商户 + List coverPicture = JSONArray.parseArray(wxMerchant.getCoverPicture(), String.class); + if (!coverPicture.isEmpty()) { + wxMerchant.setImgUrl(coverPicture.get(0)); + } Date date = new Date(); wxMerchant.setUpdateDate(date); wxMerchantMapper.updateByPrimaryKeySelective(wxMerchant);