package com.mzl.flower.web.partner; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.mzl.flower.base.BaseController; import com.mzl.flower.base.R; import com.mzl.flower.base.ReturnDataDTO; import com.mzl.flower.config.security.SecurityUtils; import com.mzl.flower.constant.Constants; import com.mzl.flower.dto.request.payment.OrderSettlementQueryDTO; import com.mzl.flower.dto.response.payment.OrderSettlementDTO; import com.mzl.flower.dto.response.payment.OrderSettlementListDTO; import com.mzl.flower.service.payment.OrderSettlementService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/api/partner/settlement") @Api(value = "结算-合伙人", tags = "结算-合伙人") @Validated @Slf4j public class SettlementPartnerController extends BaseController { @Autowired private OrderSettlementService settlementService; @GetMapping("/list") @ApiOperation(value = "查询结算列表") public ResponseEntity>> selectSettlementList(Page page , OrderSettlementQueryDTO dto){ dto.setUserId(SecurityUtils.getUserId()); dto.setType(Constants.SETTLEMENT_TYPE.partner.name()); return returnData(R.SUCCESS.getCode(), settlementService.selectSettlementList(page, dto)); } @GetMapping("/list/view") @ApiOperation(value = "结算详情") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "结算id", required = true, dataType = "String", paramType = "query") }) public ResponseEntity> getSettlement(String id){ return returnData(R.SUCCESS.getCode(), settlementService.getSettlement(id)); } }