From eda58e0e6d4abdd2b060e28867d103045845aa69 Mon Sep 17 00:00:00 2001 From: 罗元桥 <2376770955@qq.com> Date: 星期一, 30 八月 2021 13:13:18 +0800 Subject: [PATCH] Merge branch 'test' into 'yuyue_dev' --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussOptionUserDAO.java | 34 ++++++++++++++++------------------ 1 files changed, 16 insertions(+), 18 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussOptionUserDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussOptionUserDAO.java index 621b488..a074860 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussOptionUserDAO.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussOptionUserDAO.java @@ -1,10 +1,11 @@ package com.panzhihua.service_community.dao; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.panzhihua.service_community.model.dos.ComActDiscussOptionUserDO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.panzhihua.service_community.model.dos.ComActDiscussOptionUserDO; /** * @program: springcloud_k8s_panzhihuazhihuishequ @@ -14,22 +15,19 @@ **/ @Mapper public interface ComActDiscussOptionUserDAO extends BaseMapper<ComActDiscussOptionUserDO> { - // @Select("<script> " + -// " <where>" + -// "<if test='nameCn != null and nameCn.trim() != ""'>" + -// " </if> " + -// "<if test='nameCn != null and nameCn.trim() != ""'>" + -// " </if> " + -// "<if test='nameCn != null and nameCn.trim() != ""'>" + -// " </if> " + -// " </where>" + -// "</script>") - @Select("SELECT \n" + - "COUNT(ou.id)\n" + - "FROM\n" + - "com_act_discuss d\n" + - "JOIN com_act_discuss_option o ON d.id = o.discuss_id and d.id=#{id}\n" + - "JOIN com_act_discuss_option_user ou ON o.id = ou.discuss_option_id and ou.user_id=#{loginUserId}") + // @Select("<script> " + + // " <where>" + + // "<if test='nameCn != null and nameCn.trim() != ""'>" + + // " </if> " + + // "<if test='nameCn != null and nameCn.trim() != ""'>" + + // " </if> " + + // "<if test='nameCn != null and nameCn.trim() != ""'>" + + // " </if> " + + // " </where>" + + // "</script>") + @Select("SELECT \n" + "COUNT(ou.id)\n" + "FROM\n" + "com_act_discuss d\n" + + "JOIN com_act_discuss_option o ON d.id = o.discuss_id and d.id=#{id}\n" + + "JOIN com_act_discuss_option_user ou ON o.id = ou.discuss_option_id and ou.user_id=#{loginUserId}") int selectHaveVote(@Param("id") Long id, @Param("loginUserId") Long loginUserId); @Select("select count(id) from com_act_discuss_option_user where discuss_option_id = #{discussOptionId} and user_id = #{userId}") -- Gitblit v1.7.1