| <?xml version="1.0" encoding="UTF-8"?> | 
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 
| <mapper namespace="doumeemes.dao.ext.CompanyOpenExtMapper"> | 
|   | 
|   <!-- 管理页面查询 --> | 
|   <resultMap id="CompanyOpenExtListVO" type="doumeemes.dao.ext.vo.CompanyOpenExtListVO" autoMapping="true"> | 
|     <id column="ID" jdbcType="INTEGER" property="id"/> | 
|     <association property="cmodel" javaType="doumeemes.dao.business.model.Company"> | 
|       <id column="CMODEL_ID" jdbcType="INTEGER" property="id"/> | 
|       <result column="CMODEL_DELETED" jdbcType="TINYINT" property="deleted"/> | 
|       <result column="CMODEL_CREATE_USER" jdbcType="INTEGER" property="createUser"/> | 
|       <result column="CMODEL_CREATE_TIME" jdbcType="TIMESTAMP" property="createTime"/> | 
|       <result column="CMODEL_UPDATE_USER" jdbcType="INTEGER" property="updateUser"/> | 
|       <result column="CMODEL_UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/> | 
|       <result column="CMODEL_ORIGIN" jdbcType="TINYINT" property="origin"/> | 
|       <result column="CMODEL_NAME" jdbcType="VARCHAR" property="name"/> | 
|       <result column="CMODEL_REMARK" jdbcType="VARCHAR" property="remark"/> | 
|       <result column="CMODEL_TYPE" jdbcType="VARCHAR" property="type"/> | 
|       <result column="CMODEL_LEGAL_PERSON_ID" jdbcType="INTEGER" property="legalPersonId"/> | 
|       <result column="CMODEL_LEGAL_PERSON_PHONE" jdbcType="VARCHAR" property="legalPersonPhone"/> | 
|       <result column="CMODEL_REGISTER_DATE" jdbcType="TIMESTAMP" property="registerDate"/> | 
|       <result column="CMODEL_ADDR" jdbcType="VARCHAR" property="addr"/> | 
|       <result column="CMODEL_BUSINESS_SCOPE" jdbcType="VARCHAR" property="businessScope"/> | 
|       <result column="CMODEL_BUSINESS_TERM" jdbcType="VARCHAR" property="businessTerm"/> | 
|       <result column="CMODEL_ISSUE_DATE" jdbcType="TIMESTAMP" property="issueDate"/> | 
|       <result column="CMODEL_CREDIT_CODE" jdbcType="VARCHAR" property="creditCode"/> | 
|       <result column="CMODEL_REGISTER_CAPITAL" jdbcType="VARCHAR" property="registerCapital"/> | 
|       <result column="CMODEL_FILE_FORMAT" jdbcType="VARCHAR" property="fileFormat"/> | 
|       <result column="CMODEL_FILE_NAME" jdbcType="VARCHAR" property="fileName"/> | 
|       <result column="CMODEL_FILE_STORE_ADDR" jdbcType="VARCHAR" property="fileStoreAddr"/> | 
|       <result column="CMODEL_AUTH_STATUS" jdbcType="TINYINT" property="authStatus"/> | 
|       <result column="CMODEL_AUTH_ID" jdbcType="INTEGER" property="authId"/> | 
|       <result column="CMODEL_DINGDING_ID" jdbcType="VARCHAR" property="dingdingId"/> | 
|       <result column="CMODEL_OPEN_USER_NUM" jdbcType="INTEGER" property="openUserNum"/> | 
|       <result column="CMODEL_OPEN_MODULES" jdbcType="VARCHAR" property="openModules"/> | 
|       <result column="CMODEL_OEPN_VALID_DATE" jdbcType="TIMESTAMP" property="oepnValidDate"/> | 
|       <result column="CMODEL_OEPN_TYPE" jdbcType="TINYINT" property="oepnType"/> | 
|       <result column="CMODEL_CHANNEL_ID" jdbcType="INTEGER" property="channelId"/> | 
|     </association> | 
|   </resultMap> | 
|   <select id="selectList" parameterType="doumeemes.dao.ext.dto.QueryCompanyOpenExtDTO" resultMap="CompanyOpenExtListVO"> | 
|     SELECT | 
|       `a`.`ID`, | 
|       `a`.`DELETED`, | 
|       `a`.`CREATE_USER`, | 
|       `a`.`CREATE_TIME`, | 
|       `a`.`UPDATE_USER`, | 
|       `a`.`UPDATE_TIME`, | 
|       `a`.`REMARK`, | 
|       `a`.`COMPANY_ID`, | 
|       `a`.`USER_NUM`, | 
|       `a`.`MODULES`, | 
|       `a`.`VALID_DATE`, | 
|       `a`.`OEPN_TYPE`, | 
|       `cmodel`.`ID` AS CMODEL_ID, | 
|       `cmodel`.`DELETED` AS CMODEL_DELETED, | 
|       `cmodel`.`CREATE_USER` AS CMODEL_CREATE_USER, | 
|       `cmodel`.`CREATE_TIME` AS CMODEL_CREATE_TIME, | 
|       `cmodel`.`UPDATE_USER` AS CMODEL_UPDATE_USER, | 
|       `cmodel`.`UPDATE_TIME` AS CMODEL_UPDATE_TIME, | 
|       `cmodel`.`ORIGIN` AS CMODEL_ORIGIN, | 
|       `cmodel`.`NAME` AS CMODEL_NAME, | 
|       `cmodel`.`REMARK` AS CMODEL_REMARK, | 
|       `cmodel`.`TYPE` AS CMODEL_TYPE, | 
|       `cmodel`.`LEGAL_PERSON_ID` AS CMODEL_LEGAL_PERSON_ID, | 
|       `cmodel`.`LEGAL_PERSON_PHONE` AS CMODEL_LEGAL_PERSON_PHONE, | 
|       `cmodel`.`REGISTER_DATE` AS CMODEL_REGISTER_DATE, | 
|       `cmodel`.`ADDR` AS CMODEL_ADDR, | 
|       `cmodel`.`BUSINESS_SCOPE` AS CMODEL_BUSINESS_SCOPE, | 
|       `cmodel`.`BUSINESS_TERM` AS CMODEL_BUSINESS_TERM, | 
|       `cmodel`.`ISSUE_DATE` AS CMODEL_ISSUE_DATE, | 
|       `cmodel`.`CREDIT_CODE` AS CMODEL_CREDIT_CODE, | 
|       `cmodel`.`REGISTER_CAPITAL` AS CMODEL_REGISTER_CAPITAL, | 
|       `cmodel`.`FILE_FORMAT` AS CMODEL_FILE_FORMAT, | 
|       `cmodel`.`FILE_NAME` AS CMODEL_FILE_NAME, | 
|       `cmodel`.`FILE_STORE_ADDR` AS CMODEL_FILE_STORE_ADDR, | 
|       `cmodel`.`AUTH_STATUS` AS CMODEL_AUTH_STATUS, | 
|       `cmodel`.`AUTH_ID` AS CMODEL_AUTH_ID, | 
|       `cmodel`.`DINGDING_ID` AS CMODEL_DINGDING_ID, | 
|       `cmodel`.`OPEN_USER_NUM` AS CMODEL_OPEN_USER_NUM, | 
|       `cmodel`.`OPEN_MODULES` AS CMODEL_OPEN_MODULES, | 
|       `cmodel`.`OEPN_VALID_DATE` AS CMODEL_OEPN_VALID_DATE, | 
|       `cmodel`.`OEPN_TYPE` AS CMODEL_OEPN_TYPE, | 
|       `cmodel`.`CHANNEL_ID` AS CMODEL_CHANNEL_ID | 
|     FROM `company_open` `a` | 
|     LEFT JOIN `company` `cmodel` ON a.COMPANY_ID=cmodel.ID | 
|     <where> | 
|       <if test="id != null"> | 
|         AND `a`.`ID` = #{id} | 
|       </if> | 
|       <if test="deleted != null"> | 
|         AND `a`.`DELETED` = #{deleted} | 
|       </if> | 
|       <if test="createUser != null"> | 
|         AND `a`.`CREATE_USER` = #{createUser} | 
|       </if> | 
|       <if test="createTime != null"> | 
|         AND `a`.`CREATE_TIME` = #{createTime} | 
|       </if> | 
|       <if test="updateUser != null"> | 
|         AND `a`.`UPDATE_USER` = #{updateUser} | 
|       </if> | 
|       <if test="updateTime != null"> | 
|         AND `a`.`UPDATE_TIME` = #{updateTime} | 
|       </if> | 
|       <if test="remark != null and remark != ''"> | 
|         AND `a`.`REMARK` = #{remark} | 
|       </if> | 
|       <if test="companyId != null"> | 
|         AND `a`.`COMPANY_ID` = #{companyId} | 
|       </if> | 
|       <if test="userNum != null"> | 
|         AND `a`.`USER_NUM` = #{userNum} | 
|       </if> | 
|       <if test="modules != null and modules != ''"> | 
|         AND `a`.`MODULES` = #{modules} | 
|       </if> | 
|       <if test="validDate != null"> | 
|         AND `a`.`VALID_DATE` = #{validDate} | 
|       </if> | 
|       <if test="oepnType != null"> | 
|         AND `a`.`OEPN_TYPE` = #{oepnType} | 
|       </if> | 
|       <if test="cmodelId != null"> | 
|         AND `cmodel`.`ID` = #{cmodelId} | 
|       </if> | 
|       <if test="cmodelDeleted != null"> | 
|         AND `cmodel`.`DELETED` = #{cmodelDeleted} | 
|       </if> | 
|       <if test="cmodelCreateUser != null"> | 
|         AND `cmodel`.`CREATE_USER` = #{cmodelCreateUser} | 
|       </if> | 
|       <if test="cmodelCreateTime != null"> | 
|         AND `cmodel`.`CREATE_TIME` = #{cmodelCreateTime} | 
|       </if> | 
|       <if test="cmodelUpdateUser != null"> | 
|         AND `cmodel`.`UPDATE_USER` = #{cmodelUpdateUser} | 
|       </if> | 
|       <if test="cmodelUpdateTime != null"> | 
|         AND `cmodel`.`UPDATE_TIME` = #{cmodelUpdateTime} | 
|       </if> | 
|       <if test="cmodelOrigin != null"> | 
|         AND `cmodel`.`ORIGIN` = #{cmodelOrigin} | 
|       </if> | 
|       <if test="cmodelName != null and cmodelName != ''"> | 
|         AND `cmodel`.`NAME` = #{cmodelName} | 
|       </if> | 
|       <if test="cmodelRemark != null and cmodelRemark != ''"> | 
|         AND `cmodel`.`REMARK` = #{cmodelRemark} | 
|       </if> | 
|       <if test="cmodelType != null and cmodelType != ''"> | 
|         AND `cmodel`.`TYPE` = #{cmodelType} | 
|       </if> | 
|       <if test="cmodelLegalPersonId != null"> | 
|         AND `cmodel`.`LEGAL_PERSON_ID` = #{cmodelLegalPersonId} | 
|       </if> | 
|       <if test="cmodelLegalPersonPhone != null and cmodelLegalPersonPhone != ''"> | 
|         AND `cmodel`.`LEGAL_PERSON_PHONE` = #{cmodelLegalPersonPhone} | 
|       </if> | 
|       <if test="cmodelRegisterDate != null"> | 
|         AND `cmodel`.`REGISTER_DATE` = #{cmodelRegisterDate} | 
|       </if> | 
|       <if test="cmodelAddr != null and cmodelAddr != ''"> | 
|         AND `cmodel`.`ADDR` = #{cmodelAddr} | 
|       </if> | 
|       <if test="cmodelBusinessScope != null and cmodelBusinessScope != ''"> | 
|         AND `cmodel`.`BUSINESS_SCOPE` = #{cmodelBusinessScope} | 
|       </if> | 
|       <if test="cmodelBusinessTerm != null and cmodelBusinessTerm != ''"> | 
|         AND `cmodel`.`BUSINESS_TERM` = #{cmodelBusinessTerm} | 
|       </if> | 
|       <if test="cmodelIssueDate != null"> | 
|         AND `cmodel`.`ISSUE_DATE` = #{cmodelIssueDate} | 
|       </if> | 
|       <if test="cmodelCreditCode != null and cmodelCreditCode != ''"> | 
|         AND `cmodel`.`CREDIT_CODE` = #{cmodelCreditCode} | 
|       </if> | 
|       <if test="cmodelRegisterCapital != null and cmodelRegisterCapital != ''"> | 
|         AND `cmodel`.`REGISTER_CAPITAL` = #{cmodelRegisterCapital} | 
|       </if> | 
|       <if test="cmodelFileFormat != null and cmodelFileFormat != ''"> | 
|         AND `cmodel`.`FILE_FORMAT` = #{cmodelFileFormat} | 
|       </if> | 
|       <if test="cmodelFileName != null and cmodelFileName != ''"> | 
|         AND `cmodel`.`FILE_NAME` = #{cmodelFileName} | 
|       </if> | 
|       <if test="cmodelFileStoreAddr != null and cmodelFileStoreAddr != ''"> | 
|         AND `cmodel`.`FILE_STORE_ADDR` = #{cmodelFileStoreAddr} | 
|       </if> | 
|       <if test="cmodelAuthStatus != null"> | 
|         AND `cmodel`.`AUTH_STATUS` = #{cmodelAuthStatus} | 
|       </if> | 
|       <if test="cmodelAuthId != null"> | 
|         AND `cmodel`.`AUTH_ID` = #{cmodelAuthId} | 
|       </if> | 
|       <if test="cmodelDingdingId != null and cmodelDingdingId != ''"> | 
|         AND `cmodel`.`DINGDING_ID` = #{cmodelDingdingId} | 
|       </if> | 
|       <if test="cmodelOpenUserNum != null"> | 
|         AND `cmodel`.`OPEN_USER_NUM` = #{cmodelOpenUserNum} | 
|       </if> | 
|       <if test="cmodelOpenModules != null and cmodelOpenModules != ''"> | 
|         AND `cmodel`.`OPEN_MODULES` = #{cmodelOpenModules} | 
|       </if> | 
|       <if test="cmodelOepnValidDate != null"> | 
|         AND `cmodel`.`OEPN_VALID_DATE` = #{cmodelOepnValidDate} | 
|       </if> | 
|       <if test="cmodelOepnType != null"> | 
|         AND `cmodel`.`OEPN_TYPE` = #{cmodelOepnType} | 
|       </if> | 
|       <if test="cmodelChannelId != null"> | 
|         AND `cmodel`.`CHANNEL_ID` = #{cmodelChannelId} | 
|       </if> | 
|     </where> | 
|   </select> | 
| </mapper> |