| | |
| | | import com.panzhihua.common.model.dtos.PageDTO; |
| | | import com.panzhihua.common.model.dtos.shop.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.WxPayUtils; |
| | | import com.panzhihua.service_community.dao.ComShopOrderDAO; |
| | | import com.panzhihua.service_community.model.dos.ComShopOrderDO; |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public void wxOrderPayNotify(WxPayNotifyOrderDTO wxPayNotifyOrderDTO){ |
| | | log.info("微信订单支付回调开始处理逻辑"); |
| | | if(StringUtils.isEmpty(wxPayNotifyOrderDTO.getOrderTradeNo())){ |
| | | log.error("微信支付回调失败,订单号为空"); |
| | | return; |
| | | } |
| | | |
| | | log.info("微信订单支付回调开始查询订单"); |
| | | //查询订单 |
| | | ComShopOrderDO shopOrderDO = this.baseMapper.selectOne(new QueryWrapper<ComShopOrderDO>().lambda().eq(ComShopOrderDO::getOrderNo,wxPayNotifyOrderDTO.getOrderTradeNo())); |
| | | if(shopOrderDO == null){ |
| | |
| | | shopOrderDO.setPayStatus(ComShopOrderDO.payStatus.yes); |
| | | shopOrderDO.setPayAmount(BigDecimal.valueOf(Integer.parseInt(wxPayNotifyOrderDTO.getCashFee()) / 100)); |
| | | shopOrderDO.setWxTardeNo(wxPayNotifyOrderDTO.getWxTradeNo()); |
| | | shopOrderDO.setPayTime(new Date(Long.parseLong(wxPayNotifyOrderDTO.getPayTime() + "000"))); |
| | | shopOrderDO.setPayTime(DateUtils.stringToDate(wxPayNotifyOrderDTO.getPayTime(),new SimpleDateFormat("yyyyMMddHHmmss"))); |
| | | this.baseMapper.updateById(shopOrderDO); |
| | | |
| | | //查询订单商品 |