MDdxqMapper.xml 1.97 KB
<?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.hotent.lpg.manage.dao.MDdxqDao">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.hotent.lpg.common.model.WDdxq">
        <id column="ID_" property="id" />
    <result column="REF_ID_" property="refId" />
    <result column="F_ddID" property="fDdid" />
    <result column="F_qplxID" property="fQplxid" />
    <result column="F_spmc" property="fSpmc" />
    <result column="F_tp" property="fTp" />
    <result column="F_sl" property="fSl" />
    <result column="F_dj" property="fDj" />
    <result column="F_cjsj" property="fCjsj" />
    <result column="F_bz" property="fBz" />
    <result column="F_cjr" property="fCjr" />
    <result column="F_gxr" property="fGxr" />
    <result column="F_gxsj" property="fGxsj" />
    <result column="F_ms" property="fMs" />
    <result column="F_form_data_rev_" property="fFormDataRev" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        ID_, REF_ID_, F_ddID, F_qplxID, F_spmc, F_tp, F_sl, F_dj, F_cjsj, F_bz, F_cjr, F_gxr, F_gxsj, F_form_data_rev_,F_ms
    </sql>

	<select id="selectPage" resultMap="BaseResultMap">
		select
			<include refid="Base_Column_List"/>
		from
			w_ddxq
		${ew.customSqlSegment}
	</select>

	<select id="selectList" resultMap="BaseResultMap">
		select
			<include refid="Base_Column_List"/>
		from
			w_ddxq
		${ew.customSqlSegment}
	</select>

	<select id="selectById" resultMap="BaseResultMap">
		select
			<include refid="Base_Column_List"/>
		from
			w_ddxq
		where
		    ID_ = #{id}
	</select>

    <select id="countSalesVolume" resultType="java.lang.Integer">
    select coalesce(sum(F_sl),0) from w_ddxq where F_qplxID = #{qplxID}
    </select>

    <select id="listByFDdid" resultMap="BaseResultMap">
        SELECT * FROM w_ddxq w_ddxq where w_ddxq.F_ddID = #{ddID}
    </select>
</mapper>