init
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<?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.newyetai.component.chat.dao.ChatMapper">
|
||||
<select id="listChatDTO" resultType="com.newyetai.component.chat.dto.ChatDTO">
|
||||
select
|
||||
*,
|
||||
(select org_name from xs_org o where o.id = org_id) orgName,
|
||||
(select username from uc_user u where u.id = person_user_id) personUserName
|
||||
from xs_chat
|
||||
where
|
||||
deleted = 0
|
||||
<if test="param.id != null">
|
||||
and id = #{param.id}
|
||||
</if>
|
||||
<if test="param.orgId != null">
|
||||
and org_id = #{param.orgId}
|
||||
</if>
|
||||
<if test="param.orgUserId != null">
|
||||
and org_user_id = #{param.orgUserId}
|
||||
</if>
|
||||
<if test="param.personUserId != null">
|
||||
and person_user_id = #{param.personUserId}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
and status = #{param.status}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?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.newyetai.component.chat.dao.ChatMsgMapper">
|
||||
<select id="listChatMsgDTO" resultType="com.newyetai.component.chat.dto.ChatMsgDTO">
|
||||
select
|
||||
*
|
||||
from xs_chat_msg
|
||||
where
|
||||
deleted = 0
|
||||
<if test="param.id != null">
|
||||
and id = #{param.id}
|
||||
</if>
|
||||
<if test="param.chatId != null">
|
||||
and chat_id = #{param.chatId}
|
||||
</if>
|
||||
order by id desc
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user