Commit 02ba426f by zhiwj

修复bug

parent 8174429d
......@@ -67,4 +67,6 @@ public interface TabEvaluateMsgLogMapper {
@MapKey("storeId")
Map<Integer,Map<String,Object>> orderCountByStoreId(@Param("enterpriseId") Integer enterpriseId, @Param("ids") List<Integer> storeIdList);
List<Map<String, Object>> listTrendOrderCount(@Param("enterpriseId") Integer enterpriseId, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("ids") List<Integer> storeIdList);
}
\ No newline at end of file
......@@ -25,4 +25,6 @@ public interface EvaluateMsgLogService {
void update(TabEvaluateMsgLog log);
Map<Integer,Map<String,Object>> orderCountByStoreId(Integer enterpriseId, List<Integer> storeIdList);
List<Map<String, Object>> listTrendOrderCount(Integer enterpriseId, String startTime, String endTime, List<Integer> storeIdList);
}
......@@ -56,4 +56,9 @@ public class EvaluateMsgLogServiceImpl implements EvaluateMsgLogService {
public Map<Integer, Map<String, Object>> orderCountByStoreId(Integer enterpriseId, List<Integer> storeIdList) {
return tabEvaluateMsgLogMapper.orderCountByStoreId(enterpriseId, storeIdList);
}
@Override
public List<Map<String, Object>> listTrendOrderCount(Integer enterpriseId, String startTime, String endTime, List<Integer> storeIdList) {
return tabEvaluateMsgLogMapper.listTrendOrderCount(enterpriseId, startTime, endTime, storeIdList);
}
}
\ No newline at end of file
......@@ -64,7 +64,7 @@ public class EvaluateOverviewApiServiceImpl implements EvaluateOverviewApiServic
public ServiceResponse<Map<String, List<Map<String, Object>>>> chart3(Integer enterpriseId, String startTime, String endTime, List<Integer> storeIdList) {
List<Map<String, Object>> listTrendTotalEvaluate = this.evaluateService.listTrendTotalEvaluate(enterpriseId, startTime, endTime, storeIdList);
List<Map<String, Object>> listTrendGoodEvaluate = this.evaluateService.listTrendGoodEvaluate(enterpriseId, startTime, endTime, storeIdList);
// todo order trend
List<Map<String, Object>> listTrendOrderCount = evaluateMsgLogService.listTrendOrderCount(enterpriseId, startTime, endTime, storeIdList);
Map<String, List<Map<String, Object>>> map = new HashMap<>();
......@@ -73,7 +73,7 @@ public class EvaluateOverviewApiServiceImpl implements EvaluateOverviewApiServic
map.put("totalEvaluateList", dealChart4(listTrendTotalEvaluate, dateList));
map.put("goodEvaluateList", dealChart4(listTrendGoodEvaluate, dateList));
map.put("orderList", new ArrayList<>());
map.put("orderList", dealChart4(listTrendOrderCount, dateList));
return EnterpriseServiceResponse.success(map);
} catch (Exception e) {
logger.info("解析参数错误", e);
......
......@@ -316,4 +316,25 @@
</if>
group by store_id
</select>
<!-- List<Map<String, Object>> listTrendOrderCount(@Param("enterpriseId") Integer enterpriseId, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("ids") List<Integer> storeIdList);-->
<select id="listTrendOrderCount" resultType="map">
select
DATE_FORMAT(receipts_date,'%Y-%m-%d') statisticsDate,
count(*) `count`
from tab_evaluate_msg_log
where enterprise_id = #{enterpriseId}
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(receipts_date,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and endTime != '' ">
and DATE_FORMAT(receipts_date,'%Y-%m-%d') &lt;= #{endTime}
</if>
<if test="null != ids and ids.size &gt; 0">
and store_id in
<foreach close=")" collection="ids" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
group by statisticsDate
</select>
</mapper>
\ No newline at end of file
......@@ -131,9 +131,9 @@ public class EvaluateOverviewController {
}
ServiceResponse<Page<Map<String, Object>>> serviceResponse = evaluateOverviewApiService.listStoreScore(storeScoreQO);
ServiceResponse<Map<String, Object>> totalStoreScore = evaluateOverviewApiService.getTotalStoreScore(storeScoreQO);
List<Map<String, Object>> result = serviceResponse.getResult().getResult();
result.add(0, totalStoreScore.getResult());
// ServiceResponse<Map<String, Object>> totalStoreScore = evaluateOverviewApiService.getTotalStoreScore(storeScoreQO);
// List<Map<String, Object>> result = serviceResponse.getResult().getResult();
// result.add(0, totalStoreScore.getResult());
return ResultControllerUtils.commonResult(serviceResponse);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment