-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from WeBankFinTech/dev-0.9.0
Dev 0.9.0
- Loading branch information
Showing
68 changed files
with
3,943 additions
and
300 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
dss-server/src/main/java/com/webank/wedatasphere/dss/server/dao/WorkspaceMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.webank.wedatasphere.dss.server.dao; | ||
|
||
import com.webank.wedatasphere.dss.server.dto.response.*; | ||
import com.webank.wedatasphere.dss.server.entity.*; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Created by schumiyi on 2020/6/22 | ||
*/ | ||
public interface WorkspaceMapper { | ||
|
||
List<DWSWorkspace> getWorkspaces(); | ||
|
||
List<DWSWorkspace> findByWorkspaceName(String name); | ||
|
||
void addWorkSpace(DWSWorkspace dwsWorkspace); | ||
|
||
List<HomepageDemoMenuVo> getHomepageDemoMenusEn(); | ||
List<HomepageDemoMenuVo> getHomepageDemoMenusCn(); | ||
|
||
List<HomepageDemoInstanceVo> getHomepageInstancesByMenuIdCn(Long id); | ||
List<HomepageDemoInstanceVo> getHomepageInstancesByMenuIdEn(Long id); | ||
|
||
List<HomepageVideoVo> getHomepageVideosEn(); | ||
List<HomepageVideoVo> getHomepageVideosCn(); | ||
|
||
DWSWorkspace getWorkspaceById(Long workspaceId); | ||
|
||
List<OnestopMenuVo> getManagementMenuCn(); | ||
List<OnestopMenuVo> getManagementMenuEn(); | ||
|
||
List<OnestopMenuVo> getApplicationMenuCn(); | ||
List<OnestopMenuVo> getApplicationMenuEn(); | ||
|
||
List<OnestopMenuAppInstanceVo> getMenuAppInstancesCn(Long id); | ||
List<OnestopMenuAppInstanceVo> getMenuAppInstanceEn(Long id); | ||
|
||
} |
158 changes: 158 additions & 0 deletions
158
dss-server/src/main/java/com/webank/wedatasphere/dss/server/dao/impl/workspaceMapper.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!-- | ||
~ Copyright 2019 WeBank | ||
~ | ||
~ 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="com.webank.wedatasphere.dss.server.dao.WorkspaceMapper"> | ||
|
||
<sql id="workspace_main"> | ||
id,`name`,`label`,`description`,`department`,`product`,`source`,`create_by`,`create_time`,`last_update_user`,`last_update_time` | ||
</sql> | ||
|
||
<sql id="menu_appInstances_cn"> | ||
m.`id`,m.`title_cn` AS `title`, m.`desc_cn` AS `description`,m.`labels_cn` AS `labels`, | ||
m.`access_button_cn` AS `access_button`,m.`manual_button_cn` AS `manualButton`,m.`is_active`, | ||
m.`manual_button_url`,m.`icon`,m.`order`,app.`homepage_url` AS `access_button_url`,app.project_url, app.`name` | ||
</sql> | ||
<sql id="menu_appInstances_en"> | ||
m.`id`,m.`title_en` AS `title`, m.`desc_en` AS `description`,m.`labels_en` AS `labels`, | ||
m.`access_button_en` AS `access_button`,m.`manual_button_en` AS `manualButton`,m.`is_active` | ||
m.`manual_button_url`,m.`icon`,m.`order`,app.`homepage_url` AS `access_button_url`,app.project_url, app.`name` | ||
</sql> | ||
|
||
|
||
<select id="getWorkspaces" resultType="com.webank.wedatasphere.dss.server.entity.DWSWorkspace"> | ||
SELECT * | ||
FROM dss_workspace | ||
ORDER BY dss_workspace.`create_time` DESC | ||
</select> | ||
|
||
<select id="getWorkspaceById" resultType="com.webank.wedatasphere.dss.server.entity.DWSWorkspace"> | ||
SELECT * | ||
FROM dss_workspace | ||
WHERE id = #{workspaceId} | ||
</select> | ||
|
||
<select id="findByWorkspaceName" resultType="com.webank.wedatasphere.dss.server.entity.DWSWorkspace"> | ||
SELECT * | ||
FROM dss_workspace | ||
<where> | ||
dss_workspace.`name` = #{name} | ||
</where> | ||
</select> | ||
|
||
<insert id="addWorkSpace" useGeneratedKeys="true" keyProperty="id" parameterType="com.webank.wedatasphere.dss.server.entity.DWSWorkspace"> | ||
INSERT INTO dss_workspace (<include refid = "workspace_main" />) | ||
VALUES | ||
(#{id},#{name},#{label},#{description},#{department},#{product},#{source},#{createBy},#{createTime},#{lastUpdateUser},#{lastUpdateTime}) | ||
</insert> | ||
|
||
<select id="getHomepageDemoMenusCn" resultType="com.webank.wedatasphere.dss.server.dto.response.HomepageDemoMenuVo"> | ||
SELECT `id`,`name`,`title_cn` AS title,`description`,`icon`,`order` | ||
FROM dss_homepage_demo_menu | ||
<where> | ||
`is_active` = 1 | ||
</where> | ||
</select> | ||
<select id="getHomepageDemoMenusEn" resultType="com.webank.wedatasphere.dss.server.dto.response.HomepageDemoMenuVo"> | ||
SELECT `id`,`name`,`title_en` AS `title`,`description`,`icon`,`order` | ||
FROM dss_homepage_demo_menu | ||
<where> | ||
`is_active` = 1 | ||
</where> | ||
</select> | ||
|
||
<select id="getHomepageInstancesByMenuIdCn" resultType="com.webank.wedatasphere.dss.server.dto.response.HomepageDemoInstanceVo"> | ||
SELECT `id`,`menu_id`,`name`,`url`,`title_cn` AS `title`,`description`,`icon`,`order` | ||
FROM dss_homepage_demo_instance | ||
<where> | ||
`is_active` = 1 AND `menu_id` = #{id} | ||
</where> | ||
</select> | ||
<select id="getHomepageInstancesByMenuIdEn" resultType="com.webank.wedatasphere.dss.server.dto.response.HomepageDemoInstanceVo"> | ||
SELECT `id`,`menu_id`,`name`,`url`,`title_en` AS `title`,`description`,`icon`,`order` | ||
FROM dss_homepage_demo_instance | ||
<where> | ||
`is_active` = 1 AND `menu_id` = #{id} | ||
</where> | ||
</select> | ||
|
||
<select id="getHomepageVideosCn" resultType="com.webank.wedatasphere.dss.server.dto.response.HomepageVideoVo"> | ||
SELECT `id`,`name`,`title_cn` AS `title`,`url`,`description`,`order` | ||
FROM dss_homepage_video | ||
<where> | ||
`is_active` = 1 | ||
</where> | ||
</select> | ||
<select id="getHomepageVideosEn" resultType="com.webank.wedatasphere.dss.server.dto.response.HomepageVideoVo"> | ||
SELECT `id`,`name`,`title_en` AS `title`,`url`,`description`,`order` | ||
FROM dss_homepage_video | ||
<where> | ||
`is_active` = 1 | ||
</where> | ||
</select> | ||
|
||
<select id="getManagementMenuCn" resultType="com.webank.wedatasphere.dss.server.dto.response.OnestopMenuVo"> | ||
SELECT `id`,`name`,`title_cn` AS `title`,`order` | ||
FROM dss_onestop_menu | ||
<where> | ||
`is_active` = 0 | ||
</where> | ||
</select> | ||
<select id="getManagementMenuEn" resultType="com.webank.wedatasphere.dss.server.dto.response.OnestopMenuVo"> | ||
SELECT `id`,`name`,`title_en` AS `title`,`order` | ||
FROM dss_onestop_menu | ||
<where> | ||
`is_active` = 0 | ||
</where> | ||
</select> | ||
|
||
<select id="getApplicationMenuCn" resultType="com.webank.wedatasphere.dss.server.dto.response.OnestopMenuVo"> | ||
SELECT `id`,`name`,`title_cn` AS `title`,`order` | ||
FROM dss_onestop_menu | ||
<where> | ||
`is_active` = 1 | ||
</where> | ||
</select> | ||
<select id="getApplicationMenuEn" resultType="com.webank.wedatasphere.dss.server.dto.response.OnestopMenuVo"> | ||
SELECT `id`,`name`,`title_en` AS `title`,`order` | ||
FROM dss_onestop_menu | ||
<where> | ||
`is_active` = 1 | ||
</where> | ||
</select> | ||
|
||
<select id="getMenuAppInstancesCn" resultType="com.webank.wedatasphere.dss.server.dto.response.OnestopMenuAppInstanceVo"> | ||
SELECT <include refid = "menu_appInstances_cn"/> | ||
FROM dss_onestop_menu_application m | ||
LEFT JOIN dss_application app | ||
ON m.`application_id` = app.`id` | ||
<where> | ||
m.`onestop_menu_id` = #{id} | ||
</where> | ||
</select> | ||
<select id="getMenuAppInstancesEn" resultType="com.webank.wedatasphere.dss.server.dto.response.OnestopMenuAppInstanceVo"> | ||
SELECT <include refid = "menu_appInstances_en"/> | ||
FROM dss_onestop_menu_application m | ||
LEFT JOIN dss_application app | ||
ON m.`application_id` = app.`id` | ||
<where> | ||
m.`onestop_menu_id` = #{id} | ||
</where> | ||
</select> | ||
</mapper> |
Oops, something went wrong.