| @@ -9,9 +9,7 @@ import com.iformall.enums.EnumAppType; | |||||
| import com.iformall.enums.EnumPayType; | import com.iformall.enums.EnumPayType; | ||||
| import com.iformall.enums.EnumPayWay; | import com.iformall.enums.EnumPayWay; | ||||
| import com.iformall.exception.MallinkException; | import com.iformall.exception.MallinkException; | ||||
| import com.iformall.service.WxAppinfoService; | |||||
| import com.iformall.service.WxCouponOrderService; | |||||
| import com.iformall.service.WxRefundOrderService; | |||||
| import com.iformall.service.*; | |||||
| import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
| import io.swagger.annotations.ApiImplicitParam; | import io.swagger.annotations.ApiImplicitParam; | ||||
| import io.swagger.annotations.ApiImplicitParams; | import io.swagger.annotations.ApiImplicitParams; | ||||
| @@ -22,6 +20,7 @@ import org.slf4j.LoggerFactory; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||
| import java.util.HashMap; | |||||
| import java.util.Map; | import java.util.Map; | ||||
| @RestController | @RestController | ||||
| @@ -39,6 +38,12 @@ public class WxRefundOrderController extends BaseController { | |||||
| @Autowired | @Autowired | ||||
| private WxRefundOrderService wxRefundOrderService; | private WxRefundOrderService wxRefundOrderService; | ||||
| @Autowired | |||||
| private WxCardSpendService wxCardSpendService; | |||||
| @Autowired | |||||
| private WxMerchantService wxMerchantService; | |||||
| @ApiOperation(value = "退券退款", notes = "{\"couponOrderId\":\"string\"}") | @ApiOperation(value = "退券退款", notes = "{\"couponOrderId\":\"string\"}") | ||||
| @PostMapping("/create") | @PostMapping("/create") | ||||
| public ResultData create(@RequestBody Map<String, String> paramMap) { | public ResultData create(@RequestBody Map<String, String> paramMap) { | ||||
| @@ -94,4 +99,30 @@ public class WxRefundOrderController extends BaseController { | |||||
| } | } | ||||
| @ApiOperation("根据id查询接口") | |||||
| @GetMapping("/findCardSendDetail") | |||||
| @ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true) | |||||
| public ResultData findCardSendDetail(Long id) { | |||||
| if(id == null){ | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); | |||||
| } | |||||
| Map<String,Object> map = new HashMap<>(); | |||||
| WxRefundOrder refundOrder = wxRefundOrderService.getById(id); | |||||
| if(refundOrder == null){ | |||||
| return new ResultData(ErrorCode.ORDER_IS_NOT_FIND.getCode(),"退款订单未找到"); | |||||
| } | |||||
| map.put("refundOrder",refundOrder); | |||||
| Long cardSpendId = Long.parseLong(refundOrder.getPayOrderNo()); | |||||
| WxCardSpend cardSpend = wxCardSpendService.getById(cardSpendId); | |||||
| if(cardSpend == null){ | |||||
| return new ResultData(ErrorCode.ORDER_IS_NOT_FIND.getCode(),"付款订单未找到"); | |||||
| } | |||||
| map.put("refundOrder",refundOrder); | |||||
| WxMerchant merchant = wxMerchantService.getById(cardSpend.getMerchantId()); | |||||
| map.put("merchant",merchant); | |||||
| return new ResultData(map); | |||||
| } | |||||
| } | } | ||||