Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rs-cloud-platform
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
周健威
rs-cloud-platform
Commits
1ef7fb69
Commit
1ef7fb69
authored
Sep 11, 2024
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分类id处理
parent
2dc6cb43
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
0 deletions
+33
-0
ImageInformationStorageDto.java
...s/platform/rs/website/dto/ImageInformationStorageDto.java
+1
-0
ImageImgStorage.java
...om/upyuns/platform/rs/website/entity/ImageImgStorage.java
+3
-0
ImageImgStorageBiz.java
...om/upyuns/platform/rs/website/biz/ImageImgStorageBiz.java
+9
-0
ImageimgMenuBiz.java
...a/com/upyuns/platform/rs/website/biz/ImageimgMenuBiz.java
+17
-0
ImageImgStorageWebController.java
.../website/controller/web/ImageImgStorageWebController.java
+3
-0
No files found.
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/dto/ImageInformationStorageDto.java
View file @
1ef7fb69
...
...
@@ -17,4 +17,5 @@ public class ImageInformationStorageDto extends PageParam {
Integer
type
;
String
name
;
String
sort
;
String
menuIds
;
}
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/entity/ImageImgStorage.java
View file @
1ef7fb69
...
...
@@ -24,6 +24,9 @@ public class ImageImgStorage implements Serializable {
public
static
final
int
UPTYPE_URL
=
3
;
public
static
final
int
UPTYPE_SERVER
=
4
;
public
static
final
int
STATUS_UP
=
1
;
public
static
final
int
STATUS_DOWN
=
2
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/ImageImgStorageBiz.java
View file @
1ef7fb69
...
...
@@ -2,6 +2,7 @@ package com.upyuns.platform.rs.website.biz;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
cn.hutool.core.util.StrUtil
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.Query
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
...
...
@@ -37,6 +38,9 @@ public class ImageImgStorageBiz extends BaseBiz<ImageImgStorageMapper,ImageImgSt
@Autowired
ShoppingCartInfoBiz
shoppingCartInfoBiz
;
@Autowired
ImageimgMenuBiz
imageimgMenuBiz
;
/**
* 新增或者编辑图像库信息
* @param imageImgStorage
...
...
@@ -123,6 +127,11 @@ public class ImageImgStorageBiz extends BaseBiz<ImageImgStorageMapper,ImageImgSt
if
(
StringUtils
.
isNotBlank
(
imageInformationStorageDto
.
getName
()))
{
criteria
.
andLike
(
"name"
,
"%"
+
imageInformationStorageDto
.
getName
()
+
"%"
);
}
if
(
StrUtil
.
isNotBlank
(
imageInformationStorageDto
.
getMenuIds
()))
{
criteria
.
andIn
(
"menuIds"
,
imageimgMenuBiz
.
getIdsByTopId
(
Integer
.
valueOf
(
imageInformationStorageDto
.
getMenuIds
())));
}
if
(
sort
==
1
)
{
example
.
orderBy
(
"updTime"
).
desc
();
}
else
{
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/ImageimgMenuBiz.java
View file @
1ef7fb69
...
...
@@ -98,4 +98,21 @@ public class ImageimgMenuBiz extends BaseBiz<ImageimgMenuMapper,ImageimgMenu> {
}
}
}
public
List
<
Integer
>
getIdsByBottomId
(
int
root
,
List
<
Integer
>
list
)
{
Example
exampleDataMenu
=
new
Example
(
ImageimgMenu
.
class
);
exampleDataMenu
.
createCriteria
().
andEqualTo
(
"id"
,
root
);
exampleDataMenu
.
setOrderByClause
(
"order_num asc, id asc"
);
List
<
ImageimgMenu
>
menus
=
selectByExample
(
exampleDataMenu
);
if
(
CollUtil
.
isEmpty
(
list
))
{
list
=
CollUtil
.
newArrayList
(
root
);
}
else
{
list
.
add
(
root
);
}
if
(
CollUtil
.
isNotEmpty
(
menus
)
&&
-
1
!=
menus
.
get
(
0
).
getParentId
())
{
return
getIdsByBottomId
(
menus
.
get
(
0
).
getParentId
(),
list
);
}
else
{
return
list
;
}
}
}
\ No newline at end of file
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/controller/web/ImageImgStorageWebController.java
View file @
1ef7fb69
...
...
@@ -27,6 +27,9 @@ public class ImageImgStorageWebController extends BaseController<ImageImgStorage
@GetMapping
(
value
=
"/app/unauth/getList"
)
@IgnoreUserToken
public
ObjectRestResponse
getList
(
ImageInformationStorageDto
imageInformationStorageDto
)
{
if
(
imageInformationStorageDto
.
getStatus
()
==
null
)
{
imageInformationStorageDto
.
setStatus
(
ImageImgStorage
.
STATUS_UP
);
}
return
baseBiz
.
selectList
(
imageInformationStorageDto
,
2
);
}
}
\ No newline at end of file
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