|
@@ -3,11 +3,14 @@ package com.zhongzheng.controller.order;
|
|
|
import java.util.List;
|
|
|
import java.util.Arrays;
|
|
|
|
|
|
+import com.zhongzheng.common.utils.ServletUtils;
|
|
|
+import com.zhongzheng.framework.web.service.WxTokenService;
|
|
|
import com.zhongzheng.modules.order.bo.OrderGoodsRefundAddBo;
|
|
|
import com.zhongzheng.modules.order.bo.OrderGoodsRefundEditBo;
|
|
|
import com.zhongzheng.modules.order.bo.OrderGoodsRefundQueryBo;
|
|
|
import com.zhongzheng.modules.order.service.IOrderGoodsRefundService;
|
|
|
import com.zhongzheng.modules.order.vo.OrderGoodsRefundVo;
|
|
|
+import com.zhongzheng.modules.user.entity.ClientLoginUser;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -41,6 +44,7 @@ import io.swagger.annotations.ApiOperation;
|
|
|
public class OrderGoodsRefundController extends BaseController {
|
|
|
|
|
|
private final IOrderGoodsRefundService iOrderGoodsRefundService;
|
|
|
+ private final WxTokenService wxTokenService;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -51,6 +55,8 @@ public class OrderGoodsRefundController extends BaseController {
|
|
|
@Log(title = "订单商品退款", businessType = BusinessType.INSERT)
|
|
|
@PostMapping()
|
|
|
public AjaxResult<Void> add(@RequestBody OrderGoodsRefundAddBo bo) {
|
|
|
+ ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
+ bo.setUserId(loginUser.getUser().getUserId());
|
|
|
return toAjax(iOrderGoodsRefundService.insertByAddBo(bo) ? 1 : 0);
|
|
|
}
|
|
|
|