Merge branch 'dev' into dev-g

This commit is contained in:
Guoqs
2025-04-10 10:37:48 +08:00
32 changed files with 627 additions and 121 deletions

View File

@@ -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;
}
}

View File

@@ -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());