Showing
1 changed file
with
6 additions
and
8 deletions
@@ -126,6 +126,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | @@ -126,6 +126,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | ||
126 | @Value("${ip.port.uic.server}") | 126 | @Value("${ip.port.uic.server}") |
127 | private String uicServerIpAndPort; | 127 | private String uicServerIpAndPort; |
128 | 128 | ||
129 | + private static final String UIC_GETPROFILE_URL = "/uic/profile/getProfile"; | ||
129 | 130 | ||
130 | public Map<String, Integer> getCountByJudgeStatus(BuyerOrderReq req){ | 131 | public Map<String, Integer> getCountByJudgeStatus(BuyerOrderReq req){ |
131 | List<Byte> toBeJudgedList = Lists.newArrayList(); | 132 | List<Byte> toBeJudgedList = Lists.newArrayList(); |
@@ -550,12 +551,9 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | @@ -550,12 +551,9 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | ||
550 | 551 | ||
551 | private String getMobileByUid(Integer uid) { | 552 | private String getMobileByUid(Integer uid) { |
552 | LOGGER.info("call getMobileByUid uid is{}", uid); | 553 | LOGGER.info("call getMobileByUid uid is{}", uid); |
553 | - String url = "/uic/profile/getProfile"; | ||
554 | Map<String,Integer> request = Collections.singletonMap("uid", uid); | 554 | Map<String,Integer> request = Collections.singletonMap("uid", uid); |
555 | - JSONObject jsonObject = serviceCaller.get("uic.getProfileAction", "http://" + uicServerIpAndPort + url, request, JSONObject.class, null).get(1); | 555 | + JSONObject jsonObject = serviceCaller.get("uic.getProfileAction", "http://" + uicServerIpAndPort + UIC_GETPROFILE_URL, request, JSONObject.class, null).get(1); |
556 | 556 | ||
557 | -// Map<String,Integer> request = Collections.singletonMap("uid", uid); | ||
558 | -// JSONObject jsonObject = serviceCaller.getcall("uic.getProfileAction", request, JSONObject.class); | ||
559 | if(null == jsonObject.getJSONObject("data") || null == jsonObject.getJSONObject("data").getString("mobile_phone")) { | 557 | if(null == jsonObject.getJSONObject("data") || null == jsonObject.getJSONObject("data").getString("mobile_phone")) { |
560 | return null; | 558 | return null; |
561 | } | 559 | } |
@@ -565,7 +563,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | @@ -565,7 +563,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | ||
565 | 563 | ||
566 | private Integer getUidByMobile(String mobile) { | 564 | private Integer getUidByMobile(String mobile) { |
567 | Map<String,String> request = Collections.singletonMap("account", mobile); | 565 | Map<String,String> request = Collections.singletonMap("account", mobile); |
568 | - JSONObject jsonObject = serviceCaller.getcall("uic.getProfileAction", request, JSONObject.class); | 566 | + JSONObject jsonObject = serviceCaller.get("uic.getProfileAction", "http://" + uicServerIpAndPort + UIC_GETPROFILE_URL, request, JSONObject.class, null).get(1); |
569 | if(null == jsonObject.getJSONObject("data") || null == jsonObject.getJSONObject("data").getInteger("uid")) { | 567 | if(null == jsonObject.getJSONObject("data") || null == jsonObject.getJSONObject("data").getInteger("uid")) { |
570 | return null; | 568 | return null; |
571 | } | 569 | } |
@@ -574,9 +572,9 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | @@ -574,9 +572,9 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | ||
574 | } | 572 | } |
575 | 573 | ||
576 | private String getUserNameByUid(Integer uid) { | 574 | private String getUserNameByUid(Integer uid) { |
577 | - UserProfileReqBO userReq = new UserProfileReqBO(); | ||
578 | - userReq.setUid(uid); | ||
579 | - JSONObject jsonObject = serviceCaller.call("uic.getUserProfile", userReq, JSONObject.class); | 575 | + Map<String,Integer> request = Collections.singletonMap("uid", uid); |
576 | + JSONObject jsonObject = serviceCaller.get("uic.getProfileAction", "http://" + uicServerIpAndPort + UIC_GETPROFILE_URL, request, JSONObject.class, null).get(1); | ||
577 | + | ||
580 | if(null != jsonObject.getJSONObject("data") && null != jsonObject.getJSONObject("data").getInteger("profile_name")) { | 578 | if(null != jsonObject.getJSONObject("data") && null != jsonObject.getJSONObject("data").getInteger("profile_name")) { |
581 | return jsonObject.getJSONObject("data").getString("profile_name"); | 579 | return jsonObject.getJSONObject("data").getString("profile_name"); |
582 | } | 580 | } |
-
Please register or login to post a comment