售后问题修改、快递鸟返回错误修改
This commit is contained in:
@ -157,6 +157,8 @@ public interface ShopConstants {
|
||||
|
||||
String YSHOP_ORDER_CACHE_KEY = "yshop:order";
|
||||
|
||||
String YSHOP_ORDER_SALE_STATUS_KEY = "yshop:order:sale:status";
|
||||
|
||||
long YSHOP_ORDER_CACHE_TIME = 600L;
|
||||
|
||||
String WECHAT_MENUS = "wechat_menus";
|
||||
|
@ -4,6 +4,7 @@ import cn.hutool.core.util.NumberUtil;
|
||||
import co.yixiang.api.YshopException;
|
||||
import co.yixiang.common.service.impl.BaseServiceImpl;
|
||||
import co.yixiang.common.utils.QueryHelpPlus;
|
||||
import co.yixiang.constant.ShopConstants;
|
||||
import co.yixiang.dozer.service.IGenerator;
|
||||
import co.yixiang.enums.AfterSalesStatusEnum;
|
||||
import co.yixiang.enums.OrderInfoEnum;
|
||||
@ -28,6 +29,7 @@ import co.yixiang.modules.sales.service.mapper.StoreAfterSalesStatusMapper;
|
||||
import co.yixiang.modules.sales.service.vo.StoreAfterSalesVo;
|
||||
import co.yixiang.modules.sales.service.vo.YxStoreOrderCartInfoVo;
|
||||
import co.yixiang.utils.FileUtil;
|
||||
import co.yixiang.utils.RedisUtils;
|
||||
import co.yixiang.utils.SecurityUtils;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@ -64,11 +66,14 @@ public class StoreAfterSalesServiceImpl extends BaseServiceImpl<StoreAfterSalesM
|
||||
private final StoreAfterSalesItemMapper storeAfterSalesItemMapper;
|
||||
private final StoreAfterSalesStatusMapper storeAfterSalesStatusMapper;
|
||||
private final IGenerator generator;
|
||||
private final RedisUtils redisUtils;
|
||||
|
||||
@Override
|
||||
public void applyForAfterSales(Long userId, String nickname, StoreAfterSalesParam storeAfterSalesParam) {
|
||||
|
||||
YxStoreOrder yxStoreOrder = storeOrderMapper.selectOne(Wrappers.<YxStoreOrder>lambdaQuery().eq(YxStoreOrder::getOrderId, storeAfterSalesParam.getOrderCode()).eq(YxStoreOrder::getUid, userId));
|
||||
redisUtils.set(ShopConstants.YSHOP_ORDER_SALE_STATUS_KEY + userId + storeAfterSalesParam.getOrderCode(),
|
||||
yxStoreOrder.getStatus());
|
||||
checkOrder(yxStoreOrder);
|
||||
//商品除去优惠后的总价格
|
||||
BigDecimal totalPrice = BigDecimal.ZERO;
|
||||
@ -250,7 +255,8 @@ public class StoreAfterSalesServiceImpl extends BaseServiceImpl<StoreAfterSalesM
|
||||
storeAfterSales.setSalesState(1);
|
||||
|
||||
YxStoreOrder yxStoreOrder = storeOrderMapper.selectOne(Wrappers.<YxStoreOrder>lambdaQuery().eq(YxStoreOrder::getOrderId, key));
|
||||
yxStoreOrder.setStatus(OrderInfoEnum.STATUS_0.getValue());
|
||||
Object o = redisUtils.get(ShopConstants.YSHOP_ORDER_SALE_STATUS_KEY + uid + key);
|
||||
yxStoreOrder.setStatus(o == null ? 0 : Integer.parseInt(o.toString()));
|
||||
yxStoreOrder.setRefundStatus(OrderInfoEnum.STATUS_0.getValue());
|
||||
storeOrderMapper.updateById(yxStoreOrder);
|
||||
|
||||
@ -270,6 +276,7 @@ public class StoreAfterSalesServiceImpl extends BaseServiceImpl<StoreAfterSalesM
|
||||
storeAfterSalesStatus.setOperator("用户操作");
|
||||
storeAfterSalesStatusMapper.insert(storeAfterSalesStatus);
|
||||
|
||||
redisUtils.del(ShopConstants.YSHOP_ORDER_SALE_STATUS_KEY + uid + key);
|
||||
return baseMapper.updateById(storeAfterSales) > 0;
|
||||
}
|
||||
|
||||
@ -314,6 +321,8 @@ public class StoreAfterSalesServiceImpl extends BaseServiceImpl<StoreAfterSalesM
|
||||
storeAfterSales.setConsignee(consignee);
|
||||
storeAfterSales.setPhoneNumber(phoneNumber);
|
||||
storeAfterSales.setAddress(address);
|
||||
}else {
|
||||
this.makeMoney(storeAfterSales.getId(),storeAfterSales.getOrderCode());
|
||||
}
|
||||
//操作记录
|
||||
StoreAfterSalesStatus storeAfterSalesStatus = new StoreAfterSalesStatus();
|
||||
|
@ -53,7 +53,7 @@ public class StoreAfterSalesVo {
|
||||
private Integer salesState;
|
||||
|
||||
/** 添加时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Timestamp createTime;
|
||||
|
||||
@ -84,35 +84,35 @@ public class StoreAfterSalesVo {
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Timestamp reviewTime;
|
||||
|
||||
/**
|
||||
* 发货时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Timestamp deliveryTime;
|
||||
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Timestamp completeTime;
|
||||
|
||||
/**
|
||||
* 审核失败时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Timestamp auditFailedTime;
|
||||
|
||||
/**
|
||||
* 撤销时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Timestamp revocationTime;
|
||||
|
||||
|
@ -61,7 +61,10 @@ public class StoreAfterSalesController {
|
||||
Object salesCheck = storeAfterSalesService.salesCheck(salesCheckDto.getSalesId(), salesCheckDto.getOrderCode(),
|
||||
salesCheckDto.getApprovalStatus(), salesCheckDto.getConsignee(), salesCheckDto.getPhoneNumber(),
|
||||
salesCheckDto.getAddress());
|
||||
StoreAfterSales storeAfterSales = storeAfterSalesService.makeMoney(salesCheckDto.getSalesId(), salesCheckDto.getOrderCode());
|
||||
StoreAfterSales storeAfterSales = storeAfterSalesService.lambdaQuery()
|
||||
.eq(StoreAfterSales::getOrderCode, salesCheckDto.getOrderCode())
|
||||
.eq(StoreAfterSales::getId, salesCheckDto.getSalesId())
|
||||
.one();
|
||||
if (storeAfterSales.getServiceType() == 0) {
|
||||
BigDecimal bigDecimal = new BigDecimal("100");
|
||||
int payPrice = bigDecimal.multiply(storeAfterSales.getRefundAmount()).intValue();
|
||||
|
@ -9,7 +9,10 @@ import cn.hutool.http.HttpUtil;
|
||||
import co.yixiang.enums.ShipperCodeEnum;
|
||||
import co.yixiang.modules.tools.express.dao.ExpressInfo;
|
||||
import co.yixiang.modules.tools.express.config.ExpressProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.util.Base64Utils;
|
||||
@ -67,6 +70,9 @@ public class ExpressService implements Serializable {
|
||||
try {
|
||||
String result = getOrderTracesByJson(OrderCode,ShipperCode, LogisticCode,lastFourNumber);
|
||||
ObjectMapper objMap = new ObjectMapper();
|
||||
objMap.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
objMap.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
|
||||
objMap.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||
ExpressInfo ei = objMap.readValue(result, ExpressInfo.class);
|
||||
ei.setShipperName(getVendorName(ShipperCode));
|
||||
return ei;
|
||||
|
Reference in New Issue
Block a user