Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐少华
midjourney-proxy
Commits
2bfc044b
Commit
2bfc044b
authored
Sep 17, 2019
by
阮思源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改品牌方入群
parent
0174efcb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
7 deletions
+54
-7
BookGroupBizImpl.java
...java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
+5
-2
JoinGroupCipher.java
...in/java/com/pcloud/book/group/entity/JoinGroupCipher.java
+12
-0
CipherTypeEnum.java
...main/java/com/pcloud/book/group/enums/CipherTypeEnum.java
+26
-0
BookGuideBizImpl.java
...a/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
+5
-2
JoinGroupCipher.xml
...-book/src/main/resources/mapper/group/JoinGroupCipher.xml
+6
-3
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
View file @
2bfc044b
...
...
@@ -31,6 +31,7 @@ import com.pcloud.book.group.entity.BookGroup;
import
com.pcloud.book.group.entity.GroupQrcode
;
import
com.pcloud.book.group.entity.JoinGroupCipher
;
import
com.pcloud.book.group.entity.TempletRelevance
;
import
com.pcloud.book.group.enums.CipherTypeEnum
;
import
com.pcloud.book.group.enums.LargTempletEnum
;
import
com.pcloud.book.group.vo.StatisticVO
;
...
...
@@ -1251,6 +1252,7 @@ public class BookGroupBizImpl implements BookGroupBiz {
joinGroupCipherNew
.
setWechatUserId
(
wechatUserId
);
joinGroupCipherNew
.
setClassifyId
(
classifyId
);
joinGroupCipherNew
.
setAltId
(
selfRobotDTO
.
getWxId
());
joinGroupCipherNew
.
setType
(
CipherTypeEnum
.
CLASSIFY_CIPHER
.
code
);
joinGroupCipherDao
.
insert
(
joinGroupCipherNew
);
}
ownAltQrcodeInfoDTO
.
setCipher
(
cipher
);
...
...
@@ -1296,7 +1298,7 @@ public class BookGroupBizImpl implements BookGroupBiz {
if
(
joinGroupCipher
!=
null
)
{
cipher
=
joinGroupCipher
.
getCipher
();
//避免之前通过社群码入群
if
(!
cipher
.
contains
(
"RAYS_PCLOUD_"
)){
if
(!
CipherTypeEnum
.
QRCODE_CIPHER
.
code
.
equals
(
joinGroupCipher
.
getType
()
)){
cipher
=
UUIDUitl
.
generateShort
();
//查重,如果有重复,再次生成
JoinGroupCipher
joinGroupCipherHas
=
joinGroupCipherDao
.
getByCipher
(
cipher
);
...
...
@@ -1314,13 +1316,14 @@ public class BookGroupBizImpl implements BookGroupBiz {
if
(
joinGroupCipherHas
!=
null
)
{
cipher
=
UUIDUitl
.
generateShort
();
}
cipher
=
"RAYS_
PCLOUD_
"
+
cipher
;
cipher
=
"RAYS_"
+
cipher
;
JoinGroupCipher
joinGroupCipherNew
=
new
JoinGroupCipher
();
joinGroupCipherNew
.
setCipher
(
cipher
);
joinGroupCipherNew
.
setWechatUserId
(
wechatUserId
);
joinGroupCipherNew
.
setClassifyId
(
classifyId
);
joinGroupCipherNew
.
setAltId
(
selfRobotDTO
.
getWxId
());
joinGroupCipherNew
.
setQrcodeId
(
qrcodeId
);
joinGroupCipherNew
.
setType
(
CipherTypeEnum
.
QRCODE_CIPHER
.
code
);
joinGroupCipherDao
.
insert
(
joinGroupCipherNew
);
}
ownAltQrcodeInfoDTO
.
setCipher
(
cipher
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/entity/JoinGroupCipher.java
View file @
2bfc044b
...
...
@@ -32,6 +32,9 @@ public class JoinGroupCipher extends BaseEntity {
@ApiModelProperty
(
"机器人id"
)
private
String
altId
;
@ApiModelProperty
(
"暗号类型:1群,2分类,3社群码"
)
private
Integer
type
;
public
String
getCipher
()
{
return
cipher
;
}
...
...
@@ -88,6 +91,14 @@ public class JoinGroupCipher extends BaseEntity {
this
.
altId
=
altId
;
}
public
Integer
getType
()
{
return
type
;
}
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
@Override
public
String
toString
()
{
return
"JoinGroupCipher{"
+
...
...
@@ -98,6 +109,7 @@ public class JoinGroupCipher extends BaseEntity {
", wxId='"
+
wxId
+
'\''
+
", hasUsed="
+
hasUsed
+
", altId='"
+
altId
+
'\''
+
", type="
+
type
+
"} "
+
super
.
toString
();
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/enums/CipherTypeEnum.java
0 → 100644
View file @
2bfc044b
package
com
.
pcloud
.
book
.
group
.
enums
;
public
enum
CipherTypeEnum
{
/**
* 群暗号
*/
QRCODE_CIPHER
(
1
,
"群暗号"
),
/**
* 分类暗号
*/
CLASSIFY_CIPHER
(
2
,
"分类暗号"
),
/**
* 社群码暗号
*/
BOOK_GROUP_CIPHER
(
3
,
"社群码暗号"
);
public
final
Integer
code
;
public
final
String
name
;
CipherTypeEnum
(
Integer
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
View file @
2bfc044b
...
...
@@ -20,6 +20,7 @@ import com.pcloud.book.group.dto.PushAddUserMessageDTO;
import
com.pcloud.book.group.entity.AppTouchRecord
;
import
com.pcloud.book.group.entity.GroupQrcode
;
import
com.pcloud.book.group.entity.JoinGroupCipher
;
import
com.pcloud.book.group.enums.CipherTypeEnum
;
import
com.pcloud.book.group.enums.TouchTypeEnum
;
import
com.pcloud.book.group.tools.SendWeixinRequestTools
;
import
com.pcloud.book.group.vo.GroupQrcodeBaseInfoVO
;
...
...
@@ -123,9 +124,11 @@ public class BookGuideBizImpl implements BookGuideBiz {
//获取群
GroupQrcodeBaseInfoVO
wxGroup
=
bookGroupClassifyBiz
.
getWxGroupIdByClassifyIdAndWechatId
(
dto
.
getClassifyId
(),
dto
.
getWechatUserId
());
//判断是否是品牌方进具体群,如果是,从暗号表获取已经定好的群
if
((!
StringUtil
.
isEmpty
(
agreeAddUserDTO
.
getCipher
()))
&&
agreeAddUserDTO
.
getCipher
().
contains
(
"RAYS_
PCLOUD_
"
))
{
if
((!
StringUtil
.
isEmpty
(
agreeAddUserDTO
.
getCipher
()))
&&
agreeAddUserDTO
.
getCipher
().
contains
(
"RAYS_"
))
{
JoinGroupCipher
joinGroupCipher
=
joinGroupCipherDao
.
getByCipher
(
agreeAddUserDTO
.
getCipher
());
wxGroup
=
groupQrcodeDao
.
getBaseById
(
joinGroupCipher
.
getQrcodeId
());
if
(
CipherTypeEnum
.
QRCODE_CIPHER
.
code
.
equals
(
joinGroupCipher
.
getType
()))
{
wxGroup
=
groupQrcodeDao
.
getBaseById
(
joinGroupCipher
.
getQrcodeId
());
}
}
if
(
null
==
wxGroup
)
{
log
.
error
(
"[同意加好友发送欢迎语] : bookGroupClassifyBiz.getWxGroupIdByClassifyIdAndWechatId dto:{}"
);
...
...
pcloud-service-book/src/main/resources/mapper/group/JoinGroupCipher.xml
View file @
2bfc044b
...
...
@@ -12,10 +12,11 @@
<result
column=
"wx_id"
property=
"wxId"
jdbcType=
"VARCHAR"
/>
<result
column=
"has_used"
property=
"hasUsed"
jdbcType=
"BOOLEAN"
/>
<result
column=
"alt_id"
property=
"altId"
jdbcType=
"VARCHAR"
/>
<result
column=
"type"
property=
"type"
jdbcType=
"INTEGER"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, cipher, classify_id, qrcode_id, create_time, wechat_user_id, update_time, wx_id, has_used, alt_id
id, cipher, classify_id, qrcode_id, create_time, wechat_user_id, update_time, wx_id, has_used, alt_id
, type
</sql>
<insert
id=
"insert"
parameterType=
"com.pcloud.book.group.entity.JoinGroupCipher"
useGeneratedKeys=
"true"
...
...
@@ -28,7 +29,8 @@
create_time,
wechat_user_id,
has_used,
alt_id
alt_id,
type
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{cipher,jdbcType=VARCHAR},
...
...
@@ -37,7 +39,8 @@
now(),
#{wechatUserId,jdbcType=BIGINT},
0,
#{altId,jdbcType=VARCHAR}
#{altId,jdbcType=VARCHAR},
#{type,jdbcType=INTEGER}
</trim>
</insert>
...
...
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