新增 运营端小程序查询站点信息接口

This commit is contained in:
Lemon
2024-07-24 13:27:39 +08:00
parent 3b600494b5
commit 425de20eea
11 changed files with 332 additions and 937 deletions

View File

@@ -1,16 +1,19 @@
package com.jsowell.api.uniapp.business;
import com.alibaba.fastjson2.JSONObject;
import com.google.common.collect.ImmutableMap;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.response.RestApiResponse;
import com.jsowell.pile.dto.StationStatisticsInfoDTO;
import com.jsowell.pile.service.PileStationInfoService;
import com.jsowell.pile.vo.uniapp.business.StationStatisticsInfosVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* TODO
* 运营端小程序站点信息Controller
*
* @author Lemon
* @Date 2024/7/16 13:44:06
@@ -22,15 +25,22 @@ public class BusinessStationInfoController extends BaseController {
@Autowired
private PileStationInfoService pileStationInfoService;
@GetMapping("/getStationStatisticsInfos/{merchantId}")
public RestApiResponse<?> getStationStatisticsInfos(@PathVariable("merchantId") String merchantId) {
/**
* 获取站点统计信息
* @param dto
* @return
*/
@PostMapping("/getStationStatisticsInfos")
public RestApiResponse<?> getStationStatisticsInfos(@RequestBody StationStatisticsInfoDTO dto) {
RestApiResponse<?> response = null;
try {
pileStationInfoService.getStationStatisticsInfos(merchantId);
List<StationStatisticsInfosVO> stationStatisticsInfos = pileStationInfoService.getStationStatisticsInfos(dto);
response = new RestApiResponse<>(ImmutableMap.of("stationStatisticsInfos", stationStatisticsInfos));
} catch (Exception e) {
logger.error("获取站点统计信息 error", e);
response = new RestApiResponse<>(e);
}
logger.info("获取站点统计信息 params:{}, result:{}", JSONObject.toJSONString(dto), response);
return response;
}
}

View File

@@ -578,7 +578,9 @@ public class PileService {
// reservedInfo.setStartTime(DateUtils.parseDate(dto.getStartTime()));
reservedInfo.setStartTime(Time.valueOf(dto.getStartTime()));
// reservedInfo.setEndTime(DateUtils.parseDate(dto.getEndTime()));
reservedInfo.setEndTime(Time.valueOf(dto.getEndTime()));
if (StringUtils.isNotBlank(dto.getEndTime())) {
reservedInfo.setEndTime(Time.valueOf(dto.getEndTime()));
}
if (StringUtils.isNotBlank(dto.getFreq())) {
reservedInfo.setReservationType("recurring");
reservedInfo.setFreq(dto.getFreq());

View File

@@ -9,7 +9,7 @@ spring:
# redis 配置
redis:
# 地址
host: 192.168.2.2
host: 192.168.2.46
# 端口默认为6379
port: 6379
# 数据库索引
@@ -36,9 +36,9 @@ spring:
druid:
# 主库数据源
master:
# url: jdbc:mysql://192.168.2.2:3306/jsowell_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# url: jdbc:mysql://192.168.2.46:3306/jsowell_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# username: jsowell_dev
url: jdbc:mysql://192.168.2.2:3306/jsowell_prd_copy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url: jdbc:mysql://192.168.2.46:3306/jsowell_prd_copy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: jsowell_prd_copy
password: 123456
# 从库数据源

View File

@@ -8,7 +8,7 @@ spring:
# redis 配置
redis:
# 地址
host: 192.168.2.2
host: 192.168.2.46
# 端口默认为6379
port: 6379
# 数据库索引
@@ -35,9 +35,9 @@ spring:
druid:
# 主库数据源
master:
# url: jdbc:mysql://192.168.2.2:3306/jsowell_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# url: jdbc:mysql://192.168.2.46:3306/jsowell_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# username: jsowell_dev
url: jdbc:mysql://192.168.2.2:3306/jsowell_prd_copy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url: jdbc:mysql://192.168.2.46:3306/jsowell_prd_copy?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: jsowell_prd_copy
password: 123456
# 从库数据源

File diff suppressed because it is too large Load Diff