| | |
| | | import com.mzl.flower.base.BaseController; |
| | | import com.mzl.flower.base.R; |
| | | import com.mzl.flower.base.ReturnDataDTO; |
| | | import com.mzl.flower.base.annotation.OperationLog; |
| | | import com.mzl.flower.config.security.SecurityUtils; |
| | | import com.mzl.flower.constant.Constants; |
| | | import com.mzl.flower.dto.request.payment.*; |
| | | import com.mzl.flower.dto.request.payment.OrderItemSalesAuditDTO; |
| | | import com.mzl.flower.dto.request.payment.OrderItemSalesQueryDTO; |
| | | import com.mzl.flower.dto.response.payment.OrderItemSalesNewDTO; |
| | | import com.mzl.flower.dto.response.payment.OrderItemSalesNewListDTO; |
| | | import com.mzl.flower.dto.response.payment.OrderStatusCountDTO; |
| | | import com.mzl.flower.entity.log.OperationRecord; |
| | | import com.mzl.flower.entity.payment.OrderItem; |
| | | import com.mzl.flower.service.payment.OrderItemSalesService; |
| | | import com.mzl.flower.service.payment.OrderItemSettlementService; |
| | |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | |
| | | } |
| | | |
| | | @PostMapping("/audit/agree") |
| | | @OperationLog(value = "审核售后单-通过", type = "sales_fee") |
| | | @ApiOperation(value = "审核售后单-通过") |
| | | public ResponseEntity<ReturnDataDTO> agree(@RequestBody OrderItemSalesAuditDTO dto) throws Exception { |
| | | OrderItem oi = salesService.doAudit(dto, Constants.ORDER_SALES_STATUS.AGREED.name()); |
| | | orderItemSettlementService.saveItemSettlementInfo(oi, SecurityUtils.getUserId(), Constants.S_TYPE.SALES); |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | // OrderItemSettlement orderItemSettlement = orderItemSettlementService.selectOrderItemSettlementById(dto.getId()); |
| | | String content = "审核售后单-通过id:【" + dto.getId() + "】,供应商(元):【" + dto.getFeeSupplier() + "】,平台(元):【" + dto.getFeePlatform() + "】" + ",合伙人(元):【" + dto.getFeePartner() + "】" + |
| | | ",打包(元):【" + dto.getFeePlatformPack() + "】,质检(元):【" + dto.getFeePlatformCheck() + "】,物流(元):【" + dto.getFeePlatformTransport() + "】" + "" + |
| | | ",打包运费(元)(散户):【" + dto.getFeePackingTransport() + "】,平台回复:【" + dto.getRemarks() + "】"; |
| | | OperationRecord operationRecord = getOperationRecord(content); |
| | | return returnData(R.SUCCESS.getCode(), null, operationRecord); |
| | | } |
| | | |
| | | @PostMapping("/audit/reject") |
| | | @OperationLog(value = "审核售后单-拒绝", type = "sales_fee") |
| | | @ApiOperation(value = "审核售后单-拒绝") |
| | | public ResponseEntity<ReturnDataDTO> reject(@RequestBody OrderItemSalesAuditDTO dto) throws Exception { |
| | | // OrderItemSettlement orderItemSettlement = orderItemSettlementService.selectOrderItemSettlementById(dto.getId()); |
| | | salesService.doAudit(dto, Constants.ORDER_SALES_STATUS.REJECTED.name()); |
| | | return returnData(R.SUCCESS.getCode(), null); |
| | | String content = "审核售后单-拒绝id:【" + dto.getId() + "】,平台回复:【" + dto.getRemarks() + "】"; |
| | | OperationRecord operationRecord = getOperationRecord(content); |
| | | return returnData(R.SUCCESS.getCode(), null, operationRecord); |
| | | } |
| | | } |