| | |
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | | import java.util.Scanner;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.crypto.Mac;
|
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | | import org.springframework.web.multipart.MultipartHttpServletRequest;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | | import org.yeshi.utils.taobao.TbImgUtil;
|
| | | import org.yeshi.utils.wx.WXUtil;
|
| | |
|
| | |
| | | import com.yeshi.fanli.dto.ConfigParamsDTO;
|
| | | import com.yeshi.fanli.dto.mq.order.OrderTopicTagEnum;
|
| | | import com.yeshi.fanli.dto.mq.order.body.BanLiShopOrderMQMsg;
|
| | | import com.yeshi.fanli.dto.push.PushContentDTO;
|
| | | import com.yeshi.fanli.entity.bus.activity.ActivityRuleUser;
|
| | | import com.yeshi.fanli.entity.bus.activity.ActivityUser;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgDeviceReadState;
|
| | | import com.yeshi.fanli.entity.config.push.PushMsgFactory;
|
| | | import com.yeshi.fanli.entity.dynamic.ImgInfo;
|
| | | import com.yeshi.fanli.entity.dynamic.ImgInfo.ImgEnum;
|
| | | import com.yeshi.fanli.entity.dynamic.SimpleGoods;
|
| | |
| | | import com.yeshi.fanli.entity.shop.BanLiShopOrder;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.exception.dynamic.GoodsEvaluateException;
|
| | | import com.yeshi.fanli.exception.push.PushException;
|
| | | import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.activity.ActivityUserService;
|
| | |
| | | String uid = json.optJSONObject("customizedData").optString("用户ID");
|
| | | msgDeviceReadStateService.addUnreadDeviceMsg(MsgDeviceReadState.TYPE_KEFU, customizedId,
|
| | | "android".equalsIgnoreCase(deviceOS) ? 1 : 2, 1, msg, new Date());
|
| | | if (!StringUtil.isNullOrEmpty(uid))// 推送客服消息
|
| | | {
|
| | | PushContentDTO dto = PushMsgFactory.createMsgKefu();
|
| | | try {
|
| | | pushService.pushZNX(Long.parseLong(uid), dto.getTitle(), dto.getContent(), null, null);
|
| | | } catch (NumberFormatException e) {
|
| | | e.printStackTrace();
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | JSONObject data = JSONObject.fromObject(contentDecode).optJSONObject("data");
|
| | |
|
| | | JSONArray array = data.optJSONObject("recommend").optJSONArray("resultList");
|
| | | for (int i = array.size()-1; i >=0; i--) {
|
| | | for (int i = array.size() - 1; i >= 0; i--) {
|
| | | JSONObject item = array.optJSONObject(i);
|
| | | String title = item.optString("itemName");
|
| | | String doc = item.optString("cusShareText");
|
| | | long itemId = item.optLong("itemId");
|
| | | String publishTime=item.optString("cusPublishTime");
|
| | | String publishTime = item.optString("cusPublishTime");
|
| | | JSONArray imageArray = item.optJSONArray("imageList");
|
| | | List<String> imgList = new ArrayList<>();
|
| | | for (int j = 0; j < imageArray.size(); j++) {
|
| | |
| | | String title = Constant.znxConfig.getShareOrderStatisticedTitle();
|
| | | String content = Constant.znxConfig.getShareOrderStatisticedMsg();
|
| | | content = content.replace("[订单类型]", Constant.getSourceName(sourceType))
|
| | | .replace("[订单号]",UserUtil.filterOrderId(orderId))
|
| | | .replace("[金额]", money.toString());
|
| | | .replace("[订单号]", UserUtil.filterOrderId(orderId)).replace("[金额]", money.toString());
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | |
| | | String title = Constant.znxConfig.getInviteOrderStatisticedTitle();
|
| | | String content = Constant.znxConfig.getInviteOrderStatisticedMsg();
|
| | | content = content.replace("[订单类型]", Constant.getSourceName(sourceType))
|
| | | .replace("[订单号]",UserUtil.filterOrderId(orderId))
|
| | | .replace("[金额]", money.toString());
|
| | | .replace("[订单号]", UserUtil.filterOrderId(orderId)).replace("[金额]", money.toString());
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | /**
|
| | | * 团队分红
|
| | | * @Title: createMoneyTeamDividents
|
| | | * @Description: |
| | | * @param sourceType
|
| | | * @param money
|
| | | * @return |
| | | * PushContentDTO 返回类型
|
| | | * @throws
|
| | | */
|
| | | public static PushContentDTO createMoneyTeamDividents(BigDecimal money) {
|
| | | String title = Constant.znxConfig.getMoneyTeamDividentsRecievedTitle();
|
| | | String content = Constant.znxConfig.getMoneyTeamDividentsRecievedMsg();
|
| | | content = content.replace("[金额]", money.toString());
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 系统补齐
|
| | | *
|
| | | * @param reason
|
| | |
| | | }
|
| | |
|
| | | /**
|
| | | * 系统扣除
|
| | | * @param reason
|
| | | * @param money
|
| | | * @return
|
| | | */
|
| | | public static PushContentDTO createMoneySystemSub(String reason, BigDecimal money) {
|
| | | String title = Constant.znxConfig.getMoneySystemSubTitle();
|
| | | String content = Constant.znxConfig.getMoneySystemSubMsg();
|
| | | content = content.replace("[原因]", reason).replace("[金额]", money.toString());
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 系统奖励
|
| | | * @param reason
|
| | | * @param money
|
| | | * @return
|
| | | */
|
| | | public static PushContentDTO createMoneySystemReward(String reason, BigDecimal money) {
|
| | | String title = Constant.znxConfig.getMoneySystemRewardTitle();
|
| | | String content = Constant.znxConfig.getMoneySystemRewardMsg();
|
| | | content = content.replace("[原因]", reason).replace("[金额]", money.toString());
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 返利维权扣除
|
| | | * |
| | | * @param sourceType
|
| | | * @param orderId
|
| | | * @param part-是否为部分维权
|
| | | * @param money
|
| | | * @return
|
| | | */
|
| | | public static PushContentDTO createMoneyOrderFanLiWeiquan(int sourceType, String orderId, boolean part,
|
| | | BigDecimal money) {
|
| | | String title = Constant.znxConfig.getMoneyWeiquanTitle();
|
| | | String content = Constant.znxConfig.getMoneyWeiquanMsg();
|
| | | content = content.replace("[订单类型]", Constant.getSourceName(sourceType)).replace("[订单号]", orderId)
|
| | | .replace("[部分]", part ? "部分" : "").replace("[金额]", money.toString());
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 分享或邀请维权扣除
|
| | | * |
| | | * @param sourceType
|
| | | * @param orderId
|
| | | * @param part
|
| | | * @param money
|
| | | * @return
|
| | | */
|
| | |
|
| | | public static PushContentDTO createMoneyOrderShareOrInviteWeiquan(int sourceType, String orderId, boolean part,
|
| | | BigDecimal money) {
|
| | | String title = Constant.znxConfig.getMoneyWeiquanTitle();
|
| | | String content = Constant.znxConfig.getMoneyWeiquanMsg();
|
| | | content = content.replace("[订单类型]", Constant.getSourceName(sourceType))
|
| | | .replace("[订单号]", UserUtil.filterOrderId(orderId))
|
| | | .replace("[部分]", part ? "部分" : "").replace("[金额]", money.toString());
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 提现成功
|
| | | * @param applyTime
|
| | | * @param money
|
| | |
| | | String title = Constant.znxConfig.getMoneyExtractSuccessTitle();
|
| | | String content = Constant.znxConfig.getMoneyExtractSuccessMsg();
|
| | | content = content.replace("[提现时间]", TimeUtil.getGernalTime(applyTime.getTime(), "yyyy.MM.dd HH:mm"))
|
| | | .replace("[支付宝账号]",UserUtil.filterAlipayAccount(alipayAccount)).replace("[金额]", money.toString());
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 提现失败
|
| | | * @param applyTime
|
| | | * @param money
|
| | | * @param alipayAccount
|
| | | * @return
|
| | | */
|
| | | public static PushContentDTO createmoneyExtractFail(Date applyTime, BigDecimal money, String alipayAccount) {
|
| | | String title = Constant.znxConfig.getMoneyExtractFailTitle();
|
| | | String content = Constant.znxConfig.getMoneyExtractFailMsg();
|
| | | content = content.replace("[提现时间]", TimeUtil.getGernalTime(applyTime.getTime(), "yyyy.MM.dd HH:mm"))
|
| | | .replace("[支付宝账号]", UserUtil.filterAlipayAccount(alipayAccount)).replace("[金额]", money.toString());
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 现金红包
|
| | | * @param reason
|
| | | * @param money
|
| | | * @return
|
| | | */
|
| | | public static PushContentDTO createHongbaoRecieved(String reason, BigDecimal money) {
|
| | | String title = Constant.znxConfig.getHongbaoRecievedTitle();
|
| | | String content = Constant.znxConfig.getHongbaoRecievedMsg();
|
| | | content = content.replace("[原因]", reason).replace("[金额]", money.toString());
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 支付宝账号验证
|
| | | * @param alipayAccount
|
| | | * @param money
|
| | | * @return
|
| | | */
|
| | | public static PushContentDTO createAlipayAccountValid(String alipayAccount, BigDecimal money) {
|
| | | String title = Constant.znxConfig.getAlipayAccountValidTitle();
|
| | | String content = Constant.znxConfig.getAlipayAccountValidMsg();
|
| | | content = content.replace("[支付宝账号]", UserUtil.filterAlipayAccount(alipayAccount)).replace("[金额]", money.toString());
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 积分兑换成功
|
| | | * @param reason
|
| | | * @param time
|
| | | * @return
|
| | | */
|
| | | public static PushContentDTO createScoreExchangeSuccess(Date time, int score) {
|
| | | String title = Constant.znxConfig.getScoreExchangeSuccessTitle();
|
| | | String content = Constant.znxConfig.getScoreExchangeSuccessMsg();
|
| | | content = content.replace("[时间]", TimeUtil.getGernalTime(time.getTime(), "yyyy.MM.dd HH:mm")).replace("[积分数额]",
|
| | | score + "");
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 积分兑换失败
|
| | | * @param reason
|
| | | * @param time
|
| | | * @return
|
| | | */
|
| | | public static PushContentDTO createScoreExchangeFail(String reason, Date time) {
|
| | | String title = Constant.znxConfig.getScoreExchangeFailTitle();
|
| | | String content = Constant.znxConfig.getScoreExchangeFailMsg();
|
| | | content = content.replace("[时间]", TimeUtil.getGernalTime(time.getTime(), "yyyy.MM.dd HH:mm")).replace("[原因]",
|
| | | reason);
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 功能开通成功
|
| | | * @param functionName
|
| | | * @return
|
| | | */
|
| | | public static PushContentDTO createFunctionGetSuccess(String functionName) {
|
| | | String title = Constant.znxConfig.getFunctionGetSuccessTitle();
|
| | | String content = Constant.znxConfig.getFunctionGetSuccessMsg();
|
| | | content = content.replace("[增值功能]", functionName);
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 功能开通失败
|
| | | * @param functionName
|
| | | * @return
|
| | | */
|
| | | public static PushContentDTO createFunctionGetFail(String functionName) {
|
| | | String title = Constant.znxConfig.getFunctionGetFailTitle();
|
| | | String content = Constant.znxConfig.getFunctionGetFailMsg();
|
| | | content = content.replace("[增值功能]", functionName);
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | |
| | | String content = Constant.znxConfig.getInviteTeamSuccessMsg();
|
| | | content = content.replace("[时间]", TimeUtil.getGernalTime(time.getTime(), "yyyy.MM.dd HH:mm")).replace("[队员昵称]",
|
| | | nickName);
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 客服唤起
|
| | | * @return
|
| | | */
|
| | | public static PushContentDTO createMsgKefu() {
|
| | | String title = Constant.znxConfig.getMsgKefuTitle();
|
| | | String content = Constant.znxConfig.getMsgKefuMsg();
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | |
| | | /**
|
| | | * 快速订单更新(爬取本小时内的单,每分钟一次)
|
| | | */
|
| | | @XxlJob("updateJDSoonOrderHandler")
|
| | | public ReturnT<String> startPreDividents(String param) throws Exception {
|
| | | @XxlJob("updateJDOrderHandler")
|
| | | public ReturnT<String> updateJDSoonOrder(String param) throws Exception {
|
| | | if ("1".equalsIgnoreCase(param)) {//更新本小时内的单
|
| | | LogHelper.job("开始爬取京东订单");
|
| | | long now = System.currentTimeMillis();
|
| | |
|
| | | LogHelper.job("开始爬取京东订单");
|
| | | long now = System.currentTimeMillis();
|
| | |
|
| | | JDOrderResult result = JDApiUtil.getOrderList(1, 200, new Date(now), JDApiUtil.ORDER_TYPE_CREATETIME);
|
| | | if (result != null && result.getOrderList() != null)
|
| | | saveJDOrders(result.getOrderList());
|
| | | // 查询上个小时的
|
| | | result = JDApiUtil.getOrderList(1, 200, new Date(now - 1000 * 60 * 60L), JDApiUtil.ORDER_TYPE_CREATETIME);
|
| | | if (result != null && result.getOrderList() != null)
|
| | | saveJDOrders(result.getOrderList());
|
| | | JDOrderResult result = JDApiUtil.getOrderList(1, 200, new Date(now), JDApiUtil.ORDER_TYPE_CREATETIME);
|
| | | if (result != null && result.getOrderList() != null)
|
| | | saveJDOrders(result.getOrderList());
|
| | | // 查询上个小时的
|
| | | result = JDApiUtil.getOrderList(1, 200, new Date(now - 1000 * 60 * 60L), JDApiUtil.ORDER_TYPE_CREATETIME);
|
| | | if (result != null && result.getOrderList() != null)
|
| | | saveJDOrders(result.getOrderList());
|
| | | } else if ("1hour".equalsIgnoreCase(param)) {// 更新1小时内的订单
|
| | | updateUpdateOrder();
|
| | | } else if ("3day".equalsIgnoreCase(param)) {// 更新最近3天更新的数据
|
| | | updateLatest3DayOrder();
|
| | | }
|
| | |
|
| | | return ReturnT.SUCCESS;
|
| | | }
|
| | |
| | | /**
|
| | | * 爬取最近一小时内的状态更新了的单(10分钟一次)
|
| | | */
|
| | | @Scheduled(cron = "0 0/10 * * * ? ")
|
| | |
|
| | | public void updateUpdateOrder() {
|
| | | if (!Constant.IS_TASK)
|
| | | return;
|
| | | List<JDOrder> jdOrderList = new ArrayList<>();
|
| | | int pageSize = 200;
|
| | | int page = 1;
|
| | |
| | | /**
|
| | | * 更新最近3天的订单(每天早上凌晨0点过10分,早上8点过10分)
|
| | | */
|
| | | @Scheduled(cron = "0 10 0,8 * * ? ")
|
| | | public void updateLatest3DayOrder() {
|
| | | if (!Constant.IS_TASK)
|
| | | return;
|
| | | Date now = new Date();
|
| | | for (int i = 1; i < 4; i++) {
|
| | | updateDayOrder(new Date(now.getTime() - 1000 * 60 * 60 * 24L * i));
|
| | |
| | | import org.springframework.scheduling.annotation.Scheduled;
|
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | | import com.xxl.job.core.biz.model.ReturnT;
|
| | | import com.xxl.job.core.handler.annotation.XxlJob;
|
| | | import com.yeshi.fanli.dto.taobao.WeiQuanOrderResult;
|
| | | import com.yeshi.fanli.entity.bus.user.LostOrder;
|
| | | import com.yeshi.fanli.entity.bus.user.Order;
|
| | |
| | | taobaoTrade("淘宝交易(分享/自购)"),
|
| | | taobaoAuth("淘宝授权"),
|
| | | taobaoGoods("淘宝商品信息"),
|
| | | userLogin("用户登录");
|
| | | userLogin("用户登录"),
|
| | | |
| | | ;
|
| | | |
| | |
|
| | | private String desc;
|
| | |
|
| | |
| | | private MsgMoneyDetailService msgMoneyDetailService;
|
| | | @Resource
|
| | | private PushService pushService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private MsgExtraService msgExtraService;
|
| | |
|
| | | @Override
|
| | | public void extractApplay(Extract extract) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createExtractMsg("人工审核中", extract.getUserInfo().getId(),
|
| | | extract, null, null);
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createExtractMsg("人工审核中", extract.getUserInfo().getId(), extract,
|
| | | null, null);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | public void extractFail(Extract extract, String reason) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createExtractMsg("提现失败", extract.getUserInfo().getId(),
|
| | | extract, reason, null);
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createExtractMsg("提现失败", extract.getUserInfo().getId(), extract,
|
| | | reason, null);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | PushContentDTO dto = PushMsgFactory.createmoneyExtractFail(new Date(extract.getExtractTime()),
|
| | | extract.getMoney(), extract.getAccount());
|
| | | try {
|
| | | pushService.pushZNX(extract.getUserInfo().getId(), dto.getTitle(), dto.getContent(), null, null);
|
| | | } catch (NumberFormatException e) {
|
| | | e.printStackTrace();
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void extractSuccess(Extract extract, String alipayNo) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createExtractMsg("提现成功", extract.getUserInfo().getId(),
|
| | | extract, null, alipayNo);
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createExtractMsg("提现成功", extract.getUserInfo().getId(), extract,
|
| | | null, alipayNo);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | |
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | PushContentDTO dto = PushMsgFactory.createAlipayAccountValid(history.getAccount(), new BigDecimal("0.1"));
|
| | | try {
|
| | | pushService.pushZNX(history.getUid(), dto.getTitle(), dto.getContent(), null, null);
|
| | | } catch (NumberFormatException e) {
|
| | | e.printStackTrace();
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public void alipayAccountValidFail(AlipayAccountValidNormalHistory history, int limitDay, boolean change) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createAlipayAccountValidFail(history, history.getUid(),
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | |
| | |
|
| | | @Override
|
| | | public void fanliOrderReceived(Long uid, String orderId, int orderType, int goodsCount, BigDecimal money,
|
| | | BigDecimal balance, Date downTime) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.fanLiOrderReceivedMsg(money, balance, orderId, orderType, goodsCount,
|
| | | uid, downTime, false);
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.fanLiOrderReceivedMsg(money, balance, orderId, orderType,
|
| | | goodsCount, uid, downTime, false);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | | |
| | |
|
| | | @Override
|
| | | public void rewardCounponReceived(Long uid, String orderId, int orderType, int goodsCount, BigDecimal money,
|
| | | BigDecimal balance, Date downTime) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.fanLiOrderReceivedMsg(money, balance, orderId, orderType, goodsCount,
|
| | | uid, downTime, true);
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.fanLiOrderReceivedMsg(money, balance, orderId, orderType,
|
| | | goodsCount, uid, downTime, true);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void fanliOrderWeiQuan(Long uid, String orderId, int orderType, BigDecimal money, BigDecimal fanliMoney, |
| | | public void fanliOrderWeiQuan(Long uid, String orderId, int orderType, BigDecimal money, BigDecimal fanliMoney,
|
| | | int goodsCount, Date downTime) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createOrderWeiQuanMsg(uid, orderId, orderType, money, fanliMoney,
|
| | | goodsCount, downTime, Constant.TYPE_REBATE);
|
| | |
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | // TODO 需要传入是否部分维权
|
| | | PushContentDTO dto = PushMsgFactory.createMoneyOrderFanLiWeiquan(orderType, orderId, false, money);
|
| | | try {
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null);
|
| | | } catch (NumberFormatException e) {
|
| | | e.printStackTrace();
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void shareOrderReceived(Long uid, int orderType, BigDecimal money,BigDecimal balance, Date receivedDate) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.shareOrderReceivedMsg(money, balance, orderType, uid, receivedDate);
|
| | | public void shareOrderReceived(Long uid, int orderType, BigDecimal money, BigDecimal balance, Date receivedDate) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.shareOrderReceivedMsg(money, balance, orderType, uid,
|
| | | receivedDate);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | |
| | |
|
| | | PushContentDTO dto = PushMsgFactory.createMoneyShareRecieved(orderType, money);
|
| | | try {
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null);
|
| | |
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | PushContentDTO dto = PushMsgFactory.createMoneyOrderShareOrInviteWeiquan(orderType, orderId, false, money);
|
| | | try {
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null);
|
| | | } catch (NumberFormatException e) {
|
| | | e.printStackTrace();
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | @Override
|
| | | public void systemEqualize(Long uid, String reason, BigDecimal money, BigDecimal balance) {
|
| | | // MsgMoneyDetail detail = MsgMoneyDetailFactory.createSystemEqualizeMsg(uid, reason, money, balance, null);
|
| | | // try {
|
| | | // msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | // } catch (MsgMoneyDetailException e) {
|
| | | // e.printStackTrace();
|
| | | // }
|
| | | //
|
| | | // PushContentDTO dto = PushMsgFactory.createMoneySystemCompensate(reason, money);
|
| | | // try {
|
| | | // pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null);
|
| | | // } catch (NumberFormatException e) {
|
| | | // e.printStackTrace();
|
| | | // } catch (PushException e) {
|
| | | // e.printStackTrace();
|
| | | // }
|
| | | // MsgMoneyDetail detail =
|
| | | // MsgMoneyDetailFactory.createSystemEqualizeMsg(uid, reason, money,
|
| | | // balance, null);
|
| | | // try {
|
| | | // msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | // } catch (MsgMoneyDetailException e) {
|
| | | // e.printStackTrace();
|
| | | // }
|
| | | //
|
| | | // PushContentDTO dto =
|
| | | // PushMsgFactory.createMoneySystemCompensate(reason, money);
|
| | | // try {
|
| | | // pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null,
|
| | | // null);
|
| | | // } catch (NumberFormatException e) {
|
| | | // e.printStackTrace();
|
| | | // } catch (PushException e) {
|
| | | // e.printStackTrace();
|
| | | // }
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public void redPackMsg(Long uid, MsgTypeMoneyTypeEnum type, String content, String beiZhu) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createRedPackMsg(uid, type, content, beiZhu);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | public void teamReceive(Long uid, BigDecimal money, BigDecimal balance, Date receivedDate) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createTeamReceivedMsg(uid, money, balance, receivedDate, "团队收益");
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public void teamDividend(Long uid, BigDecimal money, BigDecimal balance, Date receivedDate) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createTeamReceivedMsg(uid, money, balance, receivedDate, "团队分红");
|
| | |
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | // 推送消息
|
| | | PushContentDTO dto = PushMsgFactory.createMoneyTeamDividents(money);
|
| | | try {
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null);
|
| | | } catch (NumberFormatException e) {
|
| | | e.printStackTrace();
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | hongBaoV2Service.updateByPrimaryKeySelective(update);
|
| | | }
|
| | | // TODO 商家关店跑路需要赠送金币
|
| | | // userSystemCouponService.rewardCouponWin(uid,
|
| | | // UserSystemCoupon.SOURCE_SYSTEM_PUSH, 1, true, new BigDecimal("31"));
|
| | | // userSystemCouponService.rewardCouponWin(uid,
|
| | | // UserSystemCoupon.SOURCE_SYSTEM_PUSH, 1, true, new BigDecimal("31"));
|
| | | }
|
| | |
|
| | | @Transactional
|
| | |
| | | "4c7b166fecb6d9f53837e993f2214673", "", "");
|
| | |
|
| | | // 新的规则生效时间
|
| | | public static final long NEW_ORDER_FANLI_RULE_TIME = TimeUtil.convertToTimeTemp("2020-04-14", "yyyy-MM-dd");
|
| | | public static final long NEW_ORDER_FANLI_RULE_TIME = TimeUtil.convertToTimeTemp("2020-04-18", "yyyy-MM-dd");
|
| | |
|
| | | // 使用奖励券最大金额限制
|
| | | public static final BigDecimal REWARD_COUPON_LIMIT_MONEY = new BigDecimal("10");
|
| | |
| | | <artifactId>cglib</artifactId>
|
| | | <version>2.2.2</version>
|
| | | </dependency>
|
| | | <dependency>
|
| | | <groupId>log4j</groupId>
|
| | | <artifactId>log4j</artifactId>
|
| | | <version>1.2.14</version>
|
| | | <scope>provided</scope>
|
| | | </dependency>
|
| | |
|
| | | <dependency>
|
| | | <groupId>mysql</groupId>
|
| | | <artifactId>mysql-connector-java</artifactId>
|
| | |
| | | </dependency>
|
| | |
|
| | | <dependency>
|
| | | <groupId>org.apache.logging.log4j</groupId>
|
| | | <artifactId>log4j-core</artifactId>
|
| | | <version>2.11.2</version>
|
| | | </dependency>
|
| | |
|
| | | <dependency>
|
| | | <groupId>org.bouncycastle</groupId>
|
| | | <artifactId>bcprov-jdk16</artifactId>
|
| | | <version>1.46</version>
|