Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张云鹏
/
uc-engine
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
d51e654c
...
d51e654c57c211050a8ab1b695f4b06c061baf48
authored
2022-06-28 13:53:24 +0800
by
xianghan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.添加海南app登录实现逻辑
1 parent
bc32e2f6
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
20 deletions
member-service-impl/src/main/java/com/topdraw/business/module/user/app/service/UserAppService.java
member-service-impl/src/main/java/com/topdraw/business/module/user/app/service/impl/UserAppServiceImpl.java
member-service-impl/src/main/java/com/topdraw/business/process/rest/UserOperationController.java
member-service-impl/src/main/java/com/topdraw/business/process/service/UserOperationService.java
member-service-impl/src/main/java/com/topdraw/business/process/service/impl/UserOperationServiceImpl.java
member-service-impl/src/main/java/com/topdraw/business/module/user/app/service/UserAppService.java
View file @
d51e654
...
...
@@ -21,7 +21,7 @@ public interface UserAppService {
* @param username
* @return
*/
UserAppDTO
findByUser
N
ame
(
String
username
);
UserAppDTO
findByUser
n
ame
(
String
username
);
/**
...
...
@@ -30,7 +30,7 @@ public interface UserAppService {
* @param password
* @return
*/
UserAppDTO
findByUser
N
ameAndPassword
(
String
username
,
String
password
);
UserAppDTO
findByUser
n
ameAndPassword
(
String
username
,
String
password
);
/**
* 检查账号和验证码
...
...
@@ -38,7 +38,7 @@ public interface UserAppService {
* @param VerificationCode
* @return
*/
UserAppDTO
findByUser
N
ameAndVerificationCode
(
String
username
,
String
VerificationCode
);
UserAppDTO
findByUser
n
ameAndVerificationCode
(
String
username
,
String
VerificationCode
);
/**
* 检查通过第三方账号
...
...
member-service-impl/src/main/java/com/topdraw/business/module/user/app/service/impl/UserAppServiceImpl.java
View file @
d51e654
...
...
@@ -34,8 +34,6 @@ public class UserAppServiceImpl implements UserAppService {
private
UserAppRepository
userAppRepository
;
@Autowired
private
UserAppMapper
userAppMapper
;
@Autowired
private
MemberService
memberService
;
@Override
...
...
@@ -48,21 +46,22 @@ public class UserAppServiceImpl implements UserAppService {
@Override
@Transactional
(
readOnly
=
true
)
public
UserAppDTO
findByUser
N
ame
(
String
username
)
{
public
UserAppDTO
findByUser
n
ame
(
String
username
)
{
UserApp
userApp
=
this
.
userAppRepository
.
findByUsername
(
username
).
orElseGet
(
UserApp:
:
new
);
return
this
.
userAppMapper
.
toDto
(
userApp
);
}
@Override
@Transactional
(
readOnly
=
true
)
public
UserAppDTO
findByUser
N
ameAndPassword
(
String
username
,
String
password
)
{
public
UserAppDTO
findByUser
n
ameAndPassword
(
String
username
,
String
password
)
{
UserApp
userApp
=
this
.
userAppRepository
.
findByUsernameAndPassword
(
username
,
password
).
orElseGet
(
UserApp:
:
new
);
return
this
.
userAppMapper
.
toDto
(
userApp
);
}
@Override
@Transactional
(
readOnly
=
true
)
public
UserAppDTO
findByUserNameAndVerificationCode
(
String
username
,
String
VerificationCode
)
{
public
UserAppDTO
findByUsernameAndVerificationCode
(
String
username
,
String
VerificationCode
)
{
// TDDO 需要接入短信网关
UserApp
userApp
=
null
;
return
this
.
userAppMapper
.
toDto
(
userApp
);
}
...
...
member-service-impl/src/main/java/com/topdraw/business/process/rest/UserOperationController.java
View file @
d51e654
package
com
.
topdraw
.
business
.
process
.
rest
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.topdraw.annotation.AnonymousAccess
;
import
com.topdraw.annotation.Log
;
import
com.topdraw.business.module.common.validated.CreateGroup
;
import
com.topdraw.business.module.common.validated.UpdateGroup
;
import
com.topdraw.business.module.member.domain.Member
;
import
com.topdraw.business.module.member.service.MemberService
;
import
com.topdraw.business.module.member.service.dto.MemberDTO
;
import
com.topdraw.business.module.user.app.domain.UserApp
;
...
...
@@ -35,13 +33,11 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.Assert
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.constraints.NotNull
;
import
java.io.IOException
;
import
java.net.URLDecoder
;
import
java.sql.Timestamp
;
...
...
@@ -77,18 +73,18 @@ public class UserOperationController {
@ApiOperation
(
"app登录"
)
@AnonymousAccess
public
ResultInfo
appLogin
(
@Validated
@RequestBody
UserApp
resources
)
{
log
.
info
(
"
新增App账号 ==>> param ==>> [add
Login#{}]"
,
resources
);
log
.
info
(
"
app登录 ==>> param ==>> [app
Login#{}]"
,
resources
);
this
.
userOperationService
.
appLogin
(
resources
);
UserTvDTO
userTvDTO
=
this
.
userOperationService
.
appLogin
(
resources
);
return
ResultInfo
.
success
();
}
@Log
@PostMapping
(
value
=
"/
appLogin
"
)
@ApiOperation
(
"
app登录
"
)
@PostMapping
(
value
=
"/
updateUserApp
"
)
@ApiOperation
(
"
修改app账号信息
"
)
@AnonymousAccess
public
ResultInfo
update
AppCount
(
@Validated
@RequestBody
UserApp
resources
)
{
log
.
info
(
"
新增App账号 ==>> param ==>> [addLogin
#{}]"
,
resources
);
public
ResultInfo
update
UserApp
(
@Validated
@RequestBody
UserApp
resources
)
{
log
.
info
(
"
修改app账号信息 ==>> param ==>> [updateUserApp
#{}]"
,
resources
);
this
.
userOperationService
.
appLogin
(
resources
);
return
ResultInfo
.
success
();
...
...
member-service-impl/src/main/java/com/topdraw/business/process/service/UserOperationService.java
View file @
d51e654
...
...
@@ -172,6 +172,6 @@ public interface UserOperationService {
*
* @param resources
*/
void
appLogin
(
UserApp
resources
);
UserTvDTO
appLogin
(
UserApp
resources
);
}
...
...
member-service-impl/src/main/java/com/topdraw/business/process/service/impl/UserOperationServiceImpl.java
View file @
d51e654
...
...
@@ -12,6 +12,8 @@ import com.topdraw.business.module.member.service.MemberService;
import
com.topdraw.business.module.member.service.dto.MemberDTO
;
import
com.topdraw.business.module.member.service.dto.MemberSimpleDTO
;
import
com.topdraw.business.module.user.app.domain.UserApp
;
import
com.topdraw.business.module.user.app.service.UserAppService
;
import
com.topdraw.business.module.user.app.service.dto.UserAppDTO
;
import
com.topdraw.business.module.user.iptv.domain.UserConstant
;
import
com.topdraw.business.module.user.iptv.domain.UserTv
;
import
com.topdraw.business.module.user.iptv.domain.UserTvBuilder
;
...
...
@@ -77,6 +79,8 @@ public class UserOperationServiceImpl implements UserOperationService {
@Autowired
private
MemberService
memberService
;
@Autowired
private
UserAppService
userAppService
;
@Autowired
private
UserWeixinService
userWeixinService
;
@Autowired
private
UserWeixinRepository
userWeixinRepository
;
...
...
@@ -111,9 +115,15 @@ public class UserOperationServiceImpl implements UserOperationService {
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
appLogin
(
UserApp
resources
)
{
public
UserTvDTO
appLogin
(
UserApp
resources
)
{
String
username
=
resources
.
getUsername
();
UserAppDTO
userAppDTO
=
this
.
userAppService
.
findByUsername
(
username
);
if
(
Objects
.
nonNull
(
userAppDTO
))
{
}
return
null
;
}
/**
...
...
Please
register
or
sign in
to post a comment