Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
281bd111
Commit
281bd111
authored
Oct 26, 2020
by
giaogiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加或修改推送token
parent
d65753d5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
69 additions
and
4 deletions
+69
-4
api-app/src/main/java/com/jumeirah/api/app/controller/AppUserController.java
+44
-0
api-app/src/main/java/com/jumeirah/api/app/entity/param/DeviceTokenParam.java
+10
-0
common/src/main/java/com/jumeirah/common/entity/AppUser.java
+3
-0
common/src/main/java/com/jumeirah/common/param/CharterIntroductionUpdateParam.java
+8
-2
common/src/main/java/com/jumeirah/common/service/impl/CharterIntroductionServiceImpl.java
+3
-0
framework/src/main/java/io/geekidea/springbootplus/framework/shiro/vo/JwtTokenRedisVo.java
+1
-2
No files found.
api-app/src/main/java/com/jumeirah/api/app/controller/AppUserController.java
View file @
281bd111
package
com
.
jumeirah
.
api
.
app
.
controller
;
package
com
.
jumeirah
.
api
.
app
.
controller
;
import
com.jumeirah.api.app.entity.param.DeviceTokenParam
;
import
com.jumeirah.api.app.service.AppUserApiService
;
import
com.jumeirah.api.app.service.AppUserApiService
;
import
com.jumeirah.common.entity.AppUser
;
import
com.jumeirah.common.param.app.AppSmsRegisterParam
;
import
com.jumeirah.common.param.app.AppSmsRegisterParam
;
import
com.jumeirah.common.param.app.AppUserInfoParam
;
import
com.jumeirah.common.param.app.AppUserInfoParam
;
import
com.jumeirah.common.param.app.AppUserPhoneUpdateParam
;
import
com.jumeirah.common.param.app.AppUserPhoneUpdateParam
;
...
@@ -11,9 +13,11 @@ import io.geekidea.springbootplus.framework.common.controller.BaseController;
...
@@ -11,9 +13,11 @@ import io.geekidea.springbootplus.framework.common.controller.BaseController;
import
io.geekidea.springbootplus.framework.log.annotation.Module
;
import
io.geekidea.springbootplus.framework.log.annotation.Module
;
import
io.geekidea.springbootplus.framework.log.annotation.OperationLog
;
import
io.geekidea.springbootplus.framework.log.annotation.OperationLog
;
import
io.geekidea.springbootplus.framework.log.enums.OperationLogType
;
import
io.geekidea.springbootplus.framework.log.enums.OperationLogType
;
import
io.geekidea.springbootplus.framework.shiro.jwt.JwtToken
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.shiro.SecurityUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
@@ -42,6 +46,46 @@ public class AppUserController extends BaseController {
...
@@ -42,6 +46,46 @@ public class AppUserController extends BaseController {
private
AppUserApiService
appUserApiService
;
private
AppUserApiService
appUserApiService
;
/**
/**
* ios-添加或修改推送token
*/
@PostMapping
(
"/iosDeviceToken"
)
@OperationLog
(
name
=
"ios-添加或修改推送token"
,
type
=
OperationLogType
.
ADD
)
@ApiOperation
(
value
=
"ios-添加或修改推送token"
,
notes
=
"添加和修改都调用此接口"
,
response
=
ApiResult
.
class
)
public
ApiResult
<
Boolean
>
addIosAppDeviceToken
(
@RequestBody
DeviceTokenParam
deviceToken
)
throws
Exception
{
AppUser
appUser
=
new
AppUser
();
appUser
.
setDeviceToken
(
deviceToken
.
getDeviceToken
());
appUser
.
setDeviceType
(
2
);
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
appUser
.
setId
(
jwtToken
.
getUserId
());
boolean
flag
=
appUserService
.
updateAppUser
(
appUser
);
return
ApiResult
.
result
(
flag
);
}
/**
* android-添加或修改推送token
*/
@PostMapping
(
"/androidDeviceToken"
)
@OperationLog
(
name
=
"android-添加或修改推送token"
,
type
=
OperationLogType
.
ADD
)
@ApiOperation
(
value
=
"android-添加或修改推送token"
,
notes
=
"添加和修改都调用此接口"
,
response
=
ApiResult
.
class
)
public
ApiResult
<
Boolean
>
addAppDeviceToken
(
@RequestBody
DeviceTokenParam
deviceToken
)
throws
Exception
{
AppUser
appUser
=
new
AppUser
();
appUser
.
setDeviceToken
(
deviceToken
.
getDeviceToken
());
appUser
.
setDeviceType
(
1
);
JwtToken
jwtToken
=
(
JwtToken
)
SecurityUtils
.
getSubject
().
getPrincipal
();
appUser
.
setId
(
jwtToken
.
getUserId
());
boolean
flag
=
appUserService
.
updateAppUser
(
appUser
);
return
ApiResult
.
result
(
flag
);
}
/**
* 补充或修改APP用户信息
* 补充或修改APP用户信息
*/
*/
@PostMapping
(
"/updateAppUserInfo"
)
@PostMapping
(
"/updateAppUserInfo"
)
...
...
api-app/src/main/java/com/jumeirah/api/app/entity/param/DeviceTokenParam.java
0 → 100644
View file @
281bd111
package
com
.
jumeirah
.
api
.
app
.
entity
.
param
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
public
class
DeviceTokenParam
implements
Serializable
{
private
String
deviceToken
;
}
common/src/main/java/com/jumeirah/common/entity/AppUser.java
View file @
281bd111
...
@@ -71,6 +71,9 @@ public class AppUser extends BaseEntity {
...
@@ -71,6 +71,9 @@ public class AppUser extends BaseEntity {
@ApiModelProperty
(
"性别,0:女,1:男,默认1"
)
@ApiModelProperty
(
"性别,0:女,1:男,默认1"
)
private
Integer
gender
;
private
Integer
gender
;
@ApiModelProperty
(
"设备类型,1:安卓,2:ios"
)
private
Integer
deviceType
;
@ApiModelProperty
(
"头像"
)
@ApiModelProperty
(
"头像"
)
private
String
head
;
private
String
head
;
...
...
common/src/main/java/com/jumeirah/common/param/CharterIntroductionUpdateParam.java
View file @
281bd111
package
com
.
jumeirah
.
common
.
param
;
package
com
.
jumeirah
.
common
.
param
;
import
com.jumeirah.common.entity.base.ImgJson
;
import
io.geekidea.springbootplus.framework.common.entity.BaseEntity
;
import
io.geekidea.springbootplus.framework.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -7,6 +8,8 @@ import lombok.Data;
...
@@ -7,6 +8,8 @@ import lombok.Data;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
java.util.List
;
/**
/**
* 包机介绍
* 包机介绍
*
*
...
@@ -20,8 +23,11 @@ import lombok.experimental.Accessors;
...
@@ -20,8 +23,11 @@ import lombok.experimental.Accessors;
public
class
CharterIntroductionUpdateParam
extends
BaseEntity
{
public
class
CharterIntroductionUpdateParam
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"包机图片url, json字符串"
,
example
=
"[{\"url\":\"https://picsum.photos/100/200/\",\"height\":200,\"width\":200},{\"url\":\"https://picsum.photos/100/200/\",\"height\":200,\"width\":200},{\"url\":\"https://picsum.photos/100/200/\",\"height\":200,\"width\":200}]"
)
@ApiModelProperty
(
"id"
)
private
String
imgUrl
;
private
Integer
id
;
@ApiModelProperty
(
"包机图片url"
)
private
List
<
ImgJson
>
imgUrl
;
@ApiModelProperty
(
value
=
"包机文字"
)
@ApiModelProperty
(
value
=
"包机文字"
)
private
String
text
;
private
String
text
;
...
...
common/src/main/java/com/jumeirah/common/service/impl/CharterIntroductionServiceImpl.java
View file @
281bd111
...
@@ -60,6 +60,9 @@ public class CharterIntroductionServiceImpl extends BaseServiceImpl<CharterIntro
...
@@ -60,6 +60,9 @@ public class CharterIntroductionServiceImpl extends BaseServiceImpl<CharterIntro
CharterIntroduction
charterIntroduction
=
new
CharterIntroduction
();
CharterIntroduction
charterIntroduction
=
new
CharterIntroduction
();
BeanUtils
.
copyProperties
(
charterIntroductionUpdateParam
,
charterIntroduction
);
BeanUtils
.
copyProperties
(
charterIntroductionUpdateParam
,
charterIntroduction
);
if
(
charterIntroductionUpdateParam
.
getImgUrl
()
!=
null
)
{
charterIntroduction
.
setImgUrl
(
Jackson
.
toJsonString
(
charterIntroductionUpdateParam
.
getImgUrl
()));
}
return
super
.
updateById
(
charterIntroduction
);
return
super
.
updateById
(
charterIntroduction
);
}
}
...
...
framework/src/main/java/io/geekidea/springbootplus/framework/shiro/vo/JwtTokenRedisVo.java
View file @
281bd111
...
@@ -42,11 +42,10 @@ public class JwtTokenRedisVo implements Serializable {
...
@@ -42,11 +42,10 @@ public class JwtTokenRedisVo implements Serializable {
@ApiModelProperty
(
"设备推送token"
)
@ApiModelProperty
(
"设备推送token"
)
private
String
deviceToken
;
private
String
deviceToken
;
/**
/**
* 用户系统类型
* 用户系统类型
*/
*/
private
String
client
Type
;
private
String
device
Type
;
/**
/**
* mcId
* mcId
...
...
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