Commit 94f19e28 by 周海宝

Merge branch 'v5.5.0' into 'master'

V5.5.0合并到主干

See merge request !1
2 parents 47172221 8c7d0e73
......@@ -25,7 +25,7 @@
<dependency>
<groupId>cn.com.glsx.scrm</groupId>
<artifactId>rpc-scrm-shopmall-api</artifactId>
<version>5.3.0-SNAPSHOT</version>
<version>5.5.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.com.glsx.scrm</groupId>
......
......@@ -21,6 +21,8 @@ import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
......@@ -151,6 +153,12 @@ public class PlatformOrderController {
exportVO.setTotalPrice(
(redeemPoints * exportVO.getSellQty()) + "积分");
indexNumber.getAndIncrement();
//计算订单总积分: 运费 + 商品积分
BigDecimal totalScore = new BigDecimal(redeemPoints.toString()).multiply(new BigDecimal(exportVO.getSellQty()));
if (index.getFreightAmount() != null) {
totalScore = totalScore.add(index.getFreightAmount());
}
exportVO.setTotalScore(totalScore.intValue() + "积分");
return exportVO;
}).collect(Collectors.toList());
......
......@@ -12,6 +12,7 @@ import cn.com.glsx.scrm.shopmall.remote.PlatformSubOrderRemote;
import cn.com.glsx.scrm.shopmall.request.order.SubOrderCodeRequest;
import cn.com.glsx.scrm.shopmall.request.order.platform.PlatformOrderCreateRequest;
import cn.com.glsx.scrm.shopmall.response.order.PlatformOrderCreateResponse;
import cn.com.glsx.scrm.system.dto.LoginUserDTO;
import cn.com.glsx.scrm.system.dto.WechatAppLoginUserDTO;
import com.alibaba.fastjson.JSONObject;
import com.rop.annotation.NeedInSessionType;
......@@ -71,7 +72,22 @@ public class PlatformSubOrderController {
if (wechatLoginUserInfo == null || wechatLoginUserInfo.getAccountId() == null) {
return RopResponse.error("用户登录异常,请重新登录");
}
RpcResponse<Integer> rpcResponse = platformSubOrderRemote.updateOrderStatusBySubOrderCode(request.getSubOrderCode(), PlatformOrderStatusEnum.COMPLETED.getValue(), wechatLoginUserInfo.getNickName());
RpcResponse<Integer> rpcResponse = platformSubOrderRemote.confirmReceipt(request.getSubOrderCode(), PlatformOrderStatusEnum.COMPLETED.getValue(), wechatLoginUserInfo.getNickName());
if(rpcResponse.isSuccess()){
return RopResponse.success(rpcResponse.getResult());
}else{
return RopResponse.error(rpcResponse.getMessage());
}
}
@ApiOperation("web端确认收货")
@ServiceMethod(method = "scrm.api.shopmall.platform.web.confirm.receipt", needInSession = NeedInSessionType.YES)
public RopResponse<Integer> webConfirmReceipt(SubOrderCodeRequest request) {
LoginUserDTO loginUser = RopThreadLocal.getLoginUser(LoginUserDTO.class);
if (loginUser == null || loginUser.getAccountName() == null) {
return RopResponse.error("用户登录异常,请重新登录");
}
RpcResponse<Integer> rpcResponse = platformSubOrderRemote.confirmReceipt(request.getSubOrderCode(), PlatformOrderStatusEnum.COMPLETED.getValue(), loginUser.getAccountName());
if(rpcResponse.isSuccess()){
return RopResponse.success(rpcResponse.getResult());
}else{
......
......@@ -71,7 +71,7 @@ public class IntegralTransferOutExportVO implements Serializable {
@ExcelProperty(value = "微信openid")
private String customerOpenId;
@ExcelValueReplace(replace={"待审核_0", "已审核_1", "第三方处理_2", "成功_3", "失败_4", "驳回_5", "受理失败_6", "批次处理中_7"},repeatValue=true)
@ExcelValueReplace(replace={"待审核_0", "已审核_1", "第三方处理_2", "成功_3", "失败_4", "驳回_5", "受理失败_6", "批次处理中_7", "签约中_8"},repeatValue=true)
@ExcelProperty(value = "状态",converter= ReplaceStringToStringConvert.class)
private String status;
......
......@@ -5,6 +5,7 @@ import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import lombok.Data;
......@@ -45,9 +46,16 @@ public class PlatformShopmallOrderExportVO implements Serializable {
@ExcelProperty(value="数量")
private Integer sellQty;
@ExcelProperty(value="实收金额")
@ExcelProperty(value="商品总价")
private String totalPrice;
@ExcelProperty(value="实付金额")
private String totalScore;
@ExcelProperty(value="运费")
private BigDecimal freightAmount;
@ExcelValueReplace(replace={"普通订单_0", "积分订单_1"}, repeatValue=true)
@ExcelProperty(value="订单类型",converter= ReplaceIntegerToStringConvert.class)
private Integer businessType;
......@@ -108,4 +116,5 @@ public class PlatformShopmallOrderExportVO implements Serializable {
@ExcelProperty(value="详细地址")
private String address;
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!