Authored by mali

根据手机号查询uid

... ... @@ -56,4 +56,16 @@ public class StoredSellerController {
String result = billsTradeService.getMobileByUidFromCache(req.getUid());
return new ApiResponse.ApiResponseBuilder().code(200).message("查询成功").data(result).build();
}
/**
* 根据手机号查询uid
* @param req
* @return
*/
@RequestMapping(value = "/getUidByMobile")
public ApiResponse getUidByMobile(StoredSellerReqVo req) {
LOGGER.info("getUidByMobile in. req is {}", req);
Integer result = billsTradeService.getUidByMobile(req.getMobile());
return new ApiResponse.ApiResponseBuilder().code(200).message("查询成功").data(result).build();
}
}
... ...
... ... @@ -33,4 +33,11 @@ public interface ITradeBillsService {
* @return
*/
String getMobileByUidFromCache(Integer uid);
/**
* 根据手机号查询uid
* @param mobile
* @return
*/
Integer getUidByMobile(String mobile);
}
... ...
... ... @@ -327,7 +327,7 @@ public class TradeBillsServiceImpl implements ITradeBillsService {
return "";
}
private Integer getUidByMobile(String mobile) {
public Integer getUidByMobile(String mobile) {
Map<String,String> request = Collections.singletonMap("account", mobile);
JSONObject jsonObject = serviceCaller.get("uic.getProfileAction", "http://" + uicServerIpAndPort + UIC_GETPROFILE_URL, request, JSONObject.class, null).get(1);
if(null == jsonObject.getJSONObject("data") || null == jsonObject.getJSONObject("data").getInteger("uid")) {
... ...
... ... @@ -23,6 +23,7 @@
<value>updateVideoUrl</value>
<value>queryVideoInfo</value>
<value>getMobileByUid</value>
<value>getUidByMobile</value>
</list>
</property>
</bean>
... ...