Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
saasio
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
reyun
saasio
Commits
8a3cbaf8
Commit
8a3cbaf8
authored
Mar 09, 2018
by
zhangxiaoyan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
login valid
parent
e263387e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
64 additions
and
140 deletions
+64
-140
LoginController.java
src/main/java/com/reyun/controller/LoginController.java
+0
-10
AppTypeEnum.java
src/main/java/com/reyun/dic/AppTypeEnum.java
+39
-0
Notice.java
src/main/java/com/reyun/model/Notice.java
+0
-128
NoticeService.java
src/main/java/com/reyun/service/NoticeService.java
+0
-1
AppServiceImpl.java
src/main/java/com/reyun/service/impl/AppServiceImpl.java
+25
-0
NoticeServiceImpl.java
src/main/java/com/reyun/service/impl/NoticeServiceImpl.java
+0
-1
No files found.
src/main/java/com/reyun/controller/LoginController.java
View file @
8a3cbaf8
...
...
@@ -108,16 +108,6 @@ public class LoginController
rtnMap
.
put
(
"code"
,
203
);
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
);
}
}
}
//存储token
...
...
src/main/java/com/reyun/dic/AppTypeEnum.java
0 → 100644
View file @
8a3cbaf8
package
com
.
reyun
.
dic
;
/**
* description:
*
* @author nolan
* @date 29/12/2017
*/
public
enum
AppTypeEnum
{
TEST
(
"00"
,
"测试"
),
GAME
(
"02"
,
"游戏"
),
APP
(
"04"
,
"应用"
);
private
String
code
;
private
String
val
;
AppTypeEnum
(
String
code
,
String
val
)
{
this
.
code
=
code
;
this
.
val
=
val
;
}
public
static
AppTypeEnum
getVal
(
String
code
)
{
for
(
AppTypeEnum
appTypeEnum
:
AppTypeEnum
.
values
())
{
if
(
appTypeEnum
.
getCode
().
equals
(
code
))
{
return
appTypeEnum
;
}
}
return
null
;
}
public
String
getCode
()
{
return
code
;
}
public
String
getVal
()
{
return
val
;
}
}
src/main/java/com/reyun/model/Notice.java
deleted
100644 → 0
View file @
e263387e
package
com
.
reyun
.
model
;
import
javax.persistence.*
;
import
javax.validation.constraints.NotNull
;
import
java.util.Date
;
/**
* Created by sunhao on 17/3/1.
*/
@Entity
public
class
Notice
{
private
Long
id
;
@NotNull
private
String
title
;
@NotNull
private
String
content
;
private
boolean
isdeploy
;
private
Date
deployDate
;
private
Date
createDate
;
private
Date
endDate
;
private
String
createUser
;
private
Date
modifyDate
;
private
String
modifyUser
;
private
boolean
isTop
;
private
boolean
isRead
;
@Id
@GeneratedValue
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
@Column
(
name
=
"content"
,
columnDefinition
=
"text"
)
public
String
getContent
()
{
return
content
;
}
public
void
setContent
(
String
content
)
{
this
.
content
=
content
;
}
public
boolean
getIsdeploy
()
{
return
isdeploy
;
}
public
void
setIsdeploy
(
boolean
isdeploy
)
{
this
.
isdeploy
=
isdeploy
;
}
public
Date
getDeployDate
()
{
return
deployDate
;
}
public
void
setDeployDate
(
Date
deployDate
)
{
this
.
deployDate
=
deployDate
;
}
public
Date
getCreateDate
()
{
return
createDate
;
}
public
void
setCreateDate
(
Date
createDate
)
{
this
.
createDate
=
createDate
;
}
public
String
getCreateUser
()
{
return
createUser
;
}
public
void
setCreateUser
(
String
createUser
)
{
this
.
createUser
=
createUser
;
}
public
Date
getEndDate
()
{
return
endDate
;
}
public
void
setEndDate
(
Date
endDate
)
{
this
.
endDate
=
endDate
;
}
public
Date
getModifyDate
()
{
return
modifyDate
;
}
public
void
setModifyDate
(
Date
modifyDate
)
{
this
.
modifyDate
=
modifyDate
;
}
public
String
getModifyUser
()
{
return
modifyUser
;
}
public
void
setModifyUser
(
String
modifyUser
)
{
this
.
modifyUser
=
modifyUser
;
}
public
boolean
getIsTop
()
{
return
isTop
;
}
public
void
setIsTop
(
boolean
isTop
)
{
this
.
isTop
=
isTop
;
}
@Transient
public
boolean
getIsRead
()
{
return
isRead
;
}
public
void
setIsRead
(
boolean
isRead
)
{
this
.
isRead
=
isRead
;
}
}
src/main/java/com/reyun/service/NoticeService.java
View file @
8a3cbaf8
package
com
.
reyun
.
service
;
import
com.reyun.model.IONotice
;
import
com.reyun.model.Notice
;
import
com.reyun.model.UserNoticeLog
;
import
java.util.List
;
...
...
src/main/java/com/reyun/service/impl/AppServiceImpl.java
View file @
8a3cbaf8
...
...
@@ -5,6 +5,7 @@ import com.google.common.base.Function;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.Iterables
;
import
com.google.common.collect.Maps
;
import
com.reyun.dic.AppTypeEnum
;
import
com.reyun.dic.ReportEnumType
;
import
com.reyun.dic.RoleEnumType
;
import
com.reyun.model.*
;
...
...
@@ -17,8 +18,11 @@ import com.reyun.service.IDicService;
import
com.reyun.util.CipherUtil
;
import
com.reyun.util.Constant
;
import
com.reyun.util.DateUtil
;
import
com.reyun.util.HttpClientUtil
;
import
com.reyun.util.ShortUrlGenerator
;
import
com.reyun.util.StringUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
...
...
@@ -34,6 +38,8 @@ import java.util.stream.Collectors;
@Service
public
class
AppServiceImpl
implements
AppService
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AppServiceImpl
.
class
);
@Autowired
AppRepository
appRepository
;
...
...
@@ -170,6 +176,11 @@ public class AppServiceImpl implements AppService {
this
.
iAppTagService
.
saveOrUpdate
(
app
.
getId
(),
app
.
getAppTagList
());
}
if
(
AppTypeEnum
.
APP
.
getCode
().
equals
(
app
.
getTagType
())
||
AppTypeEnum
.
GAME
.
getCode
().
equals
(
app
.
getTagType
()))
{
boolean
flag
=
doInvokeOfficeAudit
(
app
.
getId
());
logger
.
info
(
"调试完成, 分配任务至运营人员. app:{}, httpstatus: {}"
,
app
.
getId
(),
flag
);
}
return
app
;
}
...
...
@@ -258,4 +269,18 @@ public class AppServiceImpl implements AppService {
return
categoryRepository
.
findAll
();
}
private
boolean
doInvokeOfficeAudit
(
Long
app
){
String
url
=
Constant
.
adminUrl
+
"/api/ioapp/tag/task/distribute?app="
+
app
;
String
result
=
HttpClientUtil
.
doHttpGetRequest
(
url
,
""
);
Map
resObj
;
try
{
resObj
=
new
ObjectMapper
().
readValue
(
result
,
Map
.
class
);
}
catch
(
IOException
e
)
{
logger
.
error
(
"doInvokeOfficeAudit occur failed. app:{}"
,
app
);
return
false
;
}
return
"200"
.
equals
(
resObj
.
get
(
"code"
));
}
}
src/main/java/com/reyun/service/impl/NoticeServiceImpl.java
View file @
8a3cbaf8
...
...
@@ -4,7 +4,6 @@ import com.google.common.base.Function;
import
com.google.common.collect.Lists
;
import
com.reyun.model.Account
;
import
com.reyun.model.IONotice
;
import
com.reyun.model.Notice
;
import
com.reyun.model.UserNoticeLog
;
import
com.reyun.repository.NoticeRepository
;
import
com.reyun.repository.UserNoticeLogRepository
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment