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
adbb94e0
Commit
adbb94e0
authored
Dec 24, 2020
by
unset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加订单商品信息
parent
261d8381
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
10 deletions
+52
-10
ImageImgStorageBiz.java
...om/upyuns/platform/rs/website/biz/ImageImgStorageBiz.java
+4
-1
IndustryApplicationInfoBiz.java
...s/platform/rs/website/biz/IndustryApplicationInfoBiz.java
+7
-2
OrderInfoBiz.java
...java/com/upyuns/platform/rs/website/biz/OrderInfoBiz.java
+38
-4
OrderInfoController.java
...s/platform/rs/website/controller/OrderInfoController.java
+2
-2
ImageImgStorageWebController.java
.../website/controller/web/ImageImgStorageWebController.java
+1
-1
No files found.
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/ImageImgStorageBiz.java
View file @
adbb94e0
...
...
@@ -138,13 +138,16 @@ public class ImageImgStorageBiz extends BaseBiz<ImageImgStorageMapper,ImageImgSt
return
ObjectRestResponse
.
succ
(
imageImgStorage
);
}
public
ObjectRestResponse
getAll
(
Integer
typ
e
)
{
public
ObjectRestResponse
<
List
<
ImageImgStorage
>>
getAll
(
Integer
type
,
String
nam
e
)
{
Example
example
=
new
Example
(
ImageImgStorage
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andEqualTo
(
"isDel"
,
0
).
andEqualTo
(
"status"
,
1
);
if
(
type
!=
null
)
{
criteria
.
andEqualTo
(
"type"
,
type
);
}
if
(
StringUtils
.
isNotBlank
(
name
))
{
criteria
.
andLike
(
"name"
,
"%"
+
name
+
"%"
);
}
example
.
orderBy
(
"updTime"
).
desc
();
List
<
ImageImgStorage
>
list
=
mapper
.
selectByExample
(
example
);
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/IndustryApplicationInfoBiz.java
View file @
adbb94e0
...
...
@@ -12,6 +12,7 @@ import com.upyuns.platform.rs.website.entity.IndustryApplicationInfo;
import
com.upyuns.platform.rs.website.entity.IndustryApplicationType
;
import
com.upyuns.platform.rs.website.mapper.IndustryApplicationInfoMapper
;
import
com.upyuns.platform.rs.website.vo.IndustryTypeVo
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -126,9 +127,13 @@ public class IndustryApplicationInfoBiz extends BaseBiz<IndustryApplicationInfoM
* 获取所有行业应用
* @return
*/
public
List
<
IndustryApplicationInfo
>
getAllData
()
{
public
List
<
IndustryApplicationInfo
>
getAllData
(
String
name
)
{
Example
example
=
new
Example
(
IndustryApplicationInfo
.
class
);
example
.
createCriteria
().
andEqualTo
(
"isDel"
,
0
).
andEqualTo
(
"status"
,
1
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
if
(
StringUtils
.
isNotBlank
(
name
))
{
criteria
.
andLike
(
"title"
,
"%"
+
name
+
""
);
}
criteria
.
andEqualTo
(
"isDel"
,
0
).
andEqualTo
(
"status"
,
1
);
return
mapper
.
selectByExample
(
example
);
}
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/OrderInfoBiz.java
View file @
adbb94e0
...
...
@@ -875,20 +875,54 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
}
public
ObjectRestResponse
getItemByType
(
Integer
type
)
{
/**
* 根据类型查询商品信息
* @param type
* @param name
* @return
*/
public
ObjectRestResponse
getItemByType
(
Integer
type
,
String
name
)
{
if
(
type
==
null
)
{
return
ObjectRestResponse
.
paramIsEmpty
();
}
List
<
ItemInfoVo
>
itemInfoVoList
=
new
ArrayList
<>();
switch
(
ItemTypeEnum
.
getByCode
(
type
))
{
case
IMAGE_STORAGE:
return
imageImgStorageBiz
.
getAll
(
null
);
List
<
ImageImgStorage
>
imageImgStorageList
=
imageImgStorageBiz
.
getAll
(
null
,
name
).
getData
();
if
(
imageImgStorageList
!=
null
&&
imageImgStorageList
.
size
()
>
0
)
{
imageImgStorageList
.
parallelStream
().
forEach
(
imageImgStorage
->
{
List
<
ImageInfoRelation
>
imageInfoRelationList
=
imageImgStorage
.
getImageInfoRelationList
();
if
(
imageInfoRelationList
!=
null
&&
imageInfoRelationList
.
size
()
>
0
)
{
imageInfoRelationList
.
parallelStream
().
forEach
(
imageInfoRelation
->
{
ItemInfoVo
itemInfoVo
=
new
ItemInfoVo
();
itemInfoVo
.
setName
(
imageImgStorage
.
getName
()
+
imageInfoRelation
.
getFileWidth
());
itemInfoVo
.
setId
(
Long
.
parseLong
(
String
.
valueOf
(
imageInfoRelation
.
getId
())));
itemInfoVoList
.
add
(
itemInfoVo
);
});
}
else
{
ItemInfoVo
itemInfoVo
=
new
ItemInfoVo
();
itemInfoVo
.
setName
(
imageImgStorage
.
getName
());
itemInfoVo
.
setId
(
Long
.
parseLong
(
String
.
valueOf
(
imageImgStorage
.
getId
())));
itemInfoVoList
.
add
(
itemInfoVo
);
}
});
}
break
;
case
INDUSTRY_INFO:
return
ObjectRestResponse
.
succ
(
industryApplicationInfoBiz
.
getAllData
());
List
<
IndustryApplicationInfo
>
industryApplicationInfoList
=
industryApplicationInfoBiz
.
getAllData
(
name
);
if
(
industryApplicationInfoList
!=
null
&&
industryApplicationInfoList
.
size
()
>
0
)
{
industryApplicationInfoList
.
parallelStream
().
forEach
(
industryApplicationInfo
->
{
ItemInfoVo
itemInfoVo
=
new
ItemInfoVo
();
itemInfoVo
.
setName
(
industryApplicationInfo
.
getTitle
());
itemInfoVo
.
setId
(
Long
.
parseLong
(
String
.
valueOf
(
industryApplicationInfo
.
getId
())));
itemInfoVoList
.
add
(
itemInfoVo
);
});
}
case
STANDARD_DATA:
break
;
}
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
(
itemInfoVoList
);
}
}
\ No newline at end of file
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/controller/OrderInfoController.java
View file @
adbb94e0
...
...
@@ -53,8 +53,8 @@ public class OrderInfoController extends BaseController<OrderInfoBiz,OrderInfo>
}
@GetMapping
(
value
=
"getItemByType"
)
public
ObjectRestResponse
getItemByType
(
Integer
type
)
{
return
baseBiz
.
getItemByType
(
type
);
public
ObjectRestResponse
getItemByType
(
Integer
type
,
String
name
)
{
return
baseBiz
.
getItemByType
(
type
,
name
);
}
}
\ 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 @
adbb94e0
...
...
@@ -21,7 +21,7 @@ public class ImageImgStorageWebController extends BaseController<ImageImgStorage
@GetMapping
(
value
=
"/app/unauth/getAll"
)
@IgnoreUserToken
public
ObjectRestResponse
getAll
(
Integer
type
)
{
return
baseBiz
.
getAll
(
type
);
return
baseBiz
.
getAll
(
type
,
""
);
}
@GetMapping
(
value
=
"/app/unauth/getList"
)
...
...
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