|
|
|
@ -9,6 +9,7 @@ import com.hai.common.utils.ResponseMsgUtil; |
|
|
|
|
import com.hai.common.utils.WxUtils; |
|
|
|
|
import com.hai.model.ResponseData; |
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
import org.apache.commons.collections4.MapUtils; |
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
|
import org.springframework.web.bind.annotation.RequestMethod; |
|
|
|
@ -44,19 +45,20 @@ public class QianZhuConfig { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static JSONObject getMobileToken(String platformUniqueId,String nickname,String mobile) throws Exception { |
|
|
|
|
Map<String,Object> contentMap = new HashMap<>(); |
|
|
|
|
Map<String,Object> contentMap = new LinkedHashMap<>(); |
|
|
|
|
contentMap.put("platformUniqueId", platformUniqueId); |
|
|
|
|
contentMap.put("nickname", nickname); |
|
|
|
|
contentMap.put("mobile", mobile); |
|
|
|
|
|
|
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
|
map.put("platformId", CommonSysConst.getSysConfig().getQinzhuPlatformId()); |
|
|
|
|
map.put("platformId", "10458"); |
|
|
|
|
map.put("action", "users.getTokenV2"); |
|
|
|
|
map.put("version", "1.0"); |
|
|
|
|
map.put("content", JSON.toJSONString(contentMap)); |
|
|
|
|
map.put("traceId", WxUtils.makeNonStr()); |
|
|
|
|
map.put("timestamp", new Date().getTime()); |
|
|
|
|
map.put("sign", MD5Util.encode(generateSignature(map,CommonSysConst.getSysConfig().getQinzhuSecret()).getBytes()).toLowerCase()); |
|
|
|
|
map.put("sign", MD5Util.encode(generateSignature(map,"nnl3gg4ss0pka11t").getBytes()).toLowerCase()); |
|
|
|
|
// return HttpsUtils.doPost(CommonSysConst.getSysConfig().getQinzhuMobileUrl()+"/gateway", JSON.toJSONString(map));
|
|
|
|
|
return HttpsUtils.doPost("https://live.qianzhu8.com/gateway", JSON.toJSONString(map)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|