| | |
| | | id,code,company, contactname, contactphone, ismain, province, city, area, town, community, isdel, |
| | | createdby,createddate, lastmodifiedby, lastmodifieddate, longitude, latitude, isbanned |
| | | </sql> |
| | | <!-- |
| | | <select id="selectDataGrid" resultType="com.gk.hotwork.Domain.CompanyInfo"> |
| | | select * |
| | | from company |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | --> |
| | | <select id="selectDataGrid" resultType="com.gk.hotwork.Domain.CompanyInfo"> |
| | | select c.* |
| | | from |
| | | (select * |
| | | from company |
| | | <where> |
| | | 1=1 |
| | | and isdel = 0 |
| | | <if test="condition.province != null and condition.province !=''"> |
| | | and province = #{condition.province} |
| | | </if> |
| | | <if test="condition.city != null and condition.city !=''"> |
| | | and city = #{condition.city} |
| | | </if> |
| | | <if test="condition.area != null and condition.area !=''"> |
| | | and area = #{condition.area} |
| | | </if> |
| | | </where> |
| | | union |
| | | select * |
| | | from company |
| | | <where>1=1 |
| | | and |
| | | isdel = 0 |
| | | and province is null |
| | | or province = '' |
| | | </where>) c |
| | | <where> |
| | | 1=1 |
| | | <if test="condition.company != null and condition.company !=''"> |
| | | and c.company like concat('%',#{condition.company},'%') |
| | | </if> |
| | | <if test="condition.companyid != null "> |
| | | and c.id = #{condition.companyid} |
| | | </if> |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | | <select id="selectExistByName" resultType="com.gk.hotwork.Domain.CompanyInfo"> |
| | | select * |
| | | from company |