忽略时分秒的条件查询:
<select id="queryh5codecondition" resultMap="BaseResultMap" parameterType="com.zhiyu.pojo.H5code">
select * from h5code
<where>
<if test="phonetime!=null"> and date_format(phonetime,'%Y-%m-%d')=#{phonetime} </if>
<if test="togethway!=null">and togethway=#{togethway}</if>
<if test="phone!=null">and phone=#{phone}</if>
<if test="userstatus!=null">and userstatus=#{userstatus}</if>
</where>
</select>
controller:
@RequestMapping(value="/application/queryUserapplication",method=RequestMethod.POST,produces = "application/json;charset=UTF-8")
@ResponseBody
public String queryUserapplication(@RequestBody Usera