|
|
@@ -15,6 +15,43 @@ import java.util.Locale;
|
|
|
/**
|
|
|
* 获取已经发布任务
|
|
|
* Created by ljy on 2018/3/20.
|
|
|
+ *
|
|
|
+ * CREATE TABLE `release_task` (
|
|
|
+ * `id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
+ * `task_id` int(7) DEFAULT NULL COMMENT '任务id',
|
|
|
+ * `release_num` int(7) DEFAULT NULL COMMENT '发布数量',
|
|
|
+ * `last_num` int(7) DEFAULT NULL COMMENT '剩余数量',
|
|
|
+ * `create_time` bigint(20) DEFAULT NULL COMMENT '创建时间',
|
|
|
+ * `update_time` bigint(20) DEFAULT NULL COMMENT '更新时间',
|
|
|
+ * `online_time` bigint(20) DEFAULT NULL COMMENT '上线时间',
|
|
|
+ * `deadline` bigint(20) DEFAULT NULL COMMENT '截止时间',
|
|
|
+ * `remarks` varchar(100) DEFAULT NULL COMMENT '备注',
|
|
|
+ * `bonus` decimal(10,2) DEFAULT NULL COMMENT '任务奖金',
|
|
|
+ * `status` int(3) DEFAULT NULL COMMENT '1手动上线 2自动上线 3手动下线 4自动下线 5等待上线',
|
|
|
+ * `name` varchar(120) DEFAULT NULL COMMENT '任务名称(默认为task的任务名称)',
|
|
|
+ * `online_type` int(3) DEFAULT '1' COMMENT '1添加马上上线 2定时上线',
|
|
|
+ * `duration` bigint(20) DEFAULT NULL COMMENT '秒为单位(如果task的任务类型为时长任务时必须要)',
|
|
|
+ * `is_hot` tinyint(4) DEFAULT '0' COMMENT '是否热门任务 0不是 1是',
|
|
|
+ * `is_recommend` tinyint(4) DEFAULT '0' COMMENT '是否推荐任务 0不是 1是',
|
|
|
+ * `order` int(11) DEFAULT NULL COMMENT '排序 越大越靠前',
|
|
|
+ * `platform` tinyint(4) DEFAULT NULL COMMENT '平台 1andriod 2ios',
|
|
|
+ * `cancel_duration` int(11) DEFAULT NULL COMMENT '自动取消时间段',
|
|
|
+ * `demo_time` int(11) DEFAULT NULL COMMENT '试玩时长',
|
|
|
+ * `is_succession` int(11) DEFAULT NULL COMMENT '是否为连续任务 0不是 1是',
|
|
|
+ * `exclude` int(11) DEFAULT NULL COMMENT '是否为互斥任务: 0 否 1 是',
|
|
|
+ * `consume_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '最低消费金额(游戏消费类型任务必填,达到最低消费才送相应比例的金额)',
|
|
|
+ * `gift_ratio` int(11) NOT NULL DEFAULT '0' COMMENT '赠送比例(游戏消费类型任务必填,取值0到100)',
|
|
|
+ * `cash_task` tinyint(4) DEFAULT '1' COMMENT '1:现金任务 2:福利任务',
|
|
|
+ * `key_word` varchar(128) NOT NULL DEFAULT '' COMMENT 'ASO任务:关键词 其他任务为空',
|
|
|
+ * `ranking` int(11) NOT NULL DEFAULT '0' COMMENT 'ASO任务:排名 其他任务为0',
|
|
|
+ * `difficulty` int(11) DEFAULT '1' COMMENT '难度 从小到大 难度增大',
|
|
|
+ * `cost_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '成本单价',
|
|
|
+ * `profit_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '平台利润',
|
|
|
+ * `vip_bonus` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '会员获得奖励',
|
|
|
+ * PRIMARY KEY (`id`),
|
|
|
+ * KEY `release_task_task_id_index` (`task_id`),
|
|
|
+ * KEY `release_task_online_type_index` (`online_type`)
|
|
|
+ * ) ENGINE=InnoDB AUTO_INCREMENT=1589 DEFAULT CHARSET=utf8 COMMENT='发布任务';
|
|
|
*/
|
|
|
|
|
|
public class Release_task implements Serializable {
|
|
|
@@ -306,7 +343,7 @@ public class Release_task implements Serializable {
|
|
|
* @return
|
|
|
*/
|
|
|
public String getBonusText() {
|
|
|
- return NumberFormatUtils.retainMost2(bonus);
|
|
|
+ return NumberFormatUtils.retainMost2W(bonus);
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -382,10 +419,14 @@ public class Release_task implements Serializable {
|
|
|
|
|
|
//所有的奖励金额展示内容
|
|
|
public CharSequence getVipBonusText() {
|
|
|
- return String.format(Locale.CHINA, "会员:+%s元", NumberFormatUtils.retainMost2(vip_bonus));
|
|
|
+ return String.format(Locale.CHINA, "会员:+%s元", NumberFormatUtils.retainMost2W(vip_bonus));
|
|
|
// return new SpannableSb().append(String.format(Locale.CHINA, "会员:+%s元", NumberFormatUtils.retainMost2(bonus+0.1)), R.dimen.text_size_10).checkAndBr()
|
|
|
// .append(String.format(Locale.CHINA, "+%s元", NumberFormatUtils.retainMost2(bonus)), R.dimen.text_size_1)
|
|
|
// .getSsb();
|
|
|
// return String.format(Locale.CHINA, "会员:+%s元\n+%s元", NumberFormatUtils.retainMost2(bonus + 0.1f), NumberFormatUtils.retainMost2(bonus));
|
|
|
}
|
|
|
+
|
|
|
+ public String getFuliContent() {
|
|
|
+ return String.format(Locale.CHINA, "恭喜您已获得%s元奖励,需最低消费%d,可抵奖励%s。羊羊给的奖励,赶紧前往购买吧!", getBonusText(), consume_amount, NumberFormatUtils.retainMost2(gift_ratio * consume_amount / 100));
|
|
|
+ }
|
|
|
}
|