Commit 2834b8db by carrieyzzhang

Merge branch 'master' of git.minrow.com:reyun/saasio

parents 166cd2e8 cd46171d
...@@ -100,13 +100,73 @@ public class LoginController ...@@ -100,13 +100,73 @@ public class LoginController
} }
} }
if (!account.getIsSuperUser()) { String nowDate = DateUtil.format(new Date(), DateUtil.C_DATE_PATTON_DEFAULT);
if (account.getIsSuperUser()) {
//母账号
if (account.getStatus() == 0) {
//主账号禁用
rtnMap.put("msg", "主账号禁用");
rtnMap.put("code", 208);
return ResultModel.OK(rtnMap);
} else if (account.getStatus() == -1) {
//主账号还没通过审核
rtnMap.put("msg", "还没通过审核");
rtnMap.put("code", 210);
return ResultModel.OK(rtnMap);
} else if (account.getStatus() == -2) {
//主账号还没通过审核
rtnMap.put("msg", "还没通过审核");
rtnMap.put("code", 210);
return ResultModel.OK(rtnMap);
}
//主账号过期
if (!StringUtil.isEmpty(account.getPastDate()) && DateUtil.compare_date(nowDate, account.getPastDate()) == 1) {
rtnMap.put("msg", "主账号过期");
rtnMap.put("code", 206);
return ResultModel.OK(rtnMap);
}
}else {
//子账号 //子账号
if (account.getStatus() == 0) { if (account.getStatus() == 0) {
// 子账号禁用 // 子账号禁用
rtnMap.put("msg", "子账号禁用"); rtnMap.put("msg", "子账号禁用");
rtnMap.put("code", 203); rtnMap.put("code", 203);
return ResultModel.OK(rtnMap); return ResultModel.OK(rtnMap);
} else if(!account.getRoleCategory().equals(5L)){
//获取根节点母账号
Account parent = authService.findRootParentAccount(account.getId());
if (parent.getStatus() == 0) {
//子账号所在主账号被禁用
rtnMap.put("msg", "子账号所在主账号被禁用");
rtnMap.put("code", 209);
return ResultModel.OK(rtnMap);
} else if (!StringUtil.isEmpty(parent.getPastDate()) && DateUtil.compare_date(nowDate, parent.getPastDate()) == 1) {
//子账号所在主账号过期
rtnMap.put("msg", "子账号所在主账号过期");
rtnMap.put("code", 207);
return ResultModel.OK(rtnMap);
}
}
//没有控制权限AuthStr没有授权
if (!account.getRoleCategory().equals(RoleEnumType.MANAGER.getKey())) {
if (!ValidateUtil.isValid(account.getAuthStr()) || !ValidateUtil.isValid(JSONObject.fromObject(account.getAuthStr()))) {
rtnMap.put("msg", "没有产品权限");
rtnMap.put("code", 202);
return ResultModel.OK(rtnMap);
}
} }
} }
...@@ -144,7 +204,6 @@ public class LoginController ...@@ -144,7 +204,6 @@ public class LoginController
catch (Exception e) { catch (Exception e) {
logger.error("fail to parse ip," + e.getMessage()); logger.error("fail to parse ip," + e.getMessage());
} }
return ResultModel.OK(rtnMap); return ResultModel.OK(rtnMap);
} }
else { else {
......
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
<description>调度配置</description> <description>调度配置</description>
<!--<bean id="autoCalculateFlow" class="com.reyun.task.AutoCalculateFlow"></bean> <bean id="autoCalculateFlow" class="com.reyun.task.AutoCalculateFlow"></bean>
<task:scheduled-tasks> <task:scheduled-tasks>
<task:scheduled ref="autoCalculateFlow" method="run" cron="0 */10 * * * ?"/> <task:scheduled ref="autoCalculateFlow" method="run" cron="0 */6 * * * ?"/>
</task:scheduled-tasks>--> </task:scheduled-tasks>
</beans> </beans>
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
function toolservice($rootScope,$timeout,UtilService){ function toolservice($rootScope,$timeout,UtilService){
var service = {},that = $rootScope, var service = {},that = $rootScope,
rootmenu = {"admonitor":"广告监测","behavior":"行为分析","export":"数据导出","management":"管理中心"}, rootmenu = {"dataview":"数据概览","action":"行为分析","user":"用户分析","event":"埋点管理","tool":"工具"},
menu = {"custommenu": "行业看单","eventstats": "事件分析","funnel": "漏斗转化","retention": "留存分析", menu = {"custommenu": "行业看单","eventstats": "事件分析","funnel": "漏斗转化","retention": "留存分析",
"intelligentpath": "智能路径","usergroup": "用户分群","event": "APP事件管理","profile": "用户属性管理", "intelligentpath": "智能路径","usergroup": "用户分群","event": "APP事件管理","profile": "用户属性管理",
"logtool": "日志流","report": "下载报表","app": "产品中心","auth": "成员管理"}; "logtool": "日志流","report": "下载报表","app": "产品中心","auth": "成员管理"};
...@@ -404,7 +404,6 @@ ...@@ -404,7 +404,6 @@
//菜单报送数据 //菜单报送数据
service.getMenuSubmitData = function(submenu){ service.getMenuSubmitData = function(submenu){
if($rootScope.pagePath=="userinfo")return; if($rootScope.pagePath=="userinfo")return;
if(!rootmenu[$rootScope.mainMenu])return;
var cmids = service.getCMidInfo(); var cmids = service.getCMidInfo();
var company = service.getUser().company; var company = service.getUser().company;
...@@ -412,21 +411,25 @@ ...@@ -412,21 +411,25 @@
company = ""; company = "";
} }
var appkey = "",appcategory = "",appname = ""; var appkey = "",appcategory = "",appname = "",rootmenukey;
if($rootScope.appInstance){ if($rootScope.appInstance){
appkey = $rootScope.appInstance.appkey; appkey = $rootScope.appInstance.appkey;
appcategory = $rootScope.appInstance.appGenreName; appcategory = $rootScope.appInstance.appGenreName;
appname = $rootScope.appInstance.name; appname = $rootScope.appInstance.name;
} }
if(!submenu || submenu==''){submenu = menu[$rootScope.pagePath];} if(!submenu || submenu==''){submenu = menu[$rootScope.pagePath];}
for (var m in that.meauTree){
if(that.meauTree[m].indexOf($rootScope.pagePath)>-1){
rootmenukey = m;
}
}
var Uuser = UtilService.getUser(); var Uuser = UtilService.getUser();
var params = { var params = {
appid: UtilService.getTKAppkey(), appid: UtilService.getTKAppkey(),
who:Uuser.email, who:Uuser.email,
what:"pageview", what:"pageview",
context:{ context:{
rootmenu:rootmenu[$rootScope.mainMenu], //菜单分类 rootmenu:rootmenu[rootmenukey], //菜单分类
menu:menu[$rootScope.pagePath], //当前菜单 menu:menu[$rootScope.pagePath], //当前菜单
submenu:submenu, //子菜单-看单 submenu:submenu, //子菜单-看单
sessionid:UtilService.getCookie("JSESSIONID"), sessionid:UtilService.getCookie("JSESSIONID"),
......
...@@ -275,14 +275,21 @@ ...@@ -275,14 +275,21 @@
} }
$scope.flowKnow = true; $scope.flowKnow = true;
UtilService.setCookie("ryioRedCircle",true,7); UtilService.setCookie("ryioRedCircle",true,7);
var params = {
accountId: auid
};
if(type == 'ioAlert'){ if(type == 'ioAlert'){
$scope.ioAlert = false; $scope.ioAlert = false;
params.ioFlow = true;
} }
else if(type == 'ioDateAlert'){ else if(type == 'ioDateAlert'){
$scope.ioDateAlert = false; $scope.ioDateAlert = false;
params.ioPastTime = true;
} }
var closePM = HttpService.postInfo("mng/accountRestrict/confirm", params);
closePM.then(function(data) {});
} }
$rootScope.menuSubmitData = function(submenu){ $rootScope.menuSubmitData = function(submenu){
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
.controller("collectCtrl",["$rootScope","$scope","$state","ToolService","$timeout",collectCtrl]); .controller("collectCtrl",["$rootScope","$scope","$state","ToolService","$timeout",collectCtrl]);
function collectCtrl($rootScope,$scope,$state,ToolService,$timeout){ function collectCtrl($rootScope,$scope,$state,ToolService,$timeout){
var meauTree = { $rootScope.meauTree = {
"dataview":["custommenu"], "dataview":["custommenu"],
"action":["eventstats","funnel","retention","intelligentpath"], "action":["eventstats","funnel","retention","intelligentpath"],
"user":["usergroup"], "user":["usergroup"],
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
n = n.substring(0,n); n = n.substring(0,n);
} }
$scope.menuCurFlag = ""; $scope.menuCurFlag = "";
for(var k in meauTree){ for(var k in $rootScope.meauTree){
var ms = meauTree[k]; var ms = $rootScope.meauTree[k];
if(ms.indexOf(n)>-1){ if(ms.indexOf(n)>-1){
$scope.menuCurFlag = k; $scope.menuCurFlag = k;
$scope.menustatus[k] = true; $scope.menustatus[k] = true;
......
...@@ -93,9 +93,14 @@ ...@@ -93,9 +93,14 @@
ToolService.showLoading(); ToolService.showLoading();
var deletePM = HttpService.deleteInfo("mng/auth/"+$scope.delInfo.id+"/delete"); var deletePM = HttpService.deleteInfo("mng/auth/"+$scope.delInfo.id+"/delete");
deletePM.then(function(){ deletePM.then(function(){
ToolService.showTips("删除成功");
ToolService.hideLoading(); ToolService.hideLoading();
$scope.query(); if(data){
ToolService.showTips("删除成功");
$scope.query();
}
else{
ToolService.showTips("该账号已激活,不支持删除,您可以在右侧操作区对账号进行停用。");
}
}); });
} }
$scope.sendEmailAgain = function(send){ $scope.sendEmailAgain = function(send){
......
...@@ -26,9 +26,12 @@ html,body{ ...@@ -26,9 +26,12 @@ html,body{
display:inline-block; display:inline-block;
margin-right:3px; margin-right:3px;
} }
.iconfont.active, .active>.iconfont,.sidebarNav li:hover .iconfont, .activemore>.iconfont{ .iconfont.active, .active>.iconfont, .activemore>.iconfont{
color:#4186ec; color:#4186ec;
} }
.sidebarNav li:not(.activemore):hover .iconfont{
color: $menulihoverft;
}
.icon-logo{ .icon-logo{
font-size:25px; font-size:25px;
color:#fff; color:#fff;
...@@ -1109,8 +1112,8 @@ textarea.iptform{ ...@@ -1109,8 +1112,8 @@ textarea.iptform{
margin-top:15px; margin-top:15px;
margin-right: 18px; margin-right: 18px;
} }
.sidebarNav li:hover a{ .sidebarNav li:not(.activemore):not(.active):hover a{
color:$menuliactiveft; color:$menulihoverft;
} }
.sidebarNav li.active{ .sidebarNav li.active{
background-color:$menuliactivebg; background-color:$menuliactivebg;
...@@ -1139,7 +1142,7 @@ textarea.iptform{ ...@@ -1139,7 +1142,7 @@ textarea.iptform{
color:$menuliactiveft; color:$menuliactiveft;
} }
.sidebarNav .subli:hover{ .sidebarNav .subli:hover{
color:$menuliactiveft; background:$menulihoverbg;
} }
.submenuIcon{ .submenuIcon{
background:url(../images/submenu.png) no-repeat; background:url(../images/submenu.png) no-repeat;
...@@ -6534,7 +6537,7 @@ pre{ ...@@ -6534,7 +6537,7 @@ pre{
color:$menuftcolor; color:$menuftcolor;
} }
.smallMenu li:hover a{ .smallMenu li:hover a{
color:$menuliactiveft; color:$menulihoverft;
} }
.sidebarNav .subli.active { .sidebarNav .subli.active {
border-left-color: $menubgcolor; border-left-color: $menubgcolor;
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
<tr ng-repeat="info in addrList.val track by $index"> <tr ng-repeat="info in addrList.val track by $index">
<td ng-repeat="col in addrList.columnkey track by $index" data-clipboard-text="{{info[col]}}" ng-class="{'ckhand':$index>0,'copyBtn':$index==1}">{{info[col]}}</td> <td ng-repeat="col in addrList.columnkey track by $index" data-clipboard-text="{{info[col]}}" ng-class="{'ckhand':$index>0,'copyBtn':$index==1}">{{info[col]}}</td>
<td class="formOper"> <td class="formOper">
<a class="formBtn" ng-click="downFile(info.type)" ng-if="appInstance.regedbutton==true"><span class="downloadIcon active"></span>下载</a> <a class="formBtn" ng-click="downFile(info.type)" ng-if="appInstance.regedbutton==true">下载</a>
<a class="formBtn" ng-click="downTips()" ng-if="appInstance.regedbutton!=true"><span class="downloadIcon active"></span>下载</a> <a class="formBtn" ng-click="downTips()" ng-if="appInstance.regedbutton!=true">下载</a>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -33,4 +33,4 @@ ...@@ -33,4 +33,4 @@
<li>目前仅支持导出昨日数据。</li> <li>目前仅支持导出昨日数据。</li>
</ol> </ol>
</dl> </dl>
</div> </div>
\ No newline at end of file
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