记得上下班打卡 | git大法好,push需谨慎

Commit 93db134c authored by jiangxiulong's avatar jiangxiulong

UpushTargetType action

parent 83a47db9
......@@ -12,32 +12,35 @@ import java.util.*;
*/
public enum UpushTargetType {
TARGET_TYPE5("场地详情", 5),
TARGET_TYPE6("票务详情", 6),
TARGET_TYPE7("商品详情", 7),
TARGET_TYPE14("商品集合", 14),
TARGET_TYPE20("音乐人详情", 20),
TARGET_TYPE21("歌曲详情", 21),
TARGET_TYPE22("专辑详情", 22),
TARGET_TYPE24("音乐人集合", 24),
TARGET_TYPE26("摩登会员", 26),
TARGET_TYPE12("活动跳转-可分享", 12),
TARGET_TYPE100("活动跳转", 100),
TARGET_TYPE0("不跳转", 0),
TARGET_TYPE16("票务首页", 16),
TARGET_TYPE17("商品首页", 17),
// TARGET_TYPE28("消息列表", 28),
TARGET_TYPE32("系统消息列表", 32);
TARGET_TYPE0("打开APP", 0, "go_app"),
TARGET_TYPE16("演出首页", 16, "ticket_home"),
TARGET_TYPE17("商城首页", 17, "goods_home"),
TARGET_TYPE5("场地详情", 5, "area"),
TARGET_TYPE6("票务详情", 6, "ticket"),
TARGET_TYPE7("商品详情", 7, "goods"),
TARGET_TYPE14("商品集合", 14, "goods_collection"),
TARGET_TYPE20("音乐人详情", 20, "musician"),
TARGET_TYPE24("音乐人集合", 24, "musician_collection"),
TARGET_TYPE21("歌曲详情", 21, "song"),
TARGET_TYPE22("专辑详情", 22, "album"),
TARGET_TYPE26("摩登会员", 26, "member"),
TARGET_TYPE12("活动跳转-可分享", 12, "ad_link"),
TARGET_TYPE100("活动跳转", 100, "promotion"),
// TARGET_TYPE28("消息列表", 28, "area),
TARGET_TYPE32("系统消息列表", 32, "show_message_list");
// TARGET_TYPE33("会员消息列表", 33);
private String name;
private int index;
private String action;
UpushTargetType(String name, int index) {
UpushTargetType(String name, int index, String action) {
this.name = name;
this.index = index;
this.action = action;
}
public String getName() {
......@@ -48,6 +51,10 @@ public enum UpushTargetType {
return this.index;
}
public String getAction() {
return this.action;
}
private static List<Object> resultTypeListR = null;
static {
......@@ -56,6 +63,7 @@ public enum UpushTargetType {
Map<String, Object> mapTemp = new HashMap<>();
mapTemp.put("id", resultType.index);
mapTemp.put("name", resultType.name);
mapTemp.put("action", resultType.action);
resultTypeList.add(mapTemp);
}
resultTypeListR = Collections.unmodifiableList(resultTypeList);
......@@ -73,4 +81,13 @@ public enum UpushTargetType {
}
return null;
}
public static String getTypeAction(int index) {
for (UpushTargetType c : UpushTargetType.values()) {
if (c.getIndex() == index) {
return c.action;
}
}
return null;
}
}
......@@ -130,9 +130,9 @@ public class AdminUpushServiceImpl extends ServiceImpl<AdminUpushMapper, AdminUp
broadcast.setTicker(adminUpush.getPushTitle());
broadcast.setTitle(adminUpush.getPushTitle());
broadcast.setText(adminUpush.getPushContent());
broadcast.goCustomAfterOpen("ad_link");
String custom = UpushTargetType.getTypeAction(adminUpush.getJumpType());
broadcast.goCustomAfterOpen(custom);
broadcast.setDisplayType(AndroidNotification.DisplayType.NOTIFICATION);
// broadcast.setCustomField("ad_like");
if (Arrays.asList(LnsEnum.ENV.dev.name(), LnsEnum.ENV.test.name()).contains(environment.getProperty(CurrentUtil.CK_ENV_ACTIVE))) {
broadcast.setTestMode();
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment