|
|
@@ -5,6 +5,8 @@ import com.uas.platform.b2c.common.account.dao.EnterpriseDao;
|
|
|
import com.uas.platform.b2c.common.account.model.Enterprise;
|
|
|
import com.uas.platform.b2c.common.vote.service.VoteService;
|
|
|
import com.uas.platform.b2c.core.support.SystemSession;
|
|
|
+import com.uas.platform.b2c.prod.store.dao.StoreInDao;
|
|
|
+import com.uas.platform.b2c.prod.store.model.StoreIn;
|
|
|
import com.uas.platform.b2c.trade.support.CodeType;
|
|
|
import com.uas.platform.b2c.trade.support.ResultMap;
|
|
|
import com.uas.ps.core.page.PageParams;
|
|
|
@@ -14,8 +16,10 @@ import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
@@ -54,6 +58,9 @@ public class VoteServiceImpl implements VoteService {
|
|
|
@Autowired
|
|
|
EnterpriseDao enterpriseDao;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ StoreInDao storeInDao;
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public ResultMap getEnterprise(Long enUU) {
|
|
|
@@ -106,7 +113,15 @@ public class VoteServiceImpl implements VoteService {
|
|
|
map.put("enDes", enterprise.getEnBusinessScope() == null ? "" : enterprise.getEnBusinessScope());
|
|
|
map.put("enName", enterprise.getEnName());
|
|
|
map.put("userName", SystemSession.getUser().getUserName());
|
|
|
- map.put("pic", enterprise.getEnLogoUrl() == null ? "" : enterprise.getEnLogoUrl());
|
|
|
+ List<StoreIn> storeIns = storeInDao.findByEnUU(enUU);
|
|
|
+ String pic = null;
|
|
|
+ if (!CollectionUtils.isEmpty(storeIns)) {
|
|
|
+ pic = storeIns.get(0).getLogoUrl();
|
|
|
+ }
|
|
|
+ if (StringUtils.isEmpty(pic)) {
|
|
|
+ pic = enterprise.getEnLogoUrl();
|
|
|
+ }
|
|
|
+ map.put("pic", pic == null ? "https://dfs.ubtob.com/group1/M00/D4/6B/CgpkyFu9ukGALenLAABBRFsnR7A246.png" : pic);
|
|
|
ResultMap result = new ResultMap(CodeType.ERROR, "请求失败");
|
|
|
try {
|
|
|
HttpUtil.Response response = HttpUtil.sendPostRequest(URL + APPLYURL, map);
|