| | |
| | | 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; |
| | |
| | | // 居民 党员 志愿者 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 != ""'>" |
| | | + "AND u.phone = #{activitySignVO.phone} " + " </if> " |
| | | + "<if test='activitySignVO.tags != null and activitySignVO.tags != ""'>" |
| | | + "AND u.tags like concat('%',#{activitySignVO.tags},'%') " + " </if> " |
| | | + "<if test='activitySignVO.name != null and activitySignVO.name != ""'>" |
| | | + "AND u.`name` = #{activitySignVO.name} " + " </if> " |
| | | + "<if test='activitySignVO.identity != null and activitySignVO.identity != "" and activitySignVO.identity==1'>" |
| | |
| | | + "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 " |
| | |
| | | |
| | | @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); |
| | | } |