Browse Source

[商户][修改][封面图选取一张存储到imgurl]

release_toaliyun_real
gongbiao 7 years ago
parent
commit
2ba3720e1c
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java

+ 9
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java View File

@@ -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<String> 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<String> 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);


Loading…
Cancel
Save