瀏覽代碼

相同用户登录,踢掉之前登录的用户

shilin 4 年之前
父節點
當前提交
236987fc11

+ 9 - 0
src/main/java/com/gyee/frame/common/conf/UserLoginContext.java

@@ -0,0 +1,9 @@
+package com.gyee.frame.common.conf;
+
+import java.util.concurrent.ConcurrentHashMap;
+
+public class UserLoginContext
+{
+    public static ConcurrentHashMap<String, String> userLoginMap = new ConcurrentHashMap();
+	
+}

+ 101 - 0
src/main/java/com/gyee/frame/controller/gen/ChatDetailController.java

@@ -0,0 +1,101 @@
+package com.gyee.frame.controller.gen;
+
+
+import com.gyee.frame.model.auto.ChatDetail;
+import com.gyee.frame.model.auto.Gyeeuser;
+import com.gyee.frame.model.custom.DatasVo;
+import com.gyee.frame.service.ChatDetailService;
+import com.gyee.frame.service.GyeeuserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 用户Controller
+ * @ClassName: UserController
+ * @author gyee
+ * @date 2019-11-20 22:35
+ */
+
+@Controller
+@RequestMapping("/chatDetailController")
+public class ChatDetailController {
+
+
+    @Autowired
+    private ChatDetailService chatDetailService;
+    @Autowired
+    private GyeeuserService gyeeuserService;
+
+    @GetMapping("/selectByUserId")
+    @ResponseBody
+    public List<DatasVo> selectByUserId(String send, String receive) {
+
+        List<ChatDetail> result=chatDetailService.selectByUserId(send,receive);
+        List<DatasVo> ls=new ArrayList<>();
+        if(!result.isEmpty())
+        {
+            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            for(ChatDetail po:result)
+            {
+                DatasVo vo=new DatasVo();
+                vo.setSend(po.getSendingid());
+                vo.setReceive(po.getPointtoid());
+                vo.setContent(po.getChatcontent());
+                vo.setType(po.getChattypes());
+                vo.setTime(dateFormat.format(po.getChattime()));
+                ls.add(vo);
+            }
+        }
+        return  ls;
+    }
+
+    @GetMapping("/selectLastInfoByUserId")
+    @ResponseBody
+    public List<DatasVo> selectLastInfoByUserId(String userid) {
+
+        List<ChatDetail>vos=new ArrayList<>();
+        List<Gyeeuser> results=gyeeuserService.findUserlist();
+        if(!results.isEmpty())
+        {
+            for(Gyeeuser user:results)
+            {
+               if(!user.getId().equals(userid))
+               {
+                   List<ChatDetail> result=chatDetailService.selectLastInfoByUserId(userid,user.getId());
+                   if(!result.isEmpty())
+                   {
+                       if(result.get(0).getChattypes().equals("pic"))
+                       {
+                           result.get(0).setChatcontent("");
+                       }
+                       vos.add(result.get(0));
+                   }
+               }
+            }
+        }
+        List<DatasVo> ls=new ArrayList<>();
+        if(!vos.isEmpty())
+        {
+            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            for(ChatDetail po:vos)
+            {
+                DatasVo vo=new DatasVo();
+                vo.setSend(po.getSendingid());
+                vo.setReceive(po.getPointtoid());
+                vo.setContent(po.getChatcontent());
+                vo.setType(po.getChattypes());
+                vo.setTime(dateFormat.format(po.getChattime()));
+                ls.add(vo);
+            }
+        }
+        return  ls;
+    }
+
+}

+ 12 - 0
src/main/java/com/gyee/frame/controller/gen/GyeeorganController.java

@@ -60,6 +60,18 @@ public class GyeeorganController extends BaseController{
 			return AjaxResult.successData(200, list);
 		}
 	}
+
+	@GetMapping("/gyeeOrganAll")
+	@ResponseBody
+	public AjaxResult gyeeOrganAll(){
+		List<Gyeeorgan> list=gyeeorganService.gyeeOrganAll();
+		if(list.isEmpty()){
+			return AjaxResult.error(500, "无法获取风场权限");
+
+		}else{
+			return AjaxResult.successData(200, list);
+		}
+	}
 	
 	
 	//@Log(title = "集合查询", action = "111")

+ 75 - 2
src/main/java/com/gyee/frame/controller/gen/GyeeuserController.java

@@ -1,8 +1,10 @@
 package com.gyee.frame.controller.gen;
 
 import com.github.pagehelper.PageInfo;
+import com.gyee.frame.common.conf.UserLoginContext;
 import com.gyee.frame.common.domain.AjaxResult;
 import com.gyee.frame.model.auto.Gyeeuser;
