| | |
| | | Pattern p = Pattern.compile(URL_REGEX);
|
| | | Matcher matcher = p.matcher(text);
|
| | | if (!matcher.find()) {// 不包含链接
|
| | | // 解析淘口令
|
| | | if (analysisTaoToken(text, out))
|
| | | return;
|
| | | // 商品详情
|
| | | // 发现
|
| | | // 没有链接,标题过长也不处理
|
| | |
| | |
|
| | | LogHelper.test("根据粘贴板推荐:" + text);
|
| | |
|
| | | |
| | |
|
| | | if (text.length() > 80) {
|
| | | out.print(JsonUtil.loadFalseResult("值过长"));
|
| | | return;
|
| | |
| | | */ |
| | | Long countInviteOrderCountByUidAndSettleTime(@Param("uid") Long uid, @Param("state") int state, |
| | | @Param("minDate") Date minDate, @Param("maxDate") Date maxDate); |
| | | |
| | | |
| | | /** |
| | | * 根据用户ID,订单状态和结算时间统计分享赚的订单数量 |
| | | * |
| | | * @param uid |
| | | * @param minDate |
| | | * @param maxDate |
| | | * @return |
| | | */ |
| | | Long countShareOrderCountByUidAndSettleTime(@Param("uid") Long uid, @Param("state") int state, |
| | | @Param("minDate") Date minDate, @Param("maxDate") Date maxDate); |
| | | |
| | | /** |
| | | * 通过用户ID和状态查询数量 |
| | |
| | | co.`co_settle_time` is not null and co.`co_settle_time`>=#{minDate} |
| | | and #{maxDate}>co.`co_settle_time`; |
| | | </select> |
| | | |
| | | |
| | | <select id="countShareOrderCountByUidAndSettleTime" resultType="java.lang.Long"> |
| | | SELECT COUNT(h.hb_id) FROM yeshi_ec_hongbao_v2 h LEFT JOIN |
| | | yeshi_ec_hongbao_order ho ON h.`hb_id`=ho.`ho_hongbao_id` LEFT JOIN |
| | | yeshi_ec_common_order co ON co.`co_id`=ho.`ho_order_id` WHERE |
| | | h.`hb_uid`=#{uid} and h.`hb_type`=20 and co.`co_state`=#{state} and |
| | | co.`co_settle_time` is not null and co.`co_settle_time`>=#{minDate} |
| | | and #{maxDate}>co.`co_settle_time`; |
| | | </select> |
| | | |
| | | |
| | | |
| | |
| | | return new BigDecimal(0);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public BigDecimal getTLJFanLiRate() {
|
| | | String key = "tlj_fanli_proportion";
|
| | | HongBaoManage hongBaoManage = hongBaoManageMapper.selectByKeyAndMaxValidTime(key, System.currentTimeMillis());
|
| | | if (hongBaoManage == null)
|
| | | hongBaoManage = hongBaoManageMapper.selectByKey(key);
|
| | | if (hongBaoManage != null)
|
| | | return new BigDecimal(hongBaoManage.getValue());
|
| | | LogHelper.error("获取淘礼金返利分成比例出错");
|
| | | return null;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public BigDecimal getTLJShareRate() {
|
| | | String key = "tlj_share_proportion";
|
| | | HongBaoManage hongBaoManage = hongBaoManageMapper.selectByKeyAndMaxValidTime(key, System.currentTimeMillis());
|
| | | if (hongBaoManage == null)
|
| | | hongBaoManage = hongBaoManageMapper.selectByKey(key);
|
| | | if (hongBaoManage != null)
|
| | | return new BigDecimal(hongBaoManage.getValue());
|
| | | LogHelper.error("获取淘礼金分享赚分成比例出错");
|
| | | return null;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | Date minDate = new Date(TimeUtil
|
| | | .convertToTimeTemp(ca.get(Calendar.YEAR) + "-" + (ca.get(Calendar.MONTH) + 1), "yyyy-M"));
|
| | | long validCount = commonOrderService.countByUidAndOrderStateWithOrderBalanceTime(uid,
|
| | | CommonOrder.STATE_JS, minDate, maxDate);
|
| | | long weiQuanCount = commonOrderService.countByUidAndOrderStateWithOrderBalanceTime(uid,
|
| | | CommonOrder.STATE_WQ, minDate, maxDate);
|
| | | long invalidCount = commonOrderService.countByUidAndOrderStateWithOrderBalanceTime(uid,
|
| | | CommonOrder.STATE_SX, minDate, maxDate);
|
| | | long validCount = hongBaoV2Mapper.countShareOrderCountByUidAndSettleTime(uid, CommonOrder.STATE_JS, minDate, maxDate);
|
| | | long weiQuanCount = hongBaoV2Mapper.countShareOrderCountByUidAndSettleTime(uid, CommonOrder.STATE_WQ, minDate, maxDate);
|
| | | long invalidCount =hongBaoV2Mapper.countShareOrderCountByUidAndSettleTime(uid, CommonOrder.STATE_SX, minDate, maxDate);
|
| | |
|
| | | UserMoneyDetail userMoneyDetail = UserMoneyDetailFactory.createShare(uid, (int) validCount,
|
| | | (int) weiQuanCount, (int) invalidCount, sharemoney, new Date());
|
| | |
| | | */
|
| | | public BigDecimal getSecondShareRate(int urank, long time);
|
| | |
|
| | | /**
|
| | | * 淘礼金返利比例
|
| | | * |
| | | * @return
|
| | | */
|
| | | public BigDecimal getTLJFanLiRate();
|
| | |
|
| | | /**
|
| | | * 淘礼金分享比例
|
| | | * |
| | | * @return
|
| | | */
|
| | | public BigDecimal getTLJShareRate();
|
| | |
|
| | | }
|
| | |
| | | public static final String TAOBAO_COMMON_PID = "mm_124933865_43788020_437192946";
|
| | | // 淘宝将渠道ID处理成会员ID的pid
|
| | | public static final String TAOBAO_RELATION_AS_SPECIAL_PID = "mm_124933865_56750082_18689550042";
|
| | | |
| | | |
| | | //淘礼金渠道ID
|
| | | public static final String TAOBAO_TLJ_RELATION_PID_DEFAULT = "mm_124933865_56750082_19507100253";
|
| | | //淘礼金渠道会员
|
| | | public static final String TAOBAO_TLJ_RELATION_AS_SPECIAL_PID = "mm_124933865_56750082_19508150186";
|
| | | //淘礼金会员
|
| | | public static final String TAOBAO_TLJ_SPECIAL_PID_DEFAULT = "mm_124933865_56750082_19509300170";
|
| | | |
| | |
|
| | | // 自购立减PID
|
| | | public static TaoKeAppInfo ownBuyApp = new TaoKeAppInfo("24937414", "0457746e24622a6c8c7924288550af5f",
|