| | |
| | | **/ |
| | | @Mapper |
| | | public interface ComActActSignDAO extends BaseMapper<ComActActSignDO> { |
| | | // 居民 党员 志愿者 1 2 3 |
| | | @Select("<script> " + |
| | | "SELECT\n" + |
| | | "a.id,\n" + |
| | |
| | | "<if test='name != null and name.trim() != ""'>" + |
| | | "AND u.`name` = #{name} \n" + |
| | | " </if> " + |
| | | "<if test='identity != null and identity.trim() != "" and identity==党员.toString()'>" + |
| | | "AND is_partymember = 1 \n" + |
| | | "<if test='identity != null and identity.trim() != "" and identity==1'>" + |
| | | "AND u.is_partymember = 0 and a.is_volunteer=0 \n" + |
| | | " </if> " + |
| | | "<if test='identity != null and identity.trim() != "" and identity==志愿者.toString()'>" + |
| | | "AND is_partymember = 2 and is_volunteer=1 \n" + |
| | | "<if test='identity != null and identity.trim() != "" and identity==2'>" + |
| | | "AND u.is_partymember = 1 \n" + |
| | | " </if> " + |
| | | "<if test='identity != null and identity.trim() != "" and identity==居民.toString()'>" + |
| | | "AND is_partymember = 2 and is_volunteer=2 \n" + |
| | | "<if test='identity != null and identity.trim() != "" and identity==3'>" + |
| | | "AND a.is_volunteer=1 \n" + |
| | | " </if> " + |
| | | " order by a.create_at desc "+ |
| | | "</script>") |