<?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="com.sinata.system.mapper.MwApplicationMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.sinata.system.domain.MwApplication">
|
<id column="ID" property="id" />
|
<result column="DEL_FLAG" property="delFlag" />
|
<result column="CREATE_BY" property="createBy" />
|
<result column="CREATE_TIME" property="createTime" />
|
<result column="UPDATE_BY" property="updateBy" />
|
<result column="UPDATE_TIME" property="updateTime" />
|
<result column="DEPARTMENT_ID" property="departmentId" />
|
<result column="UNIT_TYPE" property="unitType" />
|
<result column="UNIT_NAME" property="unitName" />
|
<result column="CONCAT" property="concat" />
|
<result column="PHONE" property="phone" />
|
<result column="DESCRIPTION" property="description" />
|
<result column="LEGAL_PERSON_CARD_FRONT" property="legalPersonCardFront" />
|
<result column="LEGAL_PERSON_CARD_BACK" property="legalPersonCardBack" />
|
<result column="CERTIFICATE_IMAGE_URL" property="certificateImageUrl" />
|
<result column="AUDIT_STATUS" property="auditStatus" />
|
<result column="AUDIT_OPINION" property="auditOpinion" />
|
</resultMap>
|
|
<!-- 通用查询结果列 -->
|
<sql id="Base_Column_List">
|
DEL_FLAG,
|
CREATE_BY,
|
CREATE_TIME,
|
UPDATE_BY,
|
UPDATE_TIME,
|
ID, DEPARTMENT_ID, UNIT_TYPE, UNIT_NAME, CONCAT, PHONE, DESCRIPTION, LEGAL_PERSON_CARD_FRONT, LEGAL_PERSON_CARD_BACK, CERTIFICATE_IMAGE_URL, AUDIT_STATUS, AUDIT_OPINION
|
</sql>
|
<select id="pageList" resultType="com.sinata.system.domain.vo.MwApplicationVO">
|
SELECT MA.ID,
|
MA.DEPARTMENT_ID,
|
MA.UNIT_TYPE,
|
MA.UNIT_NAME,
|
MA.CONCAT,
|
MA.PHONE,
|
MA.DESCRIPTION,
|
MA.LEGAL_PERSON_CARD_FRONT,
|
MA.LEGAL_PERSON_CARD_BACK,
|
MA.CERTIFICATE_IMAGE_URL,
|
MA.AUDIT_STATUS,
|
MA.AUDIT_OPINION,
|
MA.CREATE_TIME,
|
MA.REGION,
|
SD.DEPARTMENT_NAME
|
FROM MW_APPLICATION MA
|
LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MA.DEPARTMENT_ID
|
<where>
|
MA.DEL_FLAG = 0
|
<if test="treeCode != null and treeCode !=''">
|
AND SD.TREE_CODE LIKE CONCAT(#{treeCode}, '%')
|
</if>
|
<if test="query.unitType != null and query.unitType !=''">
|
AND MA.UNIT_TYPE = #{query.unitType}
|
</if>
|
<if test="query.unitName != null and query.unitName !=''">
|
AND MA.UNIT_NAME LIKE CONCAT('%',#{query.unitName},'%')
|
</if>
|
<if test="query.concat !=null and query.concat != ''">
|
AND MA.CONCAT LIKE CONCAT('%',#{query.concat},'%')
|
</if>
|
<if test="query.phone != null and query.phone != ''">
|
AND MA.PHONE LIKE CONCAT('%',#{query.phone},'%')
|
</if>
|
</where>
|
ORDER BY MA.CREATE_TIME DESC
|
</select>
|
<select id="detail" resultType="com.sinata.system.domain.vo.MwApplicationVO">
|
SELECT MA.ID,
|
MA.DEPARTMENT_ID,
|
MA.UNIT_TYPE,
|
MA.UNIT_NAME,
|
MA.CONCAT,
|
MA.PHONE,
|
MA.DESCRIPTION,
|
MA.LEGAL_PERSON_CARD_FRONT,
|
MA.LEGAL_PERSON_CARD_BACK,
|
MA.CERTIFICATE_IMAGE_URL,
|
MA.AUDIT_STATUS,
|
MA.AUDIT_OPINION,
|
MA.CREATE_TIME,
|
MA.REGION,
|
MA.RELATION,
|
SD.DEPARTMENT_NAME
|
FROM MW_APPLICATION MA
|
LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MA.DEPARTMENT_ID
|
<where>
|
MA.ID = #{id}
|
</where>
|
</select>
|
|
</mapper>
|