中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

java_mybatis

發布時間:2020-06-14 15:36:22 來源:網絡 閱讀:267 作者:zjy1002261870 欄目:開發技術

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<properties resource="META-INF/properties/dbms.properties"></properties>
<settings>

    <setting name="cacheEnabled" value="true" />                                        <!-- mybatis cache ???? -->
    <setting name="lazyLoadingEnabled" value="true" />                              <!-- ???? ???? -->
    <setting name="multipleResultSetsEnabled" value="true" />                       <!-- ? ?? ???? ?? ?? ResultSet? ???? ?? -->
    <setting name="useColumnLabel" value="true" />                                  <!-- ??? ?? ?? ??? ?? -->
    <setting name="useGeneratedKeys" value="false" />                               <!-- ???? ?? JDBC ?? ?? ?? -->
    <setting name="autoMappingBehavior" value="PARTIAL" />                          <!-- mybatis? ??? ??/????? ???? ????? ??? ?? ??(PARTIAL? ???? ?? ??? ?? -->
    <setting name="defaultExecutorType" value="SIMPLE" />                           <!-- ??? Executor ??(SIMPLE? ??? ???? ?? ??) -->
    <setting name="defaultStatementTimeout" value="10" />                           <!-- DB ?? ???? ?? -->
    <setting name="safeRowBoundsEnabled" value="false" />                           <!-- ????? RowBound ?? ???? -->
    <setting name="mapUnderscoreToCamelCase" value="false" />                       <!-- ??? DB ???? JAVA? Camel????? ?? ?? ?? -->
    <setting name="localCacheScope" value="SESSION" />                              <!-- ???? ????(SESSION: ??? ???? ????? ??) -->
    <setting name="jdbcTypeForNull" value="NULL" />                                 <!-- mybatis? ???? parameter? null? ??, jdbcType? Setting -->
    <setting name="lazyLoadTriggerMethods" value="equals,clone,hashCode,toString" />    <!-- ????? ???? ??? ???? ?? -->
    <setting name="callSettersOnNulls" value="true" />                              <!-- ??? ?? null?? setter? ?? put ???? ????? ?? (false???, null? field? ???? ??? : default? false -->

</settings>

<mappers>
    <!-- <property name="mapperLocations" value="classpath:META-INF/persistence/mybatis/${dbms.kind}/*Mapper.xml"></property>  -->
    <mapper resource="META-INF/persistence/mybatis/${dbms.kind}/GoodsMapper.xml" />
    <mapper resource="META-INF/persistence/mybatis/${dbms.kind}/Paging.xml" />
    <mapper resource="META-INF/persistence/mybatis/${dbms.kind}/SurveyMapper.xml" />
</mappers>

</configuration>
<?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="paging">

<!-- ???? ?? ?? QUERY ???..??? ?? ????? ?? ????.. -->
<sql id="pagingPreSQL">
    SELECT * FROM (
    SELECT ROWNUM AS "ROWNUMBER" , AA.* FROM (
</sql>

<sql id="pagingPostSQL">
    ) AA ) AAA
     <![CDATA[
        WHERE AAA.ROWNUMBER  >= #{firstRowIndex} AND  AAA.ROWNUMBER  <= #{lastRowIndex}
     ]]>
</sql>

<sql id="pagingPreSqlOverCount">
    SELECT FLOOR((AA.totalCount-1)/#{rowPerPage})+1 totalPage , AA.* FROM (
    SELECT COUNT(*) OVER() totalCount, ROWNUM ROWNUMBER,MAINSQL.* FROM
    (
</sql>

<sql id="pagingPostSqlOverCount">

    ) MAINSQL 
     <![CDATA[ ) AA WHERE ROWNUMBER>=((#{pageNo}-1)*#{rowPerPage})+1 AND ROWNUMBER <= (((#{pageNo}-1)*#{rowPerPage})+1) + #{rowPerPage}-1 ]]>
</sql>

</mapper>
<?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="FileUploadDataMapper">

<select id="getFileUploadData" parameterType="java.util.Map"
    resultType="java.util.Map">
    SELECT [Number]
    ,[FileGuid]
    ,[FileId]
    ,[FilePath]
    ,[FileName]
    ,[FileType]
    ,[FileSize]
    ,[CreateTime]
    FROM [dbo].[AA_FileUploadData]
    WHERE 1=1

    <if test="FileGuid !=null and FileGuid !='' ">
        AND FileGuid= #{FileGuid}
    </if>
    <if test="FileId !=null and FileId !='' ">
        AND FileId= #{FileId}
    </if>
</select>

<select id="getFileUploadDataList" parameterType="java.util.Map"
    resultType="java.util.Map">
    <include refid="paging.pagingPreSQL" />
    select ROW_NUMBER() over(order by Number desc )
    rownum,[Number]
    ,[FileGuid]
    ,[FileId]
    ,[FilePath]
    ,[FileName]
    ,[FileType]
    ,[FileSize]
    ,[CreateTime]
    from AA_FileUploadData
    where 1=1
    <if test="FileGuid !=null and FileGuid !='' ">
        AND FileGuid= #{FileGuid}
    </if>
    <if test="FileId !=null and FileId !='' ">
        AND FileId= #{FileId}
    </if>
    <include refid="paging.pagingPostSQL" />
</select>
<select id="getFileUploadDataListCnt" parameterType="java.util.Map"
    resultType="java.lang.Integer">
    select count(1) as "totalCnt"
    from AA_FileUploadData
    where 1=1
    <if test="FileGuid !=null and FileGuid !='' ">
        AND FileGuid= #{FileGuid}
    </if>
    <if test="FileId !=null and FileId !='' ">
        AND FileId= #{FileId}
    </if>
</select>
<!-- useGeneratedKeys="true" keyProperty="GoodsID" -->

<insert id="insertFileUploadData" parameterType="java.util.Map">
    <selectKey resultType="int" keyProperty="Number" order="AFTER">
        select
        @@IDENTITY as id
    </selectKey>
    INSERT INTO [dbo].[AA_FileUploadData]
    ([FileGuid]
    ,[FileId]
    ,[FilePath]
    ,[FileName]
    ,[FileType]
    ,[FileSize]
    ,[CreateTime])
    VALUES
    (
    #{FileGuid},
    #{FileId},
    #{FilePath},
    #{FileName},
    #{FileType},
    #{FileSize},
    GetDate()
    )
</insert>

<delete id="deleteFileUploadData" parameterType="java.util.Map">
    DELETE FROM AA_FileUploadData
    WHERE FileGuid = #{FileGuid}
    <if test="FileId !=null and FileId !='' ">
        AND FileId = #{FileId}
    </if>
</delete>

</mapper>

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

正安县| 赤水市| 白朗县| 咸阳市| 和政县| 眉山市| 繁昌县| 淳化县| 根河市| 布拖县| 科技| 西平县| 屏东市| 霞浦县| 通江县| 军事| 彩票| 凤阳县| 泗阳县| 丹江口市| 许昌县| 炎陵县| 博罗县| 淮滨县| 昌乐县| 岐山县| 防城港市| 定南县| 长丰县| 辛集市| 江门市| 新余市| 南和县| 茂名市| 科技| 平顶山市| 洪洞县| 名山县| 奇台县| 武夷山市| 砚山县|