mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
Merge branch 'dev' into dev-g
This commit is contained in:
@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSON;
|
||||
import com.jsowell.common.annotation.Anonymous;
|
||||
import com.jsowell.common.enums.thirdparty.ThirdPartyReturnCodeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.pile.dto.QueryOperatorInfoDTO;
|
||||
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||
import com.jsowell.pile.thirdparty.CommonParamsDTO;
|
||||
@@ -11,10 +12,7 @@ import com.jsowell.thirdparty.lianlian.common.CommonResult;
|
||||
import com.jsowell.thirdparty.platform.service.ThirdPartyPlatformService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Map;
|
||||
@@ -153,4 +151,44 @@ public class NeiMengGuController extends ThirdPartyBaseController {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送充换电站用能统计信息 notificationOperationStatsInfo
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/v1/notificationOperationStatsInfo/{stationId}")
|
||||
public RestApiResponse<?> notificationOperationStatsInfo(@PathVariable String stationId) {
|
||||
logger.info("{}-推送充换电站用能统计信息 params:{}", platformName, stationId);
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
// 执行逻辑
|
||||
String result = platformLogic.notificationOperationStatsInfo(stationId);
|
||||
response = new RestApiResponse<>(result);
|
||||
} catch (Exception e) {
|
||||
logger.error("{}-推送充换电站用能统计信息", platformName, e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("{}-推送充换电站用能统计信息 result:{}", platformName, response);
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送历史充电订单 notificationChargeOrderInfoHistory
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/v1/notificationChargeOrderInfoHistory/{orderCode}")
|
||||
public RestApiResponse<?> notificationChargeOrderInfoHistory(@PathVariable String orderCode) {
|
||||
logger.info("{}-推送历史充电订单 params:{}", platformName, orderCode);
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
// 执行逻辑
|
||||
String result = platformLogic.notificationChargeOrderInfoHistory(orderCode);
|
||||
response = new RestApiResponse<>(result);
|
||||
} catch (Exception e) {
|
||||
logger.error("{}-推送历史充电订单", platformName, e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("{}-推送历史充电订单 result:{}", platformName, response);
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -55,6 +55,10 @@ public class MemberController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private OrderBasicInfoService orderBasicInfoService;
|
||||
|
||||
@Autowired
|
||||
private PileStationInfoService pileStationInfoService;
|
||||
|
||||
/**
|
||||
* 下发短信接口 business
|
||||
* http://localhost:8080/uniapp/member/sendSMS
|
||||
@@ -611,14 +615,15 @@ public class MemberController extends BaseController {
|
||||
/**
|
||||
* 查询用户常去站点(最近半年)
|
||||
*/
|
||||
@GetMapping("/getUserFrequentedStationList")
|
||||
public RestApiResponse<?> queryUserFrequentedStation(HttpServletRequest request) {
|
||||
@PostMapping("/getUserFrequentedStationList")
|
||||
public RestApiResponse<?> queryUserFrequentedStation(HttpServletRequest request, @RequestBody QueryStationDTO dto) {
|
||||
RestApiResponse<?> response;
|
||||
try {
|
||||
String memberId = getMemberIdByAuthorization(request);
|
||||
dto.setMemberId(memberId);
|
||||
//查询order_basic_info表,根据member_id,对应的station_id,,然后根据station_id查询pile_station_info表中的站点名称,最后统计每个站点的次数,查询当前时间前半年的记录
|
||||
List<UserFrequentedStationInfo> list = orderBasicInfoService.queryUserFrequentedStation(memberId);
|
||||
response = new RestApiResponse<>(ImmutableMap.of("list", list));
|
||||
PageResponse pageResponse = pileStationInfoService.queryUserFrequentedStation(dto);
|
||||
response = new RestApiResponse<>(pageResponse);
|
||||
} catch (BusinessException e) {
|
||||
logger.error("查询用户常去站点(最近半年) error", e);
|
||||
response = new RestApiResponse<>(e.getCode(), e.getMessage());
|
||||
|
||||
@@ -398,4 +398,6 @@ public class PileStationInfoController extends BaseController {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// public AjaxResult checkStationAmap
|
||||
}
|
||||
|
||||
@@ -3,7 +3,9 @@ package com.jsowell.web.controller.pile;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.common.core.page.TableDataInfo;
|
||||
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.pile.dto.SplitConfigDTO;
|
||||
import com.jsowell.pile.service.StationSplitConfigService;
|
||||
import com.jsowell.pile.vo.web.SplitConfigVO;
|
||||
@@ -13,6 +15,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 站点分成配置controller
|
||||
@@ -56,4 +59,26 @@ public class StationSplitConfigController extends BaseController {
|
||||
}
|
||||
return ajaxResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据汇付会员id查询配置分账的站点列表
|
||||
* /station/splitconfig/queryStationList
|
||||
* @param adapayMemberId
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/queryStationList")
|
||||
public RestApiResponse<Map<String,List<SplitConfigVO>>> queryStationList(String adapayMemberId) {
|
||||
RestApiResponse<?> response = null;
|
||||
Map<String,List<SplitConfigVO>> result = null;
|
||||
try {
|
||||
result = stationSplitConfigService.queryStationList(adapayMemberId);
|
||||
} catch (BusinessException e) {
|
||||
logger.error("查询站点列表失败" , e);
|
||||
response = new RestApiResponse<>(e.getCode() , e.getMessage());
|
||||
} catch (Exception e) {
|
||||
logger.error("查询站点列表失败" , e);
|
||||
response = new RestApiResponse<>(ReturnCodeEnum.CODE_FAILED);
|
||||
}
|
||||
return new RestApiResponse<>(result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,17 +8,17 @@ spring:
|
||||
# redis 配置
|
||||
redis:
|
||||
# 地址
|
||||
host: r-uf6k0uet7mihr5z78f.redis.rds.aliyuncs.com
|
||||
# host: 106.14.94.149
|
||||
# host: r-uf6k0uet7mihr5z78f.redis.rds.aliyuncs.com
|
||||
host: 106.14.94.149
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
database: 0
|
||||
# 账号
|
||||
username: jsowell
|
||||
# username: jsowell
|
||||
# 密码
|
||||
password: js@160829
|
||||
# password: js160829
|
||||
# password: js@160829
|
||||
password: js160829
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
@@ -38,12 +38,12 @@ spring:
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://rm-uf6ra51u33dc3798l.mysql.rds.aliyuncs.com:3306/jsowell_prd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: jsowell
|
||||
password: js@160829
|
||||
# url: jdbc:mysql://106.14.94.149:3306/jsowell_pre?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# username: jsowell_pre
|
||||
# password: Js@160829
|
||||
# url: jdbc:mysql://rm-uf6ra51u33dc3798l.mysql.rds.aliyuncs.com:3306/jsowell_prd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# username: jsowell
|
||||
# password: js@160829
|
||||
url: jdbc:mysql://106.14.94.149:3306/jsowell_pre?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: jsowell_pre
|
||||
password: Js@160829
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
|
||||
Reference in New Issue
Block a user