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

master
dulingling 5 years ago
parent 45a75ac289
commit 8e763a191d

@ -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.91</version> <version>1.3.92</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,7 +57,7 @@ public interface DashboardService {
void generateCustomersAndOrdersStatistics(Date analysisDate); void generateCustomersAndOrdersStatistics(Date analysisDate);
void generateCustomersAndOrdersStatisticsByClientMoniker(Date analysisDate,String clientMoniker); void generateCustomersAndOrdersStatisticsByClientMoniker(Date analysisDate,String clientId);
JSONObject getOrderAndCustomerPerDay(JSONObject partner,AnalysisBean partnerAnalysisBean); JSONObject getOrderAndCustomerPerDay(JSONObject partner,AnalysisBean partnerAnalysisBean);

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

@ -579,12 +579,12 @@ public class TestController implements ApplicationEventPublisherAware {
/** /**
* *
* @param date * @param date
* @param clientMoniker * @param clientId
*/ */
@GetMapping("/task/analysisCustomerDashboard") @GetMapping("/task/analysisCustomerDashboard")
public void analysisCustomerDashboardForClientMoniker(@RequestParam("date") String date,String clientMoniker){ public void analysisCustomerDashboardForClientMoniker(@RequestParam("date") String date,@RequestParam("clientId")String clientId){
try { try {
dashboardService.generateCustomersAndOrdersStatisticsByClientMoniker(DateUtils.addDays(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(date), -1),clientMoniker); dashboardService.generateCustomersAndOrdersStatisticsByClientMoniker(DateUtils.addDays(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(date), -1),clientId);
} catch (ParseException e) { } catch (ParseException e) {
e.printStackTrace(); e.printStackTrace();
} }

Loading…
Cancel
Save