package com.dy.pipIrrTerminal.general;
|
|
import com.dy.common.aop.SsoAop;
|
import com.dy.common.webUtil.BaseResponse;
|
import com.dy.common.webUtil.BaseResponseUtils;
|
import com.dy.pipIrrTerminal.general.qo.QoSummary;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
import jakarta.validation.Valid;
|
import lombok.RequiredArgsConstructor;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.validation.BindingResult;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.Map;
|
import java.util.Objects;
|
|
/**
|
* @author ZhuBaoMin
|
* @date 2025-06-25 11:25
|
* @LastEditTime 2025-06-25 11:25
|
* @Description
|
*/
|
|
@Slf4j
|
@RestController
|
@RequestMapping(path="general")
|
@RequiredArgsConstructor
|
public class GeneralCtrl {
|
private final GeneralSv generalSv;
|
|
/**
|
* 充值机用获取交易统计记录
|
* @param vo
|
* @param bindingResult
|
* @return
|
*/
|
@GetMapping(path = "getSummaries")
|
@SsoAop()
|
public BaseResponse<Map> getSummaries(@Valid QoSummary vo, BindingResult bindingResult){
|
if(bindingResult != null && bindingResult.hasErrors()){
|
return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
|
}
|
try {
|
Map res = generalSv.getSummaries(vo);
|
return BaseResponseUtils.buildSuccess(res);
|
} catch (Exception e) {
|
log.error("查询交易汇总记录异常", e);
|
return BaseResponseUtils.buildException(e.getMessage()) ;
|
}
|
}
|
}
|