| | |
| | | package com.yeshi.fanli.util;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.HashSet;
|
| | | import java.util.Properties;
|
| | | import java.util.Set;
|
| | |
|
| | | import org.yeshi.utils.annotation.MapUtil;
|
| | | import org.yeshi.utils.entity.wx.WXAPPInfo;
|
| | |
|
| | | import com.yeshi.fanli.dto.wx.WXAccountInfoDTO;
|
| | | import com.yeshi.fanli.entity.config.AlipayConfig;
|
| | | import com.yeshi.fanli.entity.config.ConstantConfig;
|
| | | import com.yeshi.fanli.entity.config.SMSConfig;
|
| | | import com.yeshi.fanli.entity.config.SystemCommonConfig;
|
| | | import com.yeshi.fanli.entity.config.WXGZConfig;
|
| | | import com.yeshi.fanli.entity.config.ZNXConfig;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | | import org.yeshi.utils.annotation.MapUtil;
|
| | |
|
| | | public class Constant {
|
| | | public static boolean IS_TASK = false;
|
| | | // 外网环境
|
| | | public static boolean IS_OUTNET = true;
|
| | | public static boolean IS_OUTNET = false;
|
| | |
|
| | | public static boolean IS_TEST = false;
|
| | | public static boolean IS_TEST = true;
|
| | |
|
| | | public static int PAGE_SIZE = 20;
|
| | | public static int[] TASK_TYPE = { 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008// 微信任务类型编号
|
| | | };
|
| | |
|
| | | public static String YINGYONGBAO_LINK = "https://w.url.cn/s/AHUuT7i";
|
| | |
|
| | | public final static String UIDAESKEY = "WW782ss@8*px/%2v";
|
| | |
|
| | |
| | | public static String Extract_Activty;
|
| | | public static String HB_Activity;
|
| | |
|
| | | public static final String EXTRACT_MIN_MONEY = "extract_min_money";
|
| | | public static final String MYLIKE = "mylike";
|
| | | public static final String MYDYNAMIC = "mydynamic";
|
| | |
|
| | |
| | | public static final String TAOBAO_AUTH_APPSECRET = "e0a2e05deabf5ce039b52e5b492d5382";
|
| | | public static final String TAOBAO_RELATION_PID_DEFAULT = "mm_124933865_56750082_87140050199";
|
| | | public static final String TAOBAO_SPECIAL_PID_DEFAULT = "mm_124933865_56750082_89555600043";
|
| | |
|
| | | // 奖励券最高比例
|
| | | public static final BigDecimal MAX_REWARD_RATE = new BigDecimal("0.31");
|
| | |
|
| | | // 返回给客户端的账号封禁提示语
|
| | | public static final String FORBIDDEN_USER_REASON_DESC = "你的账号或绑定的第三方账号已被封禁,封禁原因可在帮助中心的相关规则中参看,如有疑问或申诉解除封禁请联系客服";
|
| | |
| | | public static final int SOURCE_TYPE_TAOBAO = 1;
|
| | | // 来源-京东
|
| | | public static final int SOURCE_TYPE_JD = 2;
|
| | | // 来源-拼多多
|
| | | public static final int SOURCE_TYPE_PDD = 3;
|
| | | // 来源-唯品会
|
| | | public static final int SOURCE_TYPE_WPH = 4;
|
| | | // 来源-苏宁
|
| | | public static final int SOURCE_TYPE_SUNING = 5;
|
| | | // 来源-饿了么
|
| | | public static final int SOURCE_TYPE_ELME = 6;
|
| | |
|
| | | // 自购-返利
|
| | | public static final int TYPE_REBATE = 1;
|
| | |
| | | public static final int TYPE_SHAER = 2;
|
| | | // 邀请
|
| | | public static final int TYPE_INVITE = 3;
|
| | |
|
| | | // 口令有效期-天
|
| | | public static final int TOKEN_DAYS = 1;
|
| | | // 赠送有效期-天
|
| | | public static final int GIVE_DAYS = 1;
|
| | | // 金币有效天数
|
| | | public static final int GOLD_COIN_VALID_DAYS = 30;
|
| | |
|
| | | // 微信自动提现金额
|
| | | public static final int AUTO_EXTRACT_MONEY = 1;
|
| | | // 微信自动提现最低余额
|
| | | public static final int AUTO_EXTRACT_MIN_SURPLUS = 2;
|
| | |
|
| | | // vip、红包、奖励券倒计时 2.1上线时间
|
| | | public static final String VIP_ONLINE_TIME = "2019-12-22";
|
| | |
|
| | | // 红包邀请奖励
|
| | | public static final String RED_PACK_ONLINE_TIME = "2019-12-14";
|
| | |
|
| | | // 一阶段:20天数限制
|
| | | public static final int ONE_STAGE_LIMIT_DAYS = 20;
|
| | | // 一阶段:立得现金3元
|
| | | public static final BigDecimal ONE_STAGE_MONEY = new BigDecimal("3");
|
| | |
|
| | | // 二阶段:90天数限制
|
| | | public static final int TWO_STAGE_LIMIT_DAYS = 90;
|
| | | // 二阶段:-队友产生的订单中(自购+分享),邀请人累计产生≥1 元奖金
|
| | | public static final BigDecimal TWO_STAGE_ORDER_REWARD_MIN = new BigDecimal("1");
|
| | | // 二阶段: 红包金额最少3元
|
| | | public static final BigDecimal TWO_STAGE_MONEY_MIN = new BigDecimal("3");
|
| | | // 二阶段:每次最多增加0.5
|
| | | public static final BigDecimal TWO_STAGE_MONEY_ADD = new BigDecimal("0.5");
|
| | | // 二阶段: 增加9次
|
| | | public static final int TWO_STAGE_MONEY_ADD_NUM = 9;
|
| | |
|
| | | // 三阶段:连续奖励月数
|
| | | public static final int THREE_STAGE_REWARD_MONTH = 15;
|
| | | // 三阶段:-连续 15 个月好友每月“给你累计产生≥2 元奖 金”
|
| | | public static final BigDecimal THREE_STAGE_ORDER_REWARD_MIN = new BigDecimal("2");
|
| | | // 三阶段:红包奖励随机范围
|
| | | public static final double THREE_STAGE_RANDOM_MIN = 1.5;
|
| | | public static final double THREE_STAGE_RANDOM_MAX = 2;
|
| | |
|
| | | // 新人奖励连续天数
|
| | | public static final long TLJ_NEW_USER_DAYS = 7;
|
| | | // 新人奖励最高
|
| | | public static final BigDecimal TLJ_NEW_USER_MONEY = new BigDecimal("2");
|
| | | // 新人奖励第一次随机最小
|
| | | public static final int TLJ_NEW_USER_MIN = 50;
|
| | | // 新人奖励第一次随机最大
|
| | | public static final int TLJ_NEW_USER_MAX = 60;
|
| | | // 新人红包有效期10天
|
| | | public static final int TLJ_NEW_USER_LIMIT = 10;
|
| | | // 新人定义: 自完成注册起10天内;
|
| | | public static final int TLJ_NEW_USER_DEFINE = 10;
|
| | |
|
| | | // vip奖励券券5张
|
| | | public static final int VIP_COUPON_REWARD_NUM = 30;
|
| | | // vip赠送免单券5张
|
| | | public static final int VIP_COUPON_GIVEFREE_NUM = 5;
|
| | | // vip赠送金币
|
| | | public static final int VIP_COLDCOIN_NUM = 1800;
|
| | |
|
| | | // 奖励券倒计时 - 天数
|
| | | public static final int COUPON_REWARD_LIMIT_DAY = 5;
|
| | |
|
| | | // 专属邀请码申请直接粉丝限制
|
| | | public static final int INVITE_CODRE_TAILOR_LIMIT = 2;
|
| | |
|
| | | public static WXGZConfig wxGZConfig;
|
| | |
|
| | |
| | | public static AlipayConfig alipayConfig;
|
| | |
|
| | | public static ZNXConfig znxConfig;
|
| | |
|
| | | public static ConstantConfig constantConfig;
|
| | |
|
| | | /**
|
| | | * 淘宝商品红包
|
| | |
| | | */
|
| | | public static final String BINDUSER = "2";
|
| | | /**
|
| | | * 返利券系统的ID(安卓)
|
| | | * 系统的ID(安卓)
|
| | | */
|
| | | public static final long FANLI = 4;
|
| | | /**
|
| | |
| | | public static final String WXHEADURL = "wx/headImg/";
|
| | |
|
| | | public static final String WEBPAGE_SIGN_KEY = "@?,223Hbb88lll";
|
| | | |
| | | public static final String WXMP_SIGN_KEY="xyJBaNliK&*!uAIShEn8g@@";
|
| | | |
| | | public static final String WXMP_USER_SIGN_KEY="xyJBaNliShEn8g@@";
|
| | |
|
| | | // public static final String TAOKE_ANDROID_APPKEY = "24587154";
|
| | | // public static final String TAOKE_IOS_APPKEY = "24838852";
|
| | |
|
| | | |
| | | public static final WXAPPInfo WXMP_APP_INFO=new WXAPPInfo("wxc22f3bd53cb25012", "4c7b166fecb6d9f53837e993f2214673", "", "");
|
| | | |
| | | |
| | | // 新人抽奖-最大次数
|
| | | public static final int MAX_COUNT_LOTTERY_NEWBIES = 5;
|
| | | |
| | | |
| | |
|
| | | // 线程等待数量
|
| | | public static Set<Long> waitingThreadSet = new HashSet<>();
|
| | |
|
| | | static {
|
| | |
|
| | | if (smsConfig == null) {
|
| | |
| | |
|
| | | if (znxConfig == null) {
|
| | | Properties ps = org.yeshi.utils.PropertiesUtil
|
| | | .getProperties(TaoBaoUtil.class.getClassLoader().getResourceAsStream("znx_msg.properties"));
|
| | | .getProperties(TaoBaoUtil.class.getClassLoader().getResourceAsStream("push_msg.properties"));
|
| | | znxConfig = (ZNXConfig) MapUtil.parseMap(ZNXConfig.class, ps);
|
| | | }
|
| | |
|
| | | if (constantConfig == null) {
|
| | | Properties ps = org.yeshi.utils.PropertiesUtil
|
| | | .getProperties(TaoBaoUtil.class.getClassLoader().getResourceAsStream("constant.properties"));
|
| | | constantConfig = (ConstantConfig) MapUtil.parseMap(ConstantConfig.class, ps);
|
| | | IS_OUTNET = Boolean.parseBoolean(constantConfig.getOutNetWork());
|
| | | IS_TASK = Boolean.parseBoolean(constantConfig.getTask());
|
| | | IS_TEST = Boolean.parseBoolean(constantConfig.getTest());
|
| | |
|
| | | System.out.println("IS_OUTNET:" + IS_OUTNET);
|
| | | System.out.println("IS_TASK:" + IS_TASK);
|
| | | System.out.println("IS_TEST:" + IS_TEST);
|
| | | }
|
| | |
|
| | | Extract_Activty = String.format("%s.ui.mine.MyRedPacketsActivity",
|
| | |
| | | HB_Activity = String.format("%s.ui.main.MainActivity",
|
| | | Constant.systemCommonConfig.getAndroidBaseactivityName());
|
| | | }
|
| | |
|
| | | public static String getSourceName(int sourceType) {
|
| | | switch (sourceType) {
|
| | | case SOURCE_TYPE_TAOBAO:
|
| | | return "淘宝";
|
| | | case SOURCE_TYPE_JD:
|
| | | return "京东";
|
| | | case SOURCE_TYPE_PDD:
|
| | | return "拼多多";
|
| | | case SOURCE_TYPE_WPH:
|
| | | return "唯品会";
|
| | | case SOURCE_TYPE_SUNING:
|
| | | return "苏宁";
|
| | | case SOURCE_TYPE_ELME:
|
| | | return "饿了么";
|
| | | default:// 其他类型
|
| | | return "";
|
| | | }
|
| | | }
|
| | |
|
| | | public static int getPlatformCode(String platform) {
|
| | | if ("android".equalsIgnoreCase(platform))
|
| | | return 1;
|
| | | else if ("ios".equalsIgnoreCase(platform))
|
| | | return 2;
|
| | | else if ("wxmp".equalsIgnoreCase(platform))
|
| | | return 4;
|
| | | else
|
| | | return 0;// 未知
|
| | | }
|
| | |
|
| | | public static String getAppName(String platform, String version) {
|
| | | // if (VersionUtil.greaterThan_2_0(platform, version))
|
| | | return Constant.systemCommonConfig.getProjectChineseName();
|
| | | // else
|
| | | // return "返利券";
|
| | | }
|
| | |
|
| | | public static WXAccountInfoDTO getWXAccount(String platform, String version) {
|
| | | // return new WXAccountInfoDTO("wx43617e2ed82c5b28",
|
| | | // "f8a65908fb4681bdd181de70f6ab9a3b", "wx5c0d167c6e3ad726",
|
| | | // "0c79d5869bb0f2d7c13e43f9a18f440d");
|
| | | return new WXAccountInfoDTO("wxa99686bb65a9f466", "57390718ddedaa1591f6876cdcf96f43", "wx5c0d167c6e3ad726",
|
| | | "0c79d5869bb0f2d7c13e43f9a18f440d");
|
| | | }
|
| | | }
|