提交 c9c2104e 编写于 作者: Q qiaozhanwei 提交者: lgcareer

the current user quits and the session is completely emptied. bug fix (#987)

* add ConnectionFactoryTest and ConnectionFactory read datasource from appliction.yml

* .escheduler_env.sh to dolphinscheduler_env.sh

* dao yml assembly to conf directory

* table name modify

* entity title table  name modify

* logback log name modify

* running through the big process

* running through the big process error modify

* logback log name modify

* data_source.properties rename

* logback log name modify

* install.sh optimization

* install.sh optimization

* command count modify

* command state update

* countCommandState sql update

* countCommandState sql update

* remove application.yml file

* master.properties modify

* install.sh modify

* install.sh modify

* api server startup modify

* the current user quits and the session is completely emptied. bug fix
上级 9b836aa5
...@@ -140,11 +140,9 @@ public class SessionService extends BaseService{ ...@@ -140,11 +140,9 @@ public class SessionService extends BaseService{
/** /**
* query session by user id and ip * query session by user id and ip
*/ */
List<Session> sessionList = sessionMapper.queryByUserId(loginUser.getId()); Session session = sessionMapper.queryByUserIdAndIp(loginUser.getId(),ip);
for (Session session : sessionList){ //delete session
//delete session sessionMapper.deleteById(session.getId());
sessionMapper.deleteById(session.getId());
}
} }
} }
...@@ -26,4 +26,6 @@ public interface SessionMapper extends BaseMapper<Session> { ...@@ -26,4 +26,6 @@ public interface SessionMapper extends BaseMapper<Session> {
List<Session> queryByUserId(@Param("userId") int userId); List<Session> queryByUserId(@Param("userId") int userId);
Session queryByUserIdAndIp(@Param("userId") int userId,@Param("ip") String ip);
} }
...@@ -6,4 +6,10 @@ ...@@ -6,4 +6,10 @@
from t_ds_session from t_ds_session
where user_id = #{userId} where user_id = #{userId}
</select> </select>
<select id="queryByUserIdAndIp" resultType="org.apache.dolphinscheduler.dao.entity.Session">
select *
from t_ds_session
where user_id = #{userId} AND ip = #{ip}
</select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册