package com.zscat.mallplus.oms.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zscat.mallplus.enums.AllEnum;
import com.zscat.mallplus.enums.OrderStatus;
import com.zscat.mallplus.exception.ApiMallPlusException;
import com.zscat.mallplus.fenxiao.entity.FenxiaoConfig;
import com.zscat.mallplus.fenxiao.entity.FenxiaoRecords;
import com.zscat.mallplus.fenxiao.mapper.FenxiaoConfigMapper;
import com.zscat.mallplus.fenxiao.mapper.FenxiaoRecordsMapper;
import com.zscat.mallplus.oms.entity.*;
import com.zscat.mallplus.oms.mapper.OmsCartItemMapper;
import com.zscat.mallplus.oms.mapper.OmsOrderMapper;
import com.zscat.mallplus.oms.mapper.OmsOrderReturnApplyMapper;
import com.zscat.mallplus.oms.mapper.OmsOrderSettingMapper;
import com.zscat.mallplus.oms.service.IOmsCartItemService;
import com.zscat.mallplus.oms.service.IOmsOrderItemService;
import com.zscat.mallplus.oms.service.IOmsOrderOperateHistoryService;
import com.zscat.mallplus.oms.service.IOmsOrderService;
import com.zscat.mallplus.oms.vo.*;
import com.zscat.mallplus.pms.entity.PmsGifts;
import com.zscat.mallplus.pms.entity.PmsProduct;
import com.zscat.mallplus.pms.entity.PmsProductConsult;
import com.zscat.mallplus.pms.entity.PmsSkuStock;
import com.zscat.mallplus.pms.mapper.PmsSkuStockMapper;
import com.zscat.mallplus.pms.service.IPmsGiftsService;
import com.zscat.mallplus.pms.service.IPmsProductConsultService;
import com.zscat.mallplus.pms.service.IPmsProductService;
import com.zscat.mallplus.pms.vo.ProductConsultParam;
import com.zscat.mallplus.sms.entity.*;
import com.zscat.mallplus.sms.mapper.SmsGroupMapper;
import com.zscat.mallplus.sms.mapper.SmsGroupMemberMapper;
import com.zscat.mallplus.sms.mapper.SmsGroupRecordMapper;
import com.zscat.mallplus.sms.service.*;
import com.zscat.mallplus.sms.vo.SmsCouponHistoryDetail;
import com.zscat.mallplus.ums.entity.*;
import com.zscat.mallplus.ums.mapper.SysAppletSetMapper;
import com.zscat.mallplus.ums.mapper.UmsIntegrationChangeHistoryMapper;
import com.zscat.mallplus.ums.mapper.UmsIntegrationConsumeSettingMapper;
import com.zscat.mallplus.ums.service.IUmsMemberBlanceLogService;
import com.zscat.mallplus.ums.service.IUmsMemberReceiveAddressService;
import com.zscat.mallplus.ums.service.IUmsMemberService;
import com.zscat.mallplus.ums.service.RedisService;
import com.zscat.mallplus.util.DateUtils;
import com.zscat.mallplus.util.JsonUtils;
import com.zscat.mallplus.util.applet.TemplateData;
import com.zscat.mallplus.util.applet.WX_TemplateMsgUtil;
import com.zscat.mallplus.utils.CommonResult;
import com.zscat.mallplus.utils.ValidatorUtils;
import com.zscat.mallplus.vo.ApplyRefundVo;
import com.zscat.mallplus.vo.CartParam;
import com.zscat.mallplus.vo.Rediskey;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StopWatch;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
/**
* <p>
* 订单表 服务实现类
* </p>
*
* @author zscat
* @since 2019-04-17
*/
@Service
@Slf4j
public class OmsOrderServiceImpl extends ServiceImpl<OmsOrderMapper, OmsOrder> implements IOmsOrderService {
@Resource
FenxiaoConfigMapper fenxiaoConfigMapper;
@Resource
FenxiaoRecordsMapper fenxiaoRecordsMapper;
@Resource
private ISmsGroupActivityService smsGroupActivityService;
@Resource
private RedisService redisService;
@Value("${redis.key.prefix.orderId}")
private String REDIS_KEY_PREFIX_ORDER_ID;
@Resource
private IPmsProductService productService;
@Resource
private IUmsMemberReceiveAddressService addressService;
@Resource
private IUmsMemberBlanceLogService memberBlanceLogService;
@Resource
private WechatApiService wechatApiService;
@Resource
private ISmsGroupService groupService;
@Resource
private ISmsGroupMemberService groupMemberService;
@Resource
private IOmsCartItemService cartItemService;
@Resource
private ISmsCouponService couponService;
@Resource
private UmsIntegrationConsumeSettingMapper integrationConsumeSettingMapper;
@Autowired
private ISmsFlashPromotionProductRelationService smsFlashPromotionProductRelationService;
@Resource
private PmsSkuStockMapper skuStockMapper;
@Resource
private ISmsCouponHistoryService couponHistoryService;
@Resource
private IOmsOrderService orderService;
@Resource
private SmsGroupRecordMapper groupRecordMapper;
@Autowired
private IPmsProductConsultService pmsProductConsultService;
@Resource
private IOmsOrderItemService orderItemService;
@Resource
private OmsOrderMapper orderMapper;
@Resource
private SmsGroupMemberMapper groupMemberMapper;
@Resource
private IUmsMemberService memberService;
@Resource
private OmsOrderSettingMapper orderSettingMapper;
@Resource
private OmsCartItemMapper cartItemMapper;
@Resource
private SmsGroupMapper groupMapper;
@Resource
private IPmsGiftsService giftsService;
@Resource
private SysAppletSetMapper appletSetMapper;
@Resource
private UmsIntegrationChangeHistoryMapper integrationChangeHistoryMapper;
@Autowired
private ISmsBasicGiftsService basicGiftsService;
@Autowired
private ISmsBasicMarkingService basicMarkingService;
@Autowired
private IOmsOrderOperateHistoryService orderOperateHistoryService;
@Autowired
private IPmsGiftsService pmsGiftsService;
@Resource
private OmsOrderReturnApplyMapper orderReturnApplyMapper;
@Override
public int payOrder(TbThanks tbThanks) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String time = sdf.format(new Date());
tbThanks.setTime(time);
tbThanks.setDate(new Date());
/*TbMember tbMember=tbMemberMapper.selectByPrimaryKey(Long.valueOf(tbThanks.getUserId()));
if(tbMember!=null){
tbThanks.setUsername(tbMember.getUsername());
}
if(tbThanksMapper.insert(tbThanks)!=1){
throw new XmallException("保存捐赠支付数据失败");
}*/
//设置订单为已付款
OmsOrder tbOrder = orderMapper.selectById(tbThanks.getOrderId());
if (tbOrder == null) {
throw new ApiMallPlusException("订单不存在");
}
tbOrder.setStatus(OrderStatus.TO_DELIVER.getValue());
tbOrder.setPayType(tbThanks.getPayType());
tbOrder.setPaymentTime(new Date());
tbOrder.setModifyTime(new Date());
if (orderMapper.updateById(tbOrder) != 1) {
throw new ApiMallPlusException("更新订单失败");
}
//恢复所有下单商品的锁定库存,扣减真实库存
OmsOrderItem queryO = new OmsOrderItem();
queryO.setOrderId(tbThanks.getOrderId());
List<OmsOrderItem> list = orderItemService.list(new QueryWrapper<>(queryO));
int count = orderMapper.updateSkuStock(list);
//发送通知确认邮件
String tokenName = UUID.randomUUID().toString();
String token = UUID.randomUUID().toString();
// emailUtil.sendEmailDealThank(EMAIL_SENDER,"【mallcloud商城】支付待审核处理",tokenName,token,tbThanks);
return count;
}
@Override
public void sendDelayMessageCancelOrder(Long orderId) {
//获取订单超时时间
OmsOrderSetting orderSetting = orderSettingMapper.selectById(1L);
long delayTimes = order
没有合适的资源?快使用搜索试试~ 我知道了~
基于SpringBoot+MyBatis实现的一套电商系统,包括前台商城系统及后台管理系统
共1602个文件
java:1437个
xml:100个
properties:17个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 121 浏览量
2024-07-08
09:58:02
上传
评论
收藏 17.67MB ZIP 举报
温馨提示
mallplus项目是一套电商系统,包括前台商城系统及后台管理系统,小程序 ,wechat 和类似 taro微信商城,pc商城,基于SpringBoot+MyBatis实现。 前台商城系统包含首页门户、商品推荐、商品搜索、[ 微信 + 支付宝 + 百度 + 头条 ] 小程序 + APP + 公众号 + PC + H5 等模块。 后台管理系统包含商品管理、订单管理、会员管理、促销管理、分销商城 积分商城、权限管理、设置等模块 uniapp 生成的h5 小程序 和app
资源推荐
资源详情
资源评论
收起资源包目录
基于SpringBoot+MyBatis实现的一套电商系统,包括前台商城系统及后台管理系统 (1602个子文件)
changelog 1KB
mvnw.cmd 5KB
mvnw.cmd 5KB
index.ftl 8KB
eForm.ftl 6KB
Controller.ftl 5KB
email.ftl 2KB
menu.sql.ftl 2KB
Entity.ftl 1KB
api.ftl 725B
ServiceImpl.ftl 562B
update.ftl 302B
add.ftl 300B
Service.ftl 247B
Mapper.ftl 241B
.gitignore 268B
.gitignore 268B
.gitignore 264B
.gitignore 99B
.gitignore 67B
.gitignore 67B
.gitignore 67B
mallplus表结构.html 460KB
bcprov-jdk15on-1.54.jar 3.13MB
bcprov-jdk15on-1.54.jar 3.13MB
taobao-sdk-java-auto_1457166217151-20190906.jar 635KB
maven-wrapper.jar 46KB
maven-wrapper.jar 46KB
OmsOrderServiceImpl.java 122KB
UmsMemberServiceImpl.java 49KB
AliPayApi.java 41KB
WxPayApi.java 36KB
RedisUtil.java 32KB
RedisUtil.java 32KB
SDKUtil.java 28KB
SDKConfig.java 26KB
SmsHomeAdvertiseServiceImpl.java 26KB
CertUtil.java 23KB
AppletMemberController.java 20KB
GrapNews.java 20KB
SysUserServiceImpl.java 18KB
PmsProductServiceImpl.java 16KB
SDKConstants.java 16KB
SysUserController.java 16KB
SmsBasicGiftsServiceImpl.java 16KB
HomeController.java 16KB
AcpService.java 15KB
SmsCouponServiceImpl.java 15KB
OmsCartItemServiceImpl.java 15KB
SmsBasicMarkingServiceImpl.java 14KB
JsonUtils.java 14KB
EsProductServiceImpl.java 14KB
JsonUtil.java 14KB
RsaKit.java 13KB
SecureUtil.java 12KB
PmsProductController.java 12KB
CustomHttpUtils.java 12KB
WechatUtil.java 12KB
WxPayKit.java 11KB
DateUtils.java 10KB
WeChatAppletUtils.java 10KB
HttpUtils.java 10KB
GenUtils1.java 10KB
OmsOrderServiceImpl.java 9KB
UnionPayApiConfig.java 9KB
GenUtil.java 9KB
UmsMemberController.java 9KB
MapUtils.java 9KB
OmsOrderController.java 9KB
FileUtil.java 9KB
SmsRedPacketServiceImpl.java 9KB
QqPayApi.java 9KB
SysStoreController.java 9KB
WechatApiService.java 9KB
JwtAuthenticationTokenFilter.java 9KB
PmsGoodsController.java 9KB
PmsProductCategoryController.java 9KB
OrderTimeOutCancelTask.java 8KB
SysQiniuConfigServiceImpl.java 8KB
PmsProductServiceImpl.java 8KB
SmsRedPacketServiceImpl.java 8KB
JwtAuthenticationTokenFilter.java 8KB
SmsFlashPromotionProductRelationController.java 8KB
MpGenerator.java 8KB
PmsProductCategoryAttributeRelationController.java 8KB
SmsGroupController.java 8KB
XmlHelper.java 8KB
BuildingRoomController.java 8KB
SysPermissionController.java 8KB
AllEnum.java 8KB
OssAliyunUtil.java 8KB
OssAliyunUtil.java 7KB
WxApiType.java 7KB
PmsProductAttributeController.java 7KB
SmsHomeBrandController.java 7KB
OmsCartItem.java 7KB
OssController.java 7KB
SmsHomeRecommendSubjectController.java 7KB
SmsHomeRecommendProductController.java 7KB
PmsProductAttributeCategoryController.java 7KB
共 1602 条
- 1
- 2
- 3
- 4
- 5
- 6
- 17
资源评论
Java程序员-张凯
- 粉丝: 1w+
- 资源: 7452
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 中国医学大成1.37.程杏轩医案.何澹安医案.邵兰荪医案.pdf
- (177691224)基于ASP网络办公OA系统设计(LW+源代码+开题报告+答辩PPT).zip
- 中华本草 3.pdf
- 中华本草 4.pdf
- java个人年终工作总结
- 基于springboot的房屋买卖平台的设计与实现源码(java毕业设计完整源码).zip
- (177789594)基于python的某医院体检挂号系统源码数据库.docx
- 中华本草 7.pdf
- Smart200控制两台V90伺服,绝对定位和速度控制,有屏程序,PN通信 注释清楚,PDF调试说明,易懂
- 基于springboot的房屋租赁管理系统源码(java毕业设计完整源码).zip
- 中华本草 8卷.pdf
- 优达寿司大亨2.exe
- 基于springboot的房屋租赁系统源码(java毕业设计完整源码).zip
- 基于Java聊天系统的开题报告
- pytorch深度学习常用的工具包
- Android studio成品项目 点菜系统 源码 apk 可以实现登录注册功能,菜品喜欢,联系以及账户充值功能,包括源码以及apk,单机无联网功能,含项目报告
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功