Commit f4d3b89d by manxiaoqiang

new

parent 3d4efbb5
package com.reyun.context;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Service;
/**
* Created by nolan on 08/11/2016.
* description:
*/
@Service
public class AppUtils implements ApplicationContextAware {
private static ApplicationContext applicationContext = null;
public static ApplicationContext getApplicationContext() {
return AppUtils.applicationContext;
}
@Override
public void setApplicationContext(ApplicationContext applicationContext) {
AppUtils.applicationContext = applicationContext;
}
}
package com.reyun.controller;
import com.reyun.model.Account;
import com.reyun.repository.AccountRepository;
import com.reyun.security.TokenManager;
import com.reyun.security.annotation.CurrentAccount;
import com.reyun.service.LoginService;
import com.reyun.util.ResultModel;
import com.reyun.util.ResultStatus;
import com.reyun.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
@RequestMapping("account")
public class AccountController {
@Autowired
AccountRepository accountRepository;
@Autowired
LoginService loginService;
@Autowired
TokenManager tokenManager;
@RequestMapping(value = "register", method = RequestMethod.POST)
@ResponseBody
public ResultModel register(HttpServletResponse response,
@RequestBody Account account) {
return ResultModel.OK(loginService.save(account));
}
@RequestMapping(value = "find/{id}", method = RequestMethod.GET)
@ResponseBody
public ResultModel findone(HttpServletResponse response,
@PathVariable Long id) {
return ResultModel.OK(accountRepository.findOne(id));
}
/**
* 查询账户详情和登陆日志
*/
@RequestMapping(value = "detail", method = RequestMethod.GET)
@ResponseBody
public ResultModel findAccountAndLog(@CurrentAccount Account loginAccount) {
return ResultModel.OK(loginService.findAccountDetailAndLog(loginAccount));
}
/**
* 更新账户基本信息
*/
@RequestMapping(value = "updateBase", method = RequestMethod.PUT)
@ResponseBody
public ResultModel updateAccountInfo(HttpServletRequest request, @CurrentAccount Account loginAccount, @RequestBody Account updateAccount) {
updateAccount.setId(loginAccount.getId());
updateAccount.setEmail(loginAccount.getEmail());
return ResultModel.OK(loginService.updateAccountInfo(updateAccount, request));
}
/**
* 更新账户密码
*/
@RequestMapping(value = "updatePwd", method = RequestMethod.PUT)
@ResponseBody
public ResultModel updateAccountPwd(@CurrentAccount Account loginAccount, @RequestParam String newPassword,
@RequestParam String oldPassword) {
if (StringUtil.isEmpty(newPassword) || StringUtil.isEmpty(oldPassword) || oldPassword.equals(newPassword)) {
return ResultModel.OK(0);
} else {
ResultStatus resultStatus = loginService.updateAccountPwd(newPassword, oldPassword, loginAccount);
return new ResultModel(resultStatus.getCode(),resultStatus.getMessage(),1);
}
}
}
package com.reyun.controller;
import com.reyun.model.Account;
import com.reyun.security.annotation.CurrentAccount;
import com.reyun.service.AppService;
import com.reyun.util.ResultModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import java.io.IOException;
/**
* Created by nolan on 22/12/2016.
* description:
*/
@Controller
@RequestMapping("app")
public class AppController {
@Autowired
private AppService appService;
@RequestMapping(value = "findall", method = RequestMethod.GET)
@ResponseBody
public ResultModel findAll(@CurrentAccount Account loginAccount) {
System.out.print(loginAccount.getId());
return ResultModel.OK(appService.listAppByAccount(loginAccount.getId()));
}
@RequestMapping(value = "find/{subAccountId}/AuthApp", method = RequestMethod.GET)
@ResponseBody
public ResultModel findAuthApp(@CurrentAccount Account loginAccount, @PathVariable Long subAccountId){
return ResultModel.OK(appService.listAuthAppByAccount(loginAccount, subAccountId));
}
}
package com.reyun.controller;
import com.reyun.model.Account;
import com.reyun.model.Event4Web;
import com.reyun.model.VirtualEvent;
import com.reyun.security.annotation.CurrentAccount;
import com.reyun.service.EventService;
import com.reyun.service.VirtualEventService;
import com.reyun.util.ResultModel;
import org.json.JSONException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* Created by nolan on 22/12/2016. description:
*/
@Controller
@RequestMapping("{app}/event")
public class EventController {
@Autowired
EventService eventService;
@Autowired
private VirtualEventService virtualService;
@RequestMapping(value = "find/param", method = RequestMethod.GET)
@ResponseBody
public ResultModel findAll(@PathVariable Long app, @RequestParam String names, @RequestParam(required = false) String params) throws JSONException {
return ResultModel.OK(eventService.listAllNew(app, names, params));
}
@RequestMapping(value = "find/value/one", method = RequestMethod.GET)
@ResponseBody
public ResultModel findOneValue(@PathVariable Long app, @RequestParam String eventname, @RequestParam String attrname) {
return ResultModel.OK(eventService.listAllValue(app, eventname, attrname));
}
@RequestMapping(value = "find/value/attr", method = RequestMethod.GET)
@ResponseBody
public ResultModel findOneValueByAttr(@PathVariable Long app, @RequestParam String attrName) {
return ResultModel.OK(eventService.listAllValueByAttr(app, attrName));
//return ResultModel.OK(eventService.listAllValueByAttrTop50(app, attrName));
}
@RequestMapping(value = "find/value/attrs", method = RequestMethod.GET)
@ResponseBody
public ResultModel findOneValueByAttrs(@PathVariable Long app, @RequestParam String attrNames) {
return ResultModel.OK(eventService.listAllValueByAttrs(app, attrNames));
}
@RequestMapping(value = "find/value", method = RequestMethod.GET)
@ResponseBody
public ResultModel findAllValue(@PathVariable Long app) {
return ResultModel.OK(eventService.listValues(app));
}
@RequestMapping(value = "find/allAttr", method = RequestMethod.GET)
@ResponseBody
public ResultModel findAllAttr( @PathVariable Long app) {
return ResultModel.OK(eventService.listAllAttr(app));
}
@RequestMapping(value = "find/group/properties", method = RequestMethod.GET)
@ResponseBody
public ResultModel findGroupAttributes(@PathVariable Long app) {
return ResultModel.OK(eventService.listAllAttributes(app));}
@RequestMapping(value = "find/common/properties", method = RequestMethod.GET)
@ResponseBody
public ResultModel findCommonProperties(@PathVariable Long app) {
//return ResultModel.OK(eventService.listCommonProperties(app, "event"));
return ResultModel.OK(eventService.listAllEventAttributesTop50(app, "event"));
}
@ResponseBody
@RequestMapping(value = "find", method = RequestMethod.GET)
public ResultModel findAllEvent(@PathVariable Long app) {
return ResultModel.OK(eventService.listAllEvent(app));
}
@ResponseBody
@RequestMapping(value = "find/callback", method = RequestMethod.GET)
public ResultModel findAllEventToCallback(@PathVariable Long app) {
return ResultModel.OK(eventService.listAllEventToCallback(app));
}
@ResponseBody
@RequestMapping(value = "findOne", method = RequestMethod.GET)
public ResultModel findOneEventAttr(@PathVariable Long app, @RequestParam String eventName) {
//eventService.listAllAttr(app);
return ResultModel.OK();
}
@ResponseBody
@RequestMapping(value = "find/virtual", method = RequestMethod.GET)
public ResultModel findAllEvent(@PathVariable Long app, @CurrentAccount Account account) {
List<Event4Web> event4Webs = eventService.listAllEvent(app);
List<VirtualEvent> eventList = virtualService.findEventList(app, account);
Event4Web event4Web = null;
for (VirtualEvent virtualEvent : eventList) {
if (virtualEvent.isEnable() || virtualEvent.getType().equals("active")) {
event4Web = new Event4Web();
event4Web.setEventNameAlias(virtualEvent.getCh_name());
event4Web.setEventName(virtualEvent.getName());
event4Web.setEventNumber(0);
event4Web.setStatus(true);
event4Web.setVirtual(true);
event4Webs.add(event4Web);
}
}
return ResultModel.OK(event4Webs);
}
}
package com.reyun.controller;
import com.reyun.model.Account;
import com.reyun.security.annotation.CurrentAccount;
import com.reyun.service.ComplicateEventsService;
import com.reyun.service.EventStatsService;
import com.reyun.util.ResultModel;
import com.reyun.util.ResultStatus;
import com.reyun.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
/**
* Created by sunhao on 17/4/10.
*
*/
@Service
@RequestMapping("eventstats")
public class EventStatsController {
@Autowired
private ComplicateEventsService complicateEventsService;
@RequestMapping(value = "complicated/query/{appId}", method = RequestMethod.GET)
@ResponseBody
public ResultModel queryComplicatedEvent(HttpServletRequest httpServletRequest, @CurrentAccount Account account,
@PathVariable Long appId) {
String startDate = httpServletRequest.getParameter("startdate");
String endDate = httpServletRequest.getParameter("enddate");
String eventCondition = httpServletRequest.getParameter("eventCondition");
String viewFlag = httpServletRequest.getParameter("viewflag");
if (!StringUtil.isEmpty(eventCondition) && !StringUtil.isEmpty(startDate) && !StringUtil.isEmpty(endDate)) {
return ResultModel.OK(complicateEventsService.queryComplicatedEvent(appId, account.getId(), startDate, endDate,
eventCondition, viewFlag));
} else {
return ResultModel.ERROR(ResultStatus.PARAM_INVALID);
}
}
@RequestMapping(value = "complicated/query/total/{appId}", method = RequestMethod.GET)
@ResponseBody
public ResultModel queryDistinctTotal(HttpServletRequest httpServletRequest, @CurrentAccount Account account,
@PathVariable Long appId) {
String startDate = httpServletRequest.getParameter("startdate");
String endDate = httpServletRequest.getParameter("enddate");
String eventCondition = httpServletRequest.getParameter("eventCondition");
String viewFlag = httpServletRequest.getParameter("viewflag");
if (!StringUtil.isEmpty(eventCondition) && !StringUtil.isEmpty(startDate) && !StringUtil.isEmpty(endDate)) {
return ResultModel.OK(complicateEventsService.queryDistinctTotalData(appId, account.getId(), startDate, endDate,
eventCondition, viewFlag));
} else {
return ResultModel.ERROR(ResultStatus.PARAM_INVALID);
}
}
}
package com.reyun.controller;
import com.reyun.model.App;
import com.reyun.model.ComplicatedParam;
import com.reyun.model.EventAttr4Web;
import com.reyun.service.AppService;
import com.reyun.service.EventService;
import com.reyun.service.ExpressionService;
import com.reyun.util.ResultModel;
import com.reyun.util.ResultStatus;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("expression")
public class ExpressionController {
@Autowired
private ExpressionService expressionService;
@Autowired
private EventService eventService;
@Autowired
private AppService appService;
@ResponseBody
@RequestMapping(value = "transform", method = RequestMethod.POST)
public ResultModel transform(@RequestBody String param) {
// System.out.println(param);
JSONObject jsonObject = JSONObject.fromObject(param);
String expression = jsonObject.get("expression").toString();
String appKey = jsonObject.get("appkey").toString();
long appId = Long.parseLong(appKey);
App byId = this.appService.findById(appId);
appKey = byId.getAppkey();
// boolean isValidate = expressionService.validateOriginalExpression(expression, appKey);
String mid = expressionService.originalExpressionToMidExp(expression, appKey);
if (mid == null) {
return ResultModel.ERROR(ResultStatus.EXP_INVALID);
} else {
return ResultModel.OK(mid);
}
}
@ResponseBody
@RequestMapping(value = "properties/{event}/{appId}", method = RequestMethod.GET)
public ResultModel properties(@PathVariable String event, @PathVariable Long appId) {
List<EventAttr4Web> eventAttributeMetas = eventService.listAllEventAttribute(event, appId);
return ResultModel.OK(eventAttributeMetas);
}
@ResponseBody
@RequestMapping(value = "viewList", method = RequestMethod.GET)
public ResultModel operations() {
List<ComplicatedParam> allEventViewAttr = eventService.findAllComplicatedPatram();
List<ComplicatedParam> eventViewList = new ArrayList<>(allEventViewAttr.size());
List<ComplicatedParam> attrViewList = new ArrayList<>(allEventViewAttr.size());
for (ComplicatedParam complicatedParam : allEventViewAttr) {
switch (complicatedParam.getAttrLevel()) {
case 1:
eventViewList.add(complicatedParam);
continue;
case 2:
attrViewList.add(complicatedParam);
continue;
}
}
Map<String, Object> stringObjectMap = new HashMap<>(2);
stringObjectMap.put("eventViewList", eventViewList);
stringObjectMap.put("attrViewList", attrViewList);
return ResultModel.OK(stringObjectMap);
}
}
package com.reyun.controller;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.reyun.model.Account;
import com.reyun.security.annotation.CurrentAccount;
import com.reyun.service.FunnelService;
import com.reyun.util.ResultModel;
import com.reyun.util.ResultStatus;
import com.reyun.util.StringUtil;
@Controller
@RequestMapping("/funnel")
public class FunnelController {
protected Logger logger = LoggerFactory
.getLogger(FunnelController.class);
@Autowired
FunnelService funnelService;
@RequestMapping(value = "find/{app}", method = RequestMethod.GET)
@ResponseBody
public ResultModel list(HttpServletRequest request,
@CurrentAccount Account account, @PathVariable Long app) {
return ResultModel.OK(funnelService.findByApp(app));
}
@RequestMapping(value = "report/{funnel}", method = RequestMethod.GET)
@ResponseBody
public ResultModel reportChart(HttpServletRequest request,
@PathVariable Long funnel, @CurrentAccount Account loginAccount) {
String startDate = request.getParameter("startdate");
String endDate = request.getParameter("enddate");
String usergroupStr = request.getParameter("usergroupid");
String dimentionStr = request.getParameter("dimention");
boolean isList = request.getParameter("datatype")==null?false:"list".equals(request.getParameter("datatype"))?true:false;
String isDeviceStr = request.getParameter("isdevice");
String eventType = request.getParameter("eventType");
boolean isProfile=false;
if(!StringUtils.isEmpty(eventType) && "profile".equals(eventType)){
isProfile=true;
}
boolean isDevice = StringUtil.isEmpty(isDeviceStr)?false:"true".equals(isDeviceStr)?true:false;
Map<String, List> result = funnelService.funnelReport(funnel, startDate, endDate, usergroupStr, isList, dimentionStr, loginAccount, isDevice,isProfile);
if (result.isEmpty()) {
return ResultModel.ERROR(ResultStatus.NETWORK_ERROR);
} else {
return ResultModel.OK(result);
}
}
}
package com.reyun.dic;
/**
* Created by sunhao on 17/8/1.
* desc:app平台类型
*/
public enum AppPlatformEnum {
ANDROID("Android","安卓"),
IOS("iOS","iOS"),
H5("H5","h5");
private String key;
private String value;
AppPlatformEnum(String key, String value) {
this.key = key;
this.value = value;
}
public String getKey() {
return key;
}
public String getValue() {
return value;
}
}
package com.reyun.dic;
/**
* Created by nolan on 21/02/2017.
* description:
*/
public enum ChannelCategoryEnumType {
ADVERTISING("ADVERTISING", ""),
APPMARKET("APPMARKET", "分包");
private String key;
private String value;
ChannelCategoryEnumType(String key, String value) {
this.key = key;
this.value = value;
}
public String getKey() {
return key;
}
public String getValue() {
return value;
}
}
package com.reyun.dic;
import com.reyun.exception.TipException;
/**
* description:
*
* @author nolan
* @date 18/10/2017
*/
public enum ChannelEnumType
{
GDT("gdt"),
SM("smsearch"),
ADWORDS("adwords");
private String uniqueName;
ChannelEnumType(String uniqueName)
{
this.uniqueName = uniqueName;
}
public static ChannelEnumType getEnumType(String abbr)
{
for (ChannelEnumType channelEnumType : ChannelEnumType.values()) {
if (channelEnumType.getUniqueName().equals(abbr)) {
return channelEnumType;
}
}
throw new TipException("[" + abbr + "]渠道枚举暂未定义");
}
public String getUniqueName()
{
return uniqueName;
}
}
package com.reyun.dic;
/**
* Created by sunhao on 17/3/6.
* 配置表KEY字段字典
*/
public enum ConfigEnumType {
MASTER_PWD_PREFIX("master_pwd_prefix","万能密码前缀"),
SM_CLIENT_ID("client_id","神马应用ID"),
SM_CLIENT_SECRET("client_secret","神马应用密匙"),
SM_REDIRECT_URI("redirect_uri","神马重定向"),
DOWNLOAD_FILE_PATH("download_file_path","下载文件地址"),
SERVER_REGED_DOWNLOAD_URL("reged_download_url", "注册"),
SERVER_INSTALL_DOWNLOAD_URL("install_download_url", "激活"),
SERVER_CLICK_DOWNLOAD_URL("click_download_url", "点击"),
SERVER_BLACKLIST_DOWNLOAD_URL("blacklist_download_url", "黑名单"),
OPENAPI_TOKEN("OPENAPI_TOKEN", "对外开放接口TOKEN");
private String key;
private String value;
ConfigEnumType(String key, String value) {
this.key = key;
this.value = value;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
package com.reyun.dic;
/**
* Created by sunhao on 17/4/24.
* desc:看单表单类型,事件分析,漏斗,留存
*/
public enum CustomMenuType {
EVENT_STATS("eventstats","事件分析"),
FUNNEL("funnel","漏斗"),
RETENTION("retention","留存");
private String key;
private String value;
CustomMenuType(String key, String value) {
this.key = key;
this.value = value;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
package com.reyun.dic;
/**
* Created by nolan on 29/12/2016.
* description:
*/
public enum DataViewEnumType {
DATE("date", "日期"),
CAMPAIGN("campaign", "活动"),
CAMPAIGN_DATE("campaigndate", "活动和日期"),
CAMPAIGNGROUP("campgroup", "活动组"),
CHANNEL("channel", "渠道"),
SUBCHANNEL("subchannel", "子渠道"),
BDKEYWORD("bdkeyword", "百度关键词"),
SUBACCOUNT("subaccount","子账户"),
CAMPAIGN_H5("campaign_h5","H5监测活动");
private String code;
private String name;
DataViewEnumType(String code, String name) {
this.code = code;
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package com.reyun.dic;
/**
* Created by nolan on 04/01/2017.
* description:
*/
public enum DivEnumType {
ALL("all", "所有"),
CAMPAIGN("campaign", "推广活动"),
CAMPAIGN_GROUP("campgroup", "推广活动组"),
CHANNEL("channel", "渠道"),
BACKFLOW("backflow", "回流"),
USERGROUP("usergroup", "用户组");
String code;
String name;
DivEnumType(String code, String name) {
this.code = code;
this.name = name;
}
public String getCode() {
return code;
}
public String getName() {
return name;
}
}
package com.reyun.dic;
/**
* Created by nolan on 04/01/2017.
* description:
*/
public enum DownloadEnumType {
INSTALL("install", "激活"),
REGED("reged", "注册"),
PAY("pay", "付费"),
BACKFLOW("backflow", "回流"),
USERGROUP("usergroup", "用户群");
String code;
String name;
DownloadEnumType(String code, String name) {
this.code = code;
this.name = name;
}
public String getCode() {
return code;
}
public String getName() {
return name;
}
}
package com.reyun.dic;
/**
* Created by nolan on 04/01/2017.
* description:
*/
public enum DownloadStatusEnumType {
INIT("init", "等待下载"),
DOWNLOADING("downloading", "正在下载"),
COMPLETE("complete", "下载完成"),
FAILED("failed", "下载失败"),
INVALID("invalid","文件失效");
String code;
String name;
DownloadStatusEnumType(String code, String name) {
this.code = code;
this.name = name;
}
public String getCode() {
return code;
}
public String getName() {
return name;
}
}
package com.reyun.dic;
/**
* Created by zxy on 17/4/27.
* 报表结果导出时候,需要根据不同功能进行不同的处理.枚举功能类型.
*/
public enum FunctionEnumType {
FUNNEL("funnel","漏斗"),
CUSTOMRETENTION("customretention","自定义留存"),
DETAILCUSTOMRETENTION("detailcustomretention","自定义留存明细"),
COMMONRETENTION("commonretention","固定留存"),
EVENTSTATS("eventstats", "事件"),
COMPLICATED_EVENTS("complicatedevents", "复杂事件"),
REPORT("normal", "普通");
private String key;
private String value;
FunctionEnumType(String key, String value) {
this.key = key;
this.value = value;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
package com.reyun.exception;
import com.reyun.util.ResultModel;
import com.reyun.util.ResultStatus;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
/**
* Created by nolan on 18/11/2016.
* description:
*/
@ControllerAdvice
public class GlobalExceptionAdvice {
private Logger logger = LoggerFactory.getLogger(GlobalExceptionAdvice.class);
@ExceptionHandler(TransferCurrentAccountException.class)
public ResponseEntity<ResultModel> handleTransferCurrentAccountException(TransferCurrentAccountException ex) {
logger.error("handleTransferCurrentAccountException......", ex);
// ex.printStackTrace();
return new ResponseEntity<ResultModel>(ResultModel.ERROR(ResultStatus.USERNAME_LOGIN_EXPIRE), HttpStatus.OK);
}
@ExceptionHandler(TipException.class)
public ResponseEntity<ResultModel> handleTipException(TipException ex) {
logger.error("handleTipException......", ex);
ex.printStackTrace();
return new ResponseEntity<ResultModel>(new ResultModel(-999, ex.getMessage()), HttpStatus.OK);
}
@ExceptionHandler(RuntimeException.class)
public ResponseEntity<ResultModel> handleRuntimeException(RuntimeException ex) {
logger.error("handleRuntimeException......", ex);
ex.printStackTrace();
return new ResponseEntity<ResultModel>(new ResultModel(-999, ex.getMessage()), HttpStatus.EXPECTATION_FAILED);
}
@ExceptionHandler(Exception.class)
public ResponseEntity<ResultModel> handleAllException(Exception ex) {
logger.error("handleAllException......", ex);
ex.printStackTrace();
return new ResponseEntity<ResultModel>(new ResultModel(-999, ex.getMessage()), HttpStatus.EXPECTATION_FAILED);
}
}
package com.reyun.model;
import java.math.BigInteger;
public class AccountRestrict4Web {
private String packageName;
private String originalName;
private BigInteger IOLimit;
private String pastDate;
private BigInteger TrackLimit;
private Long accountId;
private int priceLevel;
private int iOremainingDays;
private int trackRemainingDays;
private BigInteger TrackTotalFlow;
private BigInteger thisMonthIOFlow;
private Double trackRemainPercent;
private Double IORemainPercent;
private BigInteger lastMonthIOFlow;
private Boolean isFlowRestrict;
private Long packLevel;
private Boolean isTrackPastTimeNotified;
private Boolean isIOPastTimeNotified;
private Boolean isTrackFlowNotified;
private Boolean isIOFlowNotified;
private Boolean allowBehavior;
public Long getPackLevel() {
return packLevel;
}
public void setPackLevel(Long packLevel) {
this.packLevel = packLevel;
}
public Boolean getFlowRestrict() {
return isFlowRestrict;
}
public void setFlowRestrict(Boolean flowRestrict) {
isFlowRestrict = flowRestrict;
}
public String getPackageName() {
return packageName;
}
public void setPackageName(String packageName) {
this.packageName = packageName;
}
public String getOriginalName() {
return originalName;
}
public void setOriginalName(String originalName) {
this.originalName = originalName;
}
public BigInteger getIOLimit() {
return IOLimit;
}
public void setIOLimit(BigInteger IOLimit) {
this.IOLimit = IOLimit;
}
public String getPastDate() {
return pastDate;
}
public void setPastDate(String pastDate) {
this.pastDate = pastDate;
}
public BigInteger getTrackLimit() {
return TrackLimit;
}
public void setTrackLimit(BigInteger trackLimit) {
TrackLimit = trackLimit;
}
public Long getAccountId() {
return accountId;
}
public void setAccountId(Long accountId) {
this.accountId = accountId;
}
public int getPriceLevel() {
return priceLevel;
}
public void setPriceLevel(int priceLevel) {
this.priceLevel = priceLevel;
}
public int getiOremainingDays() {
return iOremainingDays;
}
public void setiOremainingDays(int iOremainingDays) {
this.iOremainingDays = iOremainingDays;
}
public int getTrackRemainingDays() {
return trackRemainingDays;
}
public void setTrackRemainingDays(int trackRemainingDays) {
this.trackRemainingDays = trackRemainingDays;
}
public BigInteger getTrackTotalFlow() {
return TrackTotalFlow;
}
public void setTrackTotalFlow(BigInteger trackTotalFlow) {
TrackTotalFlow = trackTotalFlow;
}
public BigInteger getThisMonthIOFlow() {
return thisMonthIOFlow;
}
public void setThisMonthIOFlow(BigInteger thisMonthIOFlow) {
this.thisMonthIOFlow = thisMonthIOFlow;
}
public Double getTrackRemainPercent() {
return trackRemainPercent;
}
public void setTrackRemainPercent(Double trackRemainPercent) {
this.trackRemainPercent = trackRemainPercent;
}
public Double getIORemainPercent() {
return IORemainPercent;
}
public void setIORemainPercent(Double IORemainPercent) {
this.IORemainPercent = IORemainPercent;
}
public BigInteger getLastMonthIOFlow() {
return lastMonthIOFlow;
}
public void setLastMonthIOFlow(BigInteger lastMonthIOFlow) {
this.lastMonthIOFlow = lastMonthIOFlow;
}
public Boolean getTrackPastTimeNotified() {
return isTrackPastTimeNotified;
}
public void setTrackPastTimeNotified(Boolean trackPastTimeNotified) {
isTrackPastTimeNotified = trackPastTimeNotified;
}
public Boolean getIOPastTimeNotified() {
return isIOPastTimeNotified;
}
public void setIOPastTimeNotified(Boolean IOPastTimeNotified) {
isIOPastTimeNotified = IOPastTimeNotified;
}
public Boolean getTrackFlowNotified() {
return isTrackFlowNotified;
}
public void setTrackFlowNotified(Boolean trackFlowNotified) {
isTrackFlowNotified = trackFlowNotified;
}
public Boolean getIOFlowNotified() {
return isIOFlowNotified;
}
public void setIOFlowNotified(Boolean IOFlowNotified) {
isIOFlowNotified = IOFlowNotified;
}
public Boolean getAllowBehavior() {
return allowBehavior;
}
public void setAllowBehavior(Boolean allowBehavior) {
this.allowBehavior = allowBehavior;
}
}
package com.reyun.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import java.util.Date;
@Entity
public class App {
private Long id;
@NotNull
private String name;
private String platform;
private String appGenre;
private String appGenreName;
private String gameGenre;
//private String gameCategory;
private String appkey;
private String url;
private Long account;
// private boolean sync;
// private boolean isActive;
private Long origiApp;
private String bundleid;
private String token;
private String installtoken;
private boolean regedbutton;
private Date createTime = new Date();
private String createAccount;
private Date modifyTime = new Date();
private String modifyAccount;
private Boolean delFlag;
//是否同步DDB
// private Boolean syncDdb;
private Long installNum;
private Long registerNum;
//是够是debug模式 true 是测试,false不是测试
private Boolean isDebug;
private Boolean ioExhaust;
private Boolean mainAccountExpire;
public App() {
super();
}
public App(String name, String platform, String appGenre, String gameGenre) {
this.name = name;
this.platform = platform;
this.appGenre = appGenre;
this.gameGenre = gameGenre;
}
public App(String name, String platform, String appGenre, String gameGenre,
Long account) {
this.name = name;
this.platform = platform;
this.appGenre = appGenre;
this.gameGenre = gameGenre;
this.account = account;
}
// public boolean isActive() {
// return isActive;
// }
//
// public void setActive(boolean isActive) {
// this.isActive = isActive;
// }
public Long getAccount() {
return account;
}
public String getAppGenre() {
return appGenre;
}
@Transient
public String getAppGenreName() {
return appGenreName;
}
public void setAppGenreName(String appGenreName) {
this.appGenreName = appGenreName;
}
public String getAppkey() {
return appkey;
}
public String getGameGenre() {
return gameGenre;
}
/* @Transient
public String getGameCategory() {
return gameCategory;
}
public void setGameCategory(String gameCategory) {
this.gameCategory = gameCategory;
}*/
@Id
@GeneratedValue
public Long getId() {
return id;
}
public String getName() {
return name;
}
public String getPlatform() {
return platform;
}
public String getUrl() {
return url;
}
public void setAccount(Long account) {
this.account = account;
}
public void setAppGenre(String appGenre) {
this.appGenre = appGenre;
}
public void setAppkey(String appkey) {
this.appkey = appkey;
}
public void setGameGenre(String gameGenre) {
this.gameGenre = gameGenre;
}
public void setId(Long id) {
this.id = id;
}
public void setName(String name) {
this.name = name;
}
public void setPlatform(String platform) {
this.platform = platform;
}
public void setUrl(String url) {
this.url = url;
}
public Long getOrigiApp() {
return origiApp;
}
public void setOrigiApp(Long origiApp) {
this.origiApp = origiApp;
}
public String getBundleid() {
return bundleid;
}
public void setBundleid(String bundleid) {
this.bundleid = bundleid;
}
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
public boolean isRegedbutton() {
return regedbutton;
}
public void setRegedbutton(boolean regedbutton) {
this.regedbutton = regedbutton;
}
public String getInstalltoken() {
return installtoken;
}
public void setInstalltoken(String installtoken) {
this.installtoken = installtoken;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateAccount() {
return createAccount;
}
public void setCreateAccount(String createAccount) {
this.createAccount = createAccount;
}
public Date getModifyTime() {
return modifyTime;
}
public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
public String getModifyAccount() {
return modifyAccount;
}
public void setModifyAccount(String modifyAccount) {
this.modifyAccount = modifyAccount;
}
public Boolean getDelFlag() {
return delFlag;
}
public void setDelFlag(Boolean delFlag) {
this.delFlag = delFlag;
}
public Boolean getIsDebug() {
return this.isDebug;
}
public void setIsDebug(Boolean isDebug) {
this.isDebug = isDebug;
}
@Transient
public Boolean getIoExhaust()
{
return ioExhaust;
}
public void setIoExhaust(Boolean ioExhaust)
{
this.ioExhaust = ioExhaust;
}
@Transient
public Boolean getMainAccountExpire() {
return mainAccountExpire;
}
public void setMainAccountExpire(Boolean mainAccountExpire) {
this.mainAccountExpire = mainAccountExpire;
}
@Transient
public Long getInstallNum() {
return installNum;
}
public void setInstallNum(Long installNum) {
this.installNum = installNum;
}
@Transient
public Long getRegisterNum() {
return registerNum;
}
public void setRegisterNum(Long registerNum) {
this.registerNum = registerNum;
}
@Override
public String toString() {
return "App [id=" + id + ", name=" + name + ", platform=" + platform
+ ", appGenre=" + appGenre + ", gameGenre=" + gameGenre
+ ", appkey=" + appkey + ", url=" + url + ", account="
+ account + ", origiApp=" + origiApp
+ ", bundleid=" + bundleid + ", token=" + token
+ ", installtoken=" + installtoken + ", regedbutton="
+ regedbutton + ", createTime=" + createTime
+ ", createAccount=" + createAccount + ", modifyTime="
+ modifyTime + ", modifyAccount=" + modifyAccount
+ ", delFlag=" + delFlag + "]";
}
}
package com.reyun.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.util.Date;
/**
* Created by song on 2017/9/28.
*/
/**
* 字段说明:
* id:属性id
* attributeName:属性名字
* appKey:appId
* isAllRestrict:是否所有的用户都进行了限制appId
* isRootRestrict:本app所属的母账户下的所有app是否都进行了限制
* isParentRestrict:创建此app的账户所创建的所有的app是否都进行了限制
* isAppRestrict:本app是否进行了限制
* type:属性类型,是事件属性还是用户属性
* isEventRestrict:此种类的属性是否进行了限制
* isProfileRestrict:此种类的属性是否进行了限制
* createTime:创建时间
* modifyTime:修改时间
*
*
* 插入数据说明:
* 1.表中的每一条记录是某一条属性针对某一个app建立的限制条件;
* 2.要限制所有的用户不能使用这个属性分组,那么需要在表中单独插入一条记录,属性名字定义为attributeName,appKey为all,如果所有用户都不能
* 使用本条属性进行分组,那么就把isAllRestrict字段置为true,否则的话置为false,
* 3.如果要对某一个用户下的所有的app的某个属性进行限制,那么需要把这个账户下所有的app查出来,每一个app存一条记录,将isRootRestrict
* 字段置为true;
* 4.如果要对某一个子账户创建的app进行限制,那么就把这个子账户下的所有的app都查出来,每一个app存一条记录,将isParentRestrict字段置为true;
* 5.如果要对某一个app进行限制,那么就将这个app存一条记录,将isAppRestrict字段置为true;
* 6.type字段要区分是事件属性还是用户属性,因为用户属性和事件属性的名字可能相同,因此属性的类型不能为null;
*
* 查询数据说明:
* 1.在查询这个表的时候,应该先查询属性名为attributeName,appKey为all的记录,查询isAllRestrict这个字段的值,
* 如果没有限制,就查询本app所对应的记录,只要isRootRestrict、isParentRestrict、isAppRestrict或者这几个
* 字段有一个字段为true,那么就说明对本属性进行了限制;
*/
@Entity
public class AttributeRestrict {
@Id
@GeneratedValue
private Long id;
private String attributeName;
private String appKey;
private boolean isAllRestrict=false;
private boolean isRootRestrict=false;
private boolean isParentRestrict=false;
private boolean isAppRestrict=false;
private String type;
private boolean isEventRestrict=false;
private boolean isProfileRestrict=false;
private Date createTime=new Date();
private Date modifyTime;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getAttributeName() {
return attributeName;
}
public void setAttributeName(String attributeName) {
this.attributeName = attributeName;
}
public String getAppKey() {
return appKey;
}
public void setAppKey(String appKey) {
this.appKey = appKey;
}
public boolean isAllRestrict() {
return isAllRestrict;
}
public void setAllRestrict(boolean allRestrict) {
isAllRestrict = allRestrict;
}
public boolean isRootRestrict() {
return isRootRestrict;
}
public void setRootRestrict(boolean rootRestrict) {
isRootRestrict = rootRestrict;
}
public boolean isParentRestrict() {
return isParentRestrict;
}
public void setParentRestrict(boolean parentRestrict) {
isParentRestrict = parentRestrict;
}
public boolean isAppRestrict() {
return isAppRestrict;
}
public void setAppRestrict(boolean appRestrict) {
isAppRestrict = appRestrict;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public boolean isEventRestrict() {
return isEventRestrict;
}
public void setEventRestrict(boolean eventRestrict) {
isEventRestrict = eventRestrict;
}
public boolean isProfileRestrict() {
return isProfileRestrict;
}
public void setProfileRestrict(boolean profileRestrict) {
isProfileRestrict = profileRestrict;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getModifyTime() {
return modifyTime;
}
public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
}
package com.reyun.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;
@Entity
public class Auth {
private Long id;
private Long roleCategory;
private String controlAuth;
private Long app;
private Long account;
private boolean retentionAuth;
private boolean payAuth;
private Long createAccount;
private Date createTime;
private Date modifyTime = new Date();
private String modifyAccount;
private Boolean status;
private Boolean isNatureOpen;
private Boolean campaign;
private Boolean topAuth;
//transient
private List<RoleAuthDetail> roleAuthDetailList;
private List<DataAuth> dataAuth;
public Auth() {
super();
}
public Auth(Long id, Long roleCategory, String controlAuth,
Long app, Long account) {
super();
this.id = id;
this.roleCategory = roleCategory;
this.controlAuth = controlAuth;
this.app = app;
this.account = account;
}
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getRoleCategory() {
return roleCategory;
}
public void setRoleCategory(Long roleCategory) {
this.roleCategory = roleCategory;
}
public String getControlAuth() {
return controlAuth;
}
public void setControlAuth(String controlAuth) {
this.controlAuth = controlAuth;
}
public Long getApp() {
return app;
}
public void setApp(Long app) {
this.app = app;
}
public Long getAccount() {
return account;
}
public void setAccount(Long account) {
this.account = account;
}
public boolean isRetentionAuth() {
return retentionAuth;
}
public void setRetentionAuth(boolean retentionAuth) {
this.retentionAuth = retentionAuth;
}
public boolean isPayAuth() {
return payAuth;
}
public void setPayAuth(boolean payAuth) {
this.payAuth = payAuth;
}
public Date getModifyTime() {
return modifyTime;
}
public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
public String getModifyAccount() {
return modifyAccount;
}
public void setModifyAccount(String modifyAccount) {
this.modifyAccount = modifyAccount;
}
public Boolean getStatus() {
return status;
}
public void setStatus(Boolean status) {
this.status = status;
}
public Boolean getIsNatureOpen() {
return isNatureOpen;
}
public void setIsNatureOpen(Boolean isNatureOpen) {
this.isNatureOpen = isNatureOpen;
}
public Boolean getCampaign() {
return campaign;
}
public void setCampaign(Boolean campaign) {
this.campaign = campaign;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Long getCreateAccount() {
return createAccount;
}
public void setCreateAccount(Long createAccount) {
this.createAccount = createAccount;
}
public Boolean getTopAuth() {
return topAuth;
}
public void setTopAuth(Boolean topAuth) {
this.topAuth = topAuth;
}
@Transient
public List<RoleAuthDetail> getRoleAuthDetailList() {
return roleAuthDetailList;
}
public void setRoleAuthDetailList(List<RoleAuthDetail> roleAuthDetailList) {
this.roleAuthDetailList = roleAuthDetailList;
}
@Transient
public List<DataAuth> getDataAuth() {
return dataAuth;
}
public void setDataAuth(List<DataAuth> dataAuth) {
this.dataAuth = dataAuth;
}
@Override
public String toString() {
return "Auth [id=" + id + ", roleCategory=" + roleCategory
+ ", controlAuth=" + controlAuth + ", app=" + app
+ ", account=" + account + ", retentionAuth=" + retentionAuth
+ ", payAuth=" + payAuth + ", modifyTime=" + modifyTime
+ ", modifyAccount=" + modifyAccount + ", status=" + status
+ "]";
}
}
package com.reyun.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
@Entity
public class BussinessMan {
private Long id;
private String name;
private String email;
public BussinessMan() {
super();
}
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
}
package com.reyun.model;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;
@Entity
public class Category {
private Long id;
private int categoryid;
private String categoryname;
private int isgame;
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public int getCategoryid() {
return categoryid;
}
public void setCategoryid(int categoryid) {
this.categoryid = categoryid;
}
public String getCategoryname() {
return categoryname;
}
public void setCategoryname(String categoryname) {
this.categoryname = categoryname;
}
public int getIsgame() {
return isgame;
}
public void setIsgame(int isgame) {
this.isgame = isgame;
}
}
package com.reyun.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;
/**
* Created by sunhao on 17/4/13.
* description: 通用事件
*/
@Entity
public class CommonEvent {
private Long id;
private String event;
private String alias;
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@NotNull
public String getEvent() {
return event;
}
public void setEvent(String event) {
this.event = event;
}
@NotNull
public String getAlias() {
return alias;
}
public void setAlias(String alias) {
this.alias = alias;
}
}
package com.reyun.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.util.Date;
/**
* Created by mxq on 2017/9/11.
*/
@Entity
public class CommonIP {
private Long id;
//账号id
private Long account;
private String ip;
private Long createAccount;
private Date createTime;
private Date modifyTime = new Date();
private Long modifyAccount;
private Boolean delFlag;
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getAccount() {
return account;
}
public void setAccount(Long account) {
this.account = account;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public Long getCreateAccount() {
return createAccount;
}
public void setCreateAccount(Long createAccount) {
this.createAccount = createAccount;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Boolean getDelFlag() {
return delFlag;
}
public void setDelFlag(Boolean delFlag) {
this.delFlag = delFlag;
}
public Date getModifyTime() {
return modifyTime;
}
public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
public Long getModifyAccount() {
return modifyAccount;
}
public void setModifyAccount(Long modifyAccount) {
this.modifyAccount = modifyAccount;
}
}
package com.reyun.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
@Entity
public class CommonParam {
private Long id;
private String param;
private String alias;
private Integer sortId;
/**
* 事件通用属性值为event,用户通用属性值为profile
*/
private String type;
private String dimension;
private String dataType;
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getParam() {
return param;
}
public void setParam(String param) {
this.param = param;
}
public String getAlias() {
return alias;
}
public void setAlias(String alias) {
this.alias = alias;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getDimension() {
return dimension;
}
public void setDimension(String dimension) {
this.dimension = dimension;
}
public Integer getSortId() {
return sortId;
}
public void setSortId(Integer sortId) {
this.sortId = sortId;
}
public String getDataType() {
return dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
}
package com.reyun.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;
/**
* Created by sunhao on 17/9/21.
* 复杂事件操作符
*/
@Entity
public class ComplicatedParam {
private Long id;
//属性名
private String viewAttr;
//属性中文名称
private String viewAttrName;
//属性类型 avg sum
private String attrType;
//属性级别 1,2
private Integer attrLevel;
//有效性
private Boolean valid;
// view出现在哪个类型前面
private String viewType;
public ComplicatedParam(){}
public ComplicatedParam(String viewAttr, String viewAttrName) {
this.viewAttr = viewAttr;
this.viewAttrName = viewAttrName;
}
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getViewAttr() {
return viewAttr;
}
public void setViewAttr(String viewAttr) {
this.viewAttr = viewAttr;
}
public String getViewAttrName() {
return viewAttrName;
}
public void setViewAttrName(String viewAttrName) {
this.viewAttrName = viewAttrName;
}
public String getAttrType() {
return attrType;
}
public void setAttrType(String attrType) {
this.attrType = attrType;
}
public Integer getAttrLevel() {
return attrLevel;
}
public void setAttrLevel(Integer attrLevel) {
this.attrLevel = attrLevel;
}
@NotNull
public Boolean getValid() {
return valid;
}
public void setValid(Boolean valid) {
this.valid = valid;
}
public String getViewType() {
return viewType;
}
public void setViewType(String viewType) {
this.viewType = viewType;
}
}
package com.reyun.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
/**
* Created by sunhao on 17/3/2.
*/
@Entity
public class ConfigParam {
private Long id;
private String keyParam;
private String valueParam;
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@Column(unique = true, nullable = false)
public String getKeyParam() {
return keyParam;
}
public void setKeyParam(String keyParam) {
this.keyParam = keyParam;
}
public String getValueParam() {
return valueParam;
}
public void setValueParam(String valueParam) {
this.valueParam = valueParam;
}
}
package com.reyun.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;
/**
* Created by sunhao on 17/4/20.
* desc:看单主表
*/
@Entity
public class CustomMenu {
private Long id;
private String name;
private Date createDate;
private Long createAccount;
private String createAccountName;
private Long appId;
private Long category;
private String categoryName;
//是自建看单还是来自分享的看单,false自建,true分享
private Boolean source;
//分享看单的Id
private Long shareId;
//分享者ID
private Long shareAccountId;
//分享者名称
private String shareAccountName;
//分享时间
private Date shareDate;
//看单排序
private Integer menuOrder;
//是否已经分享过,不能标示为是否是自己分享过,只能用于前台显示是否能再次分享。
private Boolean hasShare;
private Long modifyAccount;
private Date modifyDate;
private Boolean delFlag;
//看单显示顺序
private Integer orderindex;
//Transient,展示模板列表
private List<CustomMenuTemplate> templates;
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Long getCreateAccount() {
return createAccount;
}
public void setCreateAccount(Long createAccount) {
this.createAccount = createAccount;
}
public String getCreateAccountName() {
return createAccountName;
}
public void setCreateAccountName(String createAccountName) {
this.createAccountName = createAccountName;
}
public Long getAppId() {
return appId;
}
public void setAppId(Long appId) {
this.appId = appId;
}
public Long getCategory() {
return category;
}
public void setCategory(Long category) {
this.category = category;
}
public String getCategoryName() {
return categoryName;
}
public void setCategoryName(String categoryName) {
this.categoryName = categoryName;
}
public Boolean getSource() {
return source;
}
public void setSource(Boolean source) {
this.source = source;
}
public Long getShareId() {
return shareId;
}
public void setShareId(Long shareId) {
this.shareId = shareId;
}
public Long getShareAccountId() {
return shareAccountId;
}
public void setShareAccountId(Long shareAccountId) {
this.shareAccountId = shareAccountId;
}
public String getShareAccountName() {
return shareAccountName;
}
public void setShareAccountName(String shareAccountName) {
this.shareAccountName = shareAccountName;
}
public Date getShareDate() {
return shareDate;
}
public void setShareDate(Date shareDate) {
this.shareDate = shareDate;
}
public Integer getMenuOrder() {
return menuOrder;
}
public void setMenuOrder(Integer menuOrder) {
this.menuOrder = menuOrder;
}
@Transient
public List<CustomMenuTemplate> getTemplates() {
return templates;
}
public void setTemplates(List<CustomMenuTemplate> templates) {
this.templates = templates;
}
public Long getModifyAccount() {
return modifyAccount;
}
public void setModifyAccount(Long modifyAccount) {
this.modifyAccount = modifyAccount;
}
public Date getModifyDate() {
return modifyDate;
}
public void setModifyDate(Date modifyDate) {
this.modifyDate = modifyDate;
}
public Boolean getDelFlag() {
return delFlag;
}
public void setDelFlag(Boolean delFlag) {
this.delFlag = delFlag;
}
public Boolean getHasShare() {
return hasShare;
}
public void setHasShare(Boolean hasShare) {
this.hasShare = hasShare;
}
public Integer getOrderindex() {
return orderindex;
}
public void setOrderindex(Integer orderindex) {
this.orderindex = orderindex;
}
}
package com.reyun.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;
/**
* Created by sunhao on 17/4/20.
* desc:看单收藏夹
*/
@Entity
public class CustomMenuFavorites {
private Long id;
private Long accountId;
private Long appId;
private Long shareId;
private Date createDate;
private Double matchPercent;
private Boolean delFlag;
//true分享有效,false分享无效
private Boolean shareValid;
public CustomMenuFavorites(){}
public CustomMenuFavorites(Long accountId, Long appId, Long shareId, Double matchPercent){
this.accountId = accountId;
this.appId = appId;
this.shareId = shareId;
this.createDate = new Date();
this.matchPercent = matchPercent;
this.delFlag = false;
this.shareValid = true;
}
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getAccountId() {
return accountId;
}
public void setAccountId(Long accountId) {
this.accountId = accountId;
}
public Long getAppId() {
return appId;
}
public void setAppId(Long appId) {
this.appId = appId;
}
public Long getShareId() {
return shareId;
}
public void setShareId(Long shareId) {
this.shareId = shareId;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Double getMatchPercent() {
return matchPercent;
}
public void setMatchPercent(Double matchPercent) {
this.matchPercent = matchPercent;
}
public Boolean getDelFlag() {
return delFlag;
}
public void setDelFlag(Boolean delFlag) {
this.delFlag = delFlag;
}
public Boolean getShareValid() {
return shareValid;
}
public void setShareValid(Boolean shareValid) {
this.shareValid = shareValid;
}
}
package com.reyun.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;
/**
* Created by sunhao on 17/4/20.
* desc:分享看单
*/
@Entity
public class CustomMenuShare {
private Long id;
private Long accountId;
private String accountName;
private String name;
private Long category;
private String categoryName;
private Boolean delFlag;
private Date shareDate;
private Long originalMenu;
//使用人数
private Long useNumber;
//收藏次数
private Long favoriteNumber;
//是否是热云分享的看单
private Boolean reyunMenu;
//Transient,分享ID
private Long shareId;
//Transient,展示是否有效
private Boolean shareValid;
//Transient,展示匹配度
private Double matchPercent;
//Transient,展示是否收藏
private Boolean hasFavorite;
//Transient,展示是否使用
private Boolean hasUsed;
//Transient,展示看单的模板
private List<CustomMenuShareTemplate> templates;
public CustomMenuShare(){}
public CustomMenuShare(CustomMenuShare customMenuShare){
this.accountId = customMenuShare.getAccountId();
this.accountName = customMenuShare.getAccountName();
this.name = customMenuShare.getName();
this.category = customMenuShare.getCategory();
}
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getAccountId() {
return accountId;
}
public void setAccountId(Long accountId) {
this.accountId = accountId;
}
public String getAccountName() {
return accountName;
}
public void setAccountName(String accountName) {
this.accountName = accountName;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Long getCategory() {
return category;
}
public void setCategory(Long category) {
this.category = category;
}
public String getCategoryName() {
return categoryName;
}
public void setCategoryName(String categoryName) {
this.categoryName = categoryName;
}
public Boolean getDelFlag() {
return delFlag;
}
public void setDelFlag(Boolean delFlag) {
this.delFlag = delFlag;
}
public Date getShareDate() {
return shareDate;
}
public void setShareDate(Date shareDate) {
this.shareDate = shareDate;
}
public Long getOriginalMenu() {
return originalMenu;
}
public void setOriginalMenu(Long originalMenu) {
this.originalMenu = originalMenu;
}
public Long getUseNumber() {
return useNumber;
}
public void setUseNumber(Long useNumber) {
this.useNumber = useNumber;
}
public Long getFavoriteNumber() {
return favoriteNumber;
}
public void setFavoriteNumber(Long favoriteNumber) {
this.favoriteNumber = favoriteNumber;
}
public Boolean getReyunMenu() {
return reyunMenu;
}
public void setReyunMenu(Boolean reyunMenu) {
this.reyunMenu = reyunMenu;
}
@Transient
public Long getShareId() {
return shareId;
}
public void setShareId(Long shareId) {
this.shareId = shareId;
}
@Transient
public Boolean getShareValid() {
return shareValid;
}
public void setShareValid(Boolean shareValid) {
this.shareValid = shareValid;
}
@Transient
public Double getMatchPercent() {
return matchPercent;
}
public void setMatchPercent(Double matchPercent) {
this.matchPercent = matchPercent;
}
@Transient
public Boolean getHasFavorite() {
return hasFavorite;
}
public void setHasFavorite(Boolean hasFavorite) {
this.hasFavorite = hasFavorite;
}
@Transient
public Boolean getHasUsed() {
return hasUsed;
}
public void setHasUsed(Boolean hasUsed) {
this.hasUsed = hasUsed;
}
@Transient
public List<CustomMenuShareTemplate> getTemplates() {
return templates;
}
public void setTemplates(List<CustomMenuShareTemplate> templates) {
this.templates = templates;
}
}
package com.reyun.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.Date;
/**
* Created by sunhao on 17/4/27.
* desc:分享看单模板
*/
@Entity
public class CustomMenuShareTemplate {
private Long id;
private Long accountId;
private Long customMenuId;
//模板名称
private String name;
//查询条件
private String queryCondition;
//所有事件
private String events;
//留存参数
private int relativeTime;
//查询SQL
private String querySql;
//报表类型,事件分析,漏斗,留存
private String menuType;
//分享后查询出的数据,自建模板无数据
private String queryData;
//漏斗,留存,事件分析的ID
private Long originalReportId;
private Date createDate;
private Long modifyAccount;
private Date modifyDate;
private Boolean delFlag;
//Transient 是否匹配
private Boolean hasMatch;
private String type;
private String descb;
public CustomMenuShareTemplate(){}
public CustomMenuShareTemplate(CustomMenuShareTemplate customMenuShareTemplate){
this.accountId = customMenuShareTemplate.getAccountId();
this.name = customMenuShareTemplate.getName();
this.queryCondition = customMenuShareTemplate.getQueryCondition();
this.querySql = customMenuShareTemplate.getQuerySql();
this.events = customMenuShareTemplate.getEvents();
this.relativeTime = customMenuShareTemplate.getRelativeTime();
this.menuType = customMenuShareTemplate.getMenuType();
this.modifyAccount = customMenuShareTemplate.getModifyAccount();
this.originalReportId = customMenuShareTemplate.getOriginalReportId();
this.createDate = new Date();
this.modifyDate = new Date();
this.delFlag = false;
}
public CustomMenuShareTemplate(CustomMenuTemplate customMenuTemplate){
this.accountId = customMenuTemplate.getAccountId();
this.name = customMenuTemplate.getName();
this.menuType = customMenuTemplate.getMenuType();
this.modifyAccount = customMenuTemplate.getModifyAccount();
this.originalReportId = customMenuTemplate.getOriginalReportId();
this.createDate = new Date();
this.modifyDate = new Date();
this.delFlag = false;
}
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getAccountId() {
return accountId;
}
public void setAccountId(Long accountId) {
this.accountId = accountId;
}
public Long getCustomMenuId() {
return customMenuId;
}
public void setCustomMenuId(Long customMenuId) {
this.customMenuId = customMenuId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getQueryCondition() {
return queryCondition;
}
public void setQueryCondition(String queryCondition) {
this.queryCondition = queryCondition;
}
public String getEvents() {
return events;
}
public void setEvents(String events) {
this.events = events;
}
public String getQuerySql() {
return querySql;
}
public void setQuerySql(String querySql) {
this.querySql = querySql;
}
public String getMenuType() {
return menuType;
}
public void setMenuType(String menuType) {
this.menuType = menuType;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Long getModifyAccount() {
return modifyAccount;
}
public void setModifyAccount(Long modifyAccount) {
this.modifyAccount = modifyAccount;
}
public Date getModifyDate() {
return modifyDate;
}
public void setModifyDate(Date modifyDate) {
this.modifyDate = modifyDate;
}
public String getQueryData() {
return queryData;
}
public void setQueryData(String queryData) {
this.queryData = queryData;
}
public Boolean getDelFlag() {
return delFlag;
}
public void setDelFlag(Boolean delFlag) {
this.delFlag = delFlag;
}
public Long getOriginalReportId() {
return originalReportId;
}
public void setOriginalReportId(Long originalReportId) {
this.originalReportId = originalReportId;
}
public int getRelativeTime() {
return relativeTime;
}
public void setRelativeTime(int relativeTime) {
this.relativeTime = relativeTime;
}
@Transient
public Boolean getHasMatch() {
return hasMatch;
}
public void setHasMatch(Boolean hasMatch) {
this.hasMatch = hasMatch;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getDescb() {
return descb;
}
public void setDescb(String descb) {
this.descb = descb;
}
}
package com.reyun.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.util.Date;
/**
* Created by sunhao on 17/4/20.
* desc:我的看单模板
*/
@Entity
public class CustomMenuTemplate {
private Long id;
private Long accountId;
private Long customMenuId;
//模板名称
private String name;
//报表类型,事件分析,漏斗,留存
private String menuType;
//漏斗,留存,事件分析的ID
private Long originalReportId;
private Date createDate;
private Long modifyAccount;
private Date modifyDate;
private Boolean delFlag;
//模板显示顺序
private Integer orderindex;
//模板显示形式,折线、表格......
private String type;
public CustomMenuTemplate(){}
public CustomMenuTemplate(CustomMenuTemplate customMenuTemplate){
this.accountId = customMenuTemplate.getAccountId();
this.name = customMenuTemplate.getName();
this.menuType = customMenuTemplate.getMenuType();
this.modifyAccount = customMenuTemplate.getModifyAccount();
this.originalReportId = customMenuTemplate.getOriginalReportId();
this.createDate = new Date();
this.modifyDate = new Date();
this.delFlag = false;
}
public CustomMenuTemplate(CustomMenuShareTemplate customMenuShareTemplate){
this.accountId = customMenuShareTemplate.getAccountId();
this.name = customMenuShareTemplate.getName();
this.menuType = customMenuShareTemplate.getMenuType();
this.modifyAccount = customMenuShareTemplate.getModifyAccount();
this.createDate = new Date();
this.modifyDate = new Date();
this.delFlag = false;
}
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getAccountId() {
return accountId;
}
public void setAccountId(Long accountId) {
this.accountId = accountId;
}
public Long getCustomMenuId() {
return customMenuId;
}
public void setCustomMenuId(Long customMenuId) {
this.customMenuId = customMenuId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getMenuType() {
return menuType;
}
public void setMenuType(String menuType) {
this.menuType = menuType;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Long getModifyAccount() {
return modifyAccount;
}
public void setModifyAccount(Long modifyAccount) {
this.modifyAccount = modifyAccount;
}
public Date getModifyDate() {
return modifyDate;
}
public void setModifyDate(Date modifyDate) {
this.modifyDate = modifyDate;
}
public Boolean getDelFlag() {
return delFlag;
}
public void setDelFlag(Boolean delFlag) {
this.delFlag = delFlag;
}
public Long getOriginalReportId() {
return originalReportId;
}
public void setOriginalReportId(Long originalReportId) {
this.originalReportId = originalReportId;
}
public Integer getOrderindex() {
return orderindex;
}
public void setOrderindex(Integer orderindex) {
this.orderindex = orderindex;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
package com.reyun.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;
@Entity
public class DataAuth {
private Long id;
private Long account;
private Long app;
private Long campaign;
private String campaignCode;
private Long channel;
private Boolean allCampaign;
private Date modifyTime = new Date();
private String modifyAccount;
private Boolean delFlag;
private Boolean channelPermit;//子账号渠道权限是否放开
//Transient
private List<Long> campaignList;
public DataAuth() {
super();
}
public DataAuth(Long id, Long app, Long campaign, String campaignCode,
Long channel, Boolean allCampaign,Boolean channelPermit) {
super();
this.id = id;
this.app = app;
this.campaign = campaign;
this.campaignCode = campaignCode;
this.channel = channel;
this.allCampaign = allCampaign;
this.channelPermit = channelPermit;
}
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getApp() {
return app;
}
public void setApp(Long app) {
this.app = app;
}
public Long getCampaign() {
return campaign;
}
public void setCampaign(Long campaign) {
this.campaign = campaign;
}
public String getCampaignCode() {
return campaignCode;
}
public void setCampaignCode(String campaignCode) {
this.campaignCode = campaignCode;
}
public Long getChannel() {
return channel;
}
public void setChannel(Long channel) {
this.channel = channel;
}
public Long getAccount() {
return account;
}
public void setAccount(Long account) {
this.account = account;
}
public Date getModifyTime() {
return modifyTime;
}
public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
public String getModifyAccount() {
return modifyAccount;
}
public void setModifyAccount(String modifyAccount) {
this.modifyAccount = modifyAccount;
}
public Boolean getAllCampaign() {
return allCampaign;
}
public void setAllCampaign(Boolean allCampaign) {
this.allCampaign = allCampaign;
}
public Boolean getDelFlag() {
return delFlag;
}
public void setDelFlag(Boolean delFlag) {
this.delFlag = delFlag;
}
public Boolean getChannelPermit() {
return channelPermit;
}
public void setChannelPermit(Boolean channelPermit) {
this.channelPermit = channelPermit;
}
@Transient
public List<Long> getCampaignList() {
return campaignList;
}
public void setCampaignList(List<Long> campaignList) {
this.campaignList = campaignList;
}
}
package com.reyun.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
@Entity
public class DataParam {
private Long id;
private String dataKey;
private String descp;
private String value;
private String event;
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getDataKey() {
return dataKey;
}
public void setDataKey(String dataKey) {
this.dataKey = dataKey;
}
public String getDescp() {
return descp;
}
public void setDescp(String descp) {
this.descp = descp;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getEvent() {
return event;
}
public void setEvent(String event) {
this.event = event;
}
}
package com.reyun.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.util.Date;
/**
* Created by nolan on 06/06/2017.
* description:
*/
@Entity
public class DemoAppointment {
@Id
@GeneratedValue
private Long id;
private String email;
@Column(nullable = false)
private String name;
@Column(nullable = false)
private String phone;
private String company;
private String jobTitle;
private String area; //所属区域
private String ipAddr;
private Date createTime; //预约时间
private Integer status; //审核状态(1:未认领; 2:已认领)
private Date confirmTime; //确认时间
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getCompany() {
return company;
}
public void setCompany(String company) {
this.company = company;
}
public String getJobTitle() {
return jobTitle;
}
public void setJobTitle(String jobTitle) {
this.jobTitle = jobTitle;
}
public String getArea() {
return area;
}
public void setArea(String area) {
this.area = area;
}
public String getIpAddr() {
return ipAddr;
}
public void setIpAddr(String ipAddr) {
this.ipAddr = ipAddr;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Date getConfirmTime() {
return confirmTime;
}
public void setConfirmTime(Date confirmTime) {
this.confirmTime = confirmTime;
}
}
package com.reyun.model;
import java.util.List;
/**
* Created by sunhao on 17/4/19.
* description:分类维度页面显示
*/
public class Dimension4Web {
private String id;
private String dimensionType;
private String name;
private String type;
private List<?> key;
private List<?> value;
private String eventType;
private int sortId;
public String getEventType() {
return eventType;
}
public void setEventType(String eventType) {
this.eventType = eventType;
}
public int getSortId() {
return sortId;
}
public void setSortId(int sortId) {
this.sortId = sortId;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getDimensionType() {
return dimensionType;
}
public void setDimensionType(String dimensionType) {
this.dimensionType = dimensionType;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public List<?> getKey() {
return key;
}
public void setKey(List<?> key) {
this.key = key;
}
public List<?> getValue() {
return value;
}
public void setValue(List<?> value) {
this.value = value;
}
}
package com.reyun.model;
import java.util.Map;
/**
* Created by nolan on 13/03/2017.
* description:
*/
public class EditionPricingLevel4Web {
/**
* 数据量
**/
private Integer appNum; //创建应用数
private Integer dataConversionFunnelNum; // 转化漏斗数
private Integer dataUserGroupNum; //用户分群数
private Boolean funcMngRealtimeCallback;//推广实时回调
/**
* 平台功能
*
* @return
*/
private Boolean platformExport;//数据导出
private Boolean platformServiceSupport; //7*24小时客户服务
//AB test处理
private Map<String,Boolean> abTest;
public EditionPricingLevel4Web(PackageType level) {
this.appNum = level.getAppNum();
this.dataConversionFunnelNum = level.getDataConversionFunnelNum();
this.dataUserGroupNum = level.getDataUserGroupNum();
this.funcMngRealtimeCallback = level.getFuncMngRealtimeCallback();
this.platformExport = level.getPlatformExport();
this.platformServiceSupport = level.getPlatformServiceSupport();
}
public Integer getAppNum() {
return appNum;
}
public void setAppNum(Integer appNum) {
this.appNum = appNum;
}
public Integer getDataConversionFunnelNum() {
return dataConversionFunnelNum;
}
public void setDataConversionFunnelNum(Integer dataConversionFunnelNum) {
this.dataConversionFunnelNum = dataConversionFunnelNum;
}
public Integer getDataUserGroupNum() {
return dataUserGroupNum;
}
public void setDataUserGroupNum(Integer dataUserGroupNum) {
this.dataUserGroupNum = dataUserGroupNum;
}
public Boolean getFuncMngRealtimeCallback() {
return funcMngRealtimeCallback;
}
public void setFuncMngRealtimeCallback(Boolean funcMngRealtimeCallback) {
this.funcMngRealtimeCallback = funcMngRealtimeCallback;
}
public Boolean getPlatformExport() {
return platformExport;
}
public void setPlatformExport(Boolean platformExport) {
this.platformExport = platformExport;
}
public Boolean getPlatformServiceSupport() {
return platformServiceSupport;
}
public void setPlatformServiceSupport(Boolean platformServiceSupport) {
this.platformServiceSupport = platformServiceSupport;
}
public Map<String, Boolean> getAbTest() {
return abTest;
}
public void setAbTest(Map<String, Boolean> abTest) {
this.abTest = abTest;
}
}
package com.reyun.model;
import java.util.List;
public class Email {
private boolean isHaveMultPaths;
private String subject;
private String contents;
private List<String> userEmailAddress;
private String[] multiPaths;
public boolean isHaveMultPaths() {
return isHaveMultPaths;
}
public void setHaveMultPaths(boolean isHaveMultPaths) {
this.isHaveMultPaths = isHaveMultPaths;
}
public String getSubject() {
return subject;
}
public void setSubject(String subject) {
this.subject = subject;
}
public String getContents() {
return contents;
}
public void setContents(String contents) {
this.contents = contents;
}
public List<String> getUserEmailAddress() {
return userEmailAddress;
}
public void setUserEmailAddress(List<String> userEmailAddress) {
this.userEmailAddress = userEmailAddress;
}
public String[] getMultiPaths() {
return multiPaths;
}
public void setMultiPaths(String[] multiPaths) {
this.multiPaths = multiPaths;
}
}
package com.reyun.model;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;
@Entity
@Table(name = "event_source")
@IdClass(EventMapPK.class)
public class Event {
// 事件名
@Id
private String eventName;
// 事件属性
@Id
private String eventAttr;
private String dataType;
private boolean common;
@Id
private String appkey;
public String getEventName() {
return eventName;
}
public void setEventName(String eventName) {
this.eventName = eventName;
}
public String getEventAttr() {
return eventAttr;
}
public void setEventAttr(String eventAttr) {
this.eventAttr = eventAttr;
}
public String getDataType() {
return dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
public boolean isCommon() {
return common;
}
public void setCommon(boolean common) {
this.common = common;
}
public String getAppkey() {
return appkey;
}
public void setAppkey(String appkey) {
this.appkey = appkey;
}
@Override
public String toString() {
return "Event{" +
"eventName='" + eventName + '\'' +
", eventAttr='" + eventAttr + '\'' +
", dataType='" + dataType + '\'' +
", common=" + common +
", appkey='" + appkey + '\'' +
'}';
}
}
package com.reyun.model;
import java.util.List;
import java.util.Map;
/**
* Created by sunhao on 17/4/19.
* description:事件页面展示model
*/
public class Event4Web {
private String eventName;
private String eventNameAlias;
private long eventNumber;
private List<EventAttr4Web> firstLevelAttr;
private List<EventAttr4Web> secondLevelAttr;
private List<EventAttr4Web> profiles;
private Map<String, EventAttr4Web> eventAttr4WebMap;
private Boolean isCommon;
private Boolean status;
private Boolean isVirtual;
public Boolean getVirtual() {
return isVirtual;
}
public void setVirtual(Boolean virtual) {
isVirtual = virtual;
}
public String getEventName() {
return eventName;
}
public void setEventName(String eventName) {
this.eventName = eventName;
}
public String getEventNameAlias() {
return eventNameAlias;
}
public void setEventNameAlias(String eventNameAlias) {
this.eventNameAlias = eventNameAlias;
}
public long getEventNumber() {
return eventNumber;
}
public void setEventNumber(long eventNumber) {
this.eventNumber = eventNumber;
}
public List<EventAttr4Web> getFirstLevelAttr() {
return firstLevelAttr;
}
public void setFirstLevelAttr(List<EventAttr4Web> firstLevelAttr) {
this.firstLevelAttr = firstLevelAttr;
}
public List<EventAttr4Web> getSecondLevelAttr() {
return secondLevelAttr;
}
public void setSecondLevelAttr(List<EventAttr4Web> secondLevelAttr) {
this.secondLevelAttr = secondLevelAttr;
}
public List<EventAttr4Web> getProfiles() {
return profiles;
}
public void setProfiles(List<EventAttr4Web> profiles) {
this.profiles = profiles;
}
public Map<String, EventAttr4Web> getEventAttr4WebMap() {
return eventAttr4WebMap;
}
public void setEventAttr4WebMap(Map<String, EventAttr4Web> eventAttr4WebMap) {
this.eventAttr4WebMap = eventAttr4WebMap;
}
public Boolean getCommon() {
return isCommon;
}
public void setCommon(Boolean common) {
isCommon = common;
}
public Boolean getStatus() {
return status;
}
public void setStatus(Boolean status) {
this.status = status;
}
@Override
public String toString() {
return "{" +
"eventName='" + eventName + '\'' +
", eventNameAlias='" + eventNameAlias + '\'' +
", firstLevelAttr=" + firstLevelAttr +
", secondLevelAttr=" + secondLevelAttr +
", profiles=" + profiles +
", eventAttr4WebMap=" + eventAttr4WebMap +
", isCommon=" + isCommon +
", status=" + status +
'}';
}
}
package com.reyun.model;
import java.util.List;
/**
* Created by sunhao on 17/4/19.
* description:事件属性页面展示model
*/
public class EventAttr4Web {
private String attr;
private String attrAlias;
private String dataType;
private String data;
private String webType;
private String type;
private int sortId;
private List<?> key;
private List<?> value;
private Boolean isCommon;
private Boolean status;
private Boolean addStatsCondition;
private Boolean addStatsView;
public String getAttr() {
return attr;
}
public void setAttr(String attr) {
this.attr = attr;
}
public String getAttrAlias() {
return attrAlias;
}
public void setAttrAlias(String attrAlias) {
this.attrAlias = attrAlias;
}
public String getDataType() {
return dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
public String getWebType() {
return webType;
}
public void setWebType(String webType) {
this.webType = webType;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public int getSortId() {
return sortId;
}
public void setSortId(int sortId) {
this.sortId = sortId;
}
public List<?> getKey() {
return key;
}
public void setKey(List<?> key) {
this.key = key;
}
public List<?> getValue() {
return value;
}
public void setValue(List<?> value) {
this.value = value;
}
public Boolean getCommon() {
return isCommon;
}
public void setCommon(Boolean common) {
isCommon = common;
}
public Boolean getStatus() {
return status;
}
public void setStatus(Boolean status) {
this.status = status;
}
public Boolean getAddStatsCondition() {
return addStatsCondition;
}
public void setAddStatsCondition(Boolean addStatsCondition) {
this.addStatsCondition = addStatsCondition;
}
public Boolean getAddStatsView() {
return addStatsView;
}
public void setAddStatsView(Boolean addStatsView) {
this.addStatsView = addStatsView;
}
@Override
public String toString() {
return "{" +
"attr='" + attr + '\'' +
", attrAlias='" + attrAlias + '\'' +
", dataType='" + dataType + '\'' +
", webType='" + webType + '\'' +
", type='" + type + '\'' +
", sortId=" + sortId +
", key=" + key +
", value=" + value +
", isCommon=" + isCommon +
", status=" + status +
", addStatsCondition=" + addStatsCondition +
", addStatsView=" + addStatsView +
'}';
}
}
package com.reyun.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.util.Date;
@Entity
public class EventAttributeMeta {
private Long id;
// 属性名
private String attribute;
// 备用名
private String alias;
private Boolean status;
private Boolean addStatsCondition;
private Boolean addStatsView;
private String appkey;
private Long modifyAccount;
private Date modifyTime;
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getAlias() {
return alias;
}
public void setAlias(String alias) {
this.alias = alias;
}
public Boolean getStatus() {
return status;
}
public void setStatus(Boolean status) {
this.status = status;
}
public Long getModifyAccount() {
return modifyAccount;
}
public void setModifyAccount(Long modifyAccount) {
this.modifyAccount = modifyAccount;
}
public Date getModifyTime() {
return modifyTime;
}
public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
public String getAppkey() {
return appkey;
}
public void setAppkey(String appkey) {
this.appkey = appkey;
}
public String getAttribute() {
return attribute;
}
public void setAttribute(String attribute) {
this.attribute = attribute;
}
public Boolean getAddStatsCondition() {
return addStatsCondition;
}
public void setAddStatsCondition(Boolean addStatsCondition) {
this.addStatsCondition = addStatsCondition;
}
public Boolean getAddStatsView() {
return addStatsView;
}
public void setAddStatsView(Boolean addStatsView) {
this.addStatsView = addStatsView;
}
@Override
public String toString() {
return "EventAttributeMeta{" +
"id=" + id +
", attribute='" + attribute + '\'' +
", alias='" + alias + '\'' +
", status=" + status +
", addStatsCondition=" + addStatsCondition +
", addStatsView=" + addStatsView +
", appkey='" + appkey + '\'' +
", modifyAccount=" + modifyAccount +
", modifyTime=" + modifyTime +
'}';
}
}
package com.reyun.model;
import java.io.Serializable;
/**
* Created by admin on 2017/6/14.
*/
public class EventMapPK implements Serializable {
// 事件名
private String eventName;
// 事件属性
private String eventAttr;
private String appkey;
public String getEventName() {
return eventName;
}
public void setEventName(String eventName) {
this.eventName = eventName;
}
public String getEventAttr() {
return eventAttr;
}
public void setEventAttr(String eventAttr) {
this.eventAttr = eventAttr;
}
public String getAppkey() {
return appkey;
}
public void setAppkey(String appkey) {
this.appkey = appkey;
}
}
package com.reyun.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.util.Date;
@Entity
public class EventMeta {
private Long id;
// 事件名
private String eventId;
// 事件名备用名
private String alias;
private Boolean status;
private String appkey;
private Long modifyAccount;
private Date modifyTime;
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getEventId() {
return eventId;
}
public void setEventId(String eventId) {
this.eventId = eventId;
}
public String getAlias() {
return alias;
}
public void setAlias(String alias) {
this.alias = alias;
}
public Boolean getStatus() {
return status;
}
public void setStatus(Boolean status) {
this.status = status;
}
public Long getModifyAccount() {
return modifyAccount;
}
public void setModifyAccount(Long modifyAccount) {
this.modifyAccount = modifyAccount;
}
public Date getModifyTime() {
return modifyTime;
}
public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
public String getAppkey() {
return appkey;
}
public void setAppkey(String appkey) {
this.appkey = appkey;
}
}
package com.reyun.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.util.Date;
/**
* Created by sunhao on 17/4/10.
* description: 事件分析
*/
@Entity
public class EventStats {
private Long id;
private Long app;
private Long createAccount;
private Date createTime;
private Long modifyAccount;
private Date modifyTime;
//事件分析名称
private String name;
//事件名称
private String eventName;
//事件别名
private String eventAlias;
//事件属性条件
private String eventCondition;
//查询sql
private String querySql;
//是否有效
private Boolean valid;
//是否是复杂事件
private Boolean complicatedEvents;
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getApp() {
return app;
}
public void setApp(Long app) {
this.app = app;
}
public Long getCreateAccount() {
return createAccount;
}
public void setCreateAccount(Long createAccount) {
this.createAccount = createAccount;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Long getModifyAccount() {
return modifyAccount;
}
public void setModifyAccount(Long modifyAccount) {
this.modifyAccount = modifyAccount;
}
public Date getModifyTime() {
return modifyTime;
}
public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEventAlias() {
return eventAlias;
}
public void setEventAlias(String eventAlias) {
this.eventAlias = eventAlias;
}
public String getEventName() {
return eventName;
}
public void setEventName(String eventName) {
this.eventName = eventName;
}
public String getEventCondition() {
return eventCondition;
}
public void setEventCondition(String eventCondition) {
this.eventCondition = eventCondition;
}
public String getQuerySql() {
return querySql;
}
public void setQuerySql(String querySql) {
this.querySql = querySql;
}
public Boolean getValid() {
return valid;
}
public void setValid(Boolean valid) {
this.valid = valid;
}
public Boolean getComplicatedEvents() {
return complicatedEvents;
}
public void setComplicatedEvents(Boolean complicatedEvents) {
this.complicatedEvents = complicatedEvents;
}
}
package com.reyun.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* Created by sunhao on 17/4/11.
* desc:事件分析展示属性
*/
@Entity
public class EventViewAttr {
private Long id;
//属性名
private String viewAttr;
//属性中文名称
private String viewAttrName;
//属性类型 avg sum
private String attrType;
//属性级别 1,2
private Integer attrLevel;
//有效性
private Boolean valid;
// view出现在哪个类型前面
private String viewType;
public EventViewAttr(){}
public EventViewAttr(String viewAttr, String viewAttrName) {
this.viewAttr = viewAttr;
this.viewAttrName = viewAttrName;
}
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getViewAttr() {
return viewAttr;
}
public void setViewAttr(String viewAttr) {
this.viewAttr = viewAttr;
}
public String getViewAttrName() {
return viewAttrName;
}
public void setViewAttrName(String viewAttrName) {
this.viewAttrName = viewAttrName;
}
public String getAttrType() {
return attrType;
}
public void setAttrType(String attrType) {
this.attrType = attrType;
}
public Integer getAttrLevel() {
return attrLevel;
}
public void setAttrLevel(Integer attrLevel) {
this.attrLevel = attrLevel;
}
@NotNull
public Boolean getValid() {
return valid;
}
public void setValid(Boolean valid) {
this.valid = valid;
}
public String getViewType() {
return viewType;
}
public void setViewType(String viewType) {
this.viewType = viewType;
}
}
package com.reyun.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
@Entity
public class EventtableMetadata {
private Long id;
// 授权处显示的名字
private String appkey;
private String ds;
private String bucketid;
private String event;
public EventtableMetadata() {
super();
}
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getAppkey() {
return appkey;
}
public void setAppkey(String appkey) {
this.appkey = appkey;
}
public String getDs() {
return ds;
}
public void setDs(String ds) {
this.ds = ds;
}
public String getBucketid() {
return bucketid;
}
public void setBucketid(String bucketid) {
this.bucketid = bucketid;
}
public String getEvent() {
return event;
}
public void setEvent(String event) {
this.event = event;
}
}
package com.reyun.model;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name="export_report_info")
public class ExportReportInfo {
private Long id;
private Long app;
private String name;
private String startDate;
private String endDate;
private String reportName;
private String subType;
private String fileName;
private Date createTime = new Date();
private Long account;
private String accountName;
private Date modifyTime = new Date();
private Long modifyAccount;
private String reportType;
private String conditions;
//INIT("init", "等待下载"),
//DOWNLOADING("downloading", "正在下载"),
//COMPLETE("complete", "下载完成"),
//FAILED("failed", "下载失败");
private String status;
private String functionType;
private Long functionId;
//下载人信息
private Long downloadAccount;
private String downloadName;
private Date downloadTime;
private String downloadIp;
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getApp() {
return app;
}
public void setApp(Long app) {
this.app = app;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getReportName() {
return reportName;
}
public void setReportName(String reportName) {
this.reportName = reportName;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Long getAccount() {
return account;
}
public void setAccount(Long account) {
this.account = account;
}
public String getAccountName() {
return accountName;
}
public void setAccountName(String accountName) {
this.accountName = accountName;
}
public String getSubType() {
return subType;
}
public void setSubType(String subType) {
this.subType = subType;
}
public Date getModifyTime() {
return modifyTime;
}
public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
public Long getModifyAccount() {
return modifyAccount;
}
public void setModifyAccount(Long modifyAccount) {
this.modifyAccount = modifyAccount;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getStartDate() {
return startDate;
}
public void setStartDate(String startDate) {
this.startDate = startDate;
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
public String getReportType() {
return reportType;
}
public void setReportType(String reportType) {
this.reportType = reportType;
}
public String getConditions() {
return conditions;
}
public void setConditions(String conditions) {
this.conditions = conditions;
}
public String getFunctionType() {
return functionType;
}
public void setFunctionType(String functionType) {
this.functionType = functionType;
}
public Long getFunctionId() {
return functionId;
}
public void setFunctionId(Long functionId) {
this.functionId = functionId;
}
public Long getDownloadAccount() {
return downloadAccount;
}
public void setDownloadAccount(Long downloadAccount) {
this.downloadAccount = downloadAccount;
}
public String getDownloadName() {
return downloadName;
}
public void setDownloadName(String downloadName) {
this.downloadName = downloadName;
}
public Date getDownloadTime() {
return downloadTime;
}
public void setDownloadTime(Date downloadTime) {
this.downloadTime = downloadTime;
}
public String getDownloadIp() {
return downloadIp;
}
public void setDownloadIp(String downloadIp) {
this.downloadIp = downloadIp;
}
}
package com.reyun.model;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;
@Entity
public class Funnel {
private Long id;
private Long account;
private Long app;
private String name;
private String eventInfo;
private String querySql;
private int window;
private String events;
private Long createAccount;
private Date createTime = new Date();
private Date modifyTime = new Date();
private Long modifyAccount;
private Boolean delFlag;
private String cAccount;
private String mAcoucnt;
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getAccount() {
return account;
}
public void setAccount(Long account) {
this.account = account;
}
public Long getApp() {
return app;
}
public void setApp(Long app) {
this.app = app;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEventInfo() {
return eventInfo;
}
public void setEventInfo(String eventInfo) {
this.eventInfo = eventInfo;
}
public String getQuerySql() {
return querySql;
}
public void setQuerySql(String querySql) {
this.querySql = querySql;
}
public int getWindow() {
return window;
}
public void setWindow(int window) {
this.window = window;
}
public Long getCreateAccount() {
return createAccount;
}
public void setCreateAccount(Long createAccount) {
this.createAccount = createAccount;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getModifyTime() {
return modifyTime;
}
public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
public Long getModifyAccount() {
return modifyAccount;
}
public void setModifyAccount(Long modifyAccount) {
this.modifyAccount = modifyAccount;
}
public Boolean getDelFlag() {
return delFlag;
}
public void setDelFlag(Boolean delFlag) {
this.delFlag = delFlag;
}
public String getEvents() {
return events;
}
public void setEvents(String events) {
this.events = events;
}
@Transient
@Column(name="cAccount" )
public String getcAccount() {
return cAccount;
}
public void setcAccount(String cAccount) {
this.cAccount = cAccount;
}
@Transient
public String getmAcoucnt() {
return mAcoucnt;
}
public void setmAcoucnt(String mAcoucnt) {
this.mAcoucnt = mAcoucnt;
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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