| | |
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.AccountDetailsMapper;
|
| | | import com.yeshi.fanli.dao.mybatis.AccountMessageMapper;
|
| | | import com.yeshi.fanli.dao.mybatis.HongBaoManageMapper;
|
| | | import com.yeshi.fanli.dao.mybatis.PidOrderMapper;
|
| | |
| | | import com.yeshi.fanli.dao.mybatis.share.PidUserMapper;
|
| | | import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoOrderMapper;
|
| | | import com.yeshi.fanli.dao.order.PidOrderDao;
|
| | | import com.yeshi.fanli.entity.bus.user.AccountDetails;
|
| | | import com.yeshi.fanli.entity.bus.user.HongBao;
|
| | | import com.yeshi.fanli.entity.bus.user.HongBaoManage;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | |
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.factory.AccountDetailsFactory;
|
| | | import com.yeshi.fanli.util.factory.HongBaoFactory;
|
| | | import com.yeshi.fanli.util.factory.UserMoneyDetailFactory;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoOrderUtil;
|
| | |
|
| | | @Service
|
| | |
| | |
|
| | | @Resource
|
| | | private UserInfoMapper userInfoMapper;
|
| | |
|
| | | @Resource
|
| | | private AccountDetailsMapper accountDetailsMapper;
|
| | |
|
| | | @Resource
|
| | | private AccountMessageMapper accountMessageMapper;
|
| | |
| | | }
|
| | |
|
| | |
|
| | | try {
|
| | | // 第三方提成订单被统计的通知
|
| | | userNotificationService.tiChengStatisticed(hongBao.getUserInfo().getId(),
|
| | | hongBao.getOrderId(), hongBao.getMoney());
|
| | | } catch (Exception e) {
|
| | |
|
| | | }
|
| | |
|
| | | PidOrder updatePidOrder = new PidOrder();
|
| | | updatePidOrder.setId(order.getId());
|
| | | updatePidOrder.setLocalUpdateTime(new Date());
|
| | |
| | | hongBao2.setOrderId(order.getOrderId());
|
| | |
|
| | | hongBaoMapper.insertSelective(hongBao2);
|
| | | try {
|
| | | // 第三方提成订单被统计的通知
|
| | | userNotificationService.tiChengStatisticed(hongBao2.getUserInfo().getId(),
|
| | | hongBao2.getOrderId(), hongBao2.getMoney());
|
| | | } catch (Exception e) {
|
| | | }
|
| | | |
| | |
|
| | | }
|
| | |
|
| | |
| | | hongBao3.setOrderId(order.getOrderId());
|
| | | hongBaoMapper.insertSelective(hongBao3);
|
| | |
|
| | | try {
|
| | | // 第三方提成订单被统计的通知
|
| | | userNotificationService.tiChengStatisticed(hongBao3.getUserInfo().getId(),
|
| | | hongBao3.getOrderId(), hongBao3.getMoney());
|
| | | } catch (Exception e) {
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | hongBaoMapper.updateByPrimaryKeySelective(updateHongBao);
|
| | | // 处理退款
|
| | | userInfoMapper.subHongBaoByUid(hongBao.getUserInfo().getId(), hongBao.getMoney());
|
| | | // 添加资金明细
|
| | | AccountDetails ad = AccountDetailsFactory.create("-" + hongBao.getMoney(),
|
| | | AccountDetailsFactory.SHARE_GOODS_DRAWBACK, null, null, hongBao.getUserInfo());
|
| | | accountDetailsMapper.insertSelective(ad);
|
| | | |
| | |
|
| | |
|
| | |
|
| | |
| | | hongBaoMapper.updateByPrimaryKeySelective(updateChildHongBao);
|
| | | // 处理退款
|
| | | userInfoMapper.subHongBaoByUid(cb.getUserInfo().getId(), cb.getMoney());
|
| | | // 添加资金明细
|
| | | AccountDetails ad = AccountDetailsFactory.create("-" + cb.getMoney(),
|
| | | AccountDetailsFactory.SHARE_GOODS_DRAWBACK, null, null,
|
| | | cb.getUserInfo());
|
| | | accountDetailsMapper.insertSelective(ad);
|
| | |
|
| | | // 维权通知
|
| | | try {
|
| | |
| | | hongBaoMapper.updateByPrimaryKeySelective(updateChildHongBao);
|
| | | // 处理退款
|
| | | userInfoMapper.subHongBaoByUid(cb.getUserInfo().getId(), cb.getMoney());
|
| | | // 添加资金明细
|
| | | AccountDetails ad = AccountDetailsFactory.create("-" + cb.getMoney(),
|
| | | AccountDetailsFactory.SHARE_GOODS_DRAWBACK, null, null, cb.getUserInfo());
|
| | | accountDetailsMapper.insertSelective(ad);
|
| | |
|
| | | // 维权通知
|
| | | try {
|