郑永安
2023-07-24 0645153dfa233b51a749db73f9bd5a8c5127c595
src/main/java/com/gk/hotwork/Mapper/mybatis/CompanyInfoMapper.xml
@@ -37,14 +37,17 @@
      <if test="condition.company != null and condition.company !=''">
        and company like concat('%',#{condition.company},'%')
      </if>
      <if test="condition.companyid != null ">
        and id = #{condition.companyid}
      </if>
      <if test="condition.province != null and condition.province !=''">
        and province like concat('%',#{condition.province},'%')
        and province = #{condition.province}
      </if>
      <if test="condition.city != null and condition.city !=''">
        and city like concat('%',#{condition.city},'%')
        and city = #{condition.city}
      </if>
      <if test="condition.area != null and condition.area !=''">
        and area like concat('%',#{condition.area},'%')
        and area = #{condition.area}
      </if>
      <if test="condition.town != null and condition.town !=''">
        and town like concat('%',#{condition.town},'%')
@@ -84,4 +87,27 @@
    </if>
    limit 1
  </select>
  <select id="selectCompanyList" resultType="com.gk.hotwork.Domain.CompanyInfo">
    select *
    from company
    <where>
      1=1
      and isdel = 0
      <if test="query.companyid != null and query.companyid !=''">
        and id = #{query.companyid}
      </if>
      <if test="query.company != null and query.company !=''">
        and company like concat('%',#{query.company},'%')
      </if>
      <if test="query.province != null and query.province !=''">
        and province = #{query.province}
      </if>
      <if test="query.city != null and query.city !=''">
        and city = #{query.city}
      </if>
      <if test="query.area != null and query.area !=''">
        and area = #{query.area}
      </if>
    </where>
  </select>
</mapper>