| | |
| | | int updateByPrimaryKey(AlipayAccountValidNormalHistory record);
|
| | |
|
| | | AlipayAccountValidNormalHistory selectLatestByUid(Long uid);
|
| | | |
| | | AlipayAccountValidNormalHistory selectFirstByUid(Long uid);
|
| | | } |
| | |
| | | from yeshi_ec_alipayaccount_valid_normal_history where avnh_uid =
|
| | | #{0} order by avnh_createtime desc limit 1 for update
|
| | | </select>
|
| | | |
| | | <select id="selectFirstByUid" resultMap="BaseResultMap"
|
| | | parameterType="java.lang.Long">
|
| | | select
|
| | | <include refid="Base_Column_List" />
|
| | | from yeshi_ec_alipayaccount_valid_normal_history where avnh_uid =
|
| | | #{0} limit 1
|
| | | </select>
|
| | | |
| | | |
| | |
|
| | |
|
| | |
|
| | |
| | | import com.yeshi.fanli.entity.money.UserMoneyDebt.UserMoneyDebtTypeEnum;
|
| | | import com.yeshi.fanli.entity.money.UserMoneyDebtReturnHistory;
|
| | | import com.yeshi.fanli.entity.money.UserMoneyDetail;
|
| | | import com.yeshi.fanli.entity.order.CommonOrder;
|
| | | import com.yeshi.fanli.entity.order.HongBaoOrder;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanDrawBack;
|
| | | import com.yeshi.fanli.exception.money.UserMoneyDebtException;
|
| | | import com.yeshi.fanli.exception.money.UserMoneyDetailException;
|
| | |
| | | import com.yeshi.fanli.service.inter.money.UserMoneyService;
|
| | | import com.yeshi.fanli.service.inter.money.msg.UserMoneyMsgNotificationService;
|
| | | import com.yeshi.fanli.service.inter.money.tb.TaoBaoWeiQuanDrawBackService;
|
| | | import com.yeshi.fanli.service.inter.order.CommonOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.HongBaoOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.HongBaoV2Service;
|
| | | import com.yeshi.fanli.service.inter.order.tb.TaoBaoOrderService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | |
| | | private HongBaoV2Service hongBaoV2Service;
|
| | |
|
| | | @Resource
|
| | | private HongBaoOrderService hongBaoOrderService;
|
| | |
|
| | | @Resource
|
| | | private UserMoneyService userMoneyService;
|
| | |
|
| | | @Resource
|
| | |
| | |
|
| | | @Resource
|
| | | private AlipayAccountValidNormalHistoryMapper alipayAccountValidNormalHistoryMapper;
|
| | |
|
| | | @Resource
|
| | | private CommonOrderService commonOrderService;
|
| | |
|
| | | @Override
|
| | | public void addUserMoneyDebt(UserMoneyDebt debt) throws UserMoneyDebtException {
|
| | |
| | | return userMoneyDebtMapper.selectByTypeAndSourceId(type, sourceId);
|
| | | }
|
| | |
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | @Override
|
| | | public void repayDebt(UserMoneyDebt debt, BigDecimal money) throws UserMoneyDebtException {
|
| | | if (debt == null || debt.getId() == null)
|
| | |
| | | }
|
| | |
|
| | | // 新版通知
|
| | | List<CommonOrder> orderList = commonOrderService.listBySourceTypeAndOrderId(Constant.SOURCE_TYPE_TAOBAO,
|
| | | weiQuanDrawBack.getOrderId());
|
| | | int goodsCount = 0;
|
| | | for (CommonOrder co : orderList) {
|
| | | if (co.getState() != CommonOrder.STATE_SX)
|
| | | goodsCount += co.getCount();
|
| | | }
|
| | |
|
| | | BigDecimal fanliMoney = new BigDecimal(0);
|
| | | List<HongBaoOrder> hongBaoOrderList = hongBaoOrderService
|
| | | .listDetailByOrderIdAndSourceType(weiQuanDrawBack.getOrderId(), Constant.SOURCE_TYPE_TAOBAO);
|
| | |
|
| | | for (HongBaoOrder hongBaoOrder : hongBaoOrderList) {
|
| | | fanliMoney = fanliMoney.add(hongBaoOrder.getHongBaoV2().getMoney());
|
| | | }
|
| | |
|
| | | userMoneyMsgNotificationService.fanliOrderWeiQuan(uid, weiQuanDrawBack.getOrderId(),
|
| | | Constant.SOURCE_TYPE_TAOBAO, money, userInfoService.getBalance(uid));
|
| | | Constant.SOURCE_TYPE_TAOBAO, money, fanliMoney, goodsCount,
|
| | | orderList.get(0).getThirdCreateTime());
|
| | |
|
| | | break;
|
| | | case HongBaoV2.TYPE_SHARE_GOODS:
|
| | |
| | | weiQuanDrawBack, money);
|
| | | userMoneyService.subUserMoney(uid, money, userMoneyDetail);
|
| | |
|
| | | userMoneyMsgNotificationService.shareOrderWeiQuan(debt.getUid(), weiQuanDrawBack.getOrderId(),
|
| | | Constant.SOURCE_TYPE_TAOBAO, money, userInfoService.getBalance(uid));
|
| | | // 新版通知
|
| | | List<CommonOrder> orderList1 = commonOrderService
|
| | | .listBySourceTypeAndOrderId(Constant.SOURCE_TYPE_TAOBAO, weiQuanDrawBack.getOrderId());
|
| | | int goodsCount1 = 0;
|
| | | for (CommonOrder co : orderList1) {
|
| | | if (co.getState() != CommonOrder.STATE_SX)
|
| | | goodsCount1 += co.getCount();
|
| | | }
|
| | |
|
| | | BigDecimal fanliMoney1 = new BigDecimal(0);
|
| | | List<HongBaoOrder> hongBaoOrderList1 = hongBaoOrderService.listDetailByOrderIdAndSourceType(
|
| | | weiQuanDrawBack.getOrderId(), Constant.SOURCE_TYPE_TAOBAO);
|
| | |
|
| | | for (HongBaoOrder hongBaoOrder : hongBaoOrderList1) {
|
| | | fanliMoney1 = fanliMoney1.add(hongBaoOrder.getHongBaoV2().getMoney());
|
| | | }
|
| | |
|
| | | userMoneyMsgNotificationService.shareOrderWeiQuan(uid, weiQuanDrawBack.getOrderId(),
|
| | | Constant.SOURCE_TYPE_TAOBAO, money, fanliMoney1, goodsCount1,
|
| | | orderList1.get(0).getThirdCreateTime());
|
| | |
|
| | | } catch (UserMoneyDetailException e) {
|
| | | throw new UserMoneyDebtException(12, "插入资金详情出错");
|
| | |
| | | // 新版资金记录
|
| | | AlipayAccountValidNormalHistory aliPayAccountHistory = alipayAccountValidNormalHistoryMapper
|
| | | .selectByPrimaryKey(debt.getSourceId());
|
| | |
|
| | | AlipayAccountValidNormalHistory first = alipayAccountValidNormalHistoryMapper
|
| | | .selectLatestByUid(aliPayAccountHistory.getUid());
|
| | |
|
| | | if (aliPayAccountHistory == null)
|
| | | return;
|
| | | try {
|
| | |
| | | } catch (UserMoneyDetailException e) {
|
| | | throw new UserMoneyDebtException(12, "插入资金详情出错");
|
| | | }
|
| | |
|
| | | userMoneyMsgNotificationService.alipayAccountValid(aliPayAccountHistory);
|
| | | userMoneyMsgNotificationService.alipayAccountValid(aliPayAccountHistory, "1个月",
|
| | | first.getId().longValue() != aliPayAccountHistory.getId());
|
| | | }
|
| | | }
|
| | |
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | @Override
|
| | | public void repayDebt(Long uid) {
|
| | | // 查询是否有欠债
|
| | |
| | | "该支付宝账号已被其他账号绑定,请更换其他的支付宝账号来绑定");
|
| | | }
|
| | |
|
| | | // TODO 做频率验证-每月验证一次
|
| | | AlipayAccountValidNormalHistory latest = alipayAccountValidNormalHistoryMapper.selectLatestByUid(uid);
|
| | | if (latest != null) {
|
| | | Calendar caLatest = Calendar.getInstance();
|
| | |
| | | if (userInfo.getMyHongBao().compareTo(money) >= 0) {
|
| | | // 扣款
|
| | | userMoneyService.subUserMoney(uid, money, userMoneyDetail);
|
| | | userMoneyMsgNotificationService.alipayAccountValid(history);
|
| | | userMoneyMsgNotificationService.alipayAccountValid(history,"1个月",latest!=null);
|
| | | } else {// 余额不足,暂时不扣款,加入借贷关系
|
| | | UserMoneyDebt debt = new UserMoneyDebt();
|
| | | debt.setCreateTime(new Date());
|
| | |
| | | auditRecord.setExtract(extract);
|
| | |
|
| | | Date minTime = new Date(System.currentTimeMillis() - 1000 * 60 * 60 * 24 * 180L);
|
| | | |
| | |
|
| | | extractAuditRecordMapper.insertSelective(auditRecord);
|
| | |
|
| | | ThreadUtil.run(new Runnable() {
|
| | |
| | | public void run() {
|
| | | // 统计数据
|
| | | int less10Count = commonOrderCountService.countOderByUidAndLess10(user.getId());
|
| | | ExtractAuditRecord update=new ExtractAuditRecord();
|
| | | ExtractAuditRecord update = new ExtractAuditRecord();
|
| | | update.setId(auditRecord.getId());
|
| | | int orderCount50More = orderUserStatisticService.countOrderCount100MoreByUidAndMinTime(user.getId(), minTime);
|
| | | int orderCount50More = orderUserStatisticService.countOrderCount100MoreByUidAndMinTime(user.getId(),
|
| | | minTime);
|
| | | BigDecimal weiQuanOrderFanAmount = orderUserStatisticService.sumWeiQuanOrderFanAmountByUid(user.getId(),
|
| | | minTime);
|
| | | int weiQuanOrderCount = orderUserStatisticService.countWeiQuanOrderByUid(user.getId(), minTime);
|
| | | update.setExtraInfoStr(new Gson().toJson(
|
| | | new ExtractOrderStatisticDTO(orderCount50More, weiQuanOrderCount, weiQuanOrderFanAmount, 0, less10Count)));
|
| | | update.setExtraInfoStr(new Gson().toJson(new ExtractOrderStatisticDTO(orderCount50More,
|
| | | weiQuanOrderCount, weiQuanOrderFanAmount, 0, less10Count)));
|
| | | extractAuditRecordMapper.updateByPrimaryKeySelective(update);
|
| | | }
|
| | | });
|
| | |
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | List<PayInfo> payInfoList = payInfoMapper.getListbyExtractId(extract.getId());
|
| | | String alipayNo = "";
|
| | | if (payInfoList != null && payInfoList.size() > 0)
|
| | | alipayNo = payInfoList.get(0).getOrderId();
|
| | |
|
| | | // 新版通知
|
| | | userMoneyMsgNotificationService.extractSuccess(extract);
|
| | | userMoneyMsgNotificationService.extractSuccess(extract, alipayNo);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | |
|
| | | // 4、发送消息通知
|
| | | String desc = "为保障你的账户余额安全,自动提现金额将不会高于5元";
|
| | | String beizu = "账户中剩余余额请在本App内完成提现";
|
| | | userMoneyMsgNotificationService.extractAuto(extractRecord, "未领取-提现中", desc, beizu);
|
| | | }
|
| | |
|
| | | private boolean parseSendResult(String result) {
|
| | |
| | | // 资金计算
|
| | | userMoneyService.subUserMoney(userInfo.getId(), money, detail);
|
| | |
|
| | | // 4、发送消息通知
|
| | | String desc = "为保障你的账户余额安全,自动提现金额将不会高于5元";
|
| | | String beizu = "账户中剩余余额请在本App内完成提现";
|
| | | userMoneyMsgNotificationService.extractAuto(extractRecord, "未领取-提现中", desc, beizu);
|
| | |
|
| | | // 满足条件返回信息
|
| | | return userInfo;
|
| | | }
|
| | |
| | | extractWeiXinRecordService.updateByPrimaryKeySelective(updeteRecord);
|
| | |
|
| | | if (ExtractWeiXinRecord.RECEIVED.equals(status)) {
|
| | | // 发送消息通知
|
| | | userMoneyMsgNotificationService.extractAuto(record, "已领取-已提现", null, null);
|
| | | } else if (ExtractWeiXinRecord.REFUND.equals(status)) {
|
| | | // 资金明细
|
| | | UserMoneyDetail detail = new UserMoneyDetail();
|
| | |
| | | detail.setType(UserMoneyDetailTypeEnum.extractAutoWXRefund);
|
| | | detail.setUpdateTime(new Date());
|
| | | detail.setUserInfo(new UserInfo(record.getUid()));
|
| | |
|
| | | // 资金计算
|
| | | userMoneyService.addUserMoney(record.getUid(), record.getMoney(), detail);
|
| | |
|
| | | // 发送消息通知
|
| | | userMoneyMsgNotificationService.extractAuto(record, "已退回-余额中", null, null);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void alipayAccountValid(AlipayAccountValidNormalHistory history, int limitDay, boolean change) {
|
| | | public void alipayAccountValid(AlipayAccountValidNormalHistory history, String limitDay, boolean change) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createAlipayAccountValidMsg(history, history.getUid(),
|
| | | Constant.systemCommonConfig.getProjectChineseName(), new BigDecimal("0.1"), limitDay, change);
|
| | | try {
|
| | |
| | | userMoneyService.subUserMoney(uid, drawBackMoney, userMoneyDetail);
|
| | |
|
| | | // 新版通知
|
| | | List<CommonOrder> orderList = commonOrderMapper.listBySourceTypeAndOrderNo(Constant.SOURCE_TYPE_TAOBAO,
|
| | | orderId);
|
| | | int goodsCount = 0;
|
| | | for (CommonOrder co : orderList) {
|
| | | if (co.getState() != CommonOrder.STATE_SX)
|
| | | goodsCount += co.getCount();
|
| | | }
|
| | |
|
| | | BigDecimal fanliMoney = new BigDecimal(0);
|
| | | List<HongBaoOrder> hongBaoOrderList = hongBaoOrderMapper.listDetailByOrderIdAndSourceType(orderId,
|
| | | Constant.SOURCE_TYPE_TAOBAO);
|
| | | for (HongBaoOrder hb : hongBaoOrderList) {
|
| | | fanliMoney = fanliMoney.add(hb.getHongBaoV2().getMoney());
|
| | | }
|
| | |
|
| | | userMoneyMsgNotificationService.fanliOrderWeiQuan(uid, orderId, Constant.SOURCE_TYPE_TAOBAO,
|
| | | drawBackMoney, userInfoMapper.selectByPrimaryKey(uid).getMyHongBao());
|
| | | drawBackMoney, fanliMoney, goodsCount, orderList.get(0).getThirdCreateTime());
|
| | |
|
| | | } else {// 记录资金记录,但是不显示给用户
|
| | |
|
| | | UserMoneyDetail userMoneyDetail = null;
|
| | |
| | | }
|
| | | }
|
| | | userMoneyService.subUserMoney(uid, drawBackMoney, userMoneyDetail);
|
| | | userMoneyMsgNotificationService.shareOrderWeiQuan(uid, orderId, Constant.SOURCE_TYPE_TAOBAO, drawBackMoney,
|
| | |
|
| | | userInfoMapper.selectByPrimaryKey(uid).getMyHongBao());
|
| | | // 新版通知
|
| | | List<CommonOrder> orderList = commonOrderMapper.listBySourceTypeAndOrderNo(Constant.SOURCE_TYPE_TAOBAO,
|
| | | orderId);
|
| | | int goodsCount = 0;
|
| | | for (CommonOrder co : orderList) {
|
| | | if (co.getState() != CommonOrder.STATE_SX)
|
| | | goodsCount += co.getCount();
|
| | | }
|
| | |
|
| | | BigDecimal fanliMoney = new BigDecimal(0);
|
| | | List<HongBaoOrder> hongBaoOrderList = hongBaoOrderMapper.listDetailByOrderIdAndSourceType(orderId,
|
| | | Constant.SOURCE_TYPE_TAOBAO);
|
| | | for (HongBaoOrder hb : hongBaoOrderList) {
|
| | | fanliMoney = fanliMoney.add(hb.getHongBaoV2().getMoney());
|
| | | }
|
| | |
|
| | | userMoneyMsgNotificationService.shareOrderWeiQuan(uid, orderId, Constant.SOURCE_TYPE_TAOBAO, drawBackMoney,
|
| | | fanliMoney, goodsCount, orderList.get(0).getThirdCreateTime());
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | throw new TaoBaoWeiQuanException(101, "邀请订单补贴异常");
|
| | | }
|
| | |
|
| | | //TODO 删除团队奖励维权处理
|
| | | // TODO 删除团队奖励维权处理
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | public TaoBaoWeiQuanDrawBack selectByOrderItemId(String orderItemId) {
|
| | |
| | | return hongBaoV2Mapper.selectByPrimaryKey(id);
|
| | | }
|
| | |
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | @Override
|
| | | public int addHongBao(List<CommonOrder> commonOrderList, int type) throws HongBaoException, UserAccountException {
|
| | | Set<Integer> stateSet = new HashSet<>();// 订单状态Set
|
| | |
| | | switch (t) {
|
| | | case HongBaoV2.TYPE_ZIGOU:
|
| | | userOrderMsgNotificationService.orderFanLiStatistic(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, goodsCount, state);
|
| | | commonOrder.getPayment(), money, goodsCount, commonOrder.getState(),
|
| | | commonOrder.getThirdCreateTime());
|
| | |
|
| | | break;
|
| | | case HongBaoV2.TYPE_SHARE_GOODS:
|
| | |
|
| | | userOrderMsgNotificationService.orderShareStatistic(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, goodsCount, state);
|
| | | commonOrder.getPayment(), money, goodsCount, commonOrder.getState(),
|
| | | commonOrder.getThirdCreateTime());
|
| | |
|
| | | break;
|
| | | case HongBaoV2.TYPE_YIJI:
|
| | |
|
| | | userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, goodsCount, state);
|
| | | commonOrder.getPayment(), money, goodsCount, commonOrder.getState(),
|
| | | commonOrder.getThirdCreateTime());
|
| | |
|
| | | break;
|
| | | case HongBaoV2.TYPE_ERJI:
|
| | | |
| | | userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType, commonOrder.getPayment(), money,
|
| | | goodsCount, commonOrder.getState(), commonOrder.getThirdCreateTime());
|
| | |
|
| | | userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, goodsCount, state);
|
| | | break;
|
| | |
|
| | | case HongBaoV2.TYPE_SHARE_YIJI:
|
| | |
| | | return CommonOrder.STATE_SX;
|
| | | }
|
| | |
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | private boolean updateHongBao(HongBaoOrder hongBaoOrder, CommonOrder commonOrder, int type,
|
| | | Map<Integer, HongBaoOrder> notificationMap) throws HongBaoException, UserAccountException {
|
| | | System.out.println(commonOrder.getOrderNo());
|
| | |
| | | return true;
|
| | | }
|
| | |
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | private void saveHongBao(CommonOrder commonOrder, int type, Map<Integer, HongBaoOrder> notificationMap)
|
| | | throws HongBaoException, UserAccountException {
|
| | | if (type == HongBaoV2.TYPE_ZIGOU) {// 获取自购的返利比例
|
| | |
| | | public List<HongBaoV2> listByIds(List<Long> idList) {
|
| | | return hongBaoV2Mapper.listByIds(idList);
|
| | | }
|
| | | |
| | | |
| | |
|
| | | @Override
|
| | | public List<HongBaoDTO> listByOrderTradeId(String tradeId) {
|
| | | return hongBaoV2Mapper.listByOrderTradeId(tradeId);
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.HongBaoV2;
|
| | | import com.yeshi.fanli.entity.bus.user.LostOrder;
|
| | | import com.yeshi.fanli.entity.bus.user.Order;
|
| | | import com.yeshi.fanli.entity.order.CommonOrder;
|
| | | import com.yeshi.fanli.entity.order.HongBaoOrder;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.order.HongBaoOrderService;
|
| | |
| | | import com.yeshi.fanli.service.inter.order.OrderService;
|
| | | import com.yeshi.fanli.service.inter.order.msg.UserOrderMsgNotificationService;
|
| | | import com.yeshi.fanli.service.inter.order.tb.TaoBaoPunishOrderService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.Utils;
|
| | |
|
| | | @Service
|
| | |
| | | update.setResultCode(LostOrder.RESULT_CODE_SUCCESS);
|
| | | lostOrderMapper.updateByPrimaryKeySelective(update);
|
| | | Order order = orderService.findOrderByOrderIdAndType(orderId, orderType);
|
| | |
|
| | | List<HongBaoOrder> hongBaoOrderList = hongBaoOrderService.listDetailByOrderIdAndSourceType(orderId,
|
| | | orderType);
|
| | | int goodsCount = 0;
|
| | | for (HongBaoOrder hongBaoOrder : hongBaoOrderList) {
|
| | | if (hongBaoOrder.getCommonOrder().getState() != CommonOrder.STATE_SX)
|
| | | goodsCount += hongBaoOrder.getCommonOrder().getCount();
|
| | | }
|
| | |
|
| | | // TODO 分享订单可找回
|
| | | if (order != null)
|
| | | // 添加通知
|
| | | userOrderMsgNotificationService.orderFoundSuccess(lo.getUserInfo().getId(), lo.getOrderId(),
|
| | | order.getMoney(), orderType, new Date(lo.getHandleTime()));
|
| | | userOrderMsgNotificationService.orderFoundSuccess(lo.getUserInfo().getId(), orderId, orderType,
|
| | | Constant.TYPE_REBATE, order.getMoney(), order.getMoney(), goodsCount,
|
| | | new Date(lo.getCreateTime()));
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public Integer countLostOrderNum(String preDay, int resultCode) {
|
| | | public Integer countLostOrderNum(String preDay, int resultCode) {
|
| | | return lostOrderMapper.countLostOrderNum(preDay, resultCode);
|
| | | }
|
| | |
|
| | |
| | | Message msg = MQMsgBodyFactory.create(MQTopicName.TOPIC_ORDER, OrderTopicTagEnum.orderFanLiActual, mqMsg);
|
| | | String taskKey = getTaskKey(uid);
|
| | | msg.setKey(taskKey);
|
| | | |
| | |
|
| | | // 添加事务消息
|
| | | try {
|
| | | orderTransactionProducer.send(msg, new LocalTransactionExecuter() {
|
| | |
| | | UserInfo user = userInfoMapper.selectByPrimaryKey(uid);
|
| | |
|
| | | // 新版通知
|
| | |
|
| | | userMoneyMsgNotificationService.fanliOrderReceived(uid, orderId, sourceType, userGoodsCount.get(uid), money,
|
| | | user.getMyHongBao());
|
| | | user.getMyHongBao(), orderList.get(0).getThirdCreateTime());
|
| | | }
|
| | | // 通知免单到账
|
| | | try {
|
| | |
| | |
|
| | | // 新版通知
|
| | | userMoneyMsgNotificationService.shareOrderReceived(uid, Constant.SOURCE_TYPE_TAOBAO, shareOrders.size(),
|
| | | shareGoodsCount, sharemoney, userInfoMapper.selectAvailableByPrimaryKey(uid).getMyHongBao());
|
| | | shareGoodsCount, sharemoney, userInfoMapper.selectAvailableByPrimaryKey(uid).getMyHongBao(), null,
|
| | | null);
|
| | |
|
| | | for (String orderId : drawBackOrders)
|
| | | taoBaoWeiQuanDrawBackService.doWeiQuanShare(orderId);
|
| | |
| | |
|
| | | // 新版通知
|
| | | userMoneyMsgNotificationService.shareOrderReceived(uid, Constant.SOURCE_TYPE_TAOBAO, shareOrders.size(),
|
| | | shareGoodsCount, sharemoney, userInfoMapper.selectAvailableByPrimaryKey(uid).getMyHongBao());
|
| | |
|
| | | shareGoodsCount, sharemoney, userInfoMapper.selectAvailableByPrimaryKey(uid).getMyHongBao(), null,
|
| | | null);
|
| | | }
|
| | |
|
| | | hongBaoV2SettleTempService.addTemp(recieveHongBaoIds, key);
|
| | |
| | | import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail.MsgTypeMoneyTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.AlipayAccountValidNormalHistory;
|
| | | import com.yeshi.fanli.entity.bus.user.Extract;
|
| | | import com.yeshi.fanli.entity.bus.user.ExtractWeiXinRecord;
|
| | |
|
| | | /**
|
| | | * 用户资金消息通知
|
| | |
| | | */
|
| | | public void extractFail(Extract extract, String stateDesc);
|
| | |
|
| | | |
| | | /**
|
| | | * 提现成功
|
| | | * |
| | | * 提现成功
|
| | | * @Title: extractSuccess
|
| | | * @Description: |
| | | * @param extract
|
| | | * @param alipayNo 支付宝流水号
|
| | | * void 返回类型
|
| | | * @throws
|
| | | */
|
| | | public void extractSuccess(Extract extract, String reason);
|
| | | public void extractSuccess(Extract extract, String alipayNo);
|
| | |
|
| | | /**
|
| | | * 支付宝账号验证
|
| | |
| | | * @param limitDay 限制时间
|
| | | * @param change 是否为修改 true 修改 false 首次绑定
|
| | | */
|
| | | public void alipayAccountValid(AlipayAccountValidNormalHistory history, int limitDay, boolean change);
|
| | | public void alipayAccountValid(AlipayAccountValidNormalHistory history, String limitDay, boolean change);
|
| | |
|
| | | /**
|
| | | * 付宝账号验证失败
|
| | |
| | |
|
| | | /**
|
| | | * 返利订单维权
|
| | | * |
| | | * @param uid
|
| | | * @param orderId
|
| | | * @param money
|
| | | * @param fanliMoney 订单返利
|
| | | * @Title: fanliOrderWeiQuan
|
| | | * @Description: |
| | | * @param uid 用户ID
|
| | | * @param orderId -订单号
|
| | | * @param orderType -订单类型
|
| | | * @param money -维权扣除金额
|
| | | * @param fanliMoney -返利金额
|
| | | * @param goodsCount 商品数量
|
| | | * @param downTime 下单时间
|
| | | * void 返回类型
|
| | | * @throws
|
| | | */
|
| | | public void fanliOrderWeiQuan(Long uid, String orderId, int orderType, BigDecimal money, BigDecimal fanliMoney, int goodsCount, Date downTime);
|
| | |
|
| | | /**
|
| | | * 分享赚订单被统计
|
| | | * 分享赚订单到账
|
| | | *
|
| | | * @param uid
|
| | | * @param orderCount
|
| | |
| | | public void shareOrderReceived(Long uid, int orderType, int orderCount, int goodsCount, BigDecimal money,
|
| | | BigDecimal balance, String orderId, Date downTime);
|
| | |
|
| | |
|
| | | |
| | | /**
|
| | | * 分享订单维权
|
| | | * |
| | | * @Title: shareOrderWeiQuan
|
| | | * @Description: |
| | | * @param uid
|
| | | * @param orderId
|
| | | * @param money
|
| | | * @param fanliMoney
|
| | | * @param orderId -订单号
|
| | | * @param orderType 订单类型
|
| | | * @param money 维权金额
|
| | | * @param fanliMoney 返利金额
|
| | | * @param goodsCount -商品数量
|
| | | * @param downTime 下单时间
|
| | | * void 返回类型
|
| | | * @throws
|
| | | */
|
| | |
|
| | | public void shareOrderWeiQuan(Long uid, String orderId, int orderType, BigDecimal money,BigDecimal fanliMoney, int goodsCount, Date downTime);
|
| | |
| | | switch (t) {
|
| | | case HongBaoV2.TYPE_ZIGOU:
|
| | | userOrderMsgNotificationService.orderFanLiStatistic(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, goodsCount, state);
|
| | | commonOrder.getPayment(), money, goodsCount, commonOrder.getState(),
|
| | | commonOrder.getThirdCreateTime());
|
| | |
|
| | | break;
|
| | | case HongBaoV2.TYPE_SHARE_GOODS:
|
| | |
|
| | | userOrderMsgNotificationService.orderShareStatistic(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, goodsCount, state);
|
| | | commonOrder.getPayment(), money, goodsCount, commonOrder.getState(),
|
| | | commonOrder.getThirdCreateTime());
|
| | |
|
| | | break;
|
| | | case HongBaoV2.TYPE_YIJI:
|
| | | userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, goodsCount, state);
|
| | | commonOrder.getPayment(), money, goodsCount, commonOrder.getState(),
|
| | | commonOrder.getThirdCreateTime());
|
| | |
|
| | | break;
|
| | | case HongBaoV2.TYPE_ERJI:
|
| | | userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, goodsCount, state);
|
| | | |
| | | userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType, commonOrder.getPayment(), money,
|
| | | goodsCount, commonOrder.getState(), commonOrder.getThirdCreateTime());
|
| | |
|
| | | break;
|
| | |
|
| | | case HongBaoV2.TYPE_SHARE_YIJI:
|
| | | userOrderMsgNotificationService.orderShareFirstLevelStatistic(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, goodsCount, state, notify.getBeizhu());
|
| | |
| | | switch (t) {
|
| | | case HongBaoV2.TYPE_ZIGOU:
|
| | | userOrderMsgNotificationService.orderFanLiStatistic(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, goodsCount, state);
|
| | | commonOrder.getPayment(), money, goodsCount, commonOrder.getState(),
|
| | | commonOrder.getThirdCreateTime());
|
| | |
|
| | | break;
|
| | | case HongBaoV2.TYPE_SHARE_GOODS:
|
| | |
|
| | | userOrderMsgNotificationService.orderShareStatistic(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, goodsCount, state);
|
| | | commonOrder.getPayment(), money, goodsCount, commonOrder.getState(),
|
| | | commonOrder.getThirdCreateTime());
|
| | |
|
| | | break;
|
| | | case HongBaoV2.TYPE_YIJI:
|
| | | userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, goodsCount, state);
|
| | | commonOrder.getPayment(), money, goodsCount, commonOrder.getState(),
|
| | | commonOrder.getThirdCreateTime());
|
| | |
|
| | | break;
|
| | | case HongBaoV2.TYPE_ERJI:
|
| | | userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, goodsCount, state);
|
| | | |
| | | userOrderMsgNotificationService.orderInviteStatistic(uid, orderId, orderType, commonOrder.getPayment(), money,
|
| | | goodsCount, commonOrder.getState(), commonOrder.getThirdCreateTime());
|
| | |
|
| | | break;
|
| | |
|
| | | case HongBaoV2.TYPE_SHARE_YIJI:
|
| | | userOrderMsgNotificationService.orderShareFirstLevelStatistic(uid, orderId, orderType,
|
| | | commonOrder.getPayment(), money, goodsCount, state, notify.getBeizhu());
|
| | |
| | | * @return
|
| | | */
|
| | | public static MsgMoneyDetail createAlipayAccountValidMsg(AlipayAccountValidNormalHistory valid, Long uid,
|
| | | String appName, BigDecimal money, int limitDay, boolean change) {
|
| | | String appName, BigDecimal money, String limitDay, boolean change) {
|
| | | if (valid == null || uid == null || appName == null)
|
| | | return null;
|
| | |
|
| | |
| | | List<ClientTextStyleVO> contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(String.format("成功%s的提现账号", changeWay), ClientTextStyleVO.COLOR_CONTENT));
|
| | | contentList.add(new ClientTextStyleVO( limitDay+"", ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
| | | contentList.add(new ClientTextStyleVO("天内无法修改", ClientTextStyleVO.COLOR_CONTENT));
|
| | | contentList.add(new ClientTextStyleVO("内无法修改", ClientTextStyleVO.COLOR_CONTENT));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("备注", ClientTextStyleVO.COLOR_TITLE),contentList));
|
| | |
|
| | |
|