| | |
| | | <result column="informant_phone_code" property="informantPhoneCode" /> |
| | | <result column="informant_id_card" property="informantIdCard" /> |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.ycl.entity.caseHandler.Violations" id="CondMapResultMap" extends="BaseResultMap"> |
| | | <result column="category_text" property="categoryText" /> |
| | | <result column="type_text" property="typeText" /> |
| | | <result column="grade_text" property="gradeText" /> |
| | | </resultMap> |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, category_id, type_id, grade_id, action_cause, link_shop, shop_name, car_number, description, informant, informant_phone_code, informant_id_card |
| | | </sql> |
| | | |
| | | <select id="selectCondMap" parameterType="map" resultMap="CondMapResultMap"> |
| | | SELECT |
| | | uv.*, |
| | | udd.name category_text, |
| | | udd2.name type_text, |
| | | udd3.name grade_text |
| | | FROM |
| | | ums_violations uv |
| | | LEFT JOIN ums_data_dictionary udd on uv.category_id = udd.id and udd.type_code = '01' |
| | | LEFT JOIN ums_data_dictionary udd2 on uv.type_id = udd2.id and udd.type_code = '01' |
| | | LEFT JOIN ums_data_dictionary udd3 on uv.grade_id = udd3.id and udd.type_code = '01' |
| | | WHERE |
| | | uv.`id` = #{id} |
| | | </select> |
| | | </mapper> |