添加申请接口
This commit is contained in:
parent
06388c0b5f
commit
74a4448931
@ -45,8 +45,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
.permitAll()
|
.permitAll()
|
||||||
.antMatchers("/sso/*")// 对登录注册要允许匿名访问
|
.antMatchers("/sso/*")// 对登录注册要允许匿名访问
|
||||||
.permitAll()
|
.permitAll()
|
||||||
// .antMatchers("/member/**")// 测试mongo时开启
|
.antMatchers("/member/**","/returnApply/**")// 测试时开启
|
||||||
// .permitAll()
|
.permitAll()
|
||||||
.anyRequest()// 除上面外的所有请求全部需要鉴权认证
|
.anyRequest()// 除上面外的所有请求全部需要鉴权认证
|
||||||
.authenticated()
|
.authenticated()
|
||||||
.and()
|
.and()
|
||||||
|
@ -0,0 +1,36 @@
|
|||||||
|
package com.macro.mall.portal.controller;
|
||||||
|
|
||||||
|
import com.macro.mall.portal.domain.CommonResult;
|
||||||
|
import com.macro.mall.portal.domain.OmsOrderReturnApplyParam;
|
||||||
|
import com.macro.mall.portal.service.OmsPortalOrderReturnApplyService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请退货管理Controller
|
||||||
|
* Created by macro on 2018/10/17.
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@Api(tags = "OmsPortalOrderReturnApplyController", description = "申请退货管理")
|
||||||
|
@RequestMapping("/returnApply")
|
||||||
|
public class OmsPortalOrderReturnApplyController {
|
||||||
|
@Autowired
|
||||||
|
private OmsPortalOrderReturnApplyService returnApplyService;
|
||||||
|
|
||||||
|
@ApiOperation("申请退货")
|
||||||
|
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
||||||
|
@ResponseBody
|
||||||
|
public Object create(@RequestBody OmsOrderReturnApplyParam returnApply) {
|
||||||
|
int count = returnApplyService.create(returnApply);
|
||||||
|
if (count > 0) {
|
||||||
|
return new CommonResult().success(count);
|
||||||
|
}
|
||||||
|
return new CommonResult().failed();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
package com.macro.mall.portal.domain;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请退货参数
|
||||||
|
* Created by macro on 2018/10/17.
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class OmsOrderReturnApplyParam {
|
||||||
|
@ApiModelProperty("订单id")
|
||||||
|
private Long orderId;
|
||||||
|
@ApiModelProperty("退货商品id")
|
||||||
|
private Long productId;
|
||||||
|
@ApiModelProperty("订单编号")
|
||||||
|
private String orderSn;
|
||||||
|
@ApiModelProperty("会员用户名")
|
||||||
|
private String memberUsername;
|
||||||
|
@ApiModelProperty("退货人姓名")
|
||||||
|
private String returnName;
|
||||||
|
@ApiModelProperty("退货人电话")
|
||||||
|
private String returnPhone;
|
||||||
|
@ApiModelProperty("商品图片")
|
||||||
|
private String productPic;
|
||||||
|
@ApiModelProperty("商品名称")
|
||||||
|
private String productName;
|
||||||
|
@ApiModelProperty("商品品牌")
|
||||||
|
private String productBrand;
|
||||||
|
@ApiModelProperty("商品销售属性:颜色:红色;尺码:xl;")
|
||||||
|
private String productAttr;
|
||||||
|
@ApiModelProperty("退货数量")
|
||||||
|
private Integer productCount;
|
||||||
|
@ApiModelProperty("商品单价")
|
||||||
|
private BigDecimal productPrice;
|
||||||
|
@ApiModelProperty("商品实际支付单价")
|
||||||
|
private BigDecimal productRealPrice;
|
||||||
|
@ApiModelProperty("原因")
|
||||||
|
private String reason;
|
||||||
|
@ApiModelProperty("描述")
|
||||||
|
private String description;
|
||||||
|
@ApiModelProperty("凭证图片,以逗号隔开")
|
||||||
|
private String proofPics;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package com.macro.mall.portal.service;
|
||||||
|
|
||||||
|
import com.macro.mall.portal.domain.OmsOrderReturnApplyParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单退货管理Service
|
||||||
|
* Created by macro on 2018/10/17.
|
||||||
|
*/
|
||||||
|
public interface OmsPortalOrderReturnApplyService {
|
||||||
|
/**
|
||||||
|
* 提交申请
|
||||||
|
*/
|
||||||
|
int create(OmsOrderReturnApplyParam returnApply);
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.macro.mall.portal.service.impl;
|
||||||
|
|
||||||
|
import com.macro.mall.mapper.OmsOrderReturnApplyMapper;
|
||||||
|
import com.macro.mall.model.OmsOrderReturnApply;
|
||||||
|
import com.macro.mall.portal.domain.OmsOrderReturnApplyParam;
|
||||||
|
import com.macro.mall.portal.service.OmsPortalOrderReturnApplyService;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单退货管理Service实现类
|
||||||
|
* Created by macro on 2018/10/17.
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class OmsPortalOrderReturnApplyServiceImpl implements OmsPortalOrderReturnApplyService {
|
||||||
|
@Autowired
|
||||||
|
private OmsOrderReturnApplyMapper returnApplyMapper;
|
||||||
|
@Override
|
||||||
|
public int create(OmsOrderReturnApplyParam returnApply) {
|
||||||
|
OmsOrderReturnApply realApply = new OmsOrderReturnApply();
|
||||||
|
BeanUtils.copyProperties(returnApply,realApply);
|
||||||
|
realApply.setCreateTime(new Date());
|
||||||
|
realApply.setStatus(0);
|
||||||
|
return returnApplyMapper.insert(realApply);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user