huanghongfa
2022-02-15 2d960f8cf9cbfe24b950ae21166ff90b75ac15a6
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngVolunteerMngDAO.java
@@ -21,24 +21,13 @@
 **/
@Mapper
public interface ComMngVolunteerMngDAO extends BaseMapper<ComMngVolunteerMngDO> {
    // @Select("<script> " +
    // " <where>" +
    // "<if test='nameCn != null and nameCn.trim() != &quot;&quot;'>" +
    // " </if> " +
    // "<if test='nameCn != null and nameCn.trim() != &quot;&quot;'>" +
    // " </if> " +
    // "<if test='nameCn != null and nameCn.trim() != &quot;&quot;'>" +
    // " </if> " +
    // " </where>" +
    // "</script>")
    @Select("<script> " + "SELECT\n" + "id,\n" + "`name`,\n" + "photo_path,\n" + "phone,\n" + "integral,\n"
        + "create_at \n" + "FROM\n" + "com_mng_volunteer_mng \n"
        + " where state=2 and community_id = ${comMngVolunteerMngVO.communityId}"
        + "<if test='comMngVolunteerMngVO.name != null and comMngVolunteerMngVO.name.trim() != &quot;&quot;'>"
        + " and name like concat(#{comMngVolunteerMngVO.name},'%')  \n" + " </if> "
        + "<if test='comMngVolunteerMngVO.phone != null and comMngVolunteerMngVO.phone.trim() != &quot;&quot;'>"
        + "AND phone like concat(#{comMngVolunteerMngVO.phone},'%') " + " </if> "
        + " order by integral desc,create_at desc" + "</script>")
    /**
     * 分页查询志愿者列表
     * @param page  分页参数
     * @param comMngVolunteerMngVO  请求参数
     * @return  志愿者列表
     */
    IPage<ComMngVolunteerMngVO> pageVolunteer(Page page,
        @Param("comMngVolunteerMngVO") ComMngVolunteerMngVO comMngVolunteerMngVO);
@@ -63,4 +52,7 @@
    @Select("select user_id from sys_user where type=1 and phone=#{phone}")
    Long selectUserIdByPhone(String phone);
    @Select("select id_card from sys_user where type=1 and phone=#{idCard}")
    Long selectUserIdByIdCard(String idCard);
}