| @@ -22,7 +22,7 @@ | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| where 1 = 1 | |||||
| <if test=" null != id "> | <if test=" null != id "> | ||||
| and wcuc.`id` = #{id} | and wcuc.`id` = #{id} | ||||
| </if> | </if> | ||||
| @@ -76,21 +76,25 @@ | |||||
| <include refid="allColumns"/>,wcubi.`phone` | <include refid="allColumns"/>,wcubi.`phone` | ||||
| from wx_c_user_car wcuc | from wx_c_user_car wcuc | ||||
| left join wx_c_user_basic_info wcubi on wcubi.id = wcuc.c_user_id | left join wx_c_user_basic_info wcubi on wcubi.id = wcuc.c_user_id | ||||
| <include refid="dynamicWhereConditions" /> | |||||
| where 1 = 1 | |||||
| <if test=" null != userPhone"> | <if test=" null != userPhone"> | ||||
| and wcubi.`phone` = like concat('%', #{userPhone},'%') | and wcubi.`phone` = like concat('%', #{userPhone},'%') | ||||
| </if> | </if> | ||||
| <include refid="dynamicWhereConditions" /> | |||||
| </select> | </select> | ||||
| <select id="findList" parameterType="com.iformall.domain.po.WxCUserCar" resultMap="BaseResultMap"> | <select id="findList" parameterType="com.iformall.domain.po.WxCUserCar" resultMap="BaseResultMap"> | ||||
| select | select | ||||
| <include refid="allColumns"/> | <include refid="allColumns"/> | ||||
| from wx_c_user_car wcuc | from wx_c_user_car wcuc | ||||
| where 1 = 1 | |||||
| <include refid="dynamicWhereConditions" /> | <include refid="dynamicWhereConditions" /> | ||||
| </select> | </select> | ||||
| <select id="countList" parameterType="com.iformall.domain.po.WxCUserCar" resultType="java.lang.Integer"> | <select id="countList" parameterType="com.iformall.domain.po.WxCUserCar" resultType="java.lang.Integer"> | ||||
| select count(1) from wx_c_user_car wcuc | select count(1) from wx_c_user_car wcuc | ||||
| where 1 = 1 | |||||
| <include refid="dynamicWhereConditions" /> | <include refid="dynamicWhereConditions" /> | ||||
| </select> | </select> | ||||