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
27c2119a
Commit
27c2119a
authored
Aug 13, 2019
by
阮思源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改没有点击记录的bug
parent
12b495f8
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
8 deletions
+49
-8
JoinGroupCipherDao.java
...in/java/com/pcloud/book/group/dao/JoinGroupCipherDao.java
+2
-0
JoinGroupCipherDaoImpl.java
...om/pcloud/book/group/dao/impl/JoinGroupCipherDaoImpl.java
+9
-0
JoinGroupCipherDTO.java
...in/java/com/pcloud/book/group/dto/JoinGroupCipherDTO.java
+2
-0
JoinGroupCipher.java
...in/java/com/pcloud/book/group/entity/JoinGroupCipher.java
+12
-0
BookGuideBizImpl.java
...a/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
+6
-4
BookKeywordBizImpl.java
...com/pcloud/book/keywords/biz/impl/BookKeywordBizImpl.java
+3
-1
JoinGroupCipher.xml
...-book/src/main/resources/mapper/group/JoinGroupCipher.xml
+15
-3
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/JoinGroupCipherDao.java
View file @
27c2119a
...
@@ -16,4 +16,6 @@ public interface JoinGroupCipherDao extends BaseDao<JoinGroupCipher> {
...
@@ -16,4 +16,6 @@ public interface JoinGroupCipherDao extends BaseDao<JoinGroupCipher> {
void
updateCipherStateToUsed
(
String
cipher
,
String
wxId
);
void
updateCipherStateToUsed
(
String
cipher
,
String
wxId
);
List
<
JoinGroupCipherDTO
>
getClassifyIdsByWxIdAndAltId
(
String
wxId
,
String
altId
);
List
<
JoinGroupCipherDTO
>
getClassifyIdsByWxIdAndAltId
(
String
wxId
,
String
altId
);
void
updateQrcodeId
(
String
cipher
,
String
wxId
,
Long
qrcodeId
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/impl/JoinGroupCipherDaoImpl.java
View file @
27c2119a
...
@@ -50,4 +50,13 @@ public class JoinGroupCipherDaoImpl extends BaseDaoImpl<JoinGroupCipher> impleme
...
@@ -50,4 +50,13 @@ public class JoinGroupCipherDaoImpl extends BaseDaoImpl<JoinGroupCipher> impleme
map
.
put
(
"altId"
,
altId
);
map
.
put
(
"altId"
,
altId
);
return
this
.
getSqlSession
().
selectList
(
this
.
getStatement
(
"getClassifyIdsByWxIdAndAltId"
),
map
);
return
this
.
getSqlSession
().
selectList
(
this
.
getStatement
(
"getClassifyIdsByWxIdAndAltId"
),
map
);
}
}
@Override
public
void
updateQrcodeId
(
String
cipher
,
String
wxId
,
Long
qrcodeId
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"cipher"
,
cipher
);
map
.
put
(
"wxId"
,
wxId
);
map
.
put
(
"qrcodeId"
,
qrcodeId
);
this
.
getSqlSession
().
update
(
this
.
getStatement
(
"updateQrcodeId"
),
map
);
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/dto/JoinGroupCipherDTO.java
View file @
27c2119a
...
@@ -9,6 +9,8 @@ public class JoinGroupCipherDTO {
...
@@ -9,6 +9,8 @@ public class JoinGroupCipherDTO {
private
Long
classifyId
;
private
Long
classifyId
;
private
Long
qrcodeId
;
private
Long
wechatUserId
;
private
Long
wechatUserId
;
private
String
wxId
;
private
String
wxId
;
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/entity/JoinGroupCipher.java
View file @
27c2119a
...
@@ -17,6 +17,9 @@ public class JoinGroupCipher extends BaseEntity {
...
@@ -17,6 +17,9 @@ public class JoinGroupCipher extends BaseEntity {
@ApiModelProperty
(
"分类id"
)
@ApiModelProperty
(
"分类id"
)
private
Long
classifyId
;
private
Long
classifyId
;
@ApiModelProperty
(
"群id"
)
private
Long
qrcodeId
;
@ApiModelProperty
(
"创建人"
)
@ApiModelProperty
(
"创建人"
)
private
Long
wechatUserId
;
private
Long
wechatUserId
;
...
@@ -45,6 +48,14 @@ public class JoinGroupCipher extends BaseEntity {
...
@@ -45,6 +48,14 @@ public class JoinGroupCipher extends BaseEntity {
this
.
classifyId
=
classifyId
;
this
.
classifyId
=
classifyId
;
}
}
public
Long
getQrcodeId
()
{
return
qrcodeId
;
}
public
void
setQrcodeId
(
Long
qrcodeId
)
{
this
.
qrcodeId
=
qrcodeId
;
}
public
Long
getWechatUserId
()
{
public
Long
getWechatUserId
()
{
return
wechatUserId
;
return
wechatUserId
;
}
}
...
@@ -82,6 +93,7 @@ public class JoinGroupCipher extends BaseEntity {
...
@@ -82,6 +93,7 @@ public class JoinGroupCipher extends BaseEntity {
return
"JoinGroupCipher{"
+
return
"JoinGroupCipher{"
+
"cipher='"
+
cipher
+
'\''
+
"cipher='"
+
cipher
+
'\''
+
", classifyId="
+
classifyId
+
", classifyId="
+
classifyId
+
", qrcodeId="
+
qrcodeId
+
", wechatUserId="
+
wechatUserId
+
", wechatUserId="
+
wechatUserId
+
", wxId='"
+
wxId
+
'\''
+
", wxId='"
+
wxId
+
'\''
+
", hasUsed="
+
hasUsed
+
", hasUsed="
+
hasUsed
+
...
...
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
View file @
27c2119a
...
@@ -14,10 +14,7 @@ import com.pcloud.book.group.dao.BookGroupClassifyDao;
...
@@ -14,10 +14,7 @@ import com.pcloud.book.group.dao.BookGroupClassifyDao;
import
com.pcloud.book.group.dao.BookGroupDao
;
import
com.pcloud.book.group.dao.BookGroupDao
;
import
com.pcloud.book.group.dao.GroupQrcodeDao
;
import
com.pcloud.book.group.dao.GroupQrcodeDao
;
import
com.pcloud.book.group.dao.JoinGroupCipherDao
;
import
com.pcloud.book.group.dao.JoinGroupCipherDao
;
import
com.pcloud.book.group.dto.BookGroupDTO
;
import
com.pcloud.book.group.dto.*
;
import
com.pcloud.book.group.dto.GroupClassifyQrcodeDTO
;
import
com.pcloud.book.group.dto.JoinGroupCipherDTO
;
import
com.pcloud.book.group.dto.PushAddUserMessageDTO
;
import
com.pcloud.book.group.entity.AppTouchRecord
;
import
com.pcloud.book.group.entity.AppTouchRecord
;
import
com.pcloud.book.group.entity.GroupQrcode
;
import
com.pcloud.book.group.entity.GroupQrcode
;
import
com.pcloud.book.group.enums.TouchTypeEnum
;
import
com.pcloud.book.group.enums.TouchTypeEnum
;
...
@@ -135,6 +132,11 @@ public class BookGuideBizImpl implements BookGuideBiz {
...
@@ -135,6 +132,11 @@ public class BookGuideBizImpl implements BookGuideBiz {
vo1
.
setIp
(
agreeAddUserDTO
.
getIp
());
vo1
.
setIp
(
agreeAddUserDTO
.
getIp
());
log
.
info
(
"[同意加好友发送欢迎语 拉群] AddToGroupVO :{}"
,
vo1
);
log
.
info
(
"[同意加好友发送欢迎语 拉群] AddToGroupVO :{}"
,
vo1
);
WxGroupSDK
.
addToGroup
(
vo1
);
WxGroupSDK
.
addToGroup
(
vo1
);
log
.
info
(
"根据群id查询群信息wxGroupId"
,
wxGroupId
);
GroupQrcodeDTO
groupQrcodeInfo
=
groupQrcodeDao
.
getGroupQrcodeInfo
(
wxGroupId
);
log
.
info
(
"根据群id查询群信息groupQrcodeInfo"
,
groupQrcodeInfo
.
toString
());
log
.
info
(
"更新暗号的群cipher="
+
cipher
+
"wxId="
+
agreeAddUserDTO
.
getUserWxId
()
+
"qrcodeId="
+
groupQrcodeInfo
.
getId
());
joinGroupCipherDao
.
updateQrcodeId
(
cipher
,
agreeAddUserDTO
.
getUserWxId
(),
groupQrcodeInfo
.
getId
());
}
}
@Override
@Override
...
...
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/BookKeywordBizImpl.java
View file @
27c2119a
...
@@ -438,10 +438,12 @@ public class BookKeywordBizImpl implements BookKeywordBiz {
...
@@ -438,10 +438,12 @@ public class BookKeywordBizImpl implements BookKeywordBiz {
final
Set
<
Long
>
cIds
=
Sets
.
newHashSet
();
final
Set
<
Long
>
cIds
=
Sets
.
newHashSet
();
final
Set
<
Long
>
bIds
=
Sets
.
newHashSet
();
final
Set
<
Long
>
bIds
=
Sets
.
newHashSet
();
Map
<
Long
,
Long
>
classifyToBookGroupMap
=
new
HashMap
<>();
Map
<
Long
,
Long
>
classifyToBookGroupMap
=
new
HashMap
<>();
Map
<
Long
,
Long
>
classifyToQrcodeMap
=
new
HashMap
<>();
for
(
JoinGroupCipherDTO
dto
:
dtos
)
{
for
(
JoinGroupCipherDTO
dto
:
dtos
)
{
cIds
.
add
(
dto
.
getClassifyId
());
cIds
.
add
(
dto
.
getClassifyId
());
bIds
.
add
(
dto
.
getBookGroupId
());
bIds
.
add
(
dto
.
getBookGroupId
());
classifyToBookGroupMap
.
put
(
dto
.
getClassifyId
(),
dto
.
getBookGroupId
());
classifyToBookGroupMap
.
put
(
dto
.
getClassifyId
(),
dto
.
getBookGroupId
());
classifyToQrcodeMap
.
put
(
dto
.
getClassifyId
(),
dto
.
getQrcodeId
());
}
}
final
List
<
Long
>
classifyIds
=
Lists
.
newArrayList
(
cIds
);
final
List
<
Long
>
classifyIds
=
Lists
.
newArrayList
(
cIds
);
List
<
ReplyKeywordDTO
>
replyKeywordDTOs
=
new
ArrayList
<>();
List
<
ReplyKeywordDTO
>
replyKeywordDTOs
=
new
ArrayList
<>();
...
@@ -477,7 +479,7 @@ public class BookKeywordBizImpl implements BookKeywordBiz {
...
@@ -477,7 +479,7 @@ public class BookKeywordBizImpl implements BookKeywordBiz {
continue
;
continue
;
}
}
AccountSettingDto
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
dto
.
getChannelId
());
AccountSettingDto
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
dto
.
getChannelId
());
String
linkUrl
=
SendWeixinRequestTools
.
splitUrlNew
(
accountSettingDto
,
replyKeywordDTO
.
getLinkUrl
(),
dto
.
getBookGroupId
(),
dto
.
getClassifyId
(),
null
);
String
linkUrl
=
SendWeixinRequestTools
.
splitUrlNew
(
accountSettingDto
,
replyKeywordDTO
.
getLinkUrl
(),
dto
.
getBookGroupId
(),
dto
.
getClassifyId
(),
classifyToQrcodeMap
.
get
(
dto
.
getClassifyId
())
);
replyKeywordDTO
.
setLinkUrl
(
linkUrl
);
replyKeywordDTO
.
setLinkUrl
(
linkUrl
);
if
(!
StringUtil
.
isEmpty
(
linkUrl
))
{
if
(!
StringUtil
.
isEmpty
(
linkUrl
))
{
replyKeywordDTO
.
setShortLinkUrl
(
UrlUtils
.
getShortUrl4Own
(
linkUrl
));
replyKeywordDTO
.
setShortLinkUrl
(
UrlUtils
.
getShortUrl4Own
(
linkUrl
));
...
...
pcloud-service-book/src/main/resources/mapper/group/JoinGroupCipher.xml
View file @
27c2119a
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
<id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<result
column=
"cipher"
property=
"cipher"
jdbcType=
"VARCHAR"
/>
<result
column=
"cipher"
property=
"cipher"
jdbcType=
"VARCHAR"
/>
<result
column=
"classify_id"
property=
"classifyId"
jdbcType=
"BIGINT"
/>
<result
column=
"classify_id"
property=
"classifyId"
jdbcType=
"BIGINT"
/>
<result
column=
"qrcode_id"
property=
"qrcodeId"
jdbcType=
"BIGINT"
/>
<result
column=
"wechat_user_id"
property=
"wechatUserId"
jdbcType=
"BIGINT"
/>
<result
column=
"wechat_user_id"
property=
"wechatUserId"
jdbcType=
"BIGINT"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
...
@@ -14,7 +15,7 @@
...
@@ -14,7 +15,7 @@
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, cipher, classify_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
</sql>
</sql>
<insert
id=
"insert"
parameterType=
"com.pcloud.book.group.entity.JoinGroupCipher"
useGeneratedKeys=
"true"
<insert
id=
"insert"
parameterType=
"com.pcloud.book.group.entity.JoinGroupCipher"
useGeneratedKeys=
"true"
...
@@ -23,6 +24,7 @@
...
@@ -23,6 +24,7 @@
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
cipher,
cipher,
classify_id,
classify_id,
qrcode_id,
create_time,
create_time,
wechat_user_id,
wechat_user_id,
has_used,
has_used,
...
@@ -31,6 +33,7 @@
...
@@ -31,6 +33,7 @@
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{cipher,jdbcType=VARCHAR},
#{cipher,jdbcType=VARCHAR},
#{classifyId,jdbcType=BIGINT},
#{classifyId,jdbcType=BIGINT},
#{qrcodeId,jdbcType=BIGINT},
now(),
now(),
#{wechatUserId,jdbcType=BIGINT},
#{wechatUserId,jdbcType=BIGINT},
0,
0,
...
@@ -54,7 +57,7 @@
...
@@ -54,7 +57,7 @@
<!--根据暗号获取包含bookGroupId-->
<!--根据暗号获取包含bookGroupId-->
<select
id=
"getDTOByCipher"
parameterType=
"String"
resultType=
"com.pcloud.book.group.dto.JoinGroupCipherDTO"
>
<select
id=
"getDTOByCipher"
parameterType=
"String"
resultType=
"com.pcloud.book.group.dto.JoinGroupCipherDTO"
>
select
select
a.id, cipher, a.classify_id as classifyId, a.wechat_user_id as wechatUserId, a.wx_id as wxId,
a.id, cipher, a.classify_id as classifyId, a.
qrcode_id qrcodeId, a.
wechat_user_id as wechatUserId, a.wx_id as wxId,
a.has_used as hasUsed, b.book_group_id as bookGroupId
a.has_used as hasUsed, b.book_group_id as bookGroupId
from join_group_cipher a left join book_group_classify b on a.classify_id = b.id
from join_group_cipher a left join book_group_classify b on a.classify_id = b.id
where a.cipher=#{cipher} limit 1
where a.cipher=#{cipher} limit 1
...
@@ -71,10 +74,18 @@
...
@@ -71,10 +74,18 @@
<!--根据微信id和机器人id获取分类集合-->
<!--根据微信id和机器人id获取分类集合-->
<select
id=
"getClassifyIdsByWxIdAndAltId"
parameterType=
"map"
resultType=
"com.pcloud.book.group.dto.JoinGroupCipherDTO"
>
<select
id=
"getClassifyIdsByWxIdAndAltId"
parameterType=
"map"
resultType=
"com.pcloud.book.group.dto.JoinGroupCipherDTO"
>
select a.classify_id as classifyId, b.book_group_id as bookGroupId from join_group_cipher a
select a.classify_id as classifyId,
a.qrcode_id qrcodeId,
b.book_group_id as bookGroupId from join_group_cipher a
left join book_group_classify b on a.classify_id = b.id where
left join book_group_classify b on a.classify_id = b.id where
a.has_used=1
a.has_used=1
and a.alt_id=#{altId}
and a.alt_id=#{altId}
and a.wx_id=#{wxId}
and a.wx_id=#{wxId}
</select>
</select>
<!--更新二维码-->
<update
id=
"updateQrcodeId"
parameterType=
"map"
>
update join_group_cipher set
qrcode_id=#{qrcodeId}
where cipher=#{cipher}
and wx_id=#{wxId}
</update>
</mapper>
</mapper>
\ No newline at end of file
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