update 查询用户常去站点方法

This commit is contained in:
Lemon
2025-04-07 15:01:16 +08:00
parent a885bdfbb0
commit 9c278b05d1
10 changed files with 68 additions and 55 deletions

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

View File

@@ -398,4 +398,6 @@ public class PileStationInfoController extends BaseController {
}
return result;
}
// public AjaxResult checkStationAmap
}