Upd:添加指定商户消费者数据重生接口

master
dulingling 5 years ago
parent 929dcfb427
commit 45a75ac289

@ -9,7 +9,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId> <artifactId>manage</artifactId>
<version>1.3.90</version> <version>1.3.91</version>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.8.0</jib-maven-plugin.version> <jib-maven-plugin.version>1.8.0</jib-maven-plugin.version>

@ -57,6 +57,8 @@ public interface DashboardService {
void generateCustomersAndOrdersStatistics(Date analysisDate); void generateCustomersAndOrdersStatistics(Date analysisDate);
void generateCustomersAndOrdersStatisticsByClientMoniker(Date analysisDate,String clientMoniker);
JSONObject getOrderAndCustomerPerDay(JSONObject partner,AnalysisBean partnerAnalysisBean); JSONObject getOrderAndCustomerPerDay(JSONObject partner,AnalysisBean partnerAnalysisBean);
List<JSONObject> getStatisticsCustomersAndOrdersInDays(JSONObject partner, AnalysisBean partnerAnalysisBean); List<JSONObject> getStatisticsCustomersAndOrdersInDays(JSONObject partner, AnalysisBean partnerAnalysisBean);

@ -488,7 +488,22 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
JSONObject totalObject = new JSONObject(); JSONObject totalObject = new JSONObject();
totalObject.put("client_id",0); totalObject.put("client_id",0);
generateData(format,date,totalObject); generateData(format,date,totalObject);
}
/**
*
* @param analysisDate
* @param clientMoniker
*/
public void generateCustomersAndOrdersStatisticsByClientMoniker(Date analysisDate,String clientMoniker){
DateFormat format = new SimpleDateFormat("yyyyMMdd");
String date = format.format(analysisDate);
List<JSONObject> clients =clientMapper.listClients();
for (JSONObject client:clients){
if(client.getString("client_moniker").equals(clientMoniker)){
generateData(format, date, client);
}
}
} }
private void generateData(DateFormat format, String date, JSONObject client) { private void generateData(DateFormat format, String date, JSONObject client) {

@ -575,6 +575,22 @@ public class TestController implements ApplicationEventPublisherAware {
}); });
} }
/**
*
* @param date
* @param clientMoniker
*/
@GetMapping("/task/analysisCustomerDashboard")
public void analysisCustomerDashboardForClientMoniker(@RequestParam("date") String date,String clientMoniker){
try {
dashboardService.generateCustomersAndOrdersStatisticsByClientMoniker(DateUtils.addDays(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(date), -1),clientMoniker);
} catch (ParseException e) {
e.printStackTrace();
}
}
@ManagerMapping(value = "/reports/ato_reports/royalpay_ato_report_{year}.bttps", role = ManagerRole.DEVELOPER, method = RequestMethod.GET) @ManagerMapping(value = "/reports/ato_reports/royalpay_ato_report_{year}.bttps", role = ManagerRole.DEVELOPER, method = RequestMethod.GET)
@ReadOnlyConnection @ReadOnlyConnection
public void downloadATOReport(@PathVariable String year, HttpServletResponse resp) throws IOException { public void downloadATOReport(@PathVariable String year, HttpServletResponse resp) throws IOException {

Loading…
Cancel
Save