| | |
| | | from volunteer_merchant |
| | | <where> |
| | | 1=1 |
| | | <if test="communityId!=null"> |
| | | <if test="communityId!=null and communityId !='' "> |
| | | and community_id=#{communityId} |
| | | </if> |
| | | <if test="merchantState !=null"> |
| | | <if test="merchantState !=null and merchantState !='' "> |
| | | and merchant_state=#{merchantState} |
| | | </if> |
| | | <if test="merchantType !=null "> |
| | | <if test="merchantType !=null and merchantType !='' "> |
| | | and merchant_type=#{merchantType} |
| | | </if> |
| | | <if test="name !=null "> |
| | | and (volunteer_merchant.name like concat('%',#{name},'%')) |
| | | <if test="name !=null and name !='' "> |
| | | and ((select vt.name from volunteer_type as vt where vt.id=volunteer_merchant.merchant_type) like concat('%',#{name},'%')) |
| | | </if> |
| | | </where> |
| | | order by merchantGrade desc,creation_time desc |