Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张云鹏
/
uc-consumer
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
60b8b824
...
60b8b824da5589211d1dbd44fe6287f0c2eb5131
authored
2022-06-16 10:12:44 +0800
by
xianghan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1.修改会员信息修改、账号信息修改的方式
1 parent
9c38b950
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
0 deletions
src/main/java/com/topdraw/business/module/user/iptv/repository/UserTvRepository.java
src/main/java/com/topdraw/business/module/user/iptv/service/UserTvService.java
src/main/java/com/topdraw/business/module/user/iptv/service/impl/UserTvServiceImpl.java
src/main/java/com/topdraw/business/process/service/impl/UserOperationServiceImpl.java
src/main/java/com/topdraw/business/module/user/iptv/repository/UserTvRepository.java
View file @
60b8b82
...
...
@@ -5,6 +5,7 @@ import org.springframework.data.jpa.repository.JpaRepository;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
org.springframework.data.jpa.repository.Modifying
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.data.repository.query.Param
;
import
java.time.LocalDateTime
;
import
java.util.Optional
;
...
...
@@ -24,4 +25,35 @@ public interface UserTvRepository extends JpaRepository<UserTv, Long>, JpaSpecif
@Modifying
@Query
(
value
=
"UPDATE `uc_user_tv` SET `vis_user_id` = ?2, `update_time` = ?3 WHERE `id` = ?1"
,
nativeQuery
=
true
)
Integer
updateUserTvVisUserId
(
Long
id
,
Long
visUserId
,
LocalDateTime
now
);
@Modifying
@Query
(
value
=
"UPDATE `uc_user_tv` SET `member_id` = ?2, `update_time` = now() WHERE `platform_account` = ?1"
,
nativeQuery
=
true
)
void
updateMemberId
(
String
platformAccount
,
Long
memberId
);
@Modifying
@Query
(
value
=
"UPDATE `uc_user_tv` SET `priority_member_code` = ?2, `update_time` = now() WHERE `platform_account` = ?1"
,
nativeQuery
=
true
)
void
updatePriorityMemberCode
(
String
platformAccount
,
String
priorityMemberCode
);
@Modifying
@Query
(
value
=
"UPDATE `uc_user_tv` SET "
+
" `cellphone` = :#{#resources.cellphone}, "
+
" `username` = :#{#resources.username}, "
+
" `nickname` = :#{#resources.nickname}, "
+
" `image` = :#{#resources.image}, "
+
" `platform` = :#{#resources.platform}, "
+
" `login_days` = :#{#resources.loginDays}, "
+
" `continue_days` = :#{#resources.continueDays}, "
+
" `active_time` = :#{#resources.activeTime}, "
+
" `groups` = :#{#resources.groups}, "
+
" `tags` = :#{#resources.tags}, "
+
" `login_type` = :#{#resources.loginType}, "
+
" `status` = :#{#resources.status}, "
+
" `description` = :#{#resources.description}, "
+
" `create_by` = :#{#resources.createBy}, "
+
" `update_by` = :#{#resources.updateBy}, "
+
" `priority_member_code` = :#{#resources.priorityMemberCode}, "
+
" `vis_user_id` = :#{#resources.visUserId}, "
+
" `update_time` = now() WHERE `platform_account` = :#{#resources.platformAccount}"
,
nativeQuery
=
true
)
void
updateUserTvByPlatformAccount
(
@Param
(
"resources"
)
UserTv
userTv
);
}
...
...
src/main/java/com/topdraw/business/module/user/iptv/service/UserTvService.java
View file @
60b8b82
...
...
@@ -88,4 +88,24 @@ public interface UserTvService {
*/
UserTvDTO
asyncUpdateUserTvVisUserId
(
UserTv
resources
);
/**
*
* @param platformAccount
* @param id
*/
void
updateMemberId
(
String
platformAccount
,
Long
id
);
/**
*
* @param platformAccount
* @param priorityMemberCode
*/
void
updatePriorityMemberCode
(
String
platformAccount
,
String
priorityMemberCode
);
/**
*
* @param userTv
*/
void
updateUserTvByPlatformAccount
(
UserTv
userTv
);
}
...
...
src/main/java/com/topdraw/business/module/user/iptv/service/impl/UserTvServiceImpl.java
View file @
60b8b82
...
...
@@ -44,6 +44,25 @@ public class UserTvServiceImpl implements UserTvService {
@Autowired
private
UserTvRepository
userTvRepository
;
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
updateMemberId
(
String
platformAccount
,
Long
memberId
)
{
this
.
userTvRepository
.
updateMemberId
(
platformAccount
,
memberId
);
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
updatePriorityMemberCode
(
String
platformAccount
,
String
priorityMemberCode
)
{
this
.
userTvRepository
.
updatePriorityMemberCode
(
platformAccount
,
priorityMemberCode
);
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
updateUserTvByPlatformAccount
(
UserTv
userTv
)
{
this
.
userTvRepository
.
updateUserTvByPlatformAccount
(
userTv
);
}
/**
* 获取大屏账户对应的会员
* <Waring>
...
...
src/main/java/com/topdraw/business/process/service/impl/UserOperationServiceImpl.java
View file @
60b8b82
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to post a comment