diff options
Diffstat (limited to 'vnfmarket-be/vnf-sdk-marketplace/src/main/resources/mybatis/sql/MarketplaceMapper.xml')
-rw-r--r-- | vnfmarket-be/vnf-sdk-marketplace/src/main/resources/mybatis/sql/MarketplaceMapper.xml | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/resources/mybatis/sql/MarketplaceMapper.xml b/vnfmarket-be/vnf-sdk-marketplace/src/main/resources/mybatis/sql/MarketplaceMapper.xml new file mode 100644 index 00000000..27801ae5 --- /dev/null +++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/resources/mybatis/sql/MarketplaceMapper.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2017 Huawei Technologies Co., Ltd. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="org.openo.vnfsdk.marketplace.db.mapper.IMarketplaceMapper"> + + <select id="getAllPackageData" resultType="org.openo.vnfsdk.marketplace.db.entity.PackageData"> + SELECT + * + FROM + CSAR_PACKAGE_TABLE + </select> + + <select id="getPackageData" resultType="org.openo.vnfsdk.marketplace.db.entity.PackageData"> + SELECT + * + FROM + CSAR_PACKAGE_TABLE + WHERE + CSARID=#{csarId} + </select> + + <insert id="savePackageData" parameterType="org.openo.vnfsdk.marketplace.db.entity.PackageData"> + INSERT INTO + CSAR_PACKAGE_TABLE + (CSARID, DOWNLOADURI, REPORT, SIZE, FORMAT, CREATETIME, DELETIONPENDING, MODIFYTIME, SHORTDESC, NAME, VERSION, PROVIDER, TYPE, DETAILS, REMARKS,DOWNLOADCOUNT) + VALUES + (#{csarId}, #{downloadUri}, #{report}, #{size}, #{format},#{createTime}, #{deletionPending}, #{modifyTime}, #{shortDesc}, #{name}, #{version}, #{provider},#{type}, #{details}, #{remarks}, #{downloadCount}) + </insert> + + <delete id="deletePackageData" parameterType="String"> + DELETE FROM + CSAR_PACKAGE_TABLE + WHERE + CSARID=#{csarId} + </delete> + + <delete id="updatePackageData" parameterType="org.openo.vnfsdk.marketplace.db.entity.PackageData"> + UPDATE CSAR_PACKAGE_TABLE SET DOWNLOADCOUNT=#{downloadCount} + WHERE + CSARID=#{csarId} + </delete> + +</mapper>
\ No newline at end of file |