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

master
dulingling 5 years ago
parent 482bb9721d
commit b19d14ab7a

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

@ -57,6 +57,8 @@ public interface DashboardService {
void generateCustomersAndOrdersStatistics(Date analysisDate);
void generateCustomersAndOrdersStatisticsByClientMoniker(Date analysisDate,String clientMoniker);
JSONObject getOrderAndCustomerPerDay(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();
totalObject.put("client_id",0);
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) {

@ -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)
@ReadOnlyConnection
public void downloadATOReport(@PathVariable String year, HttpServletResponse resp) throws IOException {

Loading…
Cancel
Save