/**
* 發(fā)送站內(nèi)信
*/
@Permission(Module.TZGL)
@RequestMapping(value = "/sendznx", method = RequestMethod.POST)
@ResponseBody
public String sendZnx(HttpSession session, Model model,
? ? ? ? ? ? ? ? ? @RequestParam(defaultValue = "") String[] userList,
? ? ? ? ? ? ? ? ? @RequestParam(defaultValue = "") String content) throws Exception {
? ?int rows = 0; ? ? ? //記錄發(fā)送數(shù)量
? ?String msg = ""; ? ?//記錄返回信息
? ?System.out.println("length--->"+userList.length);
? ?System.out.println("content--->"+content);
? ?try{
? ? ? ?if(userList.length == 0){ ? ? ? ? ? ? ? ? ? ? ? ? ? //給全體成員發(fā)送系統(tǒng)通知
? ? ? ? ? ?//全體成員發(fā)送
? ? ? ? ? ?try{
? ? ? ? ? ? ? ?String result = Jsoup.connect(NMApi.url() + "/message/userlist").timeout(10000)
? ? ? ? ? ? ? ? ? ? ? ?.get()
? ? ? ? ? ? ? ? ? ? ? ?.text();
? ? ? ? ? ? ? ?//--->使用Gson把請求回來的數(shù)據(jù)轉(zhuǎn)成MAP結(jié)構(gòu)
? ? ? ? ? ? ? ?Map data = new Gson().fromJson(result,new TypeToken