Search in sources :

Example 1 with CostRecordDetailResponse

use of com.tony.billing.response.costrecord.CostRecordDetailResponse in project BillingDubbo by TonyJiangWJ.

the class CostRecordController method getDetail.

/**
 * 获取详情
 *
 * @param request
 * @return
 */
@RequestMapping(value = "/record/detail/get")
public CostRecordDetailResponse getDetail(@ModelAttribute("request") @Validated CostRecordDetailRequest request) {
    CostRecordDetailResponse response = new CostRecordDetailResponse();
    ResponseUtil.error(response);
    try {
        CostRecord record = costRecordService.findByTradeNo(request.getTradeNo(), request.getUserId());
        if (record != null) {
            response.setRecordDetail(formatDetailModel(record));
            ResponseUtil.success(response);
        }
    } catch (Exception e) {
        logger.error("/detail/get error", e);
    }
    return response;
}
Also used : CostRecord(com.tony.billing.entity.CostRecord) CostRecordDetailResponse(com.tony.billing.response.costrecord.CostRecordDetailResponse) ParseException(java.text.ParseException) IOException(java.io.IOException) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

CostRecord (com.tony.billing.entity.CostRecord)1 CostRecordDetailResponse (com.tony.billing.response.costrecord.CostRecordDetailResponse)1 IOException (java.io.IOException)1 ParseException (java.text.ParseException)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1