Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
datav_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
廖旭伟
datav_platform
Commits
cfb2b6d8
Commit
cfb2b6d8
authored
Apr 15, 2023
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除项目后删除项目数据
parent
072069f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
5 deletions
+25
-5
datav-manager/src/main/java/com/mortals/xhx/module/goview/service/impl/GoviewProjectServiceImpl.java
.../module/goview/service/impl/GoviewProjectServiceImpl.java
+25
-0
datav-manager/src/main/java/com/mortals/xhx/module/goview/web/GoviewProjectAPi.java
...a/com/mortals/xhx/module/goview/web/GoviewProjectAPi.java
+0
-5
No files found.
datav-manager/src/main/java/com/mortals/xhx/module/goview/service/impl/GoviewProjectServiceImpl.java
View file @
cfb2b6d8
...
@@ -4,9 +4,17 @@ import com.mortals.framework.exception.AppException;
...
@@ -4,9 +4,17 @@ import com.mortals.framework.exception.AppException;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.xhx.module.goview.dao.GoviewProjectDao
;
import
com.mortals.xhx.module.goview.dao.GoviewProjectDao
;
import
com.mortals.xhx.module.goview.model.GoviewProjectDataEntity
;
import
com.mortals.xhx.module.goview.model.GoviewProjectDataQuery
;
import
com.mortals.xhx.module.goview.model.GoviewProjectEntity
;
import
com.mortals.xhx.module.goview.model.GoviewProjectEntity
;
import
com.mortals.xhx.module.goview.service.GoviewProjectDataService
;
import
com.mortals.xhx.module.goview.service.GoviewProjectService
;
import
com.mortals.xhx.module.goview.service.GoviewProjectService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
/**
* GoviewProjectService
* GoviewProjectService
* 项目 service实现
* 项目 service实现
...
@@ -17,9 +25,26 @@ import org.springframework.stereotype.Service;
...
@@ -17,9 +25,26 @@ import org.springframework.stereotype.Service;
@Service
(
"goviewProjectService"
)
@Service
(
"goviewProjectService"
)
public
class
GoviewProjectServiceImpl
extends
AbstractCRUDServiceImpl
<
GoviewProjectDao
,
GoviewProjectEntity
,
Long
>
implements
GoviewProjectService
{
public
class
GoviewProjectServiceImpl
extends
AbstractCRUDServiceImpl
<
GoviewProjectDao
,
GoviewProjectEntity
,
Long
>
implements
GoviewProjectService
{
@Autowired
private
GoviewProjectDataService
goviewProjectDataService
;
@Override
@Override
protected
void
saveBefore
(
GoviewProjectEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
saveBefore
(
GoviewProjectEntity
entity
,
Context
context
)
throws
AppException
{
this
.
validData
(
entity
,
context
);
this
.
validData
(
entity
,
context
);
entity
.
setState
(-
1
);
entity
.
setState
(-
1
);
}
}
@Override
protected
void
removeAfter
(
Long
[]
ids
,
Context
context
,
int
result
)
throws
AppException
{
List
<
Long
>
projectIdList
=
new
ArrayList
<>();
for
(
Long
id:
ids
){
projectIdList
.
add
(
id
);
}
List
<
GoviewProjectDataEntity
>
list
=
goviewProjectDataService
.
find
(
new
GoviewProjectDataQuery
().
projectIdList
(
projectIdList
));
List
<
Long
>
dataIds
=
new
ArrayList
<>();
for
(
GoviewProjectDataEntity
item:
list
){
dataIds
.
add
(
item
.
getId
());
}
goviewProjectDataService
.
remove
(
dataIds
.
toArray
(
new
Long
[
dataIds
.
size
()]),
context
);
}
}
}
\ No newline at end of file
datav-manager/src/main/java/com/mortals/xhx/module/goview/web/GoviewProjectAPi.java
View file @
cfb2b6d8
...
@@ -152,7 +152,6 @@ public class GoviewProjectAPi extends BaseJsonBodyController {
...
@@ -152,7 +152,6 @@ public class GoviewProjectAPi extends BaseJsonBodyController {
}
}
@PostMapping
({
"edit"
})
@PostMapping
({
"edit"
})
@RepeatSubmit
public
String
editNew
(
@RequestBody
GoviewProjectEntity
entity
)
{
public
String
editNew
(
@RequestBody
GoviewProjectEntity
entity
)
{
Map
<
String
,
Object
>
model
=
new
HashMap
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
Context
context
=
this
.
getContext
();
Context
context
=
this
.
getContext
();
...
@@ -187,7 +186,6 @@ public class GoviewProjectAPi extends BaseJsonBodyController {
...
@@ -187,7 +186,6 @@ public class GoviewProjectAPi extends BaseJsonBodyController {
}
}
@PostMapping
({
"rename"
})
@PostMapping
({
"rename"
})
@RepeatSubmit
public
String
rename
(
@RequestBody
GoviewProjectEntity
entity
)
{
public
String
rename
(
@RequestBody
GoviewProjectEntity
entity
)
{
Map
<
String
,
Object
>
model
=
new
HashMap
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
Context
context
=
this
.
getContext
();
Context
context
=
this
.
getContext
();
...
@@ -233,7 +231,6 @@ public class GoviewProjectAPi extends BaseJsonBodyController {
...
@@ -233,7 +231,6 @@ public class GoviewProjectAPi extends BaseJsonBodyController {
* @return
* @return
*/
*/
@PostMapping
({
"publish"
})
@PostMapping
({
"publish"
})
@RepeatSubmit
public
String
publish
(
@RequestBody
GoviewProjectEntity
entity
)
{
public
String
publish
(
@RequestBody
GoviewProjectEntity
entity
)
{
Map
<
String
,
Object
>
model
=
new
HashMap
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
Context
context
=
this
.
getContext
();
Context
context
=
this
.
getContext
();
...
@@ -278,7 +275,6 @@ public class GoviewProjectAPi extends BaseJsonBodyController {
...
@@ -278,7 +275,6 @@ public class GoviewProjectAPi extends BaseJsonBodyController {
}
}
@RequestMapping
(
value
=
{
"getData"
},
method
=
{
RequestMethod
.
GET
})
@RequestMapping
(
value
=
{
"getData"
},
method
=
{
RequestMethod
.
GET
})
@UnAuth
public
Rest
<
Object
>
getData
(
Long
projectId
,
ModelMap
map
)
{
public
Rest
<
Object
>
getData
(
Long
projectId
,
ModelMap
map
)
{
Rest
<
Object
>
ret
=
new
Rest
();
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
...
@@ -311,7 +307,6 @@ public class GoviewProjectAPi extends BaseJsonBodyController {
...
@@ -311,7 +307,6 @@ public class GoviewProjectAPi extends BaseJsonBodyController {
}
}
@PostMapping
({
"save/data"
})
@PostMapping
({
"save/data"
})
@RepeatSubmit
public
String
saveData
(
GoviewProjectDataEntity
entity
)
{
public
String
saveData
(
GoviewProjectDataEntity
entity
)
{
Map
<
String
,
Object
>
model
=
new
HashMap
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
Context
context
=
this
.
getContext
();
Context
context
=
this
.
getContext
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment