Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李丛阳
education
Commits
64ded90d
Commit
64ded90d
authored
Dec 19, 2019
by
luzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片17
parent
497b3cb9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
10 deletions
+45
-10
BDefaultPicController.java
...usiness/bdefaultpic/controller/BDefaultPicController.java
+29
-10
BDefaultPicService.java
...soft/business/bdefaultpic/service/BDefaultPicService.java
+6
-0
BDefaultPicServiceImpl.java
...ness/bdefaultpic/service/impl/BDefaultPicServiceImpl.java
+10
-0
No files found.
src/main/java/org/rcisoft/business/bdefaultpic/controller/BDefaultPicController.java
View file @
64ded90d
...
...
@@ -2,6 +2,7 @@ package org.rcisoft.business.bdefaultpic.controller;
/*固定导入*/
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
...
...
@@ -19,6 +20,7 @@ import org.rcisoft.core.result.ResultServiceEnums;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.constant.MessageConstant
;
import
org.rcisoft.core.exception.ServiceException
;
import
javax.validation.Valid
;
...
...
@@ -28,8 +30,8 @@ import org.rcisoft.business.bdefaultpic.service.BDefaultPicService;
import
java.util.List
;
/**
* Created by on 2019-11-26 14:44:48.
*/
* Created by on 2019-11-26 14:44:48.
*/
@Api
(
tags
=
"17 图片管理"
)
@RestController
@RequestMapping
(
"bdefaultpic"
)
...
...
@@ -39,18 +41,18 @@ public class BDefaultPicController extends PaginationController<BDefaultPic> {
private
BDefaultPicService
bDefaultPicServiceImpl
;
@ApiOperation
(
value
=
"1701 添加"
,
notes
=
"添加"
)
@ApiOperation
(
value
=
"1701 添加"
,
notes
=
"添加"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"pic"
,
value
=
"默认图片链接"
,
required
=
false
,
dataType
=
"varchar"
)})
@PostMapping
(
value
=
"/add"
)
public
Result
add
(
CurUser
curUser
,
String
pic
)
{
PersistModel
data
=
bDefaultPicServiceImpl
.
save
(
pic
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
pic
);
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
pic
);
}
@ApiOperation
(
value
=
"1702 逻辑删除"
,
notes
=
"逻辑删除"
)
@ApiOperation
(
value
=
"1702 逻辑删除"
,
notes
=
"逻辑删除"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"主键id"
,
required
=
false
,
dataType
=
"varchar"
)})
@DeleteMapping
(
"/delete"
)
public
Result
delete
(
CurUser
curUser
,
String
businessId
)
{
...
...
@@ -58,15 +60,32 @@ public class BDefaultPicController extends PaginationController<BDefaultPic> {
bDefaultPic
.
setBusinessId
(
businessId
);
PersistModel
data
=
bDefaultPicServiceImpl
.
remove
(
bDefaultPic
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
@ApiOperation
(
value
=
"1703 分页查询默认图片列表"
,
notes
=
"查看 集合"
)
@ApiOperation
(
value
=
"1703 分页查询默认图片列表"
,
notes
=
"查看 集合"
)
@GetMapping
(
value
=
"/queryBDefaultPicByPagination"
)
public
GridModel
listByPagination
(
CurUser
curUser
)
{
bDefaultPicServiceImpl
.
findAllByPagination
(
getPaginationUtility
(),
curUser
);
return
getGridModelResponse
();
}
// public Result listByPagination(CurUser curUser) {
// bDefaultPicServiceImpl.findAllByPagination(getPaginationUtility(), curUser);
// GridModel gridModel = getGridModelResponse();
// return Result.builder(new PersistModel(1),
// MessageConstant.MESSAGE_ALERT_SUCCESS,
// MessageConstant.MESSAGE_ALERT_ERROR,
// gridModel);
// }
@ApiOperation
(
value
=
"1704 查询默认图片列表"
,
notes
=
"查看 集合"
)
@GetMapping
(
value
=
"/queryBDefaultPic"
)
public
Result
queryList
(
CurUser
curUser
)
{
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bDefaultPicServiceImpl
.
findAll
(
curUser
));
}
}
src/main/java/org/rcisoft/business/bdefaultpic/service/BDefaultPicService.java
View file @
64ded90d
...
...
@@ -39,6 +39,12 @@ public interface BDefaultPicService {
* @return
*/
List
<
BDefaultPic
>
findAllByPagination
(
PageUtil
<
BDefaultPic
>
paginationUtility
,
CurUser
curUser
);
/**
* 查询
* @param curUser
* @return
*/
List
<
BDefaultPic
>
findAll
(
CurUser
curUser
);
...
...
src/main/java/org/rcisoft/business/bdefaultpic/service/impl/BDefaultPicServiceImpl.java
View file @
64ded90d
...
...
@@ -80,4 +80,14 @@ public class BDefaultPicServiceImpl implements BDefaultPicService {
return
bDefaultPicRepository
.
queryBDefaultPics
(
curUser
.
getCorpId
());
}
/**
* 查询 bDefaultPic
* @param curUser
* @return
*/
@Override
public
List
<
BDefaultPic
>
findAll
(
CurUser
curUser
)
{
return
bDefaultPicRepository
.
queryBDefaultPics
(
curUser
.
getCorpId
());
}
}
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