罗元桥
2021-08-31 8e2d30fd6ac9c8cd3ee6d68c8fd575848f37390d
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActSignDAO.java
@@ -3,6 +3,7 @@
import java.util.List;
import java.util.Map;
import com.panzhihua.common.model.vos.community.ComActActSignExcelVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@@ -26,10 +27,12 @@
    // 居民 党员 志愿者 1 2 3
    @Select("<script> " + "SELECT " + "u.user_id id, " + "u.image_url, " + "u.name, " + "u.nick_name, "
        + "case WHEN u.is_partymember = 1 THEN '党员' WHEN a.is_volunteer = 1 THEN '志愿者' ELSE '居民' END identity, "
        + "u.phone, " + "a.create_at,  " + "a.is_volunteer  " + "FROM " + "com_act_act_sign a "
        + "u.phone, " + "u.tags, " + "a.create_at,  " + "a.is_volunteer  " + "FROM " + "com_act_act_sign a "
        + "JOIN sys_user u ON a.user_id = u.user_id  " + "WHERE " + "a.activity_id = #{activitySignVO.activityId}  "
        + "<if test='activitySignVO.phone != null and activitySignVO.phone != &quot;&quot;'>"
        + "AND u.phone = #{activitySignVO.phone}  " + " </if> "
        + "<if test='activitySignVO.tags != null and activitySignVO.tags != &quot;&quot;'>"
        + "AND u.tags like concat('%',#{activitySignVO.tags},'%')   " + " </if> "
        + "<if test='activitySignVO.name != null and activitySignVO.name != &quot;&quot;'>"
        + "AND u.`name` = #{activitySignVO.name}  " + " </if> "
        + "<if test='activitySignVO.identity != null and activitySignVO.identity != &quot;&quot; and activitySignVO.identity==1'>"
@@ -58,6 +61,8 @@
        + "AND a.is_volunteer=#{activitySignVO.type}-1   " + " </if> " + " order by a.create_at desc " + "</script>")
    List<ActivitySignVO> listActivitySigns(@Param("activitySignVO") ActivitySignVO activitySignVO);
    List<ComActActSignExcelVO> getSignLists (@Param("activitySignVO") ActivitySignVO activitySignVO);
    @Select("<script> " + "SELECT " + " caas.user_id, " + " su.NAME, " + "CASE " + "  WHEN su.is_volunteer = 1 THEN "
        + "  '志愿者' ELSE '居民'  " + " END identity, " + " su.phone, " + " caas.create_at  " + "FROM "
        + " com_act_act_sign AS caas "
@@ -73,4 +78,11 @@
    @Select("select openid from sys_user where user_id = #{userId}")
    Map<String, String> getUserOpenId(@Param("userId") Long userId);
    /**
     * 获取需要默认好评的记录
     * @param activityIds 活动id list
     * @return 需要默认好评的记录列表
     */
    List<ComActActSignDO> selectNeedEvaluateSignRecords(@Param("activityIds") List<Long> activityIds);
}