| | |
| | |
|
| | | import com.aliyun.openservices.ons.api.Message;
|
| | | import com.aliyun.openservices.ons.api.Producer;
|
| | | import com.google.gson.Gson;
|
| | | 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.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsClass;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBriefExtra;
|
| | | import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetail;
|
| | | import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetailV2;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
|
| | |
| | | } else if (etype == 111) {
|
| | | out.print(JsonUtil.loadFalseResult("修改手机号后,7天内无法提现"));
|
| | | } else if (etype == 110) {
|
| | | out.print(JsonUtil.loadFalseResult("有维权订单尚未扣款"));
|
| | | out.print(JsonUtil.loadFalseResult("有售后订单尚未扣款"));
|
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | if (!StringUtil.isNullOrEmpty(inviteCode)) {// 邀请码不为空
|
| | | inviteCode = inviteCode.trim();
|
| | | if (inviteCode.length() >= 6 && inviteCode.length() <= 12) {
|
| | | if (inviteCode.length() >= 4 && inviteCode.length() <= 12) {
|
| | |
|
| | | if (!userVIPInfoService.isVIP(uid)) {
|
| | | out.print(JsonUtil.loadFalseResult(20, "只有超级会员才能修改"));
|
| | |
| | | out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMessage()));
|
| | | }
|
| | | } else {
|
| | | out.print(JsonUtil.loadFalseResult(1, "邀请码必须为6到12位"));
|
| | | out.print(JsonUtil.loadFalseResult(1, "邀请码必须为4到12位"));
|
| | | return;
|
| | | }
|
| | | }
|
| | |
| | | jdGoods.setCommissionPlus(threeClass.getSelfComm());
|
| | | // plus返利
|
| | | BigDecimal fanliMoneyPlus = JDUtil.getGoodsFanLiMoneyPlus(jdGoods, fanLiRate);
|
| | | otherInfo.setFanliMoneyPlus("京东plus会员返¥" + fanliMoneyPlus);
|
| | | otherInfo.setFanliMoneyPlus("京东plus返¥" + fanliMoneyPlus);
|
| | | // 使用奖励券最高返
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | maxMoneyPlus = "(京东plus返¥"
|
| | | + fanliMoneyPlus.add(MoneyBigDecimalUtil.mul(fanliMoneyPlus, Constant.MAX_REWARD_RATE))
|
| | | + ")";
|
| | | } else
|
| | | maxMoneyPlus = "(京东plus会员最高返¥"
|
| | | maxMoneyPlus = "(京东plus最高返¥"
|
| | | + fanliMoneyPlus.add(MoneyBigDecimalUtil.mul(fanliMoneyPlus, Constant.MAX_REWARD_RATE))
|
| | | + ")";
|
| | | }
|
| | |
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.ThreadUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.account.UserUtil;
|
| | | import com.yeshi.fanli.util.annotation.RequestSerializableByKey;
|
| | | import com.yeshi.fanli.vo.user.UserVipRateVO;
|
| | |
| | |
|
| | | if (userVIPInfo != null && userVIPInfo.getState() != null
|
| | | && userVIPInfo.getState() == UserVIPInfo.STATE_SUCCESS) { // VIP
|
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy.mm.dd");
|
| | | vo.setSuccessTime(format.format(userVIPInfo.getSuccessTime()));
|
| | | vo.setSuccessTime(TimeUtil.getGernalTime(userVIPInfo.getSuccessTime().getTime(), "yyyy.MM.dd"));
|
| | | vo.setConserveMoney(finishMoney.setScale(2));
|
| | | vo.setEarnMoney(MoneyBigDecimalUtil.add(rewardShare, rewardInvite).setScale(2));
|
| | | } else {
|
| | |
| | | @Table("yeshi_ec_user_debt")
|
| | | public class UserMoneyDebt {
|
| | | public enum UserMoneyDebtTypeEnum {
|
| | | order("维权退款"), other("其他"), extractVerify("提现账号验证");
|
| | | order("售后退款"), other("其他"), extractVerify("提现账号验证");
|
| | | private final String desc;
|
| | |
|
| | | private UserMoneyDebtTypeEnum(String desc) {
|
| | |
| | | UserMoneyDebt old = userMoneyDebtMapper.selectByUidAndTypeAndSourceId(debt.getUid(), debt.getType(),
|
| | | debt.getSourceId());
|
| | | if (old != null) {
|
| | | throw new UserMoneyDebtException(3, "对应维权已经存在");
|
| | | throw new UserMoneyDebtException(3, "对应售后已经存在");
|
| | | }
|
| | | userMoneyDebtMapper.insertSelective(debt);
|
| | | }
|
| | |
| | | if (drawBackMoney.compareTo(new BigDecimal(0)) <= 0)
|
| | | return;
|
| | | InviteOrderSubsidyDebt debt = new InviteOrderSubsidyDebt();
|
| | | debt.setBeiZhu("订单维权:" + orderId + "-" + sourceType);
|
| | | debt.setBeiZhu("订单售后:" + orderId + "-" + sourceType);
|
| | | debt.setOriginMoney(drawBackMoney);
|
| | | debt.setUid(uid);
|
| | | debt.setCreateTime(new Date());
|
| | |
| | | } else if (CommonOrder.STATE_SX == orderState) {
|
| | | orderStateContent = "未付款/已退款";
|
| | | } else if (CommonOrder.STATE_WQ == orderState) {
|
| | | orderStateContent = "已维权";
|
| | | orderStateContent = "已售后";
|
| | | if (sourceType != null && sourceType == Constant.SOURCE_TYPE_TAOBAO) {
|
| | | /* 订单维权 判断是否全部维权 */
|
| | | List<TaoBaoWeiQuanOrder> listWQ = taoBaoWeiQuanOrderMapper
|
| | |
| | | } else {
|
| | | // 2019.8.1 返回维权信息
|
| | | if (settleTime != null && august != null && settleTime.getTime() > august.getTime()) {
|
| | | orderStateContent = "维权成功";
|
| | | orderStateContent = "售后成功";
|
| | | WeiQuanInfo weiQuanInfo = new WeiQuanInfo();
|
| | | weiQuanInfo.setOldHongBao("¥" + hongBao.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | weiQuanInfo
|
| | | .setWqHongBao("维权:-¥" + weiQuanMoney.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | .setWqHongBao("售后:-¥" + weiQuanMoney.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | hongBao = MoneyBigDecimalUtil.sub(hongBao, weiQuanMoney);
|
| | | order.setWeiQuanInfo(weiQuanInfo);
|
| | | }
|
| | |
| | | app.setAppKey(appKey);
|
| | | app.setAppSecret(appSecret);
|
| | | resultJSON = TaoKeBaseUtil.baseRequest(map, app);
|
| | | System.out.println(resultJSON.toString());
|
| | | return resultJSON.optJSONObject("tbk_sc_publisher_info_save_response").optJSONObject("data")
|
| | | .optString("relation_id");
|
| | | } catch (TaoKeApiException e) {
|