Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-evaluate
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-evaluate
Commits
31dc7c84
Commit
31dc7c84
authored
May 11, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
f23ed2e4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
13 deletions
+17
-13
pom.xml
gic-evaluate-service/pom.xml
+5
-0
EvaluateOutApiServiceImpl.java
...valuate/service/outer/impl/EvaluateOutApiServiceImpl.java
+0
-2
EvaluateOverviewApiServiceImpl.java
...te/service/outer/impl/EvaluateOverviewApiServiceImpl.java
+11
-11
dubbo-gic-evaluate-service.xml
...service/src/main/resources/dubbo-gic-evaluate-service.xml
+1
-0
No files found.
gic-evaluate-service/pom.xml
View file @
31dc7c84
...
...
@@ -135,6 +135,11 @@
<artifactId>
gic-marketing-process-api
</artifactId>
<version>
${gic-marketing-process-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-data-api
</artifactId>
<version>
${gic-data-api}
</version>
</dependency>
</dependencies>
<build>
...
...
gic-evaluate-service/src/main/java/com/gic/evaluate/service/outer/impl/EvaluateOutApiServiceImpl.java
View file @
31dc7c84
...
...
@@ -67,8 +67,6 @@ public class EvaluateOutApiServiceImpl implements EvaluateOutApiService {
@Autowired
private
StoreApiService
storeApiService
;
@Autowired
private
EvaluateMsgLogService
evaluateMsgLogService
;
@Autowired
private
EvaluateTagsService
evaluateTagsService
;
// @Autowired
// private NoticeRouterApiService noticeRouterApiService;
...
...
gic-evaluate-service/src/main/java/com/gic/evaluate/service/outer/impl/EvaluateOverviewApiServiceImpl.java
View file @
31dc7c84
...
...
@@ -4,6 +4,8 @@ import com.gic.api.base.commons.Page;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.DateUtil
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.data.api.dto.StoreOrderEvaluateDTO
;
import
com.gic.data.api.service.StoreEvaluateApiService
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.response.EnterpriseServiceResponse
;
import
com.gic.evaluate.constant.QuickReplyTypeEnum
;
...
...
@@ -42,6 +44,8 @@ public class EvaluateOverviewApiServiceImpl implements EvaluateOverviewApiServic
private
EvaluateMsgLogService
evaluateMsgLogService
;
@Autowired
private
EvaluateQuickService
evaluateQuickService
;
@Autowired
StoreEvaluateApiService
storeEvaluateApiService
;
@Override
public
ServiceResponse
<
Map
<
String
,
Long
>>
chart1
(
Integer
enterpriseId
,
String
startTime
,
String
endTime
,
List
<
Integer
>
storeIdList
)
{
...
...
@@ -138,22 +142,18 @@ public class EvaluateOverviewApiServiceImpl implements EvaluateOverviewApiServic
}
).
collect
(
Collectors
.
toList
());
// todo 这里要取数据组的数据
Map
<
Integer
,
Map
<
String
,
Object
>>
orderCountMap
=
evaluateMsgLogService
.
orderCountByStoreId
(
storeTrendQO
.
getEnterpriseId
(),
storeIdList
);
Map
<
Integer
,
StoreOrderEvaluateDTO
>
orderCountMap
=
storeEvaluateApiService
.
getStoreOrderEvaluateByStoreId
(
storeTrendQO
.
getEnterpriseId
(),
storeIdList
).
getResult
();
// Map<Integer, Map<String, Object>> orderCountMap = evaluateMsgLogService.orderCountByStoreId(storeTrendQO.getEnterpriseId(), storeIdList);
for
(
Map
<
String
,
Object
>
e
:
trendList
)
{
// e.put("evaluateRate", 0);
Object
storeId
=
e
.
get
(
"storeId"
);
if
(
storeId
!=
null
)
{
Map
<
String
,
Object
>
map
=
orderCountMap
.
get
(
Integer
.
valueOf
(
storeId
.
toString
()));
if
(
map
!=
null
)
{
Long
totalCount
=
(
Long
)
e
.
get
(
"totalCount"
);
Long
orderCount
=
(
Long
)
map
.
get
(
"orderCount"
);
Long
goodCount
=
(
Long
)
e
.
get
(
"goodCount"
);
StoreOrderEvaluateDTO
storeOrderEvaluateDTO
=
orderCountMap
.
get
(
Integer
.
valueOf
(
storeId
.
toString
()));
if
(
storeOrderEvaluateDTO
!=
null
)
{
// Long totalCount = (Long) e.get("totalCount");
// Long goodCount = (Long) e.get("goodCount");
BigDecimal
goodRate
=
(
BigDecimal
)
e
.
get
(
"goodRate"
);
if
(
orderCount
!=
null
&&
orderCount
!=
0
)
{
e
.
put
(
"evaluateRate"
,
(
double
)
Math
.
round
(
totalCount
.
doubleValue
()
/
orderCount
.
doubleValue
()*
10000
)/
100
+
"%"
);
}
else
{
e
.
put
(
"evaluateRate"
,
0
);
}
e
.
put
(
"evaluateRate"
,
storeOrderEvaluateDTO
.
getEvaluateRate
());
if
(
goodRate
!=
null
)
{
e
.
put
(
"goodRate"
,
(
double
)
Math
.
round
(
goodRate
.
doubleValue
()
*
10000
)
/
100
+
"%"
);
...
...
gic-evaluate-service/src/main/resources/dubbo-gic-evaluate-service.xml
View file @
31dc7c84
...
...
@@ -28,6 +28,7 @@
<dubbo:reference
interface=
"com.gic.enterprise.service.EnterpriseApiService"
id=
"enterpriseApiService"
timeout=
"6000"
/>
<!--<dubbo:reference interface="com.gic.enterprise.service.EnterpriseApiService" id="enterpriseApiService" timeout="6000" />-->
<dubbo:reference
interface=
"com.gic.order.api.service.OrderApiService"
id=
"orderApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.data.api.service.StoreEvaluateApiService"
id=
"storeEvaluateApiService"
timeout=
"6000"
/>
<!-- <dubbo:reference interface="com.gic.log.api.service.LogApiService" id="logApiService" timeout="6000" />-->
...
...
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