Bläddra i källkod

投票-主营产品同步

Hu Jie 7 år sedan
förälder
incheckning
465a46d34f

+ 6 - 1
src/main/java/com/uas/platform/b2c/common/vote/service/Impl/VoteServiceImpl.java

@@ -110,7 +110,12 @@ public class VoteServiceImpl implements VoteService {
         map.put("enUU", enUU);
         map.put("type", type);
         map.put("userUU", SystemSession.getUser().getUserUU());
-        map.put("enDes", enterprise.getEnBusinessScope() == null ? "" :  enterprise.getEnBusinessScope());
+        List<StoreIn> list = storeInDao.findByEnUU(enUU);
+        String des = null;
+        if (!CollectionUtils.isEmpty(list)) {
+            des = list.get(0).getDescription();
+        }
+        map.put("enDes", des == null ? "" :  des);
         map.put("enName", enterprise.getEnName());
         map.put("userName", SystemSession.getUser().getUserName());
         List<StoreIn> storeIns = storeInDao.findByEnUU(enUU);

+ 11 - 0
src/main/java/com/uas/platform/b2c/prod/store/facade/impl/StoreInFacadeImpl.java

@@ -12,12 +12,15 @@ import com.uas.platform.b2c.prod.store.service.QualificationService;
 import com.uas.platform.b2c.prod.store.service.StoreInService;
 import com.uas.platform.b2c.trade.support.CodeType;
 import com.uas.platform.b2c.trade.support.ResultMap;
+import com.uas.ps.core.util.HttpUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 import org.springframework.util.StringUtils;
 
+import java.util.HashMap;
 import java.util.Iterator;
+import java.util.Map;
 import java.util.Set;
 
 /**
@@ -96,6 +99,14 @@ public class StoreInFacadeImpl implements StoreInFacade {
             enterpriseDao.save(enter);
         }
         store = storeInDao.save(store);
+		Map<String,Object> map = new HashMap<>(2);
+		map.put("enUU", store.getEnUU());
+		map.put("des", store.getDescription() == null ? "" : store.getDescription());
+		try {
+			HttpUtil.sendPostRequest("http://192.168.253.3:28888/vote/des" ,map);
+		} catch (Exception e) {
+			System.out.println(e.getMessage());
+		}
 		Set<Qualification> qualificationsSort = storeInService.getQualificationsSort();
 		Set<Qualification> qualificationsPo= store.getQualifications();
 		qualificationsSort.addAll(qualificationsPo);