Commit 0647b4e1 by xiehongfei

fix: 修正get-real-time-sales-data

parent ba45ff37
...@@ -6,6 +6,7 @@ import com.ctrip.framework.apollo.Config; ...@@ -6,6 +6,7 @@ import com.ctrip.framework.apollo.Config;
import com.ctrip.framework.apollo.ConfigService; import com.ctrip.framework.apollo.ConfigService;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse; import com.gic.api.base.commons.ServiceResponse;
import com.gic.clerk.api.dto.ClerkDTO;
import com.gic.clerk.api.dto.ClerkListDTO; import com.gic.clerk.api.dto.ClerkListDTO;
import com.gic.clerk.api.service.ClerkService; import com.gic.clerk.api.service.ClerkService;
import com.gic.commons.util.DataApiUtils; import com.gic.commons.util.DataApiUtils;
...@@ -371,7 +372,22 @@ public class DataController { ...@@ -371,7 +372,22 @@ public class DataController {
@RequestMapping(value = "get-real-time-sales-data") @RequestMapping(value = "get-real-time-sales-data")
@ResponseBody @ResponseBody
public RestResponse getRelaTimeSalesData(@RequestBody StoreRealTimeSalesQO qo) { public RestResponse getRelaTimeSalesData(@RequestBody StoreRealTimeSalesQO qo) {
return handle(getHandel(qo, "data_sales_perf_real_time_overview", // return handle(getHandel(qo, "data_sales_perf_real_time_overview",
// JSONObject.toJSONString(qo.getApiParam())));
ClerkDTO clerkDTO = clerkService.getClerkByClerkId(qo.getClerkId());
StoreRealTimeSalesApiQO apiParam = qo.getApiParam();
if (clerkDTO != null) {
Integer clerkType = clerkDTO.getClerkType();
if (clerkType == 1 || clerkType == 2 || clerkType == 3) {
apiParam.setIsClerk(0);
} else {
apiParam.setIsClerk(1);
}
} else {
apiParam.setIsClerk(1);
}
return handle(getHandel(qo, "data_sales_perf_real_time_overview_hb",
JSONObject.toJSONString(qo.getApiParam()))); JSONObject.toJSONString(qo.getApiParam())));
} }
......
package com.gic.haoban.manage.web.qo.data; package com.gic.haoban.manage.web.qo.data;
import lombok.Data; import lombok.Data;
import lombok.ToString;
import java.io.Serializable; import java.io.Serializable;
...@@ -8,7 +9,7 @@ import java.io.Serializable; ...@@ -8,7 +9,7 @@ import java.io.Serializable;
* @Author guojx * @Author guojx
* @Date 2024/4/29 15:29 * @Date 2024/4/29 15:29
*/ */
@Data @ToString
public class StoreRealTimeSalesApiQO implements Serializable { public class StoreRealTimeSalesApiQO implements Serializable {
private String storeId; private String storeId;
...@@ -26,4 +27,49 @@ public class StoreRealTimeSalesApiQO implements Serializable { ...@@ -26,4 +27,49 @@ public class StoreRealTimeSalesApiQO implements Serializable {
* 店长不用传,导购需要 * 店长不用传,导购需要
*/ */
private String clerkId; private String clerkId;
/**
* 区经、店长传查询门店,导购传查询导购
*/
private Integer isClerk;
public String getStoreId() {
return storeId;
}
public void setStoreId(String storeId) {
this.storeId = storeId;
}
public String getOrderChannel() {
return orderChannel;
}
public void setOrderChannel(String orderChannel) {
this.orderChannel = orderChannel;
}
public Integer getStoreGroup() {
return storeGroup;
}
public void setStoreGroup(Integer storeGroup) {
this.storeGroup = storeGroup;
}
public String getClerkId() {
return clerkId;
}
public void setClerkId(String clerkId) {
this.clerkId = clerkId;
}
public Integer getIsClerk() {
return isClerk;
}
public void setIsClerk(Integer isClerk) {
this.isClerk = isClerk;
}
} }
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