mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-19 22:59:46 +08:00
支付状态新增待补缴
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
package com.jsowell.api.uniapp;
|
package com.jsowell.api.uniapp;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.google.common.collect.ImmutableMap;
|
|
||||||
import com.jsowell.common.annotation.Anonymous;
|
import com.jsowell.common.annotation.Anonymous;
|
||||||
import com.jsowell.common.core.controller.BaseController;
|
import com.jsowell.common.core.controller.BaseController;
|
||||||
import com.jsowell.common.core.page.PageResponse;
|
import com.jsowell.common.core.page.PageResponse;
|
||||||
@@ -9,17 +8,16 @@ import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
|||||||
import com.jsowell.common.exception.BusinessException;
|
import com.jsowell.common.exception.BusinessException;
|
||||||
import com.jsowell.common.response.RestApiResponse;
|
import com.jsowell.common.response.RestApiResponse;
|
||||||
import com.jsowell.common.util.StringUtils;
|
import com.jsowell.common.util.StringUtils;
|
||||||
import com.jsowell.pile.domain.OrderPileOccupy;
|
|
||||||
import com.jsowell.pile.dto.QueryOccupyOrderDTO;
|
import com.jsowell.pile.dto.QueryOccupyOrderDTO;
|
||||||
import com.jsowell.pile.service.PileBillingTemplateService;
|
|
||||||
import com.jsowell.pile.service.OrderPileOccupyService;
|
import com.jsowell.pile.service.OrderPileOccupyService;
|
||||||
|
import com.jsowell.pile.service.PileBillingTemplateService;
|
||||||
import com.jsowell.pile.vo.uniapp.OccupyOrderDetailVO;
|
import com.jsowell.pile.vo.uniapp.OccupyOrderDetailVO;
|
||||||
import com.jsowell.pile.vo.web.BillingTemplateVO;
|
import com.jsowell.pile.vo.web.BillingTemplateVO;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.Objects;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 占桩订单controller
|
* 占桩订单controller
|
||||||
@@ -119,10 +117,12 @@ public class OccupyOrderController extends BaseController {
|
|||||||
try {
|
try {
|
||||||
String memberId = getMemberIdByAuthorization(request);
|
String memberId = getMemberIdByAuthorization(request);
|
||||||
logger.info("查询用户: {} 是否有未支付的占桩订单", memberId);
|
logger.info("查询用户: {} 是否有未支付的占桩订单", memberId);
|
||||||
OrderPileOccupy orderPileOccupy = orderPileOccupyService.queryUnPayOrderByMemberId(memberId);
|
// OrderPileOccupy orderPileOccupy = orderPileOccupyService.queryUnPayOrderByMemberId(memberId);
|
||||||
if (Objects.nonNull(orderPileOccupy)) {
|
// if (Objects.nonNull(orderPileOccupy)) {
|
||||||
response = new RestApiResponse<>(ImmutableMap.of("occupyCode", orderPileOccupy.getOccupyCode()));
|
// response = new RestApiResponse<>(ImmutableMap.of("occupyCode", orderPileOccupy.getOccupyCode()));
|
||||||
}
|
// }
|
||||||
|
Map<String, Object> map = orderPileOccupyService.queryUnPayOrder(memberId);
|
||||||
|
response = new RestApiResponse<>(map);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("查询用户是否有未支付的占桩订单 error,", e);
|
logger.error("查询用户是否有未支付的占桩订单 error,", e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -329,4 +329,6 @@ public interface OrderBasicInfoMapper {
|
|||||||
List<OrderVO> getOrderInfoByNXJT(NXJTQueryOrdersInfoDTO dto);
|
List<OrderVO> getOrderInfoByNXJT(NXJTQueryOrdersInfoDTO dto);
|
||||||
|
|
||||||
OrderTotalDataVO getOrderTotalData(QueryOrderDTO dto);
|
OrderTotalDataVO getOrderTotalData(QueryOrderDTO dto);
|
||||||
|
|
||||||
|
List<OrderBasicInfo> queryRepayOrder(String memberId);
|
||||||
}
|
}
|
||||||
@@ -394,4 +394,5 @@ public interface OrderBasicInfoService{
|
|||||||
*/
|
*/
|
||||||
List<OrderVO> getOrderInfoByNXJT(NXJTQueryOrdersInfoDTO dto);
|
List<OrderVO> getOrderInfoByNXJT(NXJTQueryOrdersInfoDTO dto);
|
||||||
|
|
||||||
|
List<OrderBasicInfo> queryRepayOrder(String memberId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,6 +81,8 @@ public interface OrderPileOccupyService{
|
|||||||
|
|
||||||
Map<String, Object> payOccupyPileOrder(PayOrderDTO dto);
|
Map<String, Object> payOccupyPileOrder(PayOrderDTO dto);
|
||||||
|
|
||||||
|
Map<String, Object> queryUnPayOrder(String memberId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询占桩订单列表
|
* 查询占桩订单列表
|
||||||
* @param dto
|
* @param dto
|
||||||
|
|||||||
@@ -3523,6 +3523,11 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
|||||||
return orderBasicInfoMapper.getOrderInfoByNXJT(dto);
|
return orderBasicInfoMapper.getOrderInfoByNXJT(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<OrderBasicInfo> queryRepayOrder(String memberId) {
|
||||||
|
return orderBasicInfoMapper.queryRepayOrder(memberId);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int deleteByPrimaryKey(Integer id) {
|
public int deleteByPrimaryKey(Integer id) {
|
||||||
return orderBasicInfoMapper.deleteByPrimaryKey(id);
|
return orderBasicInfoMapper.deleteByPrimaryKey(id);
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import com.jsowell.common.util.DateUtils;
|
|||||||
import com.jsowell.common.util.PageUtils;
|
import com.jsowell.common.util.PageUtils;
|
||||||
import com.jsowell.common.util.StringUtils;
|
import com.jsowell.common.util.StringUtils;
|
||||||
import com.jsowell.common.util.id.IdUtils;
|
import com.jsowell.common.util.id.IdUtils;
|
||||||
|
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||||
import com.jsowell.pile.domain.OrderPileOccupy;
|
import com.jsowell.pile.domain.OrderPileOccupy;
|
||||||
import com.jsowell.pile.domain.ykcCommond.RemoteControlGroundLockCommand;
|
import com.jsowell.pile.domain.ykcCommond.RemoteControlGroundLockCommand;
|
||||||
import com.jsowell.pile.dto.*;
|
import com.jsowell.pile.dto.*;
|
||||||
@@ -353,6 +354,21 @@ public class OrderPileOccupyServiceImpl implements OrderPileOccupyService {
|
|||||||
return orderPileOccupyMapper.queryUnPayOrderByMemberId(memberId);
|
return orderPileOccupyMapper.queryUnPayOrderByMemberId(memberId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> queryUnPayOrder(String memberId) {
|
||||||
|
Map<String, Object> resultMap = Maps.newHashMap();
|
||||||
|
OrderPileOccupy orderPileOccupy = orderPileOccupyMapper.queryUnPayOrderByMemberId(memberId);
|
||||||
|
if (orderPileOccupy != null) {
|
||||||
|
resultMap.put("occupyCode", orderPileOccupy.getOccupyCode());
|
||||||
|
}
|
||||||
|
List<OrderBasicInfo> orderList = orderBasicInfoService.queryRepayOrder(memberId);
|
||||||
|
if (CollectionUtils.isNotEmpty(orderList)) {
|
||||||
|
List<String> orderCodeList = orderList.stream().map(OrderBasicInfo::getOrderCode).collect(Collectors.toList());
|
||||||
|
resultMap.put("occupyCode", orderCodeList);
|
||||||
|
}
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询占桩订单列表
|
* 查询占桩订单列表
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -94,8 +94,14 @@ public class DelayMerchantProgramLogic extends AbstractProgramLogic {
|
|||||||
balancePayOrderV2(dto);
|
balancePayOrderV2(dto);
|
||||||
} else if (StringUtils.equals(dto.getPayMode(), OrderPayModeEnum.PAYMENT_OF_WECHATPAY.getValue())) {
|
} else if (StringUtils.equals(dto.getPayMode(), OrderPayModeEnum.PAYMENT_OF_WECHATPAY.getValue())) {
|
||||||
// 2023-07-11 全部改为汇付支付
|
// 2023-07-11 全部改为汇付支付
|
||||||
dto.setGoodsTitle("充电费用");
|
String goodsTitle = "充电费用";
|
||||||
dto.setGoodsDesc("充电桩预付款金额");
|
String goodsDesc = "充电桩预付款金额";
|
||||||
|
if (StringUtils.equals(orderInfo.getPayStatus(), OrderPayStatusEnum.repay.getValue())) {
|
||||||
|
goodsTitle = "补缴费用";
|
||||||
|
goodsDesc = dto.getOrderCode() + "订单补缴金额";
|
||||||
|
}
|
||||||
|
dto.setGoodsTitle(goodsTitle);
|
||||||
|
dto.setGoodsDesc(goodsDesc);
|
||||||
dto.setType(ScenarioEnum.ORDER.getValue());
|
dto.setType(ScenarioEnum.ORDER.getValue());
|
||||||
Map<String, Object> weixinMap = onlinePaymentOrder(dto);
|
Map<String, Object> weixinMap = onlinePaymentOrder(dto);
|
||||||
|
|
||||||
|
|||||||
@@ -2779,5 +2779,10 @@
|
|||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="queryRepayOrder" resultMap="BaseResultMap">
|
||||||
|
select <include refid="Base_Column_List"/>
|
||||||
|
from order_basic_info
|
||||||
|
where order_status = '3'
|
||||||
|
and member_id =#{memberId,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user