|
|
@@ -21,8 +21,10 @@ import com.fs.live.vo.LiveAfterSalesListUVO;
|
|
|
import com.fs.live.vo.LiveOrderItemListUVO;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
+import com.sun.media.jfxmedia.logging.Logger;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
@@ -31,7 +33,7 @@ import javax.servlet.http.HttpServletRequest;
|
|
|
import java.text.ParseException;
|
|
|
import java.util.List;
|
|
|
|
|
|
-
|
|
|
+@Slf4j
|
|
|
@Api("售后接口")
|
|
|
@RestController
|
|
|
@RequestMapping(value="/app/live/storeAfterSales")
|
|
|
@@ -50,6 +52,8 @@ public class LiveAfterSalesController extends AppBaseController {
|
|
|
@ApiOperation("获取订单项列表")
|
|
|
@GetMapping("/getStoreOrderItems")
|
|
|
public R getStoreOrderItems(@RequestParam("orderId") Long orderId, HttpServletRequest request){
|
|
|
+ log.info("获取订单项列表,订单号:{}", orderId);
|
|
|
+
|
|
|
List<LiveOrderItemListUVO> list=itemService.selectLiveOrderItemListUVOByOrderId(orderId);
|
|
|
LiveOrder order=orderService.selectLiveOrderByOrderId(String.valueOf(orderId));
|
|
|
order.setUserPhone(ParseUtils.parsePhone(order.getUserPhone()));
|
|
|
@@ -63,6 +67,8 @@ public class LiveAfterSalesController extends AppBaseController {
|
|
|
@ApiOperation(value = "申请售后", notes = "申请售后")
|
|
|
@RepeatSubmit
|
|
|
public R applyAfterSales(@RequestBody LiveAfterSalesApplyParam param) {
|
|
|
+ log.info("申请售后,用户ID:{},参数:{}", getUserId(), param);
|
|
|
+
|
|
|
return storeAfterSalesService.applyAfterSales(getUserId(), param);
|
|
|
}
|
|
|
@Login
|
|
|
@@ -70,12 +76,16 @@ public class LiveAfterSalesController extends AppBaseController {
|
|
|
@ApiOperation(value = "撤销售后", notes = "撤销售后")
|
|
|
@RepeatSubmit
|
|
|
public R revoke(@RequestBody LiveAfterSalesRevokeParam param) throws ParseException {
|
|
|
+ log.info("撤销售后,用户ID:{},参数:{}", getUserId(), param);
|
|
|
+
|
|
|
return storeAfterSalesService.revoke(getUserId(), param);
|
|
|
}
|
|
|
@Login
|
|
|
@PostMapping("/addDelivery")
|
|
|
@ApiOperation(value = "提交物流信息", notes = "提交物流信息")
|
|
|
public R addDelivery(@Validated @RequestBody LiveAfterSalesDeliveryParam param) {
|
|
|
+ log.info("提交物流信息,参数:{}", param);
|
|
|
+
|
|
|
param.setUserId(Long.parseLong(getUserId()));
|
|
|
return storeAfterSalesService.addDelivery(param);
|
|
|
}
|
|
|
@@ -85,6 +95,8 @@ public class LiveAfterSalesController extends AppBaseController {
|
|
|
@GetMapping("/getStoreAfterSalesList")
|
|
|
@ApiOperation(value = "获取售后列表", notes = "获取售后列表")
|
|
|
public R getStoreAfterSalesList(LiveAfterSalesListUParam param) {
|
|
|
+ log.info("获取售后列表,用户ID:{},参数:{}", getUserId(), param);
|
|
|
+
|
|
|
param.setUserId(Long.parseLong(getUserId()));
|
|
|
PageHelper.startPage(Integer.parseInt(ServletUtils.getParameter("pageNum")) ,Integer.parseInt(ServletUtils.getParameter("pageSize")) ); List<LiveAfterSalesListUVO> list=storeAfterSalesService.selectLiveAfterSalesListUVO(param);
|
|
|
PageInfo<LiveAfterSalesListUVO> listPageInfo=new PageInfo<>(list);
|
|
|
@@ -94,6 +106,8 @@ public class LiveAfterSalesController extends AppBaseController {
|
|
|
@GetMapping("/getStoreAfterSalesById")
|
|
|
@ApiOperation(value = "获取售后详情", notes = "获取售后详情")
|
|
|
public R getStoreAfterSalesById(@RequestParam("id") Long id) {
|
|
|
+ log.info("获取售后详情,售后ID:{}", id);
|
|
|
+
|
|
|
LiveAfterSales sales=storeAfterSalesService.selectLiveAfterSalesById(id);
|
|
|
LiveAfterSalesItem map=new LiveAfterSalesItem();
|
|
|
map.setAfterSalesId(id);
|