+import com.gyee.frame.model.custom.OnlineVo;
 import com.gyee.frame.model.custom.TableSplitResult;
 import com.gyee.frame.model.custom.Tablepar;
 import com.gyee.frame.model.custom.TitleVo;
@@ -17,8 +19,7 @@ import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 @Controller
 @RequestMapping("GyeeuserController")
@@ -59,6 +60,22 @@ public class GyeeuserController extends SocketToolController{
 		gyeeuser.setPassword(password);
 		String id=gyeeuserService.queryIdByUserNamePassWord(gyeeuser);
 		if(id!=""&&id!=null){
+
+
+
+
+			if(UserLoginContext.userLoginMap.containsKey(id))
+			{
+
+
+				this.pushToWeb("pageNumber_4","functionNumber_5",id,"loginout", Messagetype.MESSAGE);
+
+
+			}else {
+				StringBuilder sb=new StringBuilder();
+				UserLoginContext.userLoginMap.put(id,id);
+			}
+
 			return AjaxResult.successData(200, id);
 			
 		}else{			
@@ -66,6 +83,13 @@ public class GyeeuserController extends SocketToolController{
 		}
 	}
 
+	@GetMapping("/selectUserList")
+	@ResponseBody
+	public List<Gyeeuser> selectUserList() {
+
+		List<Gyeeuser> result=gyeeuserService.findUserlist();
+		return  result;
+	}
 	@PostMapping("/selectUserList")
 	@ResponseBody
 	public List<Gyeeuser> selectUserList(@RequestBody Map<String,String> map) {
@@ -88,6 +112,55 @@ public class GyeeuserController extends SocketToolController{
 
 		return  result;
 	}
+
+	@PostMapping("/onlineUserMap")
+	@ResponseBody
+	public Map<String,List<String>> onlineUserMap(@RequestBody Map<String,String> map) {
+
+
+		Map<String,List<String>> onlinemap=new HashMap<>();
+
+		List<OnlineVo> onlinevolist=new ArrayList<>();
+
+		if(null !=map && !map.isEmpty())
+		{
+			Set<Map.Entry<String, String>> set = map.entrySet();
+			for (Iterator<Map.Entry<String, String>> it = set.iterator(); it.hasNext();) {
+				Map.Entry<String, String> entry = (Map.Entry<String, String>) it.next();
+				//System.out.println(entry.getKey() + "--->" + entry.getValue());
+
+				String key = entry.getKey().substring(0, entry.getKey().indexOf("->"));
+
+				String end = entry.getKey().substring(entry.getKey().indexOf("->")+2);
+
+				if (onlinemap.containsKey(key)) {
+					List<String> ls = onlinemap.get(key);
+					ls.add(end);
+					onlinemap.put(key, ls);
+				} else {
+					List<String> ls = new ArrayList<>();
+					ls.add(end);
+					onlinemap.put(key, ls);
+				}
+			}
+
+			Set<Map.Entry<String, List<String>>> set2 = onlinemap.entrySet();
+			for (Iterator<Map.Entry<String, List<String>>> it2 = set2.iterator(); it2.hasNext();) {
+				Map.Entry<String, List<String>> entry2 = (Map.Entry<String, List<String>>) it2.next();
+				//System.out.println(entry.getKey() + "--->" + entry.getValue());
+
+				OnlineVo vo=new OnlineVo();
+				vo.setId(entry2.getKey());
+				vo.setUserlist(entry2.getValue());
+				onlinevolist.add(vo);
+			}
+		}
+
+
+		this.pushToWeb("pageNumber_4","functionNumber_4","all",onlinevolist, Messagetype.MESSAGE);
+
+		return  onlinemap;
+	}
 	
 	//@Log(title = "集合查询", action = "111")
 	@PostMapping("list")

+ 102 - 0
src/main/java/com/gyee/frame/mapper/auto/ChatDetailMapper.java

@@ -0,0 +1,102 @@
+package com.gyee.frame.mapper.auto;
+
+
+import com.gyee.frame.model.auto.ChatDetail;
+import com.gyee.frame.model.auto.ChatDetailExample;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface ChatDetailMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table chatdetail
+     *
+     * @mbg.generated
+     */
+    long countByExample(ChatDetailExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table chatdetail
+     *
+     * @mbg.generated
+     */
+    int deleteByExample(ChatDetailExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table chatdetail
+     *
+     * @mbg.generated
+     */
+    int deleteByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table chatdetail
+     *
+     * @mbg.generated
+     */
+    int insert(ChatDetail record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table chatdetail
+     *
+     * @mbg.generated
+     */
+    int insertSelective(ChatDetail record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table chatdetail
+     *
+     * @mbg.generated
+     */
+    List<ChatDetail> selectByExample(ChatDetailExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table chatdetail
+     *
+     * @mbg.generated
+     */
+    ChatDetail selectByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table chatdetail
+     *
+     * @mbg.generated
+     */
+    int updateByExampleSelective(@Param("record") ChatDetail record, @Param("example") ChatDetailExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table chatdetail
+     *
+     * @mbg.generated
+     */
+    int updateByExample(@Param("record") ChatDetail record, @Param("example") ChatDetailExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table chatdetail
+     *
+     * @mbg.generated
+     */
+    int updateByPrimaryKeySelective(ChatDetail record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table chatdetail
+     *
+     * @mbg.generated
+     */
+    int updateByPrimaryKey(ChatDetail record);
+
+    List<ChatDetail> selectByUserId(@Param("sendingid") String sendingid, @Param("pointtoid") String pointtoid);
+
+    List<ChatDetail> selectLastInfoByUserId(@Param("sendingid") String sendingid, @Param("pointtoid") String pointtoid);
+}

+ 476 - 0
src/main/java/com/gyee/frame/model/auto/ChatDetail.java

@@ -0,0 +1,476 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class ChatDetail implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column chatdetail.id
+     *
+     * @mbg.generated
+     */
+    private Integer id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column chatdetail.sendingid
+     *
+     * @mbg.generated
+     */
+    private String sendingid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column chatdetail.sendingname
+     *
+     * @mbg.generated
+     */
+    private String sendingname;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column chatdetail.chattime
+     *
+     * @mbg.generated
+     */
+    private Date chattime;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column chatdetail.pointto
+     *
+     * @mbg.generated
+     */
+    private String pointto;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column chatdetail.pointtoid
+     *
+     * @mbg.generated
+     */
+    private String pointtoid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column chatdetail.chattypes
+     *
+     * @mbg.generated
+     */
+    private String chattypes;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column chatdetail.chatcontent
+     *
+     * @mbg.generated
+     */
+    private String chatcontent;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column chatdetail.remark1
+     *
+     * @mbg.generated
+     */
+    private String remark1;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column chatdetail.remark2
+     *
+     * @mbg.generated
+     */
+    private String remark2;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column chatdetail.remark3
+     *
+     * @mbg.generated
+     */
+    private String remark3;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column chatdetail.numericdate
+     *
+     * @mbg.generated
+     */
+    private Long numericdate;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column chatdetail.sendingip
+     *
+     * @mbg.generated
+     */
+    private String sendingip;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column chatdetail.receiveip
+     *
+     * @mbg.generated
+     */
+    private String receiveip;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table chatdetail
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column chatdetail.id
+     *
+     * @return the value of chatdetail.id
+     *
+     * @mbg.generated
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column chatdetail.id
+     *
+     * @param id the value for chatdetail.id
+     *
+     * @mbg.generated
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column chatdetail.sendingid
+     *
+     * @return the value of chatdetail.sendingid
+     *
+     * @mbg.generated
+     */
+    public String getSendingid() {
+        return sendingid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column chatdetail.sendingid
+     *
+     * @param sendingid the value for chatdetail.sendingid
+     *
+     * @mbg.generated
+     */
+    public void setSendingid(String sendingid) {
+        this.sendingid = sendingid == null ? null : sendingid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column chatdetail.sendingname
+     *
+     * @return the value of chatdetail.sendingname
+     *
+     * @mbg.generated
+     */
+    public String getSendingname() {
+        return sendingname;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column chatdetail.sendingname
+     *
+     * @param sendingname the value for chatdetail.sendingname
+     *
+     * @mbg.generated
+     */
+    public void setSendingname(String sendingname) {
+        this.sendingname = sendingname == null ? null : sendingname.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column chatdetail.chattime
+     *
+     * @return the value of chatdetail.chattime
+     *
+     * @mbg.generated
+     */
+    public Date getChattime() {
+        return chattime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column chatdetail.chattime
+     *
+     * @param chattime the value for chatdetail.chattime
+     *
+     * @mbg.generated
+     */
+    public void setChattime(Date chattime) {
+        this.chattime = chattime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column chatdetail.pointto
+     *
+     * @return the value of chatdetail.pointto
+     *
+     * @mbg.generated
+     */
+    public String getPointto() {
+        return pointto;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column chatdetail.pointto
+     *
+     * @param pointto the value for chatdetail.pointto
+     *
+     * @mbg.generated
+     */
+    public void setPointto(String pointto) {
+        this.pointto = pointto == null ? null : pointto.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column chatdetail.pointtoid
+     *
+     * @return the value of chatdetail.pointtoid
+     *
+     * @mbg.generated
+     */
+    public String getPointtoid() {
+        return pointtoid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column chatdetail.pointtoid
+     *
+     * @param pointtoid the value for chatdetail.pointtoid
+     *
+     * @mbg.generated
+     */
+    public void setPointtoid(String pointtoid) {
+        this.pointtoid = pointtoid == null ? null : pointtoid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column chatdetail.chattypes
+     *
+     * @return the value of chatdetail.chattypes
+     *
+     * @mbg.generated
+     */
+    public String getChattypes() {
+        return chattypes;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column chatdetail.chattypes
+     *
+     * @param chattypes the value for chatdetail.chattypes
+     *
+     * @mbg.generated
+     */
+    public void setChattypes(String chattypes) {
+        this.chattypes = chattypes == null ? null : chattypes.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column chatdetail.chatcontent
+     *
+     * @return the value of chatdetail.chatcontent
+     *
+     * @mbg.generated
+     */
+    public String getChatcontent() {
+        return chatcontent;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column chatdetail.chatcontent
+     *
+     * @param chatcontent the value for chatdetail.chatcontent
+     *
+     * @mbg.generated
+     */
+    public void setChatcontent(String chatcontent) {
+        this.chatcontent = chatcontent == null ? null : chatcontent.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column chatdetail.remark1
+     *
+     * @return the value of chatdetail.remark1
+     *
+     * @mbg.generated
+     */
+    public String getRemark1() {
+        return remark1;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column chatdetail.remark1
+     *
+     * @param remark1 the value for chatdetail.remark1
+     *
+     * @mbg.generated
+     */
+    public void setRemark1(String remark1) {
+        this.remark1 = remark1 == null ? null : remark1.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column chatdetail.remark2
+     *
+     * @return the value of chatdetail.remark2
+     *
+     * @mbg.generated
+     */
+    public String getRemark2() {
+        return remark2;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column chatdetail.remark2
+     *
+     * @param remark2 the value for chatdetail.remark2
+     *
+     * @mbg.generated
+     */
+    public void setRemark2(String remark2) {
+        this.remark2 = remark2 == null ? null : remark2.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column chatdetail.remark3
+     *
+     * @return the value of chatdetail.remark3
+     *
+     * @mbg.generated
+     */
+    public String getRemark3() {
+        return remark3;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column chatdetail.remark3
+     *
+     * @param remark3 the value for chatdetail.remark3
+     *
+     * @mbg.generated
+     */
+    public void setRemark3(String remark3) {
+        this.remark3 = remark3 == null ? null : remark3.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column chatdetail.numericdate
+     *
+     * @return the value of chatdetail.numericdate
+     *
+     * @mbg.generated
+     */
+    public Long getNumericdate() {
+        return numericdate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column chatdetail.numericdate
+     *
+     * @param numericdate the value for chatdetail.numericdate
+     *
+     * @mbg.generated
+     */
+    public void setNumericdate(Long numericdate) {
+        this.numericdate = numericdate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column chatdetail.sendingip
+     *
+     * @return the value of chatdetail.sendingip
+     *
+     * @mbg.generated
+     */
+    public String getSendingip() {
+        return sendingip;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column chatdetail.sendingip
+     *
+     * @param sendingip the value for chatdetail.sendingip
+     *
+     * @mbg.generated
+     */
+    public void setSendingip(String sendingip) {
+        this.sendingip = sendingip == null ? null : sendingip.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column chatdetail.receiveip
+     *
+     * @return the value of chatdetail.receiveip
+     *
+     * @mbg.generated
+     */
+    public String getReceiveip() {
+        return receiveip;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column chatdetail.receiveip
+     *
+     * @param receiveip the value for chatdetail.receiveip
+     *
+     * @mbg.generated
+     */
+    public void setReceiveip(String receiveip) {
+        this.receiveip = receiveip == null ? null : receiveip.trim();
+    }
+}

文件差異過大導致無法顯示
+ 1253 - 0
src/main/java/com/gyee/frame/model/auto/ChatDetailExample.java


+ 55 - 0
src/main/java/com/gyee/frame/model/custom/DatasVo.java

@@ -0,0 +1,55 @@
+
+package com.gyee.frame.model.custom;
+
+/**
+ *
+ */
+
+public class DatasVo {
+
+    private String time;
+    private String send;
+    private String receive;
+    private String type;
+    private String content;
+
+    public String getTime() {
+        return time;
+    }
+
+    public void setTime(String time) {
+        this.time = time;
+    }
+
+    public String getSend() {
+        return send;
+    }
+
+    public void setSend(String send) {
+        this.send = send;
+    }
+
+    public String getReceive() {
+        return receive;
+    }
+
+    public void setReceive(String receive) {
+        this.receive = receive;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+}

+ 36 - 0
src/main/java/com/gyee/frame/model/custom/OnlineVo.java

@@ -0,0 +1,36 @@
+/**
+ * <p>文件名:	DataVo.java</p>
+ * <p>版权:  </p>
+ * <p>公司:	company Co., Ltd.</p>
+ * <p>项目名:lnly</p>
+ * <p>作者:	刘厦(liusha.information@gmail.com)</p>
+ */
+package com.gyee.frame.model.custom;
+
+import java.util.List;
+
+/**
+ *
+ */
+
+public class OnlineVo {
+
+    private String id;
+    private List<String> userlist;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public List<String> getUserlist() {
+        return userlist;
+    }
+
+    public void setUserlist(List<String> userlist) {
+        this.userlist = userlist;
+    }
+}

+ 1 - 1
src/main/java/com/gyee/frame/netty/websocket/WebSocketServer.java

@@ -87,7 +87,7 @@ public class WebSocketServer extends SocketTaskUtil {
         //判断是否有对象编号
         if(StringUtils.isNotNull(keyid))
         {
-             sb.append("_").append(keyid);
+            sb.append("_").append(keyid);
         }
 
         pfkey=String.valueOf(sb);

+ 6 - 3
src/main/java/com/gyee/frame/netty/websocket/config/ConfigDetail.txt

@@ -44,6 +44,9 @@ sisConfigMap->braceletPushTask->"pageNumber_9","functionNumber_1"
 
 24.矩阵监视模块推送,按照场站、期次、线路推送 keyid例如(wp_CL_FDC,pj_CL01_GC,ln_CL01_XL)
 socketConfigMap->monitor_target_matrixMonitor->"pageNumber_4","functionNumber_2","keyid"
-25.即时通信状态判断
-socketConfigMap->monitor_target_status->"pageNumber_4","functionNumber_3","keyid"
-
+25.判断即时通信用户在线状态
+socketConfigMap->monitor_target_status->"pageNumber_4","functionNumber_3","keyid"(无调度任务,rtc推送实时数据)
+26.判断即时通信前台连接是否掉线
+socketConfigMap->online_target_status->"pageNumber_4","functionNumber_4","keyid"(无调度任务,rtc推送实时数据)
+26.试试监听登录用户信息,便于后台退出
+socketConfigMap->online_target_status->"pageNumber_4","functionNumber_5","keyid"(keyid为用户id,无调度任务,rtc推送实时数据)

+ 117 - 0
src/main/java/com/gyee/frame/service/ChatDetailService.java

@@ -0,0 +1,117 @@
+package com.gyee.frame.service;
+
+
+import com.gyee.frame.common.base.BaseService;
+import com.gyee.frame.mapper.auto.ChatDetailMapper;
+import com.gyee.frame.model.auto.ChatDetail;
+import com.gyee.frame.model.auto.ChatDetailExample;
+import com.gyee.frame.util.Convert;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ *  ChatDetailService
+ * @Title: ChatDetailService.java 
+ * @Package com.gyee.frame.service 
+ * @author gyee_自动生成
+ * @email 1@qq.com
+ * @date 2020-04-15 16:48:37  
+ **/
+@Service
+public class ChatDetailService implements BaseService<ChatDetail, ChatDetailExample> {
+	@Resource
+	private ChatDetailMapper chatDetailMapper;
+
+	@Override
+	public int deleteByPrimaryKey(String ids) {
+
+		List<Integer> lista= Convert.toListIntArray(ids);
+		ChatDetailExample example=new ChatDetailExample();
+		example.createCriteria().andIdIn(lista);
+		return chatDetailMapper.deleteByExample(example);
+
+	}
+
+	@Override
+	public int updateByPrimaryKeySelective(ChatDetail record) {
+		return chatDetailMapper.updateByPrimaryKeySelective(record);
+	}
+
+
+	/**
+	 * 添加
+	 */
+	@Override
+	public int insertSelective(ChatDetail record) {
+
+
+
+		return chatDetailMapper.insertSelective(record);
+	}
+
+
+	@Override
+	public int updateByExampleSelective(ChatDetail record, ChatDetailExample example) {
+
+		return chatDetailMapper.updateByExampleSelective(record, example);
+	}
+
+
+	@Override
+	public int updateByExample(ChatDetail record, ChatDetailExample example) {
+
+		return chatDetailMapper.updateByExample(record, example);
+	}
+
+	@Override
+	public List<ChatDetail> selectByExample(ChatDetailExample example) {
+
+		return chatDetailMapper.selectByExample(example);
+	}
+
+
+	@Override
+	public long countByExample(ChatDetailExample example) {
+
+		return chatDetailMapper.countByExample(example);
+	}
+
+
+	@Override
+	public int deleteByExample(ChatDetailExample example) {
+
+		return chatDetailMapper.deleteByExample(example);
+	}
+
+	@Override
+	public ChatDetail selectByPrimaryKey(String id) {
+
+		if(StringUtils.isNotNull(id))
+		{
+			return chatDetailMapper.selectByPrimaryKey(Integer.valueOf(id));
+		}
+		return new ChatDetail();
+
+	}
+
+
+	public List<ChatDetail> selectLastInfoByUserId(String sendingid,String pointtoid){
+
+
+		List<ChatDetail> list= chatDetailMapper.selectLastInfoByUserId(sendingid,pointtoid);
+
+		return  list;
+	}
+
+	public List<ChatDetail> selectByUserId(String sendingid,String pointtoid){
+
+		List<ChatDetail> list= chatDetailMapper.selectByUserId(sendingid,pointtoid);
+
+		return  list;
+	}
+
+
+}

+ 8 - 0
src/main/java/com/gyee/frame/service/GyeeorganService.java

@@ -148,4 +148,12 @@ public class GyeeorganService implements BaseService<Gyeeorgan, GyeeorganExample
 	}
 
 
+	public List<Gyeeorgan> gyeeOrganAll(){
+
+		GyeeorganExample example=new GyeeorganExample();
+
+		List<Gyeeorgan> list=gyeeorganMapper.selectByExample(example);
+		return list;
+	}
+
 }

文件差異過大導致無法顯示
+ 1029 - 0
src/main/java/com/gyee/frame/util/Convert.java


+ 5 - 1
src/main/resources/application.yml

@@ -89,7 +89,11 @@ redis :
   redis_ls_ip: 117.78.18.24
   redis_ls_port: 6380
 exceptjob :
-  exceptmaps: {'pageNumber_4_functionNumber_3': '1'}
+  exceptmaps: {
+    'pageNumber_4_functionNumber_3': '1',
+    'pageNumber_4_functionNumber_4': '1',
+    'pageNumber_4_functionNumber_5': '1'
+  }
 #mybatis:
 #  #配置mapper的扫描,找到所有的mapper.xml映射文件
 #  mapperLocations : classpath*:mybatis/*/*.xml

+ 446 - 0
src/main/resources/mybatis/auto/ChatDetailMapper.xml

@@ -0,0 +1,446 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.gyee.frame.mapper.auto.ChatDetailMapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.ChatDetail">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="sendingid" jdbcType="VARCHAR" property="sendingid" />
+    <result column="sendingname" jdbcType="VARCHAR" property="sendingname" />
+    <result column="chattime" jdbcType="TIMESTAMP" property="chattime" />
+    <result column="pointto" jdbcType="VARCHAR" property="pointto" />
+    <result column="pointtoid" jdbcType="VARCHAR" property="pointtoid" />
+    <result column="chattypes" jdbcType="VARCHAR" property="chattypes" />
+    <result column="chatcontent" jdbcType="VARCHAR" property="chatcontent" />
+    <result column="remark1" jdbcType="VARCHAR" property="remark1" />
+    <result column="remark2" jdbcType="VARCHAR" property="remark2" />
+    <result column="remark3" jdbcType="VARCHAR" property="remark3" />
+    <result column="numericdate" jdbcType="BIGINT" property="numericdate" />
+    <result column="sendingip" jdbcType="VARCHAR" property="sendingip" />
+    <result column="receiveip" jdbcType="VARCHAR" property="receiveip" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    id, sendingid, sendingname, chattime, pointto, pointtoid, chattypes, chatcontent, 
+    remark1, remark2, remark3, numericdate, sendingip, receiveip
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.ChatDetailExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from chatdetail
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from chatdetail
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from chatdetail
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.ChatDetailExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from chatdetail
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.ChatDetail">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into chatdetail (id, sendingid, sendingname, 
+      chattime, pointto, pointtoid, 
+      chattypes, chatcontent, remark1, 
+      remark2, remark3, numericdate, 
+      sendingip, receiveip)
+    values (#{id,jdbcType=INTEGER}, #{sendingid,jdbcType=VARCHAR}, #{sendingname,jdbcType=VARCHAR}, 
+      #{chattime,jdbcType=TIMESTAMP}, #{pointto,jdbcType=VARCHAR}, #{pointtoid,jdbcType=VARCHAR}, 
+      #{chattypes,jdbcType=VARCHAR}, #{chatcontent,jdbcType=VARCHAR}, #{remark1,jdbcType=VARCHAR}, 
+      #{remark2,jdbcType=VARCHAR}, #{remark3,jdbcType=VARCHAR}, #{numericdate,jdbcType=BIGINT}, 
+      #{sendingip,jdbcType=VARCHAR}, #{receiveip,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.ChatDetail">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into chatdetail
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="sendingid != null">
+        sendingid,
+      </if>
+      <if test="sendingname != null">
+        sendingname,
+      </if>
+      <if test="chattime != null">
+        chattime,
+      </if>
+      <if test="pointto != null">
+        pointto,
+      </if>
+      <if test="pointtoid != null">
+        pointtoid,
+      </if>
+      <if test="chattypes != null">
+        chattypes,
+      </if>
+      <if test="chatcontent != null">
+        chatcontent,
+      </if>
+      <if test="remark1 != null">
+        remark1,
+      </if>
+      <if test="remark2 != null">
+        remark2,
+      </if>
+      <if test="remark3 != null">
+        remark3,
+      </if>
+      <if test="numericdate != null">
+        numericdate,
+      </if>
+      <if test="sendingip != null">
+        sendingip,
+      </if>
+      <if test="receiveip != null">
+        receiveip,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="sendingid != null">
+        #{sendingid,jdbcType=VARCHAR},
+      </if>
+      <if test="sendingname != null">
+        #{sendingname,jdbcType=VARCHAR},
+      </if>
+      <if test="chattime != null">
+        #{chattime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pointto != null">
+        #{pointto,jdbcType=VARCHAR},
+      </if>
+      <if test="pointtoid != null">
+        #{pointtoid,jdbcType=VARCHAR},
+      </if>
+      <if test="chattypes != null">
+        #{chattypes,jdbcType=VARCHAR},
+      </if>
+      <if test="chatcontent != null">
+        #{chatcontent,jdbcType=VARCHAR},
+      </if>
+      <if test="remark1 != null">
+        #{remark1,jdbcType=VARCHAR},
+      </if>
+      <if test="remark2 != null">
+        #{remark2,jdbcType=VARCHAR},
+      </if>
+      <if test="remark3 != null">
+        #{remark3,jdbcType=VARCHAR},
+      </if>
+      <if test="numericdate != null">
+        #{numericdate,jdbcType=BIGINT},
+      </if>
+      <if test="sendingip != null">
+        #{sendingip,jdbcType=VARCHAR},
+      </if>
+      <if test="receiveip != null">
+        #{receiveip,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.ChatDetailExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from chatdetail
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update chatdetail
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.sendingid != null">
+        sendingid = #{record.sendingid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.sendingname != null">
+        sendingname = #{record.sendingname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.chattime != null">
+        chattime = #{record.chattime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.pointto != null">
+        pointto = #{record.pointto,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pointtoid != null">
+        pointtoid = #{record.pointtoid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.chattypes != null">
+        chattypes = #{record.chattypes,jdbcType=VARCHAR},
+      </if>
+      <if test="record.chatcontent != null">
+        chatcontent = #{record.chatcontent,jdbcType=VARCHAR},
+      </if>
+      <if test="record.remark1 != null">
+        remark1 = #{record.remark1,jdbcType=VARCHAR},
+      </if>
+      <if test="record.remark2 != null">
+        remark2 = #{record.remark2,jdbcType=VARCHAR},
+      </if>
+      <if test="record.remark3 != null">
+        remark3 = #{record.remark3,jdbcType=VARCHAR},
+      </if>
+      <if test="record.numericdate != null">
+        numericdate = #{record.numericdate,jdbcType=BIGINT},
+      </if>
+      <if test="record.sendingip != null">
+        sendingip = #{record.sendingip,jdbcType=VARCHAR},
+      </if>
+      <if test="record.receiveip != null">
+        receiveip = #{record.receiveip,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update chatdetail
+    set id = #{record.id,jdbcType=INTEGER},
+      sendingid = #{record.sendingid,jdbcType=VARCHAR},
+      sendingname = #{record.sendingname,jdbcType=VARCHAR},
+      chattime = #{record.chattime,jdbcType=TIMESTAMP},
+      pointto = #{record.pointto,jdbcType=VARCHAR},
+      pointtoid = #{record.pointtoid,jdbcType=VARCHAR},
+      chattypes = #{record.chattypes,jdbcType=VARCHAR},
+      chatcontent = #{record.chatcontent,jdbcType=VARCHAR},
+      remark1 = #{record.remark1,jdbcType=VARCHAR},
+      remark2 = #{record.remark2,jdbcType=VARCHAR},
+      remark3 = #{record.remark3,jdbcType=VARCHAR},
+      numericdate = #{record.numericdate,jdbcType=BIGINT},
+      sendingip = #{record.sendingip,jdbcType=VARCHAR},
+      receiveip = #{record.receiveip,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.ChatDetail">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update chatdetail
+    <set>
+      <if test="sendingid != null">
+        sendingid = #{sendingid,jdbcType=VARCHAR},
+      </if>
+      <if test="sendingname != null">
+        sendingname = #{sendingname,jdbcType=VARCHAR},
+      </if>
+      <if test="chattime != null">
+        chattime = #{chattime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="pointto != null">
+        pointto = #{pointto,jdbcType=VARCHAR},
+      </if>
+      <if test="pointtoid != null">
+        pointtoid = #{pointtoid,jdbcType=VARCHAR},
+      </if>
+      <if test="chattypes != null">
+        chattypes = #{chattypes,jdbcType=VARCHAR},
+      </if>
+      <if test="chatcontent != null">
+        chatcontent = #{chatcontent,jdbcType=VARCHAR},
+      </if>
+      <if test="remark1 != null">
+        remark1 = #{remark1,jdbcType=VARCHAR},
+      </if>
+      <if test="remark2 != null">
+        remark2 = #{remark2,jdbcType=VARCHAR},
+      </if>
+      <if test="remark3 != null">
+        remark3 = #{remark3,jdbcType=VARCHAR},
+      </if>
+      <if test="numericdate != null">
+        numericdate = #{numericdate,jdbcType=BIGINT},
+      </if>
+      <if test="sendingip != null">
+        sendingip = #{sendingip,jdbcType=VARCHAR},
+      </if>
+      <if test="receiveip != null">
+        receiveip = #{receiveip,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.ChatDetail">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update chatdetail
+    set sendingid = #{sendingid,jdbcType=VARCHAR},
+      sendingname = #{sendingname,jdbcType=VARCHAR},
+      chattime = #{chattime,jdbcType=TIMESTAMP},
+      pointto = #{pointto,jdbcType=VARCHAR},
+      pointtoid = #{pointtoid,jdbcType=VARCHAR},
+      chattypes = #{chattypes,jdbcType=VARCHAR},
+      chatcontent = #{chatcontent,jdbcType=VARCHAR},
+      remark1 = #{remark1,jdbcType=VARCHAR},
+      remark2 = #{remark2,jdbcType=VARCHAR},
+      remark3 = #{remark3,jdbcType=VARCHAR},
+      numericdate = #{numericdate,jdbcType=BIGINT},
+      sendingip = #{sendingip,jdbcType=VARCHAR},
+      receiveip = #{receiveip,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+
+  <select id="selectByUserId"   resultMap="BaseResultMap">
+    select
+    id, sendingid, sendingname, chattime, pointto, pointtoid, chattypes, chatcontent,
+    remark1, remark2, remark3, numericdate, sendingip, receiveip
+    from chatdetail
+    where  ((sendingid = #{sendingid} and pointtoid = #{pointtoid}
+    ) or (sendingid = #{pointtoid} and pointtoid = #{sendingid} ))
+    AND   DATE_SUB(CURDATE(), INTERVAL 3 DAY) &lt;=chattime
+    ORDER BY chattime
+  </select>
+
+ <!-- <select id="selectLastInfoByUserId"  resultMap="BaseResultMap">
+    select
+    id, sendingid, sendingname, chattime, pointto, pointtoid, chattypes, chatcontent,
+    remark1, remark2, remark3, numericdate, sendingip, receiveip
+    from chatdetail
+    where pointtoid = #{userid}
+    AND   DATE_SUB(CURDATE(), INTERVAL 3 DAY) &lt;=chattime
+    group by sendingid
+    ORDER BY chattime desc
+  </select>-->
+
+  <select id="selectLastInfoByUserId"   resultMap="BaseResultMap">
+    select
+    id, sendingid, sendingname, chattime, pointto, pointtoid, chattypes, chatcontent,
+    remark1, remark2, remark3, numericdate, sendingip, receiveip
+    from chatdetail
+    where  ((sendingid = #{sendingid} and pointtoid = #{pointtoid}
+    ) or (sendingid = #{pointtoid} and pointtoid = #{sendingid} ))
+    AND   DATE_SUB(CURDATE(), INTERVAL 3 DAY) &lt;=chattime
+    ORDER BY chattime desc limit 1
+  </select>
+</mapper>