| | |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.platform.domain.vo.DynamicColumnVO"> |
| | | <result column="ref_id" property="refId" /> |
| | | <result column="prop_name" property="propName" /> |
| | | <result column="label_value" property="labelValue" /> |
| | | <result column="field_value" property="fieldValue" /> |
| | | <result column="ref_id" property="refId"/> |
| | | <result column="prop_name" property="propName"/> |
| | | <result column="label_value" property="labelValue"/> |
| | | <result column="field_value" property="fieldValue"/> |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <select id="getById" resultMap="BaseResultMap"> |
| | | SELECT |
| | | TDC.ref_id, |
| | | TDC.prop_name, |
| | | TDC.label_value, |
| | | TDC.field_value, |
| | | TDC.id |
| | | FROM |
| | | t_dynamic_column TDC |
| | | WHERE |
| | | TDC.id = #{id} AND TDC.deleted = 0 |
| | | SELECT TDC.ref_id, |
| | | TDC.prop_name, |
| | | TDC.label_value, |
| | | TDC.field_value, |
| | | TDC.id |
| | | FROM t_dynamic_column TDC |
| | | WHERE TDC.id = #{id} |
| | | AND TDC.deleted = 0 |
| | | </select> |
| | | |
| | | <select id="getHeader" resultType="java.lang.String"> |
| | | SELECT TDC.label_value |
| | | FROM t_dynamic_column TDC |
| | | WHERE TDC.table_name =#{tableName} |
| | | </select> |
| | | <select id="getData" resultType="com.ycl.platform.domain.vo.DynamicColumnVO"> |
| | | SELECT |
| | | TDCV.ref_id as id, |
| | | TDC.prop_name, |
| | | TDC.label_value, |
| | | TDCV.column_value |
| | | FROM |
| | | t_dynamic_column TDC |
| | | LEFT JOIN t_dynamic_column_value TDCV ON TDC.id =TDCV.dynamic_column_id |
| | | <where> |
| | | TDC.table_name = 't_yw_point' |
| | | <!-- <if test="ids !=null and ids.size > 0">--> |
| | | <!-- AND TDCV.ref_id in--> |
| | | <!-- <foreach collection="ids" open="(" separator="," close=")" item="id">--> |
| | | <!-- #{id}--> |
| | | <!-- </foreach>--> |
| | | <!-- </if>--> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="getPage" resultMap="BaseResultMap"> |
| | | SELECT |
| | | TDC.ref_id, |
| | | TDC.prop_name, |
| | | TDC.label_value, |
| | | TDC.field_value, |
| | | TDC.id |
| | | FROM |
| | | t_dynamic_column TDC |
| | | WHERE |
| | | TDC.deleted = 0 |
| | | SELECT TDC.ref_id, |
| | | TDC.prop_name, |
| | | TDC.label_value, |
| | | TDC.field_value, |
| | | TDC.id |
| | | FROM t_dynamic_column TDC |
| | | WHERE TDC.deleted = 0 |
| | | </select> |
| | | |
| | | </mapper> |