| | |
| | | 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;
|
| | |
|
| | | public class Constant {
|
| | | public static boolean IS_TASK = false;
|
| | | // 外网环境
|
| | | public static boolean IS_OUTNET = false;
|
| | |
|
| | | public static boolean IS_TEST = true;
|
| | |
|
| | | public static boolean ENABLE_MQ = false;
|
| | |
|
| | | public static int PAGE_SIZE = 20;
|
| | | |
| | | // 新的规则生效时间
|
| | | public static final long NEW_ORDER_FANLI_RULE_TIME = TimeUtil.convertToTimeTemp("2020-04-28 16:00:00", "yyyy-MM-dd HH:mm:ss");
|
| | |
|
| | | // 验证文本口令或链接uid
|
| | | public static Long LINK_TOKEN_VERIFY_UID = 437032L;
|
| | |
|
| | | public static String YINGYONGBAO_LINK = "https://w.url.cn/s/AHUuT7i";
|
| | |
|
| | | public final static String UIDAESKEY = "WW782ss@8*px/%2v";
|
| | |
|
| | | public final static String ADMINH5_AESKEY = "WW782Ss@0*px/,2v";
|
| | |
|
| | | public final static String RANDKEY = "user_randkey";
|
| | | public final static String RANDPWDKEY = "user_pwd_randkey";
|
| | |
|
| | | public final static String MAIL_SENDER_ACCOUNT = "he15901227708@163.com";// 发送账号
|
| | | public final static String MAIL_SENDER_PWD = "hexiaohui1011";// 发送密码
|
| | |
|
| | | public final static String TAOBAO_APP_ID = "23595652";
|
| | | public final static String TAOBAO_APP_SECRET = "a4b2098670284a929a3f5930644ac26d";
|
| | | public final static String TAOBAO_BASEURL = "http://gw.api.taobao.com/router/rest";
|
| | | public final static long TAOBAO_AdzoneId = 70076496L;
|
| | |
|
| | | public final static int HB_NOTIME = 1;
|
| | | public final static int HB_GET = 2;
|
| | | public final static int HB_GOT = 3;
|
| | | public final static int HB_DISABLE = 4;
|
| | | public final static String HB_STATEEXCEPTION = "红包状态异常";
|
| | | public final static String HB_NOEXIST = "红包不存在";
|
| | | public static final int MR_COUNT = 2;
|
| | |
|
| | | public final static String BA_EXIST = "该类型账户已存在";
|
| | | public final static String BA_SUCCESS = "创建成功";
|
| | |
|
| | | public final static int NOT_EXIST_OBJACT = 1;
|
| | | public final static int OBJECT_STATE_EXCEPTION = 2;
|
| | |
|
| | | public final static int ZHIFUBAO = 1;
|
| | | public final static int WEIXIN = 2;
|
| | | public static final String NOTYPE = "不存在该类型";
|
| | | public static final String NOACCOUNT = "不存在该类型账户";
|
| | | public static final String HB_TIMEEXCEPTION = "红包解锁时间未到,还不能打开红包";
|
| | | public static final String DEL = "delete";
|
| | | public static final int EXTRACT_DEFUALT = 0;
|
| | | public static final int EXTRACT_PASS = 1;
|
| | | public static final int EXTRACT_REJECT = 2;
|
| | | public static final String SESSION_ADMIN = "ADMIN";// 管理员用户的session key
|
| | | public static final String SESSION_EXTRACT_CODE = "ADMIN_EXTRACT_CODE"; // 提现码
|
| | | public static final String SESSION_EXTRACT_VERIFY_RESULT = "SESSION_EXTRACT_VERIFY_RESULT"; // 提现码验证结果
|
| | | public static final int NOWHOTSIZE = 10;
|
| | | public static final int DAYMS = 86400000;
|
| | | public static final int DEFAULT_DAYMS = 1296000000;
|
| | | public static final int HOURMS = 3600000;
|
| | | public static String Extract_Activty;
|
| | | public static String HB_Activity;
|
| | |
|
| | | public static final String MYLIKE = "mylike";
|
| | | public static final String MYDYNAMIC = "mydynamic";
|
| | |
|
| | | public static final String TAOBAO_AUTH_APPKEY = "24980167";
|
| | | 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 CODE_FORBIDDEN_USER = 80001;
|
| | |
|
| | | // 来源-淘宝
|
| | | 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;
|
| | |
|
| | | // 订单实付款
|
| | | public static final BigDecimal VIP_ORDER_PAY = new BigDecimal("1");
|
| | |
|
| | | // 订单列表显> 时间 TODO
|
| | | public static final String ORDER_SHOW_BRACE_TIME = "1999-03-01";
|
| | |
|
| | | // 奖励券倒计时 - 天数
|
| | | public static final int COUPON_REWARD_LIMIT_DAY = 5;
|
| | |
|
| | | // 专属邀请码申请直接粉丝限制
|
| | | public static final int INVITE_CODRE_TAILOR_LIMIT = 2;
|
| | |
|
| | | public static WXGZConfig wxGZConfig;
|
| | |
|
| | | // 短信验证码配置
|
| | | public static SMSConfig smsConfig;
|
| | |
|
| | | // 系统常见配置
|
| | | public static SystemCommonConfig systemCommonConfig;
|
| | |
|
| | | public static AlipayConfig alipayConfig;
|
| | |
|
| | | public static ZNXConfig znxConfig;
|
| | |
|
| | | public static ConstantConfig constantConfig;
|
| | |
|
| | | /**
|
| | | * 淘宝商品红包
|
| | | */
|
| | | public static final int TAOBAO = 1;
|
| | | /**
|
| | | * 一级分销红包
|
| | | */
|
| | | public static final int ONESALE = 6;
|
| | | /**
|
| | | * 二级分销红包
|
| | | */
|
| | | public static final int TWOSALE = 7;
|
| | |
|
| | | /**
|
| | | * 一级分销红包
|
| | | */
|
| | | public static final int ONESHARE = 21;
|
| | | /**
|
| | | * 二级分销红包
|
| | | */
|
| | | public static final int TWOSHARE = 22;
|
| | |
|
| | | /**
|
| | | * 新人红包类型
|
| | | */
|
| | | public static final int HB_NEWUSER = 4;
|
| | | /**
|
| | | * 活动红包
|
| | | */
|
| | | public static final int HB_HUODONG = 3;
|
| | | public static final String APPID = "23649898";
|
| | | /**
|
| | | * 新建
|
| | | */
|
| | | public static final String NEWUSER = "1";
|
| | | /**
|
| | | * 绑定
|
| | | */
|
| | | public static final String BINDUSER = "2";
|
| | | /**
|
| | | * 系统的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 WXAPPInfo WXMP_APP_INFO = new WXAPPInfo("wxc22f3bd53cb25012",
|
| | | "4c7b166fecb6d9f53837e993f2214673", "", "");
|
| | |
|
| | |
|
| | | // 使用奖励券最大金额限制
|
| | | public static final BigDecimal REWARD_COUPON_LIMIT_MONEY = new BigDecimal("10");
|
| | | |
| | | |
| | | public static final Long[] NO_UPGRADE_UIDS=new Long[]{1700696L};
|
| | | |
| | | |
| | | |
| | |
|
| | | // 线程等待数量
|
| | | public static Set<Long> waitingThreadSet = new HashSet<>();
|
| | |
|
| | | static {
|
| | |
|
| | | if (smsConfig == null) {
|
| | | smsConfig = new SMSConfig();
|
| | | Properties ps = org.yeshi.utils.PropertiesUtil
|
| | | .getProperties(TaoBaoUtil.class.getClassLoader().getResourceAsStream("sms_config.properties"));
|
| | | smsConfig = (SMSConfig) MapUtil.parseMap(SMSConfig.class, ps);
|
| | | }
|
| | |
|
| | | if (systemCommonConfig == null) {
|
| | | Properties ps = org.yeshi.utils.PropertiesUtil
|
| | | .getProperties(TaoBaoUtil.class.getClassLoader().getResourceAsStream("system_config.properties"));
|
| | | systemCommonConfig = (SystemCommonConfig) MapUtil.parseMap(SystemCommonConfig.class, ps);
|
| | | }
|
| | |
|
| | | if (wxGZConfig == null) {
|
| | | Properties ps = org.yeshi.utils.PropertiesUtil
|
| | | .getProperties(TaoBaoUtil.class.getClassLoader().getResourceAsStream("wx_gz_config.properties"));
|
| | | wxGZConfig = (WXGZConfig) MapUtil.parseMap(WXGZConfig.class, ps);
|
| | | }
|
| | |
|
| | | if (alipayConfig == null) {
|
| | | Properties ps = org.yeshi.utils.PropertiesUtil
|
| | | .getProperties(TaoBaoUtil.class.getClassLoader().getResourceAsStream("alipay.properties"));
|
| | | alipayConfig = (AlipayConfig) MapUtil.parseMap(AlipayConfig.class, ps);
|
| | | }
|
| | |
|
| | | if (znxConfig == null) {
|
| | | Properties ps = org.yeshi.utils.PropertiesUtil
|
| | | .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",
|
| | | Constant.systemCommonConfig.getAndroidBaseactivityName());
|
| | | 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");
|
| | | }
|
| | | }
|
| | | 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.TimeUtil; |
| | | 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.AlipayWapConfig; |
| | | 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; |
| | | |
| | | public class Constant { |
| | | public static boolean IS_TASK = true; |
| | | // 外网环境 |
| | | public static boolean IS_OUTNET = true; |
| | | |
| | | public static boolean IS_TEST = false; |
| | | |
| | | public static boolean ENABLE_MQ = true; |
| | | |
| | | public static int PAGE_SIZE = 20; |
| | | |
| | | |
| | | // 新的规则生效时间 |
| | | public static final long NEW_ORDER_FANLI_RULE_TIME = TimeUtil.convertToTimeTemp("2020-04-28 16:00:00", "yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | // 验证文本口令或链接uid |
| | | public static Long LINK_TOKEN_VERIFY_UID = 437032L; |
| | | |
| | | public static String LINK_TOKEN_VERIFY_RELATION_ID = "20211660"; |
| | | |
| | | public static String YINGYONGBAO_LINK = "https://w.url.cn/s/AHUuT7i"; |
| | | |
| | | public final static String UIDAESKEY = "WW782ss@8*px/%2v"; |
| | | |
| | | public final static String ADMINH5_AESKEY = "WW782Ss@0*px/,2v"; |
| | | |
| | | public final static String RANDKEY = "user_randkey"; |
| | | |
| | | public final static int HB_NOTIME = 1; |
| | | |
| | | public final static String BA_EXIST = "该类型账户已存在"; |
| | | public final static String BA_SUCCESS = "创建成功"; |
| | | |
| | | public final static int NOT_EXIST_OBJACT = 1; |
| | | public final static int OBJECT_STATE_EXCEPTION = 2; |
| | | |
| | | public final static int ZHIFUBAO = 1; |
| | | public final static int WEIXIN = 2; |
| | | public static final String NOTYPE = "不存在该类型"; |
| | | public static final String NOACCOUNT = "不存在该类型账户"; |
| | | public static final String DEL = "delete"; |
| | | public static final int EXTRACT_DEFUALT = 0; |
| | | public static final int EXTRACT_PASS = 1; |
| | | public static final int EXTRACT_REJECT = 2; |
| | | public static final String SESSION_ADMIN = "ADMIN";// 管理员用户的session key |
| | | public static final String SESSION_EXTRACT_CODE = "ADMIN_EXTRACT_CODE"; // 提现码 |
| | | public static final String SESSION_EXTRACT_VERIFY_RESULT = "SESSION_EXTRACT_VERIFY_RESULT"; // 提现码验证结果 |
| | | public static final int DAYMS = 86400000; |
| | | |
| | | |
| | | public static final String TAOBAO_AUTH_APPKEY = "24980167"; |
| | | public static final String TAOBAO_AUTH_APPSECRET = "e0a2e05deabf5ce039b52e5b492d5382"; |
| | | |
| | | |
| | | public static final long PUSH_MIN_TIME = 1000 * 60 * 60L * 24 * 30 * 2; |
| | | |
| | | |
| | | //优惠狗云发单群唤起关键词 |
| | | public static final String YHG_CLOUD_GROUP_AWAKEN_KEY = "快省爆款推荐"; |
| | | |
| | | // 奖励券最高比例 |
| | | public static final BigDecimal MAX_REWARD_RATE = new BigDecimal("0.31"); |
| | | |
| | | // 返回给客户端的账号封禁提示语 |
| | | public static final String FORBIDDEN_USER_REASON_DESC = "你的账号或绑定的第三方账号已被封禁,封禁原因可在帮助中心的相关规则中参看,如有疑问或申诉解除封禁请联系客服"; |
| | | |
| | | // 用户被封禁 |
| | | public static final int CODE_FORBIDDEN_USER = 80001; |
| | | |
| | | // 来源-淘宝 |
| | | 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_VIP = 4; |
| | | // 来源-苏宁 |
| | | public static final int SOURCE_TYPE_SUNING = 5; |
| | | // 来源-饿了么 |
| | | public static final int SOURCE_TYPE_ELME = 6; |
| | | // 来源-抖音 |
| | | public static final int SOURCE_TYPE_DY = 7; |
| | | |
| | | // 自购-返利 |
| | | 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; |
| | | |
| | | // 订单实付款 |
| | | public static final BigDecimal VIP_ORDER_PAY = new BigDecimal("1"); |
| | | |
| | | // 订单列表显> 时间 TODO |
| | | public static final String ORDER_SHOW_BRACE_TIME = "1999-03-01"; |
| | | |
| | | // 奖励券倒计时 - 天数 |
| | | public static final int COUPON_REWARD_LIMIT_DAY = 5; |
| | | |
| | | // 专属邀请码申请直接粉丝限制 |
| | | public static final int INVITE_CODRE_TAILOR_LIMIT = 2; |
| | | |
| | | public static WXGZConfig wxGZConfig; |
| | | |
| | | // 短信验证码配置 |
| | | public static SMSConfig smsConfig; |
| | | |
| | | // 系统常见配置 |
| | | public static SystemCommonConfig systemCommonConfig; |
| | | |
| | | public static AlipayConfig alipayConfig; |
| | | |
| | | public static AlipayWapConfig alipayWapConfig; |
| | | |
| | | public static ZNXConfig znxConfig; |
| | | |
| | | public static ConstantConfig constantConfig; |
| | | |
| | | public static String PDD_SEARCH_CUSTOMER_PARAMS = "437031"; |
| | | |
| | | /** |
| | | * 淘宝商品红包 |
| | | */ |
| | | public static final int TAOBAO = 1; |
| | | /** |
| | | * 一级分销红包 |
| | | */ |
| | | public static final int ONESALE = 6; |
| | | /** |
| | | * 二级分销红包 |
| | | */ |
| | | public static final int TWOSALE = 7; |
| | | |
| | | /** |
| | | * 一级分销红包 |
| | | */ |
| | | public static final int ONESHARE = 21; |
| | | /** |
| | | * 二级分销红包 |
| | | */ |
| | | public static final int TWOSHARE = 22; |
| | | |
| | | /** |
| | | * 新人红包类型 |
| | | */ |
| | | public static final int HB_NEWUSER = 4; |
| | | /** |
| | | * 活动红包 |
| | | */ |
| | | public static final int HB_HUODONG = 3; |
| | | public static final String APPID = "23649898"; |
| | | /** |
| | | * 新建 |
| | | */ |
| | | public static final String NEWUSER = "1"; |
| | | /** |
| | | * 绑定 |
| | | */ |
| | | public static final String BINDUSER = "2"; |
| | | /** |
| | | * 系统的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 WXAPPInfo WXMP_APP_INFO = new WXAPPInfo("wxc22f3bd53cb25012", |
| | | "4c7b166fecb6d9f53837e993f2214673", "", ""); |
| | | |
| | | |
| | | // 使用奖励券最大金额限制 |
| | | public static final BigDecimal REWARD_COUPON_LIMIT_MONEY = new BigDecimal("10"); |
| | | |
| | | |
| | | public static final Long[] NO_UPGRADE_UIDS = new Long[]{1700696L}; |
| | | |
| | | |
| | | // 线程等待数量 |
| | | public static Set<Long> waitingThreadSet = new HashSet<>(); |
| | | |
| | | static { |
| | | |
| | | if (smsConfig == null) { |
| | | smsConfig = new SMSConfig(); |
| | | Properties ps = org.yeshi.utils.PropertiesUtil |
| | | .getProperties(TaoBaoUtil.class.getClassLoader().getResourceAsStream("sms_config.properties")); |
| | | smsConfig = (SMSConfig) MapUtil.parseMap(SMSConfig.class, ps); |
| | | } |
| | | |
| | | if (systemCommonConfig == null) { |
| | | Properties ps = org.yeshi.utils.PropertiesUtil |
| | | .getProperties(TaoBaoUtil.class.getClassLoader().getResourceAsStream("system_config.properties")); |
| | | systemCommonConfig = (SystemCommonConfig) MapUtil.parseMap(SystemCommonConfig.class, ps); |
| | | } |
| | | |
| | | if (wxGZConfig == null) { |
| | | Properties ps = org.yeshi.utils.PropertiesUtil |
| | | .getProperties(TaoBaoUtil.class.getClassLoader().getResourceAsStream("wx_gz_config.properties")); |
| | | wxGZConfig = (WXGZConfig) MapUtil.parseMap(WXGZConfig.class, ps); |
| | | } |
| | | |
| | | if (alipayConfig == null) { |
| | | Properties ps = org.yeshi.utils.PropertiesUtil |
| | | .getProperties(TaoBaoUtil.class.getClassLoader().getResourceAsStream("alipay.properties")); |
| | | alipayConfig = (AlipayConfig) MapUtil.parseMap(AlipayConfig.class, ps); |
| | | } |
| | | |
| | | if (alipayWapConfig == null) { |
| | | Properties ps = org.yeshi.utils.PropertiesUtil |
| | | .getProperties(TaoBaoUtil.class.getClassLoader().getResourceAsStream("alipay_wap.properties")); |
| | | alipayWapConfig = (AlipayWapConfig) MapUtil.parseMap(AlipayWapConfig.class, ps); |
| | | } |
| | | |
| | | |
| | | if (znxConfig == null) { |
| | | Properties ps = org.yeshi.utils.PropertiesUtil |
| | | .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); |
| | | } |
| | | |
| | | } |
| | | |
| | | 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_VIP: |
| | | 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"); |
| | | } |
| | | } |