generated from root/miduo_server
天降礼包
parent
254ef14284
commit
da64e81c43
File diff suppressed because it is too large
Load Diff
|
@ -21,8 +21,6 @@ import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.regex.Matcher;
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author hj
|
* @Author hj
|
||||||
|
@ -64,7 +62,7 @@ public class ActivityController {
|
||||||
List<ServerInfo> serverInfos = serverInfoDao.getAllServerInfo();
|
List<ServerInfo> serverInfos = serverInfoDao.getAllServerInfo();
|
||||||
map.addAttribute("serverInfos", serverInfos);
|
map.addAttribute("serverInfos", serverInfos);
|
||||||
map.addAttribute("allActivityList", allActivityList);
|
map.addAttribute("allActivityList", allActivityList);
|
||||||
return "ARBActivitys";
|
return "activity/arb/ARBActivitys";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -85,7 +83,7 @@ public class ActivityController {
|
||||||
List<ServerInfo> serverInfos = serverInfoDao.getAllServerInfo();
|
List<ServerInfo> serverInfos = serverInfoDao.getAllServerInfo();
|
||||||
serverInfos.add(0,new ServerInfo(0,"全部"));
|
serverInfos.add(0,new ServerInfo(0,"全部"));
|
||||||
map.addAttribute("serverInfos", serverInfos);
|
map.addAttribute("serverInfos", serverInfos);
|
||||||
return "updateARBActivity";
|
return "activity/arb/updateARBActivity";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -143,7 +141,7 @@ public class ActivityController {
|
||||||
List<ARBMission> missions = activityDao.findActivityMissionList(activityId);
|
List<ARBMission> missions = activityDao.findActivityMissionList(activityId);
|
||||||
map.addAttribute("missions", missions);
|
map.addAttribute("missions", missions);
|
||||||
map.addAttribute("activityId", activityId);
|
map.addAttribute("activityId", activityId);
|
||||||
return "ARBMissions";
|
return "activity/arb/ARBMissions";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -166,7 +164,7 @@ public class ActivityController {
|
||||||
map.addAttribute("activityId", activityId);
|
map.addAttribute("activityId", activityId);
|
||||||
int type = activityDao.findOneActivity(activityId).getType();
|
int type = activityDao.findOneActivity(activityId).getType();
|
||||||
map.addAttribute("type", type);
|
map.addAttribute("type", type);
|
||||||
return "addARBMission";
|
return "activity/arb/addARBMission";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -238,9 +236,9 @@ public class ActivityController {
|
||||||
String result;
|
String result;
|
||||||
if (type == 2) {
|
if (type == 2) {
|
||||||
//返利专属
|
//返利专属
|
||||||
result = "missionToMonsterCurrencyBack";
|
result = "activity/arb/missionToMonsterCurrencyBack";
|
||||||
} else {
|
} else {
|
||||||
result = "missionToOneDayRecharge";
|
result = "activity/arb/missionToOneDayRecharge";
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,159 @@
|
||||||
|
package com.jmfy.controller;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
import com.jmfy.dao.ActivityDao;
|
||||||
|
import com.jmfy.model.ServerInfo;
|
||||||
|
import com.jmfy.model.config.SRechargeCommodityConfig;
|
||||||
|
import com.jmfy.model.gm.GiftActivity;
|
||||||
|
import com.jmfy.model.gm.GiftMission;
|
||||||
|
import com.jmfy.utils.FileCacheUtils;
|
||||||
|
import com.jmfy.utils.JsonUtil;
|
||||||
|
import com.jmfy.utils.StringUtil;
|
||||||
|
import config.SItemConfig;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
|
||||||
|
import com.jmfy.dao.ServerInfoDao;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class GiftActivityController {
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(ActivityController.class);
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ServerInfoDao serverInfoDao;
|
||||||
|
@Resource
|
||||||
|
private ActivityDao activityDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动信息界面
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/findGiftActivityInfo", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
|
public String findGiftActivityInfo(ModelMap map, HttpServletRequest request) throws Exception {
|
||||||
|
List<GiftActivity> allActivityList = activityDao.findAllGiftActivityList();
|
||||||
|
map.addAttribute("allActivityList", allActivityList);
|
||||||
|
return "activity/GiftActivityInfo";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 切换到活动信息更新页面
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/jumpUpdateGiftActivity", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
|
public String jumpUpdateGiftActivity(ModelMap map, HttpServletRequest request) throws Exception {
|
||||||
|
String activityId = request.getParameter("activityId");
|
||||||
|
if (!StringUtil.isEmpty(activityId)){
|
||||||
|
GiftActivity oneActivity = activityDao.findOneGiftActivity(activityId);
|
||||||
|
map.addAttribute("activity", oneActivity);
|
||||||
|
}
|
||||||
|
List<ServerInfo> serverInfos = serverInfoDao.getAllServerInfo();
|
||||||
|
serverInfos.add(0,new ServerInfo(0,"全部"));
|
||||||
|
map.addAttribute("serverInfo", serverInfos);
|
||||||
|
return "activity/UporsetGiftActivity";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改活动信息
|
||||||
|
* @param activity
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/updateGiftActivity")
|
||||||
|
public @ResponseBody int updateGiftActivity(@RequestBody GiftActivity activity) throws Exception {
|
||||||
|
if (StringUtil.isEmpty(activity.getId())){
|
||||||
|
activityDao.insertGiftActivity(activity);
|
||||||
|
}else {
|
||||||
|
activityDao.upsetGiftActivity(activity);
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除活动信息
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/removeGiftActivity", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
|
public @ResponseBody int removeGiftActivity(HttpServletRequest request) throws Exception {
|
||||||
|
// mongo
|
||||||
|
String activityId = request.getParameter("activityId");
|
||||||
|
activityDao.deleteGiftActivity(activityId);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 档位信息界面
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/findGiftMission", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
|
public String findGiftMission(ModelMap map, HttpServletRequest request) throws Exception {
|
||||||
|
String activityId = request.getParameter("activityId");
|
||||||
|
List<GiftMission> missions = activityDao.findGiftMissionList(activityId);
|
||||||
|
map.addAttribute("missions", missions);
|
||||||
|
map.addAttribute("activityId", activityId);
|
||||||
|
return "activity/GiftMissionInfo";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 切换到活动信息更新页面
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/jumpAddGiftMission", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
|
public String jumpAddGiftMission(ModelMap map, HttpServletRequest request) {
|
||||||
|
ArrayList<SRechargeCommodityConfig> giftList = new ArrayList<>(FileCacheUtils.rechargeMap.values());
|
||||||
|
List<SRechargeCommodityConfig> list = giftList.stream().filter(v -> v.getTianJianglibao() == 1).collect(Collectors.toList());
|
||||||
|
map.addAttribute("giftList",list);
|
||||||
|
String activityId = request.getParameter("activityId");
|
||||||
|
map.addAttribute("activityId", activityId);
|
||||||
|
return "activity/AddGiftMission";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加礼包信息
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/addGiftMission", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
|
public @ResponseBody int addGiftMission(@RequestBody GiftMission mission) {
|
||||||
|
int result = 1;
|
||||||
|
try {
|
||||||
|
activityDao.insertGiftMission(mission);
|
||||||
|
}catch (Exception e){
|
||||||
|
result = 0;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除档位信息
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/removeGiftMission", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
|
public @ResponseBody int removeGiftMission(HttpServletRequest request) throws Exception {
|
||||||
|
String missionId = request.getParameter("missionId");
|
||||||
|
activityDao.deleteGiftMission(Integer.parseInt(missionId));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -2,6 +2,8 @@ package com.jmfy.dao;
|
||||||
|
|
||||||
import com.jmfy.model.gm.ARBActivity;
|
import com.jmfy.model.gm.ARBActivity;
|
||||||
import com.jmfy.model.gm.ARBMission;
|
import com.jmfy.model.gm.ARBMission;
|
||||||
|
import com.jmfy.model.gm.GiftActivity;
|
||||||
|
import com.jmfy.model.gm.GiftMission;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -13,6 +15,21 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public interface ActivityDao {
|
public interface ActivityDao {
|
||||||
|
|
||||||
|
//**********************************单笔充值活动*******************************//
|
||||||
|
List<GiftActivity> findAllGiftActivityList() throws Exception;
|
||||||
|
GiftActivity findOneGiftActivity(String activityId) throws Exception;
|
||||||
|
void insertGiftActivity(GiftActivity activity) throws Exception;
|
||||||
|
void upsetGiftActivity(GiftActivity activity) throws Exception;
|
||||||
|
void deleteGiftActivity(String activityId) throws Exception;
|
||||||
|
|
||||||
|
List<GiftMission> findGiftMissionList(String activityId) throws Exception;
|
||||||
|
GiftMission findOneGiftMission(int missionId) throws Exception;
|
||||||
|
void insertGiftMission(GiftMission mission) throws Exception;
|
||||||
|
void deleteGiftMission(int missionId) throws Exception;
|
||||||
|
|
||||||
|
|
||||||
|
//**********************************自动返利活动*******************************//
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取活动列表
|
* 获取活动列表
|
||||||
* @return
|
* @return
|
||||||
|
|
|
@ -4,9 +4,12 @@ import com.jmfy.dao.ActivityDao;
|
||||||
import com.jmfy.model.gm.ARBActivity;
|
import com.jmfy.model.gm.ARBActivity;
|
||||||
import com.jmfy.model.gm.ARBMission;
|
import com.jmfy.model.gm.ARBMission;
|
||||||
import com.jmfy.model.Constant;
|
import com.jmfy.model.Constant;
|
||||||
|
import com.jmfy.model.gm.GiftActivity;
|
||||||
|
import com.jmfy.model.gm.GiftMission;
|
||||||
import com.jmfy.utils.Connect;
|
import com.jmfy.utils.Connect;
|
||||||
import com.jmfy.utils.DateUtil;
|
import com.jmfy.utils.DateUtil;
|
||||||
import com.jmfy.utils.StringUtil;
|
import com.jmfy.utils.StringUtil;
|
||||||
|
import com.sun.javaws.exceptions.ErrorCodeResponseException;
|
||||||
import org.bson.types.ObjectId;
|
import org.bson.types.ObjectId;
|
||||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||||
import org.springframework.data.mongodb.core.query.Criteria;
|
import org.springframework.data.mongodb.core.query.Criteria;
|
||||||
|
@ -30,6 +33,96 @@ public class ActivityDaoImpl implements ActivityDao {
|
||||||
@Resource
|
@Resource
|
||||||
private Connect connect;
|
private Connect connect;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<GiftActivity> findAllGiftActivityList() throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
List<GiftActivity> all = mongoTemplate.findAll(GiftActivity.class);
|
||||||
|
if (all == null){
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
return all;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GiftActivity findOneGiftActivity(String activityId) throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
Query query = new Query(Criteria.where("id").is(activityId));
|
||||||
|
return mongoTemplate.findOne(query,GiftActivity.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertGiftActivity(GiftActivity activity) throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
GiftActivity oneActivity = findOneGiftActivity(activity.getId());
|
||||||
|
if (oneActivity != null){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
activity.setCreateTime(DateUtil.now());
|
||||||
|
mongoTemplate.insert(activity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void upsetGiftActivity(GiftActivity activity) throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
// 添加
|
||||||
|
GiftActivity oneActivity = findOneGiftActivity(activity.getId());
|
||||||
|
if (oneActivity == null){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 修改
|
||||||
|
Update update = new Update();
|
||||||
|
if (!StringUtil.isEmpty(activity.getName())){
|
||||||
|
update.set("name", activity.getName());
|
||||||
|
}
|
||||||
|
update.set("startTime", activity.getStartTime());
|
||||||
|
update.set("endTime", activity.getEndTime());
|
||||||
|
update.set("openLimitDay", activity.getOpenLimitDay());
|
||||||
|
update.set("serverIds", activity.getServerIds());
|
||||||
|
Query query = new Query(Criteria.where("id").is(activity.getId()));
|
||||||
|
mongoTemplate.updateMulti(query, update, GiftActivity.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteGiftActivity(String activityId) throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
Query query = new Query(Criteria.where("id").is(activityId));
|
||||||
|
mongoTemplate.remove(query, GiftActivity.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<GiftMission> findGiftMissionList(String activityId) throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
List<GiftMission> all = mongoTemplate.findAll(GiftMission.class);
|
||||||
|
if (all == null){
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
return all;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GiftMission findOneGiftMission(int id) throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
Query query = new Query(Criteria.where("id").is(id));
|
||||||
|
return mongoTemplate.findOne(query,GiftMission.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertGiftMission(GiftMission mission) throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
GiftMission oneGiftMission = findOneGiftMission(mission.getId());
|
||||||
|
if (oneGiftMission != null){
|
||||||
|
throw new Exception("礼包id已存在");
|
||||||
|
}
|
||||||
|
mongoTemplate.insert(mission);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteGiftMission(int missionId) throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
Query query = new Query(Criteria.where("id").is(missionId));
|
||||||
|
mongoTemplate.remove(query, GiftMission.class);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ARBActivity> findAllActivityList() throws Exception {
|
public List<ARBActivity> findAllActivityList() throws Exception {
|
||||||
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
|
|
@ -31,7 +31,8 @@ public class ServerInfoDaoImpl implements ServerInfoDao {
|
||||||
@Override
|
@Override
|
||||||
public List<ServerInfo> getAllServerInfo() throws Exception {
|
public List<ServerInfo> getAllServerInfo() throws Exception {
|
||||||
MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName);
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName);
|
||||||
Query query = new Query(Criteria.where("isSlave").is(0));
|
Query query = new Query();
|
||||||
|
// Query query = new Query(Criteria.where("isSlave").is(0));
|
||||||
List<ServerInfo> serverInfos = mongoTemplate.find(query, ServerInfo.class);
|
List<ServerInfo> serverInfos = mongoTemplate.find(query, ServerInfo.class);
|
||||||
return serverInfos.stream().sorted().collect(Collectors.toList());
|
return serverInfos.stream().sorted().collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ public class SRechargeCommodityConfig {
|
||||||
private int type;
|
private int type;
|
||||||
|
|
||||||
private double price;
|
private double price;
|
||||||
|
private int tianJianglibao;
|
||||||
private int[][] firstMultiple;
|
private int[][] firstMultiple;
|
||||||
|
|
||||||
private int[] continuedMultiple;
|
private int[] continuedMultiple;
|
||||||
|
@ -59,12 +59,14 @@ public class SRechargeCommodityConfig {
|
||||||
private String rechargeId9;
|
private String rechargeId9;
|
||||||
private String rechargeId10;
|
private String rechargeId10;
|
||||||
|
|
||||||
public static Map<String, SRechargeCommodityConfig> sdkRechargeCommodityConfigMap;
|
public static Map<String, SRechargeCommodityConfig> sdkRechargeCommodityConfigMap;
|
||||||
|
|
||||||
|
public static Map<Integer, SRechargeCommodityConfig> configMap;
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
Map<Integer, SRechargeCommodityConfig> config = FileCacheUtils.rechargeMap;
|
configMap = FileCacheUtils.rechargeMap;
|
||||||
sdkRechargeCommodityConfigMap = new HashMap<>();
|
sdkRechargeCommodityConfigMap = new HashMap<>();
|
||||||
for(SRechargeCommodityConfig sRechargeCommodityConfig : config.values()){
|
for(SRechargeCommodityConfig sRechargeCommodityConfig : configMap.values()){
|
||||||
sdkRechargeCommodityConfigMap.put(sRechargeCommodityConfig.getRechargeId(),sRechargeCommodityConfig);
|
sdkRechargeCommodityConfigMap.put(sRechargeCommodityConfig.getRechargeId(),sRechargeCommodityConfig);
|
||||||
sdkRechargeCommodityConfigMap.put(sRechargeCommodityConfig.getRechargeId2(),sRechargeCommodityConfig);
|
sdkRechargeCommodityConfigMap.put(sRechargeCommodityConfig.getRechargeId2(),sRechargeCommodityConfig);
|
||||||
sdkRechargeCommodityConfigMap.put(sRechargeCommodityConfig.getRechargeId3(),sRechargeCommodityConfig);
|
sdkRechargeCommodityConfigMap.put(sRechargeCommodityConfig.getRechargeId3(),sRechargeCommodityConfig);
|
||||||
|
@ -72,7 +74,6 @@ public class SRechargeCommodityConfig {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String getSupportInfo() {
|
public String getSupportInfo() {
|
||||||
String[] itemIds = new String[baseReward.length];
|
String[] itemIds = new String[baseReward.length];
|
||||||
String[] itemNums = new String[baseReward.length];
|
String[] itemNums = new String[baseReward.length];
|
||||||
|
@ -220,6 +221,10 @@ public class SRechargeCommodityConfig {
|
||||||
return rechargeId10;
|
return rechargeId10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getTianJianglibao() {
|
||||||
|
return tianJianglibao;
|
||||||
|
}
|
||||||
|
|
||||||
public static Map<String, SRechargeCommodityConfig> getSdkRechargeCommodityConfigMap() {
|
public static Map<String, SRechargeCommodityConfig> getSdkRechargeCommodityConfigMap() {
|
||||||
return sdkRechargeCommodityConfigMap;
|
return sdkRechargeCommodityConfigMap;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,112 @@
|
||||||
|
package com.jmfy.model.gm;
|
||||||
|
|
||||||
|
import com.jmfy.model.ServerInfo;
|
||||||
|
import com.jmfy.redisProperties.RedisUserKey;
|
||||||
|
import com.jmfy.utils.DateUtil;
|
||||||
|
import com.jmfy.utils.RedisUtil;
|
||||||
|
import org.springframework.data.annotation.Id;
|
||||||
|
import org.springframework.data.mongodb.core.mapping.Document;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
@Document(collection = "c_gift_activity")
|
||||||
|
public class GiftActivity {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
private long startTime;
|
||||||
|
|
||||||
|
private long endTime;
|
||||||
|
|
||||||
|
private int openLimitDay;
|
||||||
|
|
||||||
|
private long createTime;
|
||||||
|
|
||||||
|
private Set<String> serverIds = new HashSet<>();
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getStartTime() {
|
||||||
|
return startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStartTimeStr() {
|
||||||
|
return DateUtil.stampToTime(startTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartTime(long startTime) {
|
||||||
|
this.startTime = startTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getEndTime() {
|
||||||
|
return endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEndTimeStr() {
|
||||||
|
return DateUtil.stampToTime(endTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndTime(long endTime) {
|
||||||
|
this.endTime = endTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getOpenLimitDay() {
|
||||||
|
return openLimitDay;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOpenLimitDay(int openLimitDay) {
|
||||||
|
this.openLimitDay = openLimitDay;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(long createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Set<String> getServerIds() {
|
||||||
|
return serverIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setServerIds(Set<String> serverIds) {
|
||||||
|
this.serverIds = serverIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getServerNames(){
|
||||||
|
Map<String, ServerInfo> infoMap = RedisUtil.getInstence().getMap(RedisUserKey.SERVER_INFO, ServerInfo.class, -1);
|
||||||
|
StringBuilder builder = new StringBuilder();
|
||||||
|
for (String serverId : serverIds) {
|
||||||
|
if (serverId.equals("0")){
|
||||||
|
builder.append("全部");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
ServerInfo info = infoMap.get(serverId);
|
||||||
|
if (info != null){
|
||||||
|
builder.append(info.getName()).append("|");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return builder.toString();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,80 @@
|
||||||
|
package com.jmfy.model.gm;
|
||||||
|
|
||||||
|
import com.jmfy.model.config.SRechargeCommodityConfig;
|
||||||
|
import com.jmfy.model.vo.ARBActivityTypeEnum;
|
||||||
|
import com.jmfy.utils.JsonUtil;
|
||||||
|
import org.springframework.data.annotation.Id;
|
||||||
|
import org.springframework.data.mongodb.core.mapping.Document;
|
||||||
|
|
||||||
|
@Document(collection = "c_gift_mission")
|
||||||
|
public class GiftMission {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
private int id;
|
||||||
|
|
||||||
|
private int sort;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
private String discount;
|
||||||
|
|
||||||
|
private int buyLimitCount;
|
||||||
|
|
||||||
|
private String activityId;
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDiscount() {
|
||||||
|
return discount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDiscount(String discount) {
|
||||||
|
this.discount = discount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getBuyLimitCount() {
|
||||||
|
return buyLimitCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBuyLimitCount(int buyLimitCount) {
|
||||||
|
this.buyLimitCount = buyLimitCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRewardDescription() {
|
||||||
|
SRechargeCommodityConfig config = SRechargeCommodityConfig.configMap.get(id);
|
||||||
|
if (config == null){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return JsonUtil.showReward(config.getBaseReward());
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSort() {
|
||||||
|
return sort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSort(int sort) {
|
||||||
|
this.sort = sort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getActivityId() {
|
||||||
|
return activityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActivityId(String activityId) {
|
||||||
|
this.activityId = activityId;
|
||||||
|
}
|
||||||
|
}
|
|
@ -108,12 +108,12 @@ public enum PowersEnum {
|
||||||
* 功能封禁
|
* 功能封禁
|
||||||
* todo:没做完,暂时隐藏,展示将show的0改成1
|
* todo:没做完,暂时隐藏,展示将show的0改成1
|
||||||
*/
|
*/
|
||||||
BAN_FUNCTION(1201,"功能封禁",1201,1,""),
|
BAN_FUNCTION(1201,"功能封禁",1201,0,""),
|
||||||
BAN_FUNCTION_ACTION(1202,"功能封禁操作",1201,1,"/html/banFunction.html"),
|
BAN_FUNCTION_ACTION(1202,"功能封禁操作",1201,1,"/html/banFunction.html"),
|
||||||
/**
|
/**
|
||||||
* 太初密卷
|
* 太初密卷
|
||||||
*/
|
*/
|
||||||
TAICHU_SECRET_VOLUME(1301,"太初密卷",1301,1,""),
|
TAICHU_SECRET_VOLUME(1301,"太初密卷",1301,0,""),
|
||||||
TAICHU_SECRET_VOLUME_INFO(1302,"太初密卷信息",1301,1,"getAllSecretVolumeInfo"),
|
TAICHU_SECRET_VOLUME_INFO(1302,"太初密卷信息",1301,1,"getAllSecretVolumeInfo"),
|
||||||
TAICHU_SECRET_VOLUME_ADD(1303,"添加太初密卷信息",1301,1,"/html/addSecretVolumeInfo.html"),
|
TAICHU_SECRET_VOLUME_ADD(1303,"添加太初密卷信息",1301,1,"/html/addSecretVolumeInfo.html"),
|
||||||
/**
|
/**
|
||||||
|
@ -123,7 +123,6 @@ public enum PowersEnum {
|
||||||
PACKAGE_NAME_MANAGER(1401,"公告频道Id管理",1400,1,"packageInfoList"),
|
PACKAGE_NAME_MANAGER(1401,"公告频道Id管理",1400,1,"packageInfoList"),
|
||||||
ADD_PACKAGE_NAME(1402,"权限: 添加频道",1400,0,""),
|
ADD_PACKAGE_NAME(1402,"权限: 添加频道",1400,0,""),
|
||||||
DELETE_PACKAGE_NAME(1403,"权限: 删除频道",1400,0,""),
|
DELETE_PACKAGE_NAME(1403,"权限: 删除频道",1400,0,""),
|
||||||
|
|
||||||
// 渠道
|
// 渠道
|
||||||
CHANNEL_NAME_MANAGER(1404,"渠道管理",1400,1,"channelInfoList"),
|
CHANNEL_NAME_MANAGER(1404,"渠道管理",1400,1,"channelInfoList"),
|
||||||
ADD_CHANNEL_PERMISSIONS(1405,"权限: 添加渠道",1400,0,""),
|
ADD_CHANNEL_PERMISSIONS(1405,"权限: 添加渠道",1400,0,""),
|
||||||
|
@ -132,12 +131,19 @@ public enum PowersEnum {
|
||||||
GAME_AGREEMENT_MANAGER(1408,"游戏协议管理",1400,1,"gameAgreementList"),
|
GAME_AGREEMENT_MANAGER(1408,"游戏协议管理",1400,1,"gameAgreementList"),
|
||||||
ADD_GAME_AGREEMENT_PERMISSIONS(1409,"权限: 操作游戏协议(增,删,改)",1400,0,""),
|
ADD_GAME_AGREEMENT_PERMISSIONS(1409,"权限: 操作游戏协议(增,删,改)",1400,0,""),
|
||||||
UPDATE_CHANNEL_PERMISSIONS(1410,"权限: 修改渠道",1400,0,""),
|
UPDATE_CHANNEL_PERMISSIONS(1410,"权限: 修改渠道",1400,0,""),
|
||||||
AUTO_RECHARGE_BACK_ACTIVITY_SHOW(1411,"自动返利活动",1400,1,"findARBActivityInfos"),
|
|
||||||
/**
|
/**
|
||||||
* 合服
|
* 合服
|
||||||
*/
|
*/
|
||||||
HEFU(1500,"合服",1500,0,""),
|
HEFU(1500,"合服",1500,0,""),
|
||||||
HEFU_MANAGER(1501,"合服",1500,1,"/html/hefu.html"),
|
HEFU_MANAGER(1501,"合服",1500,1,"/html/hefu.html"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动
|
||||||
|
*/
|
||||||
|
ACTIVITY_MANAGER(1600, "活动管理", 1600, 1, ""),
|
||||||
|
AUTO_RECHARGE_BACK_ACTIVITY_SHOW(1601,"自动返利活动",1600,1,"findARBActivityInfos"),
|
||||||
|
single_recharge(1602, "单笔充值活动", 1600, 1, "findGiftActivityInfo"),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
private int id;
|
private int id;
|
||||||
|
|
|
@ -0,0 +1,194 @@
|
||||||
|
<!--_meta 作为公共模版分离出去-->
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<!--suppress ALL -->
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8"/>
|
||||||
|
<meta name="renderer" content="webkit|ie-comp|ie-stand"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||||
|
<meta name="viewport"
|
||||||
|
content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
|
||||||
|
<meta http-equiv="Cache-Control" content="no-siteapp"/>
|
||||||
|
<link rel="Bookmark" href="../favicon.ico"/>
|
||||||
|
<link rel="Shortcut Icon" href="../favicon.ico"/>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script type="text/javascript" src="../static/lib/html5shiv.js"></script>
|
||||||
|
<script type="text/javascript" src="../static/lib/respond.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<link rel="stylesheet" type="text/css" href="../static/h-ui/css/H-ui.min.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/H-ui.admin.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../static/lib/Hui-iconfont/1.0.8/iconfont.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/skin/default/skin.css" id="skin"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/style.css"/>
|
||||||
|
<!-- 引入layui.css -->
|
||||||
|
<link rel="stylesheet" href="https://www.layuicdn.com/layui-v2.5.6/css/layui.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="../static/tips/help.css">
|
||||||
|
<!--[if IE 6]>
|
||||||
|
<script type="text/javascript" src="../static/lib/DD_belatedPNG_0.0.8a-min.js"></script>
|
||||||
|
<script>DD_belatedPNG.fix('*');</script>
|
||||||
|
<![endif]-->
|
||||||
|
<!--/meta 作为公共模版分离出去-->
|
||||||
|
|
||||||
|
<title>单笔充值活动礼包配置</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<nav class="breadcrumb">
|
||||||
|
<a href="javascript:;" onclick="history.go(-2)">
|
||||||
|
<i class="Hui-iconfont"></i> 活动首页
|
||||||
|
</a>
|
||||||
|
<a href="javascript:;" onclick="history.go(-1)">
|
||||||
|
<span class="c-gray en">></span> 上一页
|
||||||
|
</a>
|
||||||
|
<span class="c-gray en">></span> 单笔充值活动礼包配置
|
||||||
|
<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
|
||||||
|
href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont"></i></a>
|
||||||
|
</nav>
|
||||||
|
<div class="page-container">
|
||||||
|
<form class="form form-horizontal" id="form-article-add" action="#" method="post">
|
||||||
|
<div class="tabBar cl">
|
||||||
|
<span>单笔充值活动礼包配置</span>
|
||||||
|
</div>
|
||||||
|
<div class="row cl">
|
||||||
|
<label class="form-label col-xs-4 col-sm-2">
|
||||||
|
<span class="c-red">*</span>排序:
|
||||||
|
</label>
|
||||||
|
<div class="formControls col-xs-8 col-sm-9">
|
||||||
|
<input type="number" style="width: 500px;" th:id="sortId" placeholder="排序越小档位越先验证,id重复则随机排序" value="" class="input-text"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row cl">
|
||||||
|
<label class="form-label col-xs-4 col-sm-2">
|
||||||
|
<span class="c-red">*</span>礼包:
|
||||||
|
</label>
|
||||||
|
<div class="formControls col-xs-8 col-sm-9">
|
||||||
|
<!-- 服务器列表 -->
|
||||||
|
<div th:id="giftId" style="float: left;width: 230px;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row cl">
|
||||||
|
<label class="form-label col-xs-4 col-sm-2">
|
||||||
|
<span class="c-red">*</span>礼包名称:
|
||||||
|
</label>
|
||||||
|
<div class="formControls col-xs-8 col-sm-9">
|
||||||
|
<input type="text" th:id="name" placeholder="" value="" class="input-text"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row cl">
|
||||||
|
<label class="form-label col-xs-4 col-sm-2">
|
||||||
|
<span class="c-red">*</span>折扣描述:
|
||||||
|
</label>
|
||||||
|
<div class="formControls col-xs-8 col-sm-9">
|
||||||
|
<input type="text" th:id="discount" placeholder="" value="" class="input-text"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row cl">
|
||||||
|
<label class="form-label col-xs-4 col-sm-2">
|
||||||
|
<span class="c-red">*</span>限购次数:
|
||||||
|
</label>
|
||||||
|
<div class="formControls col-xs-8 col-sm-9">
|
||||||
|
<input type="number" th:id="buyLimitCount" placeholder="" value="" class="input-text"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row cl">
|
||||||
|
<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
|
||||||
|
<input th:id="activityId" th:value="${activityId}" type="hidden" />
|
||||||
|
<button onClick="return upsertMission();" class="btn btn-primary radius" type="button">
|
||||||
|
<i class="Hui-iconfont"></i> 确认
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!--_footer 作为公共模版分离出去-->
|
||||||
|
<script type="text/javascript" src="../static/lib/jquery/1.9.1/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="../static/lib/layer/2.4/layer.js"></script>
|
||||||
|
<script type="text/javascript" src="../static/h-ui/js/H-ui.min.js"></script>
|
||||||
|
<script type="text/javascript" src="../static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
|
||||||
|
|
||||||
|
<!--请在下方写此页面业务相关的脚本-->
|
||||||
|
<script type="text/javascript" src="../static/lib/My97DatePicker/4.8/WdatePicker.js"></script>
|
||||||
|
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
|
||||||
|
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/validate-methods.js"></script>
|
||||||
|
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/messages_zh.js"></script>
|
||||||
|
|
||||||
|
<!--多选框-->
|
||||||
|
<script src="../static/xmSelect/js/xm-select.js"></script>
|
||||||
|
<!-- 引入layui.js -->
|
||||||
|
<script scr="https://www.layuicdn.com/layui-v2.5.6/layui.js"></script>
|
||||||
|
|
||||||
|
<script th:inline="javascript">
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
$('.skin-minimal input').iCheck({
|
||||||
|
checkboxClass: 'icheckbox-blue',
|
||||||
|
radioClass: 'iradio-blue',
|
||||||
|
increaseArea: '20%'
|
||||||
|
});
|
||||||
|
$("#tab-system").Huitab({
|
||||||
|
index: 0
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var props = xmSelect.render({
|
||||||
|
el: '#giftId',
|
||||||
|
template({name, value}){
|
||||||
|
return name + '<span style="position: absolute; right: 10px; color: #8799a3">'+value+'</span>'
|
||||||
|
},
|
||||||
|
filterable: true,
|
||||||
|
radio: true,
|
||||||
|
clickClose: true,
|
||||||
|
tips: '选择礼包', // 让默认值不是“请选择”,而是“选择校区”
|
||||||
|
height:'260px',
|
||||||
|
theme: { color: '#0081ff' },
|
||||||
|
model: { label: { type: 'text' } },
|
||||||
|
prop: {
|
||||||
|
name: 'name',
|
||||||
|
value: 'id',
|
||||||
|
},
|
||||||
|
data: function () {
|
||||||
|
return [[${giftList}]];
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
function upsertMission() {
|
||||||
|
// ID
|
||||||
|
let giftId = props.getValue("valueStr");
|
||||||
|
let id = Number(giftId);
|
||||||
|
let activityId = document.getElementById("activityId").value;
|
||||||
|
let sortId = document.getElementById("sortId").value;
|
||||||
|
let name = document.getElementById("name").value;
|
||||||
|
let discount = document.getElementById("discount").value;
|
||||||
|
let buyLimitCount = document.getElementById("buyLimitCount").value;
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
data:
|
||||||
|
JSON.stringify({
|
||||||
|
"id": id,
|
||||||
|
"sort": sortId,
|
||||||
|
"name": name,
|
||||||
|
"discount": discount,
|
||||||
|
"buyLimitCount": buyLimitCount,
|
||||||
|
"activityId": activityId
|
||||||
|
})
|
||||||
|
,
|
||||||
|
url: "/addGiftMission",
|
||||||
|
dataType: "json",
|
||||||
|
contentType: 'application/json',
|
||||||
|
success: function (data) {
|
||||||
|
if (data == 1) {
|
||||||
|
layer.msg('成功!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error:function () {
|
||||||
|
layer.msg('参数异常,请重试!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<!--/请在上方写此页面业务相关的脚本-->
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,150 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8"/>
|
||||||
|
<meta name="renderer" content="webkit|ie-comp|ie-stand"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||||
|
<meta name="viewport"
|
||||||
|
content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
|
||||||
|
<meta http-equiv="Cache-Control" content="no-siteapp"/>
|
||||||
|
<script type="text/javascript" src="lib/html5shiv.js"></script>
|
||||||
|
<script type="text/javascript" src="lib/respond.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<link rel="stylesheet" type="text/css" href="h-ui/css/H-ui.min.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="h-ui.admin/css/H-ui.admin.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="h-ui.admin/skin/default/skin.css" id="skin"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="h-ui.admin/css/style.css"/>
|
||||||
|
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js"></script>
|
||||||
|
<script>DD_belatedPNG.fix('*');</script>
|
||||||
|
<title>礼包活动查询</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<nav class="breadcrumb">
|
||||||
|
<i class="Hui-iconfont"></i> 礼包活动查询
|
||||||
|
<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
|
||||||
|
href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont"></i></a>
|
||||||
|
</nav>
|
||||||
|
<h2 class="mt-20" style="text-align: center"><span style="color:red;">礼包活动查询</span></h2>
|
||||||
|
<div class="mt-20" style="text-align: left;margin-left: 24px;">
|
||||||
|
<!-- 新增按钮 -->
|
||||||
|
<button class="btn btn-primary radius" style="margin-left: 10px;height: 40px;line-height: 40px;" type="button" onclick="jumpAddGiftActivity()">
|
||||||
|
<i class="Hui-iconfont"></i> 添加活动
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="page-container" style="text-align: center">
|
||||||
|
<div class="text-c">
|
||||||
|
<div class="mt-20">
|
||||||
|
<table class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
|
||||||
|
<thead>
|
||||||
|
<tr class="text-c">
|
||||||
|
<th>活动id</th>
|
||||||
|
<th>活动名称</th>
|
||||||
|
<th>开启时间</th>
|
||||||
|
<th>结束时间</th>
|
||||||
|
<th>限制开服天数</th>
|
||||||
|
<th>生效区服</th>
|
||||||
|
<th>操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr th:each="obj:${allActivityList}" th:id="${obj.getId()}">
|
||||||
|
<td th:text="${obj.getId()}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.getName()}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.getStartTimeStr()}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.getEndTimeStr()}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.getOpenLimitDay()}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.getServerNames()}" style="text-align: center;"></td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<button type="button" th:id="${obj.getId()}" class="btn btn-primary radius" onclick="return jumpUpdateActivity(this)">
|
||||||
|
修改
|
||||||
|
</button>
|
||||||
|
<button type="button" th:id="${obj.getId()}" class="btn btn-success radius" onclick="return jumpActivityMissionInfo(this)">
|
||||||
|
档位
|
||||||
|
</button>
|
||||||
|
<button type="button" th:id="${obj.getId()}" th:name="${obj.getName()}" class="btn btn-danger radius" onclick="return deleteActivity(this)">
|
||||||
|
删除
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--_footer 作为公共模版分离出去-->
|
||||||
|
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
|
||||||
|
<script type="text/javascript" src="h-ui/js/H-ui.min.js"></script>
|
||||||
|
<script type="text/javascript" src="h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
|
||||||
|
|
||||||
|
<!--请在下方写此页面业务相关的脚本-->
|
||||||
|
<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script>
|
||||||
|
<script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
|
||||||
|
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
|
||||||
|
|
||||||
|
<script th:inline="javascript">
|
||||||
|
$('.table-sort').dataTable({
|
||||||
|
"aaSorting": [[0, "desc"]],//默认第几个排序
|
||||||
|
"bStateSave": true,//状态保存
|
||||||
|
"pading": false,
|
||||||
|
"aoColumnDefs": [
|
||||||
|
//{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
|
||||||
|
{"orderable": false, "aTargets": [1]}// 不参与排序的列
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加活动信息页面
|
||||||
|
*/
|
||||||
|
function jumpAddGiftActivity() {
|
||||||
|
window.location.href = "/jumpUpdateGiftActivity";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转更新活动界面
|
||||||
|
*/
|
||||||
|
function jumpUpdateActivity(obj) {
|
||||||
|
var activityId = $(obj).attr("id");
|
||||||
|
window.location.href = "/jumpUpdateGiftActivity?activityId="+activityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 切换到档位信息页面
|
||||||
|
* @param obj
|
||||||
|
*/
|
||||||
|
function jumpActivityMissionInfo(obj) {
|
||||||
|
var activityId = $(obj).attr("id");
|
||||||
|
window.location.href = "/findGiftMission?activityId="+activityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除活动信息
|
||||||
|
* @param obj
|
||||||
|
*/
|
||||||
|
function deleteActivity(obj) {
|
||||||
|
var activityId = $(obj).attr("id");
|
||||||
|
var name = $(obj).attr("name");
|
||||||
|
var msg = "请确认是否要删除活动:{"+name+"},\n\n请确认!";
|
||||||
|
if (confirm(msg) === true) {
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
data: {
|
||||||
|
"activityId": activityId
|
||||||
|
},
|
||||||
|
url: "/removeGiftActivity",
|
||||||
|
success: function (data) {
|
||||||
|
if (data === 1) {
|
||||||
|
alert("操作成功");
|
||||||
|
document.getElementById(activityId).style.display="none";
|
||||||
|
}else {
|
||||||
|
alert("操作失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,132 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8"/>
|
||||||
|
<meta name="renderer" content="webkit|ie-comp|ie-stand"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||||
|
<meta name="viewport"
|
||||||
|
content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
|
||||||
|
<meta http-equiv="Cache-Control" content="no-siteapp"/>
|
||||||
|
<script type="text/javascript" src="lib/html5shiv.js"></script>
|
||||||
|
<script type="text/javascript" src="lib/respond.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<link rel="stylesheet" type="text/css" href="h-ui/css/H-ui.min.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="h-ui.admin/css/H-ui.admin.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="h-ui.admin/skin/default/skin.css" id="skin"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="h-ui.admin/css/style.css"/>
|
||||||
|
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js"></script>
|
||||||
|
<script>DD_belatedPNG.fix('*');</script>
|
||||||
|
<title>礼包查询</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<nav class="breadcrumb">
|
||||||
|
<a href="javascript:;" onclick="history.go(-1)">
|
||||||
|
<i class="Hui-iconfont"></i> 活动首页
|
||||||
|
</a>
|
||||||
|
<a href="javascript:;" onclick="history.go(-1)">
|
||||||
|
<span class="c-gray en">></span> 上一页
|
||||||
|
</a>
|
||||||
|
<span class="c-gray en">></span> 礼包查询
|
||||||
|
<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
|
||||||
|
href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont"></i></a>
|
||||||
|
</nav>
|
||||||
|
<div class="mt-20" style="text-align: left;margin-left: 24px;">
|
||||||
|
<!-- 新增按钮 -->
|
||||||
|
<button class="btn btn-primary radius" th:id="${activityId}" type="button" onclick="jumpAddGiftMission(this)">
|
||||||
|
<i class="Hui-iconfont"></i> 添加礼包
|
||||||
|
</button>
|
||||||
|
<!-- <a class="btn btn-primary radius" th:id="${activityId}" onclick="return jumpAddARBMission(this)"><i class="Hui-iconfont"></i> 添加档位</a>-->
|
||||||
|
</div>
|
||||||
|
<div class="page-container" style="text-align: center">
|
||||||
|
<div class="text-c">
|
||||||
|
<div class="mt-20">
|
||||||
|
<input th:id="activityId" th:value="${activityId}" type="hidden" />
|
||||||
|
<table class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
|
||||||
|
<thead>
|
||||||
|
<tr class="text-c">
|
||||||
|
<th>id</th>
|
||||||
|
<th>排序</th>
|
||||||
|
<th>名称</th>
|
||||||
|
<th>折扣描述</th>
|
||||||
|
<th>限购次数</th>
|
||||||
|
<th>奖励</th>
|
||||||
|
<th>操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr th:each="obj:${missions}" th:id="${obj.getId()}">
|
||||||
|
<td th:text="${obj.getId()}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.getSort()}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.getName()}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.getDiscount()}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.getBuyLimitCount()}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.getRewardDescription()}" style="text-align: center;"></td>
|
||||||
|
<td style="text-align: center;">
|
||||||
|
<button type="button" th:id="${obj.getId()}" th:name="${obj.getName()}" class="btn btn-danger radius" onclick="return deleteMission(this)">
|
||||||
|
删除
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--_footer 作为公共模版分离出去-->
|
||||||
|
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
|
||||||
|
<script type="text/javascript" src="h-ui/js/H-ui.min.js"></script>
|
||||||
|
<script type="text/javascript" src="h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
|
||||||
|
|
||||||
|
<!--请在下方写此页面业务相关的脚本-->
|
||||||
|
<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script>
|
||||||
|
<script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
|
||||||
|
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
|
||||||
|
|
||||||
|
<script th:inline="javascript">
|
||||||
|
$('.table-sort').dataTable({
|
||||||
|
"aaSorting": [[0, "desc"]],//默认第几个排序
|
||||||
|
"bStateSave": true,//状态保存
|
||||||
|
"pading": false,
|
||||||
|
"aoColumnDefs": [
|
||||||
|
//{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
|
||||||
|
{"orderable": false, "aTargets": [1, 2]}// 不参与排序的列
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
function jumpAddGiftMission(obj) {
|
||||||
|
let activityId = $(obj).attr("id");
|
||||||
|
window.location.href = "/jumpAddGiftMission?activityId="+activityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除活动信息
|
||||||
|
* @param obj
|
||||||
|
*/
|
||||||
|
function deleteMission(obj) {
|
||||||
|
let missionId = $(obj).attr("id");
|
||||||
|
let name = $(obj).attr("name");
|
||||||
|
let msg = "请确认是否要删除礼包:{"+name+"},\n\n请确认!";
|
||||||
|
if (confirm(msg) === true) {
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
data: {
|
||||||
|
"missionId": missionId
|
||||||
|
},
|
||||||
|
url: "/removeGiftMission",
|
||||||
|
success: function (data) {
|
||||||
|
if (data === 1) {
|
||||||
|
alert("操作成功");
|
||||||
|
document.getElementById(missionId).style.display="none";
|
||||||
|
}else {
|
||||||
|
alert("操作失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,278 @@
|
||||||
|
<!--_meta 作为公共模版分离出去-->
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<!--suppress ALL -->
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8"/>
|
||||||
|
<meta name="renderer" content="webkit|ie-comp|ie-stand"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||||
|
<meta name="viewport"
|
||||||
|
content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
|
||||||
|
<meta http-equiv="Cache-Control" content="no-siteapp"/>
|
||||||
|
<link rel="Bookmark" href="../favicon.ico"/>
|
||||||
|
<link rel="Shortcut Icon" href="../favicon.ico"/>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script type="text/javascript" src="../static/lib/html5shiv.js"></script>
|
||||||
|
<script type="text/javascript" src="../static/lib/respond.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<link rel="stylesheet" type="text/css" href="../static/h-ui/css/H-ui.min.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/H-ui.admin.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../static/lib/Hui-iconfont/1.0.8/iconfont.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/skin/default/skin.css" id="skin"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/style.css"/>
|
||||||
|
<!--[if IE 6]>
|
||||||
|
<script type="text/javascript" src="../static/lib/DD_belatedPNG_0.0.8a-min.js"></script>
|
||||||
|
<script>DD_belatedPNG.fix('*');</script>
|
||||||
|
<![endif]-->
|
||||||
|
<!--/meta 作为公共模版分离出去-->
|
||||||
|
<title>单笔充值活动配置</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<nav class="breadcrumb">
|
||||||
|
<a href="javascript:;" onclick="history.go(-2)">
|
||||||
|
<i class="Hui-iconfont"></i> 活动首页
|
||||||
|
</a>
|
||||||
|
<a href="javascript:;" onclick="history.go(-1)">
|
||||||
|
<span class="c-gray en">></span> 上一页
|
||||||
|
</a>
|
||||||
|
<span class="c-gray en">></span> 单笔充值活动配置
|
||||||
|
<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
|
||||||
|
href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont"></i></a>
|
||||||
|
</nav>
|
||||||
|
<div class="page-container">
|
||||||
|
<form class="form form-horizontal" id="form-article-add" th:object="${activity}" action="#" method="post">
|
||||||
|
<div id="tab-system" class="HuiTab">
|
||||||
|
<div class="tabBar cl">
|
||||||
|
<span>单笔充值活动配置</span>
|
||||||
|
</div>
|
||||||
|
<div class="tabCon">
|
||||||
|
<div class="row cl">
|
||||||
|
<label class="form-label col-xs-4 col-sm-2">
|
||||||
|
<span class="c-red">*</span>
|
||||||
|
活动名称:</label>
|
||||||
|
<div class="formControls col-xs-8 col-sm-9">
|
||||||
|
<input type="text" style="height: 32px;" th:id="name" placeholder="" th:value="${activity?.getName()}" class="input-text"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row cl">
|
||||||
|
<label class="form-label col-xs-4 col-sm-2">
|
||||||
|
<span class="c-red">*</span>
|
||||||
|
开服限制天数:</label>
|
||||||
|
<div class="formControls col-xs-8 col-sm-9">
|
||||||
|
<input type="number" style="height: 32px;" th:id="openLimitDay" placeholder="" th:value="${activity?.getOpenLimitDay()}" class="input-text"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row cl">
|
||||||
|
<label class="form-label col-xs-4 col-sm-2">
|
||||||
|
<span class="c-red">*</span> 有效时间:
|
||||||
|
</label>
|
||||||
|
<div class="formControls col-xs-8 col-sm-9">
|
||||||
|
<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" id="startTime" class="input-text Wdate" style="width:180px;" name="startTime">
|
||||||
|
<input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" id="endTime" class="input-text Wdate" style="width:180px;" name="endTime">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row cl">
|
||||||
|
<label class="form-label col-xs-4 col-sm-2">
|
||||||
|
<span class="c-red">*</span>区服id:
|
||||||
|
</label>
|
||||||
|
<div class="formControls col-xs-8 col-sm-9">
|
||||||
|
<!-- 服务器列表 -->
|
||||||
|
<div th:id="serverIds" style="float: left;width: 230px;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row cl" style="margin-top: 60px;">
|
||||||
|
<input th:id="activityId" th:value="${activity?.getId()}" type="hidden" />
|
||||||
|
<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
|
||||||
|
<button onClick="return upsertActivity();" class="btn btn-primary radius" type="button">
|
||||||
|
<i class="Hui-iconfont"></i> 确认
|
||||||
|
</button>
|
||||||
|
<button onClick="history.go(-1);" style="margin-left: 20px;" class="btn btn-warning radius" type="button">
|
||||||
|
<i class="Hui-iconfont"></i> 取消
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!--_footer 作为公共模版分离出去-->
|
||||||
|
<script type="text/javascript" src="../static/lib/jquery/1.9.1/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="../static/lib/layer/2.4/layer.js"></script>
|
||||||
|
<script type="text/javascript" src="../static/h-ui/js/H-ui.min.js"></script>
|
||||||
|
<script type="text/javascript" src="../static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
|
||||||
|
|
||||||
|
<!--请在下方写此页面业务相关的脚本-->
|
||||||
|
<script type="text/javascript" src="../static/lib/My97DatePicker/4.8/WdatePicker.js"></script>
|
||||||
|
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
|
||||||
|
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/validate-methods.js"></script>
|
||||||
|
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/messages_zh.js"></script>
|
||||||
|
|
||||||
|
<!--多选框-->
|
||||||
|
<script src="../static/xmSelect/js/xm-select.js"></script>
|
||||||
|
|
||||||
|
<script th:inline="javascript">
|
||||||
|
$(function () {
|
||||||
|
// 表格样式
|
||||||
|
$('.skin-minimal input').iCheck({
|
||||||
|
checkboxClass: 'icheckbox-blue',
|
||||||
|
radioClass: 'iradio-blue',
|
||||||
|
increaseArea: '20%'
|
||||||
|
});
|
||||||
|
$("#tab-system").Huitab({
|
||||||
|
index: 0
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
var activity = [[${activity}]];
|
||||||
|
|
||||||
|
var serverInfos = xmSelect.render({
|
||||||
|
el: '#serverIds', // div的id值
|
||||||
|
template({name, value}){
|
||||||
|
return name + '<span style="position: absolute; right: 10px; color: #8799a3">'+value+'</span>'
|
||||||
|
},
|
||||||
|
toolbar: { // 工具条【‘全选’,‘清空’】
|
||||||
|
show: true, // 开启工具条
|
||||||
|
showIcon: false, // 隐藏工具条的图标
|
||||||
|
},
|
||||||
|
tips: '选择服务器', // 让默认值不是“请选择”,而是“选择校区”
|
||||||
|
filterable: true, // 开启搜索模式,默认按照name进行搜索
|
||||||
|
height:'260px',
|
||||||
|
model: {
|
||||||
|
label: {
|
||||||
|
type: 'block',
|
||||||
|
block: {
|
||||||
|
//最大显示数量, 0:不限制
|
||||||
|
showCount: 1,
|
||||||
|
//是否显示删除图标
|
||||||
|
showIcon: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
prop: {
|
||||||
|
name: 'name',
|
||||||
|
value: 'server_id',
|
||||||
|
},
|
||||||
|
initValue: getServerInit(),
|
||||||
|
on: function(data){
|
||||||
|
//可以return一个数组, 代表想选中的数据
|
||||||
|
|
||||||
|
//arr: 当前多选已选中的数据
|
||||||
|
var arr = data.arr;
|
||||||
|
//change, 此次选择变化的数据,数组
|
||||||
|
var change = data.change;
|
||||||
|
//isAdd, 此次操作是新增还是删除
|
||||||
|
var isAdd = data.isAdd;
|
||||||
|
|
||||||
|
if(isAdd){
|
||||||
|
var allItem = change.find(function(item){
|
||||||
|
return item.server_id == '0';
|
||||||
|
})
|
||||||
|
if(allItem){
|
||||||
|
return [allItem];
|
||||||
|
}
|
||||||
|
allItem = arr.find(function(item){
|
||||||
|
return item.server_id == '0';
|
||||||
|
})
|
||||||
|
if(allItem){
|
||||||
|
return change;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
data: function () {
|
||||||
|
return [[${serverInfo}]];
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
function getServerInit(){
|
||||||
|
let result = [];
|
||||||
|
if (activity != null){
|
||||||
|
result = activity.serverIds;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function formatDate(value) {
|
||||||
|
var date = new Date(value);
|
||||||
|
var y = date.getFullYear(),
|
||||||
|
m = date.getMonth() + 1,
|
||||||
|
d = date.getDate(),
|
||||||
|
h = date.getHours(),
|
||||||
|
i = date.getMinutes(),
|
||||||
|
s = date.getSeconds();
|
||||||
|
if (m < 10) { m = '0' + m; }
|
||||||
|
if (d < 10) { d = '0' + d; }
|
||||||
|
if (h < 10) { h = '0' + h; }
|
||||||
|
if (i < 10) { i = '0' + i; }
|
||||||
|
if (s < 10) { s = '0' + s; }
|
||||||
|
var t = y + '-' + m + '-' + d + ' ' + h + ':' + i + ':' + s;
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
|
$(function(){
|
||||||
|
//赋初始值
|
||||||
|
if (activity != null){
|
||||||
|
document.getElementById("startTime").value = formatDate(activity.startTime);
|
||||||
|
document.getElementById("endTime").value = formatDate(activity.endTime);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增或修改活动信息
|
||||||
|
*/
|
||||||
|
function upsertActivity() {
|
||||||
|
// ID
|
||||||
|
let activityId = document.getElementById("activityId").value;
|
||||||
|
if (activityId == ""){
|
||||||
|
activityId = null;
|
||||||
|
}
|
||||||
|
// 标题
|
||||||
|
let name = document.getElementById("name").value;
|
||||||
|
// 开服限制天数
|
||||||
|
let openLimitDay = document.getElementById("openLimitDay").value;
|
||||||
|
// 生效的服务器id
|
||||||
|
let servers = serverInfos.getValue('value');
|
||||||
|
|
||||||
|
if (name == "" || openLimitDay == "" || servers == ""){
|
||||||
|
alert("参数不能为空!")
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 优效时间
|
||||||
|
let startTime = document.getElementById("startTime").value;
|
||||||
|
let endTime = document.getElementById("endTime").value;
|
||||||
|
let DateStart = new Date(startTime);
|
||||||
|
let DateEnd = new Date(endTime);
|
||||||
|
if (DateEnd <= DateStart) {
|
||||||
|
alert("结束时间必须大于开始时间.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
data:
|
||||||
|
JSON.stringify({
|
||||||
|
"id": activityId,
|
||||||
|
"name": name,
|
||||||
|
"openLimitDay": openLimitDay,
|
||||||
|
"startTime": DateStart.getTime(),
|
||||||
|
"endTime": DateEnd.getTime(),
|
||||||
|
"serverIds": servers
|
||||||
|
})
|
||||||
|
,
|
||||||
|
url: "/updateGiftActivity",
|
||||||
|
dataType: "json",
|
||||||
|
contentType: 'application/json',
|
||||||
|
success: function (data) {
|
||||||
|
if (data == 1) {
|
||||||
|
layer.msg('成功!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<!--/请在上方写此页面业务相关的脚本-->
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -94,7 +94,7 @@
|
||||||
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
|
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
|
||||||
|
|
||||||
<!--多选框-->
|
<!--多选框-->
|
||||||
<script src="../static/xmSelect/js/xm-select.js"></script>
|
<script src="../../../static/xmSelect/js/xm-select.js"></script>
|
||||||
|
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
$('.table-sort').dataTable({
|
$('.table-sort').dataTable({
|
|
@ -79,7 +79,7 @@
|
||||||
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
|
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
|
||||||
|
|
||||||
<!--多选框-->
|
<!--多选框-->
|
||||||
<script src="../static/xmSelect/js/xm-select.js"></script>
|
<script src="../../../static/xmSelect/js/xm-select.js"></script>
|
||||||
|
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
$('.table-sort').dataTable({
|
$('.table-sort').dataTable({
|
|
@ -9,22 +9,22 @@
|
||||||
<meta name="viewport"
|
<meta name="viewport"
|
||||||
content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
|
content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
|
||||||
<meta http-equiv="Cache-Control" content="no-siteapp"/>
|
<meta http-equiv="Cache-Control" content="no-siteapp"/>
|
||||||
<link rel="Bookmark" href="../favicon.ico"/>
|
<link rel="Bookmark" href="../../favicon.ico"/>
|
||||||
<link rel="Shortcut Icon" href="../favicon.ico"/>
|
<link rel="Shortcut Icon" href="../../favicon.ico"/>
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
<script type="text/javascript" src="../static/lib/html5shiv.js"></script>
|
<script type="text/javascript" src="../../../static/lib/html5shiv.js"></script>
|
||||||
<script type="text/javascript" src="../static/lib/respond.min.js"></script>
|
<script type="text/javascript" src="../../../static/lib/respond.min.js"></script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
<link rel="stylesheet" type="text/css" href="../static/h-ui/css/H-ui.min.css"/>
|
<link rel="stylesheet" type="text/css" href="../../../static/h-ui/css/H-ui.min.css"/>
|
||||||
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/H-ui.admin.css"/>
|
<link rel="stylesheet" type="text/css" href="../../../static/h-ui.admin/css/H-ui.admin.css"/>
|
||||||
<link rel="stylesheet" type="text/css" href="../static/lib/Hui-iconfont/1.0.8/iconfont.css"/>
|
<link rel="stylesheet" type="text/css" href="../../../static/lib/Hui-iconfont/1.0.8/iconfont.css"/>
|
||||||
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/skin/default/skin.css" id="skin"/>
|
<link rel="stylesheet" type="text/css" href="../../../static/h-ui.admin/skin/default/skin.css" id="skin"/>
|
||||||
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/style.css"/>
|
<link rel="stylesheet" type="text/css" href="../../../static/h-ui.admin/css/style.css"/>
|
||||||
<!-- 引入layui.css -->
|
<!-- 引入layui.css -->
|
||||||
<link rel="stylesheet" href="https://www.layuicdn.com/layui-v2.5.6/css/layui.css">
|
<link rel="stylesheet" href="https://www.layuicdn.com/layui-v2.5.6/css/layui.css">
|
||||||
<link rel="stylesheet" type="text/css" href="../static/tips/help.css">
|
<link rel="stylesheet" type="text/css" href="../../../static/tips/help.css">
|
||||||
<!--[if IE 6]>
|
<!--[if IE 6]>
|
||||||
<script type="text/javascript" src="../static/lib/DD_belatedPNG_0.0.8a-min.js"></script>
|
<script type="text/javascript" src="../../../static/lib/DD_belatedPNG_0.0.8a-min.js"></script>
|
||||||
<script>DD_belatedPNG.fix('*');</script>
|
<script>DD_belatedPNG.fix('*');</script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
<!--/meta 作为公共模版分离出去-->
|
<!--/meta 作为公共模版分离出去-->
|
||||||
|
@ -124,19 +124,19 @@
|
||||||
|
|
||||||
|
|
||||||
<!--_footer 作为公共模版分离出去-->
|
<!--_footer 作为公共模版分离出去-->
|
||||||
<script type="text/javascript" src="../static/lib/jquery/1.9.1/jquery.min.js"></script>
|
<script type="text/javascript" src="../../../static/lib/jquery/1.9.1/jquery.min.js"></script>
|
||||||
<script type="text/javascript" src="../static/lib/layer/2.4/layer.js"></script>
|
<script type="text/javascript" src="../../../static/lib/layer/2.4/layer.js"></script>
|
||||||
<script type="text/javascript" src="../static/h-ui/js/H-ui.min.js"></script>
|
<script type="text/javascript" src="../../../static/h-ui/js/H-ui.min.js"></script>
|
||||||
<script type="text/javascript" src="../static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
|
<script type="text/javascript" src="../../../static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
|
||||||
|
|
||||||
<!--请在下方写此页面业务相关的脚本-->
|
<!--请在下方写此页面业务相关的脚本-->
|
||||||
<script type="text/javascript" src="../static/lib/My97DatePicker/4.8/WdatePicker.js"></script>
|
<script type="text/javascript" src="../../../static/lib/My97DatePicker/4.8/WdatePicker.js"></script>
|
||||||
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
|
<script type="text/javascript" src="../../../static/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
|
||||||
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/validate-methods.js"></script>
|
<script type="text/javascript" src="../../../static/lib/jquery.validation/1.14.0/validate-methods.js"></script>
|
||||||
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/messages_zh.js"></script>
|
<script type="text/javascript" src="../../../static/lib/jquery.validation/1.14.0/messages_zh.js"></script>
|
||||||
|
|
||||||
<!--多选框-->
|
<!--多选框-->
|
||||||
<script src="../static/xmSelect/js/xm-select.js"></script>
|
<script src="../../../static/xmSelect/js/xm-select.js"></script>
|
||||||
<!-- 引入layui.js -->
|
<!-- 引入layui.js -->
|
||||||
<script scr="https://www.layuicdn.com/layui-v2.5.6/layui.js"></script>
|
<script scr="https://www.layuicdn.com/layui-v2.5.6/layui.js"></script>
|
||||||
|
|
||||||
|
@ -203,29 +203,6 @@
|
||||||
$('#form-create tbody').append(element)
|
$('#form-create tbody').append(element)
|
||||||
});
|
});
|
||||||
|
|
||||||
function getItem() {
|
|
||||||
let result = new Array();
|
|
||||||
|
|
||||||
var ids = xmSelect.batch(null, 'getValue', 'value');
|
|
||||||
|
|
||||||
let nums = new Array();
|
|
||||||
$("input[name='count']").each(function(){
|
|
||||||
nums.push($(this).val());
|
|
||||||
});
|
|
||||||
if (ids.length != nums.length){
|
|
||||||
alert("道具参数错误,请删除道具重新添加");
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let i = 0; i < ids.length; i++) {
|
|
||||||
let info = new Array();
|
|
||||||
info.push(ids[i]);
|
|
||||||
info.push(nums[i]);
|
|
||||||
result.push(info);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
function upsertMission() {
|
function upsertMission() {
|
||||||
// ID
|
// ID
|
||||||
let activityId = document.getElementById("activityId").value;
|
let activityId = document.getElementById("activityId").value;
|
|
@ -9,19 +9,19 @@
|
||||||
<meta name="viewport"
|
<meta name="viewport"
|
||||||
content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
|
content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
|
||||||
<meta http-equiv="Cache-Control" content="no-siteapp"/>
|
<meta http-equiv="Cache-Control" content="no-siteapp"/>
|
||||||
<link rel="Bookmark" href="../favicon.ico"/>
|
<link rel="Bookmark" href="../../favicon.ico"/>
|
||||||
<link rel="Shortcut Icon" href="../favicon.ico"/>
|
<link rel="Shortcut Icon" href="../../favicon.ico"/>
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
<script type="text/javascript" src="../static/lib/html5shiv.js"></script>
|
<script type="text/javascript" src="../../../static/lib/html5shiv.js"></script>
|
||||||
<script type="text/javascript" src="../static/lib/respond.min.js"></script>
|
<script type="text/javascript" src="../../../static/lib/respond.min.js"></script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
<link rel="stylesheet" type="text/css" href="../static/h-ui/css/H-ui.min.css"/>
|
<link rel="stylesheet" type="text/css" href="../../../static/h-ui/css/H-ui.min.css"/>
|
||||||
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/H-ui.admin.css"/>
|
<link rel="stylesheet" type="text/css" href="../../../static/h-ui.admin/css/H-ui.admin.css"/>
|
||||||
<link rel="stylesheet" type="text/css" href="../static/lib/Hui-iconfont/1.0.8/iconfont.css"/>
|
<link rel="stylesheet" type="text/css" href="../../../static/lib/Hui-iconfont/1.0.8/iconfont.css"/>
|
||||||
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/skin/default/skin.css" id="skin"/>
|
<link rel="stylesheet" type="text/css" href="../../../static/h-ui.admin/skin/default/skin.css" id="skin"/>
|
||||||
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/style.css"/>
|
<link rel="stylesheet" type="text/css" href="../../../static/h-ui.admin/css/style.css"/>
|
||||||
<!--[if IE 6]>
|
<!--[if IE 6]>
|
||||||
<script type="text/javascript" src="../static/lib/DD_belatedPNG_0.0.8a-min.js"></script>
|
<script type="text/javascript" src="../../../static/lib/DD_belatedPNG_0.0.8a-min.js"></script>
|
||||||
<script>DD_belatedPNG.fix('*');</script>
|
<script>DD_belatedPNG.fix('*');</script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
<!--/meta 作为公共模版分离出去-->
|
<!--/meta 作为公共模版分离出去-->
|
||||||
|
@ -110,19 +110,19 @@
|
||||||
|
|
||||||
|
|
||||||
<!--_footer 作为公共模版分离出去-->
|
<!--_footer 作为公共模版分离出去-->
|
||||||
<script type="text/javascript" src="../static/lib/jquery/1.9.1/jquery.min.js"></script>
|
<script type="text/javascript" src="../../../static/lib/jquery/1.9.1/jquery.min.js"></script>
|
||||||
<script type="text/javascript" src="../static/lib/layer/2.4/layer.js"></script>
|
<script type="text/javascript" src="../../../static/lib/layer/2.4/layer.js"></script>
|
||||||
<script type="text/javascript" src="../static/h-ui/js/H-ui.min.js"></script>
|
<script type="text/javascript" src="../../../static/h-ui/js/H-ui.min.js"></script>
|
||||||
<script type="text/javascript" src="../static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
|
<script type="text/javascript" src="../../../static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
|
||||||
|
|
||||||
<!--请在下方写此页面业务相关的脚本-->
|
<!--请在下方写此页面业务相关的脚本-->
|
||||||
<script type="text/javascript" src="../static/lib/My97DatePicker/4.8/WdatePicker.js"></script>
|
<script type="text/javascript" src="../../../static/lib/My97DatePicker/4.8/WdatePicker.js"></script>
|
||||||
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
|
<script type="text/javascript" src="../../../static/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
|
||||||
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/validate-methods.js"></script>
|
<script type="text/javascript" src="../../../static/lib/jquery.validation/1.14.0/validate-methods.js"></script>
|
||||||
<script type="text/javascript" src="../static/lib/jquery.validation/1.14.0/messages_zh.js"></script>
|
<script type="text/javascript" src="../../../static/lib/jquery.validation/1.14.0/messages_zh.js"></script>
|
||||||
|
|
||||||
<!--多选框-->
|
<!--多选框-->
|
||||||
<script src="../static/xmSelect/js/xm-select.js"></script>
|
<script src="../../../static/xmSelect/js/xm-select.js"></script>
|
||||||
|
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
$(function () {
|
$(function () {
|
Loading…
Reference in New Issue