记得上下班打卡 | git大法好,push需谨慎

Commit ee0e7168 authored by jiangxiulong's avatar jiangxiulong

500

parent 2edef4cf
...@@ -8,6 +8,7 @@ import io.swagger.annotations.Api; ...@@ -8,6 +8,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -26,6 +27,7 @@ import java.util.List; ...@@ -26,6 +27,7 @@ import java.util.List;
@Api(tags = "前端-banner") @Api(tags = "前端-banner")
@RestController @RestController
@RequestMapping("banners") @RequestMapping("banners")
@Slf4j
public class KylinBannersController { public class KylinBannersController {
@Autowired @Autowired
...@@ -45,6 +47,7 @@ public class KylinBannersController { ...@@ -45,6 +47,7 @@ public class KylinBannersController {
List<KylinBanners> result = bannersServiceImpl.blist(position, provinceName); List<KylinBanners> result = bannersServiceImpl.blist(position, provinceName);
return ResponseDto.success(result); return ResponseDto.success(result);
} catch (Exception e) { } catch (Exception e) {
log.error("banner列表Error", e);
return ResponseDto.success(new ArrayList<>()); return ResponseDto.success(new ArrayList<>());
} }
} }
......
package com.liquidnet.service.kylin.controller; package com.liquidnet.service.kylin.controller;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.liquidnet.commons.lang.util.CollectionUtil;
import com.liquidnet.service.base.ErrorMapping; import com.liquidnet.service.base.ErrorMapping;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.kylin.dto.vo.mongo.KylinPerformanceVo; import com.liquidnet.service.kylin.dto.vo.mongo.KylinPerformanceVo;
...@@ -11,9 +13,12 @@ import io.swagger.annotations.Api; ...@@ -11,9 +13,12 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.juli.logging.Log;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -28,6 +33,7 @@ import java.util.List; ...@@ -28,6 +33,7 @@ import java.util.List;
@Api(tags = "前端-演出") @Api(tags = "前端-演出")
@RestController @RestController
@RequestMapping("performance") @RequestMapping("performance")
@Slf4j
public class KylinPerformancesController { public class KylinPerformancesController {
@Autowired @Autowired
...@@ -115,8 +121,12 @@ public class KylinPerformancesController { ...@@ -115,8 +121,12 @@ public class KylinPerformancesController {
@ApiImplicitParam(type = "query", dataType = "String", name = "cityName", value = "城市名称", required = true) @ApiImplicitParam(type = "query", dataType = "String", name = "cityName", value = "城市名称", required = true)
}) })
public ResponseDto<List> performanceCalendar(@RequestParam String yearMonth, @RequestParam String cityName) { public ResponseDto<List> performanceCalendar(@RequestParam String yearMonth, @RequestParam String cityName) {
List result = null; List result = CollectionUtil.arrayListString();
try {
result = kylinPerformancesService.performanceCalendar(yearMonth, cityName); result = kylinPerformancesService.performanceCalendar(yearMonth, cityName);
} catch (Exception e) {
log.error("kylinCalendarError", e);
}
return ResponseDto.success(result); return ResponseDto.success(result);
} }
...@@ -154,12 +164,17 @@ public class KylinPerformancesController { ...@@ -154,12 +164,17 @@ public class KylinPerformancesController {
@RequestParam(defaultValue = "0") double longitudeFrom, @RequestParam(defaultValue = "0") double longitudeFrom,
@RequestParam(defaultValue = "0") String agentId @RequestParam(defaultValue = "0") String agentId
) { ) {
try {
KylinPerformanceVo result = kylinPerformancesService.detail(performancesId, latitudeFrom, longitudeFrom, agentId); KylinPerformanceVo result = kylinPerformancesService.detail(performancesId, latitudeFrom, longitudeFrom, agentId);
if (result != null) { if (result != null) {
return ResponseDto.success(result); return ResponseDto.success(result);
} else { } else {
return ResponseDto.failure(ErrorMapping.get("20700")); return ResponseDto.failure(ErrorMapping.get("20700"));
} }
} catch (Exception e) {
log.error("演出详情Error", e);
return ResponseDto.failure(ErrorMapping.get("20700"));
}
} }
@GetMapping("roadList/{roadShowId}") @GetMapping("roadList/{roadShowId}")
......
...@@ -245,7 +245,13 @@ public class KylinPerformancesServiceImpl implements IKylinPerformancesService { ...@@ -245,7 +245,13 @@ public class KylinPerformancesServiceImpl implements IKylinPerformancesService {
List<KylinPerformanceVo> performancesList = dataUtils.getPerformancesListOfcityName(cityName); List<KylinPerformanceVo> performancesList = dataUtils.getPerformancesListOfcityName(cityName);
// 获取此月开始结束时间 // 获取此月开始结束时间
String monthStart = DateUtil.getMonthFirst(yearMonth); String[] split = yearMonth.split("-");
String monthStart = "";
if (split.length > 2) {
monthStart = DateUtil.getMonthFirst(split[0].concat("-").concat(split[1]));
} else {
monthStart = DateUtil.getMonthFirst(yearMonth);
}
String monthEnd = ""; String monthEnd = "";
monthEnd = DateUtil.getMonthLast(monthStart); monthEnd = DateUtil.getMonthLast(monthStart);
......
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