Commit 2834b8db by carrieyzzhang

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

parents 166cd2e8 cd46171d
......@@ -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) {
// 子账号禁用
rtnMap.put("msg", "子账号禁用");
rtnMap.put("code", 203);
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
catch (Exception e) {
logger.error("fail to parse ip," + e.getMessage());
}
return ResultModel.OK(rtnMap);
}
else {
......
......@@ -9,9 +9,9 @@
<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 ref="autoCalculateFlow" method="run" cron="0 */10 * * * ?"/>
</task:scheduled-tasks>-->
<task:scheduled ref="autoCalculateFlow" method="run" cron="0 */6 * * * ?"/>
</task:scheduled-tasks>
</beans>
......@@ -6,7 +6,7 @@
function toolservice($rootScope,$timeout,UtilService){
var service = {},that = $rootScope,
rootmenu = {"admonitor":"广告监测","behavior":"行为分析","export":"数据导出","management":"管理中心"},
rootmenu = {"dataview":"数据概览","action":"行为分析","user":"用户分析","event":"埋点管理","tool":"工具"},
menu = {"custommenu": "行业看单","eventstats": "事件分析","funnel": "漏斗转化","retention": "留存分析",
"intelligentpath": "智能路径","usergroup": "用户分群","event": "APP事件管理","profile": "用户属性管理",
"logtool": "日志流","report": "下载报表","app": "产品中心","auth": "成员管理"};
......@@ -404,7 +404,6 @@
//菜单报送数据
service.getMenuSubmitData = function(submenu){
if($rootScope.pagePath=="userinfo")return;
if(!rootmenu[$rootScope.mainMenu])return;
var cmids = service.getCMidInfo();
var company = service.getUser().company;
......@@ -412,21 +411,25 @@
company = "";
}
var appkey = "",appcategory = "",appname = "";
var appkey = "",appcategory = "",appname = "",rootmenukey;
if($rootScope.appInstance){
appkey = $rootScope.appInstance.appkey;
appcategory = $rootScope.appInstance.appGenreName;
appname = $rootScope.appInstance.name;
}
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 params = {
appid: UtilService.getTKAppkey(),
who:Uuser.email,
what:"pageview",
context:{
rootmenu:rootmenu[$rootScope.mainMenu], //菜单分类
rootmenu:rootmenu[rootmenukey], //菜单分类
menu:menu[$rootScope.pagePath], //当前菜单
submenu:submenu, //子菜单-看单
sessionid:UtilService.getCookie("JSESSIONID"),
......
......@@ -275,14 +275,21 @@
}
$scope.flowKnow = true;
UtilService.setCookie("ryioRedCircle",true,7);
UtilService.setCookie("ryioRedCircle",true,7);
var params = {
accountId: auid
};
if(type == 'ioAlert'){
$scope.ioAlert = false;
params.ioFlow = true;
}
else if(type == 'ioDateAlert'){
$scope.ioDateAlert = false;
params.ioPastTime = true;
}
var closePM = HttpService.postInfo("mng/accountRestrict/confirm", params);
closePM.then(function(data) {});
}
$rootScope.menuSubmitData = function(submenu){
......
......@@ -3,7 +3,7 @@
.controller("collectCtrl",["$rootScope","$scope","$state","ToolService","$timeout",collectCtrl]);
function collectCtrl($rootScope,$scope,$state,ToolService,$timeout){
var meauTree = {
$rootScope.meauTree = {
"dataview":["custommenu"],
"action":["eventstats","funnel","retention","intelligentpath"],
"user":["usergroup"],
......@@ -28,8 +28,8 @@
n = n.substring(0,n);
}
$scope.menuCurFlag = "";
for(var k in meauTree){
var ms = meauTree[k];
for(var k in $rootScope.meauTree){
var ms = $rootScope.meauTree[k];
if(ms.indexOf(n)>-1){
$scope.menuCurFlag = k;
$scope.menustatus[k] = true;
......
......@@ -93,9 +93,14 @@
ToolService.showLoading();
var deletePM = HttpService.deleteInfo("mng/auth/"+$scope.delInfo.id+"/delete");
deletePM.then(function(){
ToolService.showTips("删除成功");
ToolService.hideLoading();
$scope.query();
if(data){
ToolService.showTips("删除成功");
$scope.query();
}
else{
ToolService.showTips("该账号已激活,不支持删除,您可以在右侧操作区对账号进行停用。");
}
});
}
$scope.sendEmailAgain = function(send){
......
......@@ -26,9 +26,12 @@ html,body{
display:inline-block;
margin-right:3px;
}
.iconfont.active, .active>.iconfont,.sidebarNav li:hover .iconfont, .activemore>.iconfont{
.iconfont.active, .active>.iconfont, .activemore>.iconfont{
color:#4186ec;
}
.sidebarNav li:not(.activemore):hover .iconfont{
color: $menulihoverft;
}
.icon-logo{
font-size:25px;
color:#fff;
......@@ -1109,8 +1112,8 @@ textarea.iptform{
margin-top:15px;
margin-right: 18px;
}
.sidebarNav li:hover a{
color:$menuliactiveft;
.sidebarNav li:not(.activemore):not(.active):hover a{
color:$menulihoverft;
}
.sidebarNav li.active{
background-color:$menuliactivebg;
......@@ -1139,7 +1142,7 @@ textarea.iptform{
color:$menuliactiveft;
}
.sidebarNav .subli:hover{
color:$menuliactiveft;
background:$menulihoverbg;
}
.submenuIcon{
background:url(../images/submenu.png) no-repeat;
......@@ -6534,7 +6537,7 @@ pre{
color:$menuftcolor;
}
.smallMenu li:hover a{
color:$menuliactiveft;
color:$menulihoverft;
}
.sidebarNav .subli.active {
border-left-color: $menubgcolor;
......
......@@ -17,8 +17,8 @@
<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 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="downTips()" 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">下载</a>
</td>
</tr>
</table>
......@@ -33,4 +33,4 @@
<li>目前仅支持导出昨日数据。</li>
</ol>
</dl>
</div>
\ No newline at end of file
</div>
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