forked from edp963/davinci
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a8748c4
commit 9c06a58
Showing
32 changed files
with
778 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,4 +31,5 @@ tempFiles/ | |
userfiles/ | ||
.vscode | ||
*yarn.lock | ||
bin/upgrade.go | ||
bin/upgrade.go | ||
davinci-ui/ |
46 changes: 46 additions & 0 deletions
46
server/src/main/java/edp/davinci/common/model/RecordInfo.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,46 @@ | ||
/* | ||
* << | ||
* Davinci | ||
* == | ||
* Copyright (C) 2016 - 2018 EDP | ||
* == | ||
* 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. | ||
* >> | ||
* | ||
*/ | ||
|
||
package edp.davinci.common.model; | ||
|
||
import lombok.Data; | ||
|
||
import java.util.Date; | ||
|
||
@Data | ||
public class RecordInfo { | ||
Long createBy; | ||
|
||
Date createTime; | ||
|
||
Long updateBy; | ||
|
||
Date updateTime; | ||
|
||
public void createBy(Long userId) { | ||
this.createBy = userId; | ||
this.createTime = new Date(); | ||
} | ||
|
||
|
||
public void updateBy(Long userId) { | ||
this.updateBy = userId; | ||
this.updateTime = new Date(); | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
server/src/main/java/edp/davinci/dao/DownloadRecordMapper.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,38 @@ | ||
package edp.davinci.dao; | ||
|
||
import edp.davinci.model.DownloadRecord; | ||
import org.apache.ibatis.annotations.Delete; | ||
import org.apache.ibatis.annotations.Select; | ||
import org.apache.ibatis.annotations.Update; | ||
|
||
import java.util.List; | ||
|
||
public interface DownloadRecordMapper { | ||
|
||
int insert(DownloadRecord downloadRecord); | ||
|
||
@Delete({ | ||
"delete from download_record where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
int deleteById(Long id); | ||
|
||
@Select({ | ||
"select * from download_record where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
DownloadRecord selectById(Long id); | ||
|
||
|
||
@Select({ | ||
"select * from download_record where user_id = #{userId} order by create_time desc" | ||
}) | ||
List<DownloadRecord> getDownloadRecordsByUser(Long userId); | ||
|
||
@Update({ | ||
"update download_record", | ||
"set path = #{path,jdbcType=VARCHAR},", | ||
"status = #{status,jdbcType=SMALLINT},", | ||
"last_download_time = #{lastDownloadTime,jdbcType=TIMESTAMP}", | ||
"where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
int updateById(DownloadRecord downloadRecord); | ||
} |
20 changes: 20 additions & 0 deletions
20
server/src/main/java/edp/davinci/dao/RelProjectAdminMapper.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,20 @@ | ||
package edp.davinci.dao; | ||
|
||
import edp.davinci.model.RelProjectAdmin; | ||
import org.apache.ibatis.annotations.Delete; | ||
import org.apache.ibatis.annotations.Param; | ||
|
||
public interface RelProjectAdminMapper { | ||
|
||
int insert(RelProjectAdmin relProjectAdmin); | ||
|
||
@Delete({ | ||
"delete from rel_project_admin where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
int deleteById(Long id); | ||
|
||
@Delete({ | ||
"delete from rel_project_admin where project_id = #{projectId} and user_id = #{userId}" | ||
}) | ||
int delete(@Param("projectId") Long projectId, @Param("userId") Long userId); | ||
} |
34 changes: 34 additions & 0 deletions
34
server/src/main/java/edp/davinci/dao/RelRoleDashboardMapper.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,34 @@ | ||
package edp.davinci.dao; | ||
|
||
import edp.davinci.model.RelRoleDashboard; | ||
import org.apache.ibatis.annotations.Delete; | ||
import org.apache.ibatis.annotations.Select; | ||
import org.apache.ibatis.annotations.Update; | ||
|
||
public interface RelRoleDashboardMapper { | ||
|
||
int insert(RelRoleDashboard relRoleDashboard); | ||
|
||
@Delete({ | ||
"delete from rel_role_dashboard where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
int deleteById(Long id); | ||
|
||
|
||
@Select({ | ||
"select * from rel_role_dashboard where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
RelRoleDashboard selectById(Long id); | ||
|
||
|
||
@Update({ | ||
"update rel_role_dashboard", | ||
"set role_id = #{roleId,jdbcType=BIGINT},", | ||
"dashboard_id = #{dashboardId,jdbcType=BIGINT},", | ||
"permission = #{permission,jdbcType=SMALLINT},", | ||
"update_by = #{updateBy,jdbcType=BIGINT},", | ||
"update_time = #{updateTime,jdbcType=TIMESTAMP}", | ||
"where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
int updateById(RelRoleDashboard relRoleDashboard); | ||
} |
33 changes: 33 additions & 0 deletions
33
server/src/main/java/edp/davinci/dao/RelRoleDisplayMapper.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,33 @@ | ||
package edp.davinci.dao; | ||
|
||
import edp.davinci.model.RelRoleDisplay; | ||
import org.apache.ibatis.annotations.Delete; | ||
import org.apache.ibatis.annotations.Select; | ||
import org.apache.ibatis.annotations.Update; | ||
|
||
public interface RelRoleDisplayMapper { | ||
int insert(RelRoleDisplay record); | ||
|
||
@Delete({ | ||
"delete from rel_role_display where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
int deleteById(Long id); | ||
|
||
|
||
@Select({ | ||
"select * from rel_role_display where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
RelRoleDisplay selectById(Long id); | ||
|
||
|
||
@Update({ | ||
"update rel_role_display", | ||
"set role_id = #{roleId,jdbcType=BIGINT},", | ||
"display_id = #{displayId,jdbcType=BIGINT},", | ||
"permission = #{permission,jdbcType=SMALLINT},", | ||
"update_by = #{updateBy,jdbcType=BIGINT},", | ||
"update_time = #{updateTime,jdbcType=TIMESTAMP}", | ||
"where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
int updateById(RelRoleDisplay record); | ||
} |
35 changes: 35 additions & 0 deletions
35
server/src/main/java/edp/davinci/dao/RelRolePortalMapper.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,35 @@ | ||
package edp.davinci.dao; | ||
|
||
import edp.davinci.model.RelRolePortal; | ||
import org.apache.ibatis.annotations.Delete; | ||
import org.apache.ibatis.annotations.Select; | ||
import org.apache.ibatis.annotations.Update; | ||
|
||
public interface RelRolePortalMapper { | ||
|
||
int insert(RelRolePortal record); | ||
|
||
@Delete({ | ||
"delete from rel_role_portal", | ||
"where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
int deleteById(Long id); | ||
|
||
|
||
@Select({ | ||
"select * from rel_role_portal where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
RelRolePortal selectById(Long id); | ||
|
||
|
||
@Update({ | ||
"update rel_role_portal", | ||
"set role_id = #{roleId,jdbcType=BIGINT},", | ||
"portal_id = #{portalId,jdbcType=BIGINT},", | ||
"permission = #{permission,jdbcType=SMALLINT},", | ||
"update_by = #{updateBy,jdbcType=BIGINT},", | ||
"update_time = #{updateTime,jdbcType=TIMESTAMP}", | ||
"where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
int updateById(RelRolePortal record); | ||
} |
40 changes: 40 additions & 0 deletions
40
server/src/main/java/edp/davinci/dao/RelRoleProjectMapper.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,40 @@ | ||
package edp.davinci.dao; | ||
|
||
import edp.davinci.model.RelRoleProject; | ||
import org.apache.ibatis.annotations.Delete; | ||
import org.apache.ibatis.annotations.Param; | ||
import org.apache.ibatis.annotations.Select; | ||
import org.apache.ibatis.annotations.Update; | ||
|
||
public interface RelRoleProjectMapper { | ||
|
||
int insert(RelRoleProject record); | ||
|
||
@Delete({ | ||
"delete from rel_role_project where project_id = #{iprojectIdd}" | ||
}) | ||
int deleteByProjectId(@Param("projectId") Long projectId); | ||
|
||
|
||
@Select({ | ||
"select * from rel_role_project where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
RelRoleProject selectById(Long id); | ||
|
||
@Update({ | ||
"update rel_role_project", | ||
"set project_id = #{projectId,jdbcType=BIGINT},", | ||
"role_id = #{roleId,jdbcType=BIGINT},", | ||
"source_permission = #{sourcePermission,jdbcType=SMALLINT},", | ||
"view_permission = #{viewPermission,jdbcType=SMALLINT},", | ||
"widget_permission = #{widgetPermission,jdbcType=SMALLINT},", | ||
"viz_permission = #{vizPermission,jdbcType=SMALLINT},", | ||
"schedule_permission = #{schedulePermission,jdbcType=SMALLINT},", | ||
"share_permission = #{sharePermission,jdbcType=BIT},", | ||
"download_permission = #{downloadPermission,jdbcType=BIT},", | ||
"update_by = #{updateBy,jdbcType=BIGINT},", | ||
"update_time = #{updateTime,jdbcType=TIMESTAMP}", | ||
"where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
int updateById(RelRoleProject record); | ||
} |
33 changes: 33 additions & 0 deletions
33
server/src/main/java/edp/davinci/dao/RelRoleSlideMapper.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,33 @@ | ||
package edp.davinci.dao; | ||
|
||
import edp.davinci.model.RelRoleSlide; | ||
import org.apache.ibatis.annotations.Delete; | ||
import org.apache.ibatis.annotations.Select; | ||
import org.apache.ibatis.annotations.Update; | ||
|
||
public interface RelRoleSlideMapper { | ||
|
||
int insert(RelRoleSlide relRoleSlide); | ||
|
||
@Delete({ | ||
"delete from rel_role_slide where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
int deleteById(Long id); | ||
|
||
@Select({ | ||
"select * from rel_role_slide where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
RelRoleSlide selectById(Long id); | ||
|
||
|
||
@Update({ | ||
"update rel_role_slide", | ||
"set role_id = #{roleId,jdbcType=BIGINT},", | ||
"slide_id = #{slideId,jdbcType=BIGINT},", | ||
"permission = #{permission,jdbcType=SMALLINT},", | ||
"update_by = #{updateBy,jdbcType=BIGINT},", | ||
"update_time = #{updateTime,jdbcType=TIMESTAMP}", | ||
"where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
int updateById(RelRoleSlide record); | ||
} |
38 changes: 38 additions & 0 deletions
38
server/src/main/java/edp/davinci/dao/RelRoleUserMapper.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,38 @@ | ||
package edp.davinci.dao; | ||
|
||
import edp.davinci.model.RelRoleUser; | ||
import org.apache.ibatis.annotations.Delete; | ||
import org.apache.ibatis.annotations.ResultMap; | ||
import org.apache.ibatis.annotations.Select; | ||
import org.apache.ibatis.annotations.Update; | ||
|
||
public interface RelRoleUserMapper { | ||
int insert(RelRoleUser record); | ||
|
||
@Delete({ | ||
"delete from rel_role_user where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
int deleteById(Long id); | ||
|
||
|
||
@Select({ | ||
"select", | ||
"id, user_id, role_id, create_by, create_time, update_by, update_time", | ||
"from rel_role_user", | ||
"where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
@ResultMap("BaseResultMap") | ||
RelRoleUser selectById(Long id); | ||
|
||
@Update({ | ||
"update rel_role_user", | ||
"set user_id = #{userId,jdbcType=BIGINT},", | ||
"role_id = #{roleId,jdbcType=BIGINT},", | ||
"create_by = #{createBy,jdbcType=BIGINT},", | ||
"create_time = #{createTime,jdbcType=TIMESTAMP},", | ||
"update_by = #{updateBy,jdbcType=BIGINT},", | ||
"update_time = #{updateTime,jdbcType=TIMESTAMP}", | ||
"where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
int updateById(RelRoleUser record); | ||
} |
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,35 @@ | ||
package edp.davinci.dao; | ||
|
||
import edp.davinci.model.Role; | ||
import org.apache.ibatis.annotations.Delete; | ||
import org.apache.ibatis.annotations.ResultMap; | ||
import org.apache.ibatis.annotations.Select; | ||
import org.apache.ibatis.annotations.Update; | ||
|
||
public interface RoleMapper { | ||
int insert(Role record); | ||
|
||
@Delete({ | ||
"delete from role where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
int deleteById(Long id); | ||
|
||
@Select({ | ||
"select * from role where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
@ResultMap("BaseResultMap") | ||
Role selectById(Long id); | ||
|
||
@Update({ | ||
"update role", | ||
"set org_id = #{orgId,jdbcType=BIGINT},", | ||
"name = #{name,jdbcType=VARCHAR},", | ||
"description = #{description,jdbcType=VARCHAR},", | ||
"create_by = #{createBy,jdbcType=BIGINT},", | ||
"create_time = #{createTime,jdbcType=TIMESTAMP},", | ||
"update_by = #{updateBy,jdbcType=BIGINT},", | ||
"update_time = #{updateTime,jdbcType=TIMESTAMP}", | ||
"where id = #{id,jdbcType=BIGINT}" | ||
}) | ||
int updateByPrimaryKey(Role record); | ||
} |
Oops, something went wrong.