|
|
@@ -19,13 +19,14 @@ import com.qnfhq.common.validator.ValidatorUtils;
|
|
|
import com.qnfhq.constant.CacheConstants;
|
|
|
import com.qnfhq.modules.c2c.dto.*;
|
|
|
import com.qnfhq.modules.c2c.dto.setting.CancelReasonSetting;
|
|
|
-import com.qnfhq.modules.c2c.dto.setting.ReviewSetting;
|
|
|
+import com.qnfhq.modules.c2c.dto.setting.ComplainReasonSetting;
|
|
|
import com.qnfhq.modules.c2c.entity.*;
|
|
|
import com.qnfhq.modules.c2c.enums.AdStatusEnum;
|
|
|
import com.qnfhq.modules.c2c.enums.C2cOrderFlowEnum;
|
|
|
import com.qnfhq.modules.c2c.enums.C2cOrderStatusEnum;
|
|
|
import com.qnfhq.modules.c2c.enums.DirectionEnum;
|
|
|
import com.qnfhq.modules.c2c.service.*;
|
|
|
+import com.qnfhq.modules.common.service.FileService;
|
|
|
import com.qnfhq.modules.user.entity.AppAssetEntity;
|
|
|
import com.qnfhq.modules.user.entity.AppUserDetailEntity;
|
|
|
import com.qnfhq.modules.user.entity.AppUserEntity;
|
|
|
@@ -41,12 +42,16 @@ import com.qnfhq.utils.DistributedRedisLock;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import jakarta.annotation.Resource;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
import java.util.*;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
/**
|
|
|
* c2c订单
|
|
|
@@ -90,11 +95,13 @@ public class C2cOrderController extends ApiBaseController {
|
|
|
private C2cOrderComplainService orderComplainService;
|
|
|
|
|
|
@Resource
|
|
|
- private C2cOrderComplainVoucherService orderComplainVoucherService;
|
|
|
+ private C2cOrderVoucherService orderComplainVoucherService;
|
|
|
@Resource
|
|
|
private AppUserService appUserService;
|
|
|
@Resource
|
|
|
private C2cUserStatService c2cUserStatService;
|
|
|
+ @Autowired
|
|
|
+ private C2cOrderVoucherService c2cOrderVoucherService;
|
|
|
|
|
|
|
|
|
private String getC2cAdLockKey(String adId) {
|
|
|
@@ -334,7 +341,7 @@ public class C2cOrderController extends ApiBaseController {
|
|
|
@Operation(summary = "我已完成付款按钮")
|
|
|
@PostMapping("/confirmPay")
|
|
|
@RepeatSubmit(interval = 3000, message = "请求过于频繁")
|
|
|
- public Result confirmPay(@RequestBody C2cOrderIdDTO dto)
|
|
|
+ public Result confirmPay(@RequestBody C2cOrderConfirmPayDTO dto)
|
|
|
{
|
|
|
ValidatorUtils.validateEntity(dto);
|
|
|
|
|
|
@@ -433,68 +440,88 @@ public class C2cOrderController extends ApiBaseController {
|
|
|
@Operation(summary = "上传付款凭证")
|
|
|
@PostMapping("/uploadPayment")
|
|
|
@RepeatSubmit(interval = 3000, message = "请求过于频繁")
|
|
|
- public Result uploadPayment(@RequestBody C2cPaymentVoucherDTO c2cPaymentVoucher) {
|
|
|
- ValidatorUtils.validateEntity(c2cPaymentVoucher);
|
|
|
-
|
|
|
- Long orderId = c2cPaymentVoucher.getOrderId();
|
|
|
- String img = c2cPaymentVoucher.getImg();
|
|
|
-
|
|
|
- C2cOrderEntity order = c2cOrderService.selectOrder(orderId);
|
|
|
+ public Result uploadPayment(MultipartFile file,Long orderId,Long id) {
|
|
|
+ if(Objects.isNull(orderId)) {
|
|
|
+ return error(MessageUtils.message("c2c.orderId.is.empty"));//订单编号不能空
|
|
|
+ }
|
|
|
+ C2cOrderEntity order = c2cOrderService.selectById(orderId);
|
|
|
if(order == null) {
|
|
|
return error(MessageUtils.message("c2c.order.not.exist"));//订单编号无效
|
|
|
}
|
|
|
if(order!=null && order.getFlow().intValue()==C2cOrderFlowEnum.END.getCode()) {
|
|
|
return error(MessageUtils.message("c2c.order.is.end"));//订单已结束
|
|
|
}
|
|
|
-
|
|
|
- if(order.getUserId().longValue() != StpUtil.getLoginIdAsLong()
|
|
|
- && order.getTranUserId().longValue() != StpUtil.getLoginIdAsLong()) {
|
|
|
- return error(MessageUtils.message("operation.fail.please.refresh"));//操作失败,请刷新后重试
|
|
|
+ if( StpUtil.getLoginIdAsLong() != order.getUserId().longValue()
|
|
|
+ && StpUtil.getLoginIdAsLong() != order.getTranUserId().longValue()) {
|
|
|
+ return error(MessageUtils.message("c2c.complain.voucher.submit.fail"));//提交失败,您不是订单交易方
|
|
|
}
|
|
|
|
|
|
+ List<C2cPaymentVoucherEntity> list = c2cPaymentVoucherService.selectList(orderId);
|
|
|
+ if(list!=null && list.size()>=3) {
|
|
|
+ return error(MessageUtils.message("c2c.order.payment.vouchers.limit"));//付款凭证最多3张
|
|
|
+ }
|
|
|
|
|
|
- if(c2cPaymentVoucher.getId() == null || c2cPaymentVoucher.getId().intValue() == 0) {
|
|
|
- C2cPaymentVoucherEntity entity = new C2cPaymentVoucherEntity();
|
|
|
- entity.setOrderId(orderId);
|
|
|
- entity.setUserId(StpUtil.getLoginIdAsLong());
|
|
|
- entity.setImg(img);
|
|
|
- entity.setStatus(1);
|
|
|
- entity.setCreateTime(new Date());
|
|
|
- entity.setUpdateTime(new Date());
|
|
|
- if(c2cPaymentVoucherService.save(entity)) {
|
|
|
- Map data = MapUtil.of("id", entity.getId());
|
|
|
- return success(data);
|
|
|
- } else {
|
|
|
- return error(MessageUtils.message("c2c.order.uploadPayment.fail"));//上传付款凭证失败
|
|
|
- }
|
|
|
-
|
|
|
- } else {
|
|
|
- C2cPaymentVoucherEntity voucher = c2cPaymentVoucherService.getById(c2cPaymentVoucher.getId());
|
|
|
- if(voucher==null) {
|
|
|
- return error(MessageUtils.message("c2c.order.pay.cert.id.invalid"));//凭证编号无效
|
|
|
- }
|
|
|
- if(StpUtil.getLoginIdAsString().equals(voucher.getUserId().toString())) {
|
|
|
-
|
|
|
- C2cPaymentVoucherEntity entity = new C2cPaymentVoucherEntity();
|
|
|
- entity.setId(c2cPaymentVoucher.getId());
|
|
|
- entity.setOrderId(orderId);
|
|
|
- entity.setUserId(StpUtil.getLoginIdAsLong());
|
|
|
- entity.setImg(img);
|
|
|
- entity.setStatus(1);
|
|
|
- entity.setUpdateTime(new Date());
|
|
|
- if(c2cPaymentVoucherService.updateById(entity)) {
|
|
|
- Map data = MapUtil.of("id", entity.getId());
|
|
|
+ try {
|
|
|
+ String filename = file.getResource().getFilename();
|
|
|
+ //这里文件名用了uuid 防止重复,可以根据自己的需要来写
|
|
|
+ String name = UUID.randomUUID() + filename.substring(filename.lastIndexOf("."), filename.length());
|
|
|
+ name = name.replace("-", "");
|
|
|
+ String url = fileService.uploadFileOSS(file,name);
|
|
|
+
|
|
|
+ if(id == null || id.intValue() == 0) {
|
|
|
+ C2cPaymentVoucherEntity voucherEntity = new C2cPaymentVoucherEntity();
|
|
|
+ voucherEntity.setOrderId(orderId);
|
|
|
+ voucherEntity.setImg(url);
|
|
|
+ voucherEntity.setUserId(StpUtil.getLoginIdAsLong());
|
|
|
+ voucherEntity.setStatus(1);
|
|
|
+ voucherEntity.setCreateTime(new Date());
|
|
|
+ voucherEntity.setUpdateTime(new Date());
|
|
|
+ if (c2cPaymentVoucherService.save(voucherEntity)) {
|
|
|
+ Map data = MapUtil.of("id", voucherEntity.getId());
|
|
|
+ data.put("file", url);
|
|
|
+ data.put("name", name);
|
|
|
return success(data);
|
|
|
} else {
|
|
|
return error(MessageUtils.message("c2c.order.uploadPayment.fail"));//上传付款凭证失败
|
|
|
}
|
|
|
-
|
|
|
- } else {
|
|
|
- return error(MessageUtils.message("operation.fail.please.refresh"));//操作失败,请刷新后重试
|
|
|
+ } else {//修改
|
|
|
+ C2cPaymentVoucherEntity voucher = c2cPaymentVoucherService.getById(id);
|
|
|
+ if(voucher==null) {
|
|
|
+ return error(MessageUtils.message("c2c.order.pay.cert.id.invalid"));//凭证编号无效
|
|
|
+ }
|
|
|
+ if(StpUtil.getLoginIdAsString().equals(voucher.getUserId().toString())) {
|
|
|
+ //删除旧的凭证
|
|
|
+ String fileName = voucher.getImg().substring(voucher.getImg().lastIndexOf("/")+1);
|
|
|
+ try {
|
|
|
+ fileService.deleteFileOSS(fileName);
|
|
|
+ } catch (IOException e) {
|
|
|
+ log.error("删除付款凭证失败",e);
|
|
|
+ return error(MessageUtils.message("c2c.deletePayment.voucher.fail"));//删除付款凭证失败
|
|
|
+ }
|
|
|
+
|
|
|
+ voucher.setOrderId(orderId);
|
|
|
+ voucher.setImg(url);
|
|
|
+ voucher.setUpdateTime(new Date());
|
|
|
+ if(c2cPaymentVoucherService.updateById(voucher)) {
|
|
|
+ Map data = MapUtil.of("id", voucher.getId());
|
|
|
+ data.put("file", url);
|
|
|
+ data.put("name", name);
|
|
|
+ return success(data);
|
|
|
+ } else {
|
|
|
+ return error(MessageUtils.message("c2c.order.uploadPayment.fail"));//上传付款凭证失败
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return error(MessageUtils.message("operation.fail.please.refresh"));//操作失败,请刷新后重试
|
|
|
+ }
|
|
|
}
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.getMessage();
|
|
|
+ return new Result().error(e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Resource
|
|
|
+ private FileService fileService;
|
|
|
|
|
|
@Operation(summary = "删除付款凭证")
|
|
|
@PostMapping("/deletePayment")
|
|
|
@@ -514,6 +541,14 @@ public class C2cOrderController extends ApiBaseController {
|
|
|
|
|
|
if(StpUtil.getLoginIdAsString().equals(voucher.getUserId().toString())) {
|
|
|
|
|
|
+ String fileName = voucher.getImg().substring(voucher.getImg().lastIndexOf("/")+1);
|
|
|
+ try {
|
|
|
+ fileService.deleteFileOSS(fileName);
|
|
|
+ } catch (IOException e) {
|
|
|
+ log.error("删除付款凭证失败",e);
|
|
|
+ return error(MessageUtils.message("c2c.deletePayment.voucher.fail"));//删除付款凭证失败
|
|
|
+ }
|
|
|
+
|
|
|
C2cPaymentVoucherEntity entity = new C2cPaymentVoucherEntity();
|
|
|
entity.setId(c2cPaymentVoucher.getId());
|
|
|
entity.setStatus(-1);
|
|
|
@@ -629,6 +664,12 @@ public class C2cOrderController extends ApiBaseController {
|
|
|
{
|
|
|
ValidatorUtils.validateEntity(c2cOrderComplain);
|
|
|
|
|
|
+ if(c2cOrderComplain.getReasonId().intValue()==4) {//买家取消原因=其他
|
|
|
+ if(StrUtil.isEmpty(c2cOrderComplain.getOtherReason())) {
|
|
|
+ return error(MessageUtils.message("c2c.order.cancel.otherReason.NotEmpty"));//其他原因不能空
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
C2cOrderEntity order = c2cOrderService.selectById(c2cOrderComplain.getOrderId());
|
|
|
if(order == null) {
|
|
|
return error(MessageUtils.message("c2c.order.not.exist"));//订单编号无效
|
|
|
@@ -645,14 +686,17 @@ public class C2cOrderController extends ApiBaseController {
|
|
|
return error(MessageUtils.message("c2c.complain.submit.fail"));//发起申诉失败,您不是买家或卖家
|
|
|
}
|
|
|
|
|
|
- if(c2cOrderComplain.getReason().length()>250) {
|
|
|
- return error(MessageUtils.message("c2c.order.complain.remark.maxval"));//申诉原因最多250个字
|
|
|
+ if(c2cOrderComplain.getRemark().length()>250) {
|
|
|
+ return error(MessageUtils.message("c2c.order.complain.remark.maxval"));//描述最多250个字
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
C2cOrderComplainEntity c2cOrderComplainEntity = new C2cOrderComplainEntity();
|
|
|
c2cOrderComplainEntity.setOrderId(c2cOrderComplain.getOrderId());
|
|
|
- c2cOrderComplainEntity.setReason(c2cOrderComplain.getReason());
|
|
|
+ c2cOrderComplainEntity.setReasonId(c2cOrderComplain.getReasonId());
|
|
|
+ c2cOrderComplainEntity.setOtherReason(c2cOrderComplain.getOtherReason());
|
|
|
+ c2cOrderComplainEntity.setRemark(c2cOrderComplain.getRemark());
|
|
|
+ c2cOrderComplainEntity.setVoucherIds(c2cOrderComplain.getVoucherIds());
|
|
|
return c2cOrderService.complain(order,c2cOrderComplainEntity,StpUtil.getLoginIdAsLong());
|
|
|
} catch (Exception e) {
|
|
|
return error(e.getMessage());
|
|
|
@@ -661,84 +705,102 @@ public class C2cOrderController extends ApiBaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @Operation(summary = "用户或商家提交申诉凭证")
|
|
|
- @PostMapping("/complainVoucher")
|
|
|
+ @Operation(summary = "用户或商家上传凭证")
|
|
|
+ @PostMapping("/addVoucher")
|
|
|
@RepeatSubmit(interval = 3000, message = "请求过于频繁")
|
|
|
- public Result complainVoucher(@RequestBody C2cOrderComplainVoucherDTO dto)
|
|
|
+ public Result addVoucher(MultipartFile file,Integer type, Long orderId,String remark)
|
|
|
{
|
|
|
- ValidatorUtils.validateEntity(dto);
|
|
|
-
|
|
|
- C2cOrderComplainEntity orderComplain = orderComplainService.getById(dto.getComplainId());
|
|
|
- if(orderComplain == null) {
|
|
|
- return error(MessageUtils.message("c2c.order.complain.not.exist"));//申诉编号无效
|
|
|
+ if(Objects.isNull(type)) {
|
|
|
+ return error(MessageUtils.message("c2c.voucher.type.is.empty"));//凭证类别不能空
|
|
|
}
|
|
|
-
|
|
|
- if( StpUtil.getLoginIdAsLong() != orderComplain.getFromUserId().longValue()
|
|
|
- && StpUtil.getLoginIdAsLong() != orderComplain.getToUserId().longValue()) {
|
|
|
- return error(MessageUtils.message("c2c.complain.voucher.submit.fail"));//提交失败,您不是申诉人或被申诉人
|
|
|
+ if(Objects.isNull(orderId)) {
|
|
|
+ return error(MessageUtils.message("c2c.orderId.is.empty"));//订单编号不能空
|
|
|
+ }
|
|
|
+ C2cOrderEntity order = c2cOrderService.selectById(orderId);
|
|
|
+ if(order == null) {
|
|
|
+ return error(MessageUtils.message("c2c.order.not.exist"));//订单编号无效
|
|
|
}
|
|
|
|
|
|
- if(StrUtil.isEmpty(dto.getRemark())) {
|
|
|
- return error(MessageUtils.message("c2c.order.complain.remark.notEmpty"));//申诉原因不能空
|
|
|
+ if( StpUtil.getLoginIdAsLong() != order.getUserId().longValue()
|
|
|
+ && StpUtil.getLoginIdAsLong() != order.getTranUserId().longValue()) {
|
|
|
+ return error(MessageUtils.message("c2c.complain.voucher.submit.fail"));//提交失败,您不是订单交易方
|
|
|
}
|
|
|
- if(dto.getRemark().length()>250) {
|
|
|
+
|
|
|
+ if(remark!=null && remark.length()>250) {
|
|
|
return error(MessageUtils.message("c2c.order.complain.remark.maxval"));//描述最多250个字
|
|
|
}
|
|
|
|
|
|
- if(dto.getId()==null || dto.getId().intValue()==0) {
|
|
|
- C2cOrderComplainVoucherEntity voucherEntity = new C2cOrderComplainVoucherEntity();
|
|
|
- voucherEntity.setComplainId(dto.getComplainId());
|
|
|
- voucherEntity.setRemark(dto.getRemark());
|
|
|
- voucherEntity.setImg1(dto.getImg1());
|
|
|
- voucherEntity.setImg2(dto.getImg2());
|
|
|
- voucherEntity.setImg3(dto.getImg3());
|
|
|
- voucherEntity.setImg4(dto.getImg4());
|
|
|
- voucherEntity.setImg5(dto.getImg5());
|
|
|
+ List<C2cOrderVoucherEntity> list = c2cOrderVoucherService.selectList(orderId);
|
|
|
+ if(list!=null && list.size()>=5) {
|
|
|
+ return error(MessageUtils.message("c2c.order.complain.files.limit"));//申诉凭证最多5张
|
|
|
+ }
|
|
|
+
|
|
|
+ try {
|
|
|
+ String filename = file.getResource().getFilename();
|
|
|
+ //这里文件名用了uuid 防止重复,可以根据自己的需要来写
|
|
|
+ String name = UUID.randomUUID() + filename.substring(filename.lastIndexOf("."), filename.length());
|
|
|
+ name = name.replace("-", "");
|
|
|
+ String url = fileService.uploadFileOSS(file,name);
|
|
|
+
|
|
|
+ C2cOrderVoucherEntity voucherEntity = new C2cOrderVoucherEntity();
|
|
|
+ voucherEntity.setOrderId(orderId);
|
|
|
+ voucherEntity.setType(type);
|
|
|
+ voucherEntity.setRemark(remark);
|
|
|
+ voucherEntity.setFile(url);
|
|
|
voucherEntity.setUserId(StpUtil.getLoginIdAsLong());
|
|
|
voucherEntity.setStatus(1);
|
|
|
voucherEntity.setCreateTime(new Date());
|
|
|
voucherEntity.setUpdateTime(new Date());
|
|
|
if(orderComplainVoucherService.save(voucherEntity)) {
|
|
|
Map data = MapUtil.of("id", voucherEntity.getId());
|
|
|
+ data.put("file", url);
|
|
|
+ data.put("name", name);
|
|
|
return success(data);
|
|
|
} else {
|
|
|
return error(MessageUtils.message("c2c.order.complain.voucher.save.fail"));//保存申诉凭证失败
|
|
|
}
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.getMessage();
|
|
|
+ return new Result().error(e.getMessage());
|
|
|
+ }
|
|
|
|
|
|
- } else {
|
|
|
- C2cOrderComplainVoucherEntity voucherEntity = orderComplainVoucherService.getById(dto.getId());
|
|
|
- if(voucherEntity==null) {
|
|
|
- return error(MessageUtils.message("c2c.order.complain.voucher.id.invalid"));//申诉凭证编号无效
|
|
|
- }
|
|
|
- if(orderComplain.getFlow().intValue() == C2cOrderFlowEnum.END.getCode()) {
|
|
|
- return error(MessageUtils.message("c2c.order.complain.voucher.is.end"));//申诉已结束
|
|
|
- }
|
|
|
- if(StpUtil.getLoginIdAsLong() == voucherEntity.getUserId().longValue()) {
|
|
|
- voucherEntity.setComplainId(dto.getComplainId());
|
|
|
- voucherEntity.setRemark(dto.getRemark());
|
|
|
- voucherEntity.setImg1(dto.getImg1());
|
|
|
- voucherEntity.setImg2(dto.getImg2());
|
|
|
- voucherEntity.setImg3(dto.getImg3());
|
|
|
- voucherEntity.setImg4(dto.getImg4());
|
|
|
- voucherEntity.setImg5(dto.getImg5());
|
|
|
- voucherEntity.setUserId(StpUtil.getLoginIdAsLong());
|
|
|
- voucherEntity.setStatus(1);
|
|
|
- voucherEntity.setUpdateTime(new Date());
|
|
|
- if(orderComplainVoucherService.updateById(voucherEntity)) {
|
|
|
- Map data = MapUtil.of("id", voucherEntity.getId());
|
|
|
- return success(data);
|
|
|
- } else {
|
|
|
- return error(MessageUtils.message("c2c.order.complain.voucher.update.fail"));//修改申诉凭证失败
|
|
|
- }
|
|
|
- } else {
|
|
|
- return error(MessageUtils.message("operation.fail.please.refresh"));//操作失败,请刷新后重试
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
+ @Operation(summary = "删除申诉凭证")
|
|
|
+ @PostMapping("/deleteVoucher")
|
|
|
+ @RepeatSubmit(interval = 3000, message = "请求过于频繁")
|
|
|
+ public Result deleteVoucher(@RequestBody C2cOrderComplainVoucherIDDTO dto) {
|
|
|
+ ValidatorUtils.validateEntity(dto);
|
|
|
+
|
|
|
+ C2cOrderVoucherEntity voucher = c2cOrderVoucherService.getById(dto.getId());
|
|
|
+ if(voucher==null) {
|
|
|
+ return error(MessageUtils.message("c2c.order.pay.cert.id.invalid"));//凭证编号无效
|
|
|
+ }
|
|
|
+
|
|
|
+ //订单已完成不能删除
|
|
|
+ C2cOrderEntity order = c2cOrderService.selectOrder(voucher.getOrderId());
|
|
|
+ if(order!=null && order.getFlow().intValue()==C2cOrderFlowEnum.END.getCode()) {
|
|
|
+ return error(MessageUtils.message("c2c.order.is.end"));//订单已结束
|
|
|
}
|
|
|
|
|
|
+ if(StpUtil.getLoginIdAsString().equals(voucher.getUserId().toString())) {
|
|
|
|
|
|
+ String fileName = voucher.getFile().substring(voucher.getFile().lastIndexOf("/")+1);
|
|
|
+ try {
|
|
|
+ fileService.deleteFileOSS(fileName);
|
|
|
+ } catch (IOException e) {
|
|
|
+ log.error("删除凭证失败",e);
|
|
|
+ return error(MessageUtils.message("c2c.deleteVoucher.voucher.fail"));//删除凭证失败
|
|
|
+ }
|
|
|
+ voucher.setStatus(-1);
|
|
|
+ voucher.setUpdateTime(new Date());
|
|
|
+ return toAjax(c2cOrderVoucherService.updateById(voucher));
|
|
|
+ } else {
|
|
|
+ return error(MessageUtils.message("operation.fail.please.refresh"));//操作失败,请刷新后重试
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+
|
|
|
@Operation(summary = "用户或商家查询申诉历史")
|
|
|
@PostMapping("/complainHis")
|
|
|
public Result complainHis(@RequestBody C2cOrderComplainOidDTO orderComplain)
|
|
|
@@ -788,7 +850,7 @@ public class C2cOrderController extends ApiBaseController {
|
|
|
return error(MessageUtils.message("c2c.order.no.permission.view"));//您无权查看
|
|
|
}
|
|
|
|
|
|
- List<C2cOrderComplainVoucherEntity> complainList = new ArrayList<>();
|
|
|
+ List<C2cOrderVoucherEntity> complainList = new ArrayList<>();
|
|
|
C2cOrderEntity order = c2cOrderService.selectOrder(orderComplain.getOrderId());
|
|
|
|
|
|
if(c2cOrderService.checkOrderTranUser(order)) {
|
|
|
@@ -866,4 +928,15 @@ public class C2cOrderController extends ApiBaseController {
|
|
|
return new Result().ok(settingsList);
|
|
|
}
|
|
|
|
|
|
+ @PostMapping("/complainReason")
|
|
|
+ @Operation(summary = "申诉理由查询列表")
|
|
|
+ public Result complainReason(){
|
|
|
+ SettingEntity setting = settingService.getSetting(SettingEnum.COMPLAIN_REASON_SETTING.name());
|
|
|
+ List<ComplainReasonSetting> settingsList = JSONUtil.toList(JSONUtil.parseArray(setting.getSettingValue()), ComplainReasonSetting.class);
|
|
|
+ if (CollectionUtils.isEmpty(settingsList)) {
|
|
|
+ return new Result().error(MessageUtils.message("c2c.order.complain.reason.notset"));//"未配置申诉原因"
|
|
|
+ }
|
|
|
+ return new Result().ok(settingsList);
|
|
|
+ }
|
|
|
+
|
|
|
}
|