| | |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.order.api.model.TOrderAppeal; |
| | | import com.ruoyi.order.api.model.*; |
| | | import com.ruoyi.order.api.query.TOrderAppealQuery; |
| | | import com.ruoyi.order.api.vo.TOrderAppealVO; |
| | | import com.ruoyi.order.dto.ManageFeedbackDto; |
| | | import com.ruoyi.order.dto.ManageOrderAppealQuery; |
| | | import com.ruoyi.order.service.TOrderAppealService; |
| | | import com.ruoyi.order.service.*; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Arrays; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | private final TokenService tokenService; |
| | | @Resource |
| | | private AppUserClient appUserClient; |
| | | @Resource |
| | | private TChargingOrderService chargingOrderService; |
| | | @Resource |
| | | private TShoppingOrderService shoppingOrderService; |
| | | @Resource |
| | | private TExchangeOrderService exchangeOrderService; |
| | | |
| | | @Resource |
| | | private TVipOrderService vipOrderService; |
| | | |
| | | |
| | | @Autowired |
| | | public TOrderAppealController(TOrderAppealService orderAppealService, TokenService tokenService) { |
| | |
| | | .like(manageOrderAppealQuery.getPhone() != null, TOrderAppeal::getPhone, manageOrderAppealQuery.getPhone()) |
| | | .eq(manageOrderAppealQuery.getOrderType() != null, TOrderAppeal::getOrderType, manageOrderAppealQuery.getOrderType()) |
| | | .in(TOrderAppeal::getOrderType, 1, 2).page(Page.of(manageOrderAppealQuery.getPageCurr(), manageOrderAppealQuery.getPageSize())); |
| | | |
| | | for (TOrderAppeal record : page.getRecords()) { |
| | | record.setUid(record.getId().toString()); |
| | | } |
| | | return R.ok(page); |
| | | |
| | | |
| | | } |
| | | @ApiOperation(tags = {"后台-订单管理-订单申诉"},value = "删除") |
| | | @DeleteMapping (value = "/manage/delete") |
| | | public R<Page<TOrderAppeal>> delete(String ids) { |
| | | orderAppealService.removeBatchByIds(Arrays.asList(ids.split(","))); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(tags = {"后台-订单管理-订单申诉"},value = "后台-订单管理-订单申诉") |
| | |
| | | orderAppeal.setAppUserId(appUserId); |
| | | orderAppeal.setStatus(1); |
| | | orderAppeal.setPhone(data.getPhone()); |
| | | |
| | | if (orderAppeal.getOrderType()==1){ |
| | | TChargingOrder byId = chargingOrderService.getById(orderAppeal.getOrderId()); |
| | | orderAppeal.setCode(byId.getCode()); |
| | | }else if(orderAppeal.getOrderType()==2){ |
| | | TShoppingOrder byId = shoppingOrderService.getById(orderAppeal.getOrderId()); |
| | | orderAppeal.setCode(byId.getCode()); |
| | | }else if(orderAppeal.getOrderType()==3){ |
| | | TExchangeOrder byId = exchangeOrderService.getById(orderAppeal.getOrderId()); |
| | | orderAppeal.setCode(byId.getCode()); |
| | | }else if(orderAppeal.getOrderType()==4){ |
| | | TVipOrder byId = vipOrderService.getById(orderAppeal.getOrderId()); |
| | | orderAppeal.setCode(byId.getCode()); |
| | | } |
| | | orderAppealService.save(orderAppeal); |
| | | return AjaxResult.success(); |
| | | } |