yumeng пре 1 година
родитељ
комит
1e81d7bfd4

+ 0 - 2
ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/KuaishouItemListServiceImpl.java

@@ -83,7 +83,6 @@ public class KuaishouItemListServiceImpl implements IKuaishouItemListService {
     public JSONObject getItemDetail(Long regId, Long activityId, Long itemId, KuaishouAccessToken accessToken) throws Exception {
         // 调用爬虫信息
         JSONObject itemList = this.getInvestmentActivityOpenItemList(activityId, itemId, accessToken);
-        System.err.println(itemList);
         JSONObject invalidJson = new JSONObject();
         if (!Check.isNull(itemList)) {
             invalidJson = itemList.getJSONObject("data");
@@ -524,7 +523,6 @@ public class KuaishouItemListServiceImpl implements IKuaishouItemListService {
             e.printStackTrace();
         }
         JSONObject jsonObject = JSONObject.parseObject(GsonUtils.toJSON(response));
-        System.err.println(jsonObject);
         String code = jsonObject.getString("code");
         if ("1".equals(code)) {
             returnJson.put("code", 0);

+ 1 - 1
ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/KuaishouPromoterServiceImpl.java

@@ -138,7 +138,7 @@ public class KuaishouPromoterServiceImpl implements IKuaishouPromoterService {
             // 骄阳渠道经理、骄阳剪手经理 可以看到自己创建的以及自己部门人员的达人信息
             Long deptId = deptService.getDeptIdByUserId(userId);
             userList = deptService.getDeptUserListByDeptId(deptId);
-        } else if ("jy_bd".equals(roleKey) || "jy_scissors".equals(roleKey)) {
+        } else if ("jy_bd".equals(roleKey) || "jy_scissors".equals(roleKey) || "jy_out_operation".equals(roleKey)) {
             // 骄阳渠道、骄阳-剪手 可以看到自己创建的达人信息
             userList = Arrays.asList(userId);
         } else {

+ 14 - 3
ruixuan-live/src/main/java/com/ruixuan/jiaoyang/controller/JiaoYangReportController.java

@@ -159,7 +159,7 @@ public class JiaoYangReportController extends BaseController {
 
     @GetMapping("/profitData")
     @ApiOperation(value = "商品列表")
-    public JSONObject profitData(String date,Integer dataType) throws ParseException {
+    public JSONObject profitData(String date, Integer dataType) throws ParseException {
 
         JSONObject returnJson = new JSONObject();
 
@@ -169,7 +169,7 @@ public class JiaoYangReportController extends BaseController {
             // date 为本月结束时间
             String lastMonthFirstDate = DateUtils.getLastMonthFirstDayByDate(date);// 上个月开始时间
             String lastMonthEndDate = DateUtils.getLastMonthNowDay(date);// 上个月结束时间
-            JSONObject dayData = jiaoYangReportService.dayData(DateUtils.strDateTimsToInt(date), DateUtils.strDateTimsToInt(lastDate),dataType);
+            JSONObject dayData = jiaoYangReportService.dayData(DateUtils.strDateTimsToInt(date), DateUtils.strDateTimsToInt(lastDate), dataType);
             JSONArray dayArray = new JSONArray();
             JSONObject obj1 = new JSONObject();
             obj1.put("date", dayData.getString("date"));
@@ -204,7 +204,7 @@ public class JiaoYangReportController extends BaseController {
             dayArray.add(obj3);
             dayArray.add(new JSONObject());
 
-            JSONObject monthData = jiaoYangReportService.monthData(DateUtils.strDateTimsToInt(firstDateByMonth), DateUtils.strDateTimsToInt(date), DateUtils.strDateTimsToInt(lastMonthFirstDate), DateUtils.strDateTimsToInt(lastMonthEndDate),dataType);
+            JSONObject monthData = jiaoYangReportService.monthData(DateUtils.strDateTimsToInt(firstDateByMonth), DateUtils.strDateTimsToInt(date), DateUtils.strDateTimsToInt(lastMonthFirstDate), DateUtils.strDateTimsToInt(lastMonthEndDate), dataType);
 
 
             JSONObject obj4 = new JSONObject();
@@ -459,6 +459,17 @@ public class JiaoYangReportController extends BaseController {
         }*/
 
 
+        String roleId = sysRoleService.getRoleBYUserId(userId);
+        if ("jy_out_operation".equals(roleId)) {
+            List<Long> userIds = new ArrayList<>();
+            userIds.add(userId);
+            List<Long> promoterIds = jiaoYangReportService.getPromoterIdsByUserIds(userIds);
+            if (Check.isNull(promoterIds)) {
+                return getDataTable(new ArrayList<JSONObject>());
+            }
+            requestMap.put("promoterIds", promoterIds);
+        }
+
         if (!Check.isNull(orderStartDate)) {
             Long start = DateUtils.strDateToInt(orderStartDate);
             requestMap.put("start", start);