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

Commit ee0e7168 authored by jiangxiulong's avatar jiangxiulong

500

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