Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-webapp-plug
Overview
Overview
Details
Activity
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
base_platform_enterprise
gic-webapp-plug
Commits
eab47cb0
Commit
eab47cb0
authored
Mar 05, 2020
by
何文超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
664ee1d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletions
+25
-1
AppletConfigGoodsController.java
...lug/web/controller/goods/AppletConfigGoodsController.java
+22
-1
dubbo-gic-webapp-plug.xml
src/main/resources/dubbo-gic-webapp-plug.xml
+3
-0
No files found.
src/main/java/com/gic/plug/web/controller/goods/AppletConfigGoodsController.java
View file @
eab47cb0
package
com
.
gic
.
plug
.
web
.
controller
.
goods
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -17,6 +20,7 @@ import com.gic.commons.webapi.reponse.RestResponse;
import
com.gic.goods.api.dto.GoodsCordDTO
;
import
com.gic.goods.api.dto.SpecCordDTO
;
import
com.gic.goods.api.service.CordApiService
;
import
com.gic.goods.api.service.MallGoodsBusinessApiService
;
import
com.gic.goods.api.util.Constant
;
import
com.gic.mall.base.api.enums.ErrorCodeEnums
;
import
com.gic.mall.share.api.dto.shop.ShopDTO
;
...
...
@@ -53,6 +57,9 @@ public class AppletConfigGoodsController {
@Autowired
private
EsBusinessOperaApiService
esBusinessOperaApiService
;
@Autowired
private
MallGoodsBusinessApiService
mallGoodsBusinessApiService
;
@RequestMapping
(
"get-mall-cord-list"
)
public
RestResponse
getMallCordList
(
String
appConfigId
,
Long
shopId
)
{
Long
areaId
=
null
;
...
...
@@ -124,6 +131,21 @@ public class AppletConfigGoodsController {
ServiceResponse
<
ESResponseQueryBatchDTO
>
serviceResponse
=
searchGoods
(
currentPage
,
pageSize
,
areaId
,
search
,
Constant
.
CHANNEL_CODE_MALL
,
cordJSON
);
if
(
serviceResponse
.
isSuccess
())
{
List
<
Long
>
goodsIds
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
serviceResponse
.
getResult
().
getRes
()))
{
serviceResponse
.
getResult
().
getRes
().
forEach
(
json
->
{
Long
goodsId
=
json
.
getLong
(
"goodsId"
);
goodsIds
.
add
(
goodsId
);
});
}
ServiceResponse
<
Map
<
Long
,
BigDecimal
>>
mapServiceResponse
=
mallGoodsBusinessApiService
.
getLowestSkuPrice
(
goodsIds
,
1129
);
if
(
mapServiceResponse
.
isSuccess
())
{
Map
<
Long
,
BigDecimal
>
map
=
mapServiceResponse
.
getResult
();
serviceResponse
.
getResult
().
getRes
().
forEach
(
json
->
{
Long
goodsId
=
json
.
getLong
(
"goodsId"
);
json
.
put
(
"minSkuPrice"
,
map
.
getOrDefault
(
goodsId
,
BigDecimal
.
valueOf
(
0
)));
});
}
return
RestResponse
.
success
(
serviceResponse
.
getResult
());
}
return
RestResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
...
...
@@ -200,7 +222,6 @@ public class AppletConfigGoodsController {
JSONObject
status
=
QueryConditionAssemblyUtil
.
createSimpleQueryNode
(
"status"
,
OperateEnum
.
OPERATE_EQ
,
2
);
if
(
Constant
.
CHANNEL_CODE_MALL
.
equals
(
channelCode
))
{
List
<
JSONObject
>
jsonObjectList
=
new
ArrayList
<>();
status
=
QueryConditionAssemblyUtil
.
addQueryNodeForSiblin
(
status
,
QueryConditionAssemblyUtil
.
createSimpleQueryNode
(
"upShelfTime"
,
OperateEnum
.
OPERATE_LTE
,
new
Date
().
getTime
()),
OperateEnum
.
OPERATE_AND
);
}
...
...
src/main/resources/dubbo-gic-webapp-plug.xml
View file @
eab47cb0
...
...
@@ -47,6 +47,7 @@
<dubbo:reference
id=
"tagApiService"
interface=
"com.gic.goods.api.service.TagApiService"
timeout=
"60000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"cordApiService"
interface=
"com.gic.goods.api.service.CordApiService"
timeout=
"60000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"goodsApiService"
interface=
"com.gic.goods.api.service.GoodsApiService"
timeout=
"60000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
interface=
"com.gic.goods.api.service.MallGoodsBusinessApiService"
id=
"mallGoodsBusinessApiService"
timeout=
"60000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
interface=
"com.gic.search.business.api.service.EsBusinessOperaApiService"
id=
"esBusinessOperaApiService"
timeout=
"60000"
retries=
"0"
/>
...
...
@@ -56,4 +57,5 @@
<dubbo:reference
interface=
"com.gic.store.service.StoreWidgetApiService"
id=
"storeWidgetApiService"
timeout=
"60000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.mall.share.api.service.ShopApiService"
id=
"shopApiService"
timeout=
"10000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.member.config.api.service.AppletsConfigApiService"
id=
"appletsConfigApiService"
timeout=
"10000"
retries=
"0"
/>
</beans>
\ 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