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
ae1652f2
Commit
ae1652f2
authored
Aug 08, 2019
by
裴大威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ruansiyuan' of
http://192.168.89.173/rays/pcloud-book
into feat-dw
parents
45a46305
a73c67b3
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
63 additions
and
7 deletions
+63
-7
BookGroupBiz.java
...src/main/java/com/pcloud/book/group/biz/BookGroupBiz.java
+5
-0
BookGroupBizImpl.java
...java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
+14
-0
JoinGroupCipherDao.java
...in/java/com/pcloud/book/group/dao/JoinGroupCipherDao.java
+4
-0
JoinGroupCipherDaoImpl.java
...om/pcloud/book/group/dao/impl/JoinGroupCipherDaoImpl.java
+9
-0
JoinGroupCipher.java
...in/java/com/pcloud/book/group/entity/JoinGroupCipher.java
+12
-0
WXGroupLearningReportListener.java
...m/pcloud/book/mq/topic/WXGroupLearningReportListener.java
+2
-2
JoinGroupCipher.xml
...-book/src/main/resources/mapper/group/JoinGroupCipher.xml
+17
-5
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/BookGroupBiz.java
View file @
ae1652f2
...
@@ -267,4 +267,9 @@ public interface BookGroupBiz {
...
@@ -267,4 +267,9 @@ public interface BookGroupBiz {
* 获取所有的大类分类
* 获取所有的大类分类
*/
*/
List
<
LargeTempletDTO
>
getAllLargTemplet
();
List
<
LargeTempletDTO
>
getAllLargTemplet
();
/**
* 根据微信id和机器人id获取分类集合
*/
List
<
Long
>
getClassifyIdsByWxIdAndAltId
(
String
wxId
,
String
altId
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
View file @
ae1652f2
...
@@ -1109,6 +1109,7 @@ public class BookGroupBizImpl implements BookGroupBiz {
...
@@ -1109,6 +1109,7 @@ public class BookGroupBizImpl implements BookGroupBiz {
joinGroupCipherNew
.
setCipher
(
cipher
);
joinGroupCipherNew
.
setCipher
(
cipher
);
joinGroupCipherNew
.
setWechatUserId
(
wechatUserId
);
joinGroupCipherNew
.
setWechatUserId
(
wechatUserId
);
joinGroupCipherNew
.
setClassifyId
(
classifyId
);
joinGroupCipherNew
.
setClassifyId
(
classifyId
);
joinGroupCipherNew
.
setAltId
(
selfRobotDTO
.
getWxId
());
joinGroupCipherDao
.
insert
(
joinGroupCipherNew
);
joinGroupCipherDao
.
insert
(
joinGroupCipherNew
);
}
}
ownAltQrcodeInfoDTO
.
setCipher
(
cipher
);
ownAltQrcodeInfoDTO
.
setCipher
(
cipher
);
...
@@ -1174,4 +1175,17 @@ public class BookGroupBizImpl implements BookGroupBiz {
...
@@ -1174,4 +1175,17 @@ public class BookGroupBizImpl implements BookGroupBiz {
return
list
;
return
list
;
}
}
@ParamLog
(
"根据微信id和机器人id获取分类集合"
)
@Override
public
List
<
Long
>
getClassifyIdsByWxIdAndAltId
(
String
wxId
,
String
altId
)
{
if
(
StringUtil
.
isEmpty
(
wxId
)
||
StringUtil
.
isEmpty
(
altId
))
{
return
new
ArrayList
<>();
}
List
<
Long
>
list
=
joinGroupCipherDao
.
getClassifyIdsByWxIdAndAltId
(
wxId
,
altId
);
if
(
list
==
null
)
{
return
new
ArrayList
<>();
}
return
list
;
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/JoinGroupCipherDao.java
View file @
ae1652f2
...
@@ -4,6 +4,8 @@ import com.pcloud.book.group.dto.JoinGroupCiperDTO;
...
@@ -4,6 +4,8 @@ import com.pcloud.book.group.dto.JoinGroupCiperDTO;
import
com.pcloud.book.group.entity.JoinGroupCipher
;
import
com.pcloud.book.group.entity.JoinGroupCipher
;
import
com.pcloud.common.core.dao.BaseDao
;
import
com.pcloud.common.core.dao.BaseDao
;
import
java.util.List
;
public
interface
JoinGroupCipherDao
extends
BaseDao
<
JoinGroupCipher
>
{
public
interface
JoinGroupCipherDao
extends
BaseDao
<
JoinGroupCipher
>
{
JoinGroupCipher
getByWechatUserId
(
Long
wechatUserId
,
Long
classifyId
);
JoinGroupCipher
getByWechatUserId
(
Long
wechatUserId
,
Long
classifyId
);
...
@@ -12,4 +14,6 @@ public interface JoinGroupCipherDao extends BaseDao<JoinGroupCipher> {
...
@@ -12,4 +14,6 @@ public interface JoinGroupCipherDao extends BaseDao<JoinGroupCipher> {
JoinGroupCiperDTO
getDTOByCipher
(
String
cipher
);
JoinGroupCiperDTO
getDTOByCipher
(
String
cipher
);
void
updateCipherStateToUsed
(
String
cipher
,
String
wxId
);
void
updateCipherStateToUsed
(
String
cipher
,
String
wxId
);
List
<
Long
>
getClassifyIdsByWxIdAndAltId
(
String
wxId
,
String
altId
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/impl/JoinGroupCipherDaoImpl.java
View file @
ae1652f2
...
@@ -7,6 +7,7 @@ import com.pcloud.common.core.dao.BaseDaoImpl;
...
@@ -7,6 +7,7 @@ import com.pcloud.common.core.dao.BaseDaoImpl;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -41,4 +42,12 @@ public class JoinGroupCipherDaoImpl extends BaseDaoImpl<JoinGroupCipher> impleme
...
@@ -41,4 +42,12 @@ public class JoinGroupCipherDaoImpl extends BaseDaoImpl<JoinGroupCipher> impleme
map
.
put
(
"wxId"
,
wxId
);
map
.
put
(
"wxId"
,
wxId
);
this
.
getSqlSession
().
update
(
this
.
getStatement
(
"updateCipherStateToUsed"
),
map
);
this
.
getSqlSession
().
update
(
this
.
getStatement
(
"updateCipherStateToUsed"
),
map
);
}
}
@Override
public
List
<
Long
>
getClassifyIdsByWxIdAndAltId
(
String
wxId
,
String
altId
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"wxId"
,
wxId
);
map
.
put
(
"altId"
,
altId
);
return
this
.
getSqlSession
().
selectList
(
this
.
getStatement
(
"getClassifyIdsByWxIdAndAltId"
),
map
);
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/entity/JoinGroupCipher.java
View file @
ae1652f2
...
@@ -26,6 +26,9 @@ public class JoinGroupCipher extends BaseEntity {
...
@@ -26,6 +26,9 @@ public class JoinGroupCipher extends BaseEntity {
@ApiModelProperty
(
"是否使用"
)
@ApiModelProperty
(
"是否使用"
)
private
Boolean
hasUsed
;
private
Boolean
hasUsed
;
@ApiModelProperty
(
"机器人id"
)
private
String
altId
;
public
String
getCipher
()
{
public
String
getCipher
()
{
return
cipher
;
return
cipher
;
}
}
...
@@ -66,6 +69,14 @@ public class JoinGroupCipher extends BaseEntity {
...
@@ -66,6 +69,14 @@ public class JoinGroupCipher extends BaseEntity {
this
.
hasUsed
=
hasUsed
;
this
.
hasUsed
=
hasUsed
;
}
}
public
String
getAltId
()
{
return
altId
;
}
public
void
setAltId
(
String
altId
)
{
this
.
altId
=
altId
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"JoinGroupCipher{"
+
return
"JoinGroupCipher{"
+
...
@@ -74,6 +85,7 @@ public class JoinGroupCipher extends BaseEntity {
...
@@ -74,6 +85,7 @@ public class JoinGroupCipher extends BaseEntity {
", wechatUserId="
+
wechatUserId
+
", wechatUserId="
+
wechatUserId
+
", wxId='"
+
wxId
+
'\''
+
", wxId='"
+
wxId
+
'\''
+
", hasUsed="
+
hasUsed
+
", hasUsed="
+
hasUsed
+
", altId='"
+
altId
+
'\''
+
"} "
+
super
.
toString
();
"} "
+
super
.
toString
();
}
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/mq/topic/WXGroupLearningReportListener.java
View file @
ae1652f2
...
@@ -120,9 +120,9 @@ public class WXGroupLearningReportListener {
...
@@ -120,9 +120,9 @@ public class WXGroupLearningReportListener {
sendPicMessageVO
.
setWxGroupId
(
wechatGroupId
);
sendPicMessageVO
.
setWxGroupId
(
wechatGroupId
);
sendPicMessageVO
.
setAltId
(
alt
);
sendPicMessageVO
.
setAltId
(
alt
);
sendPicMessageVO
.
setIp
(
findIp
(
wechatGroupId
));
sendPicMessageVO
.
setIp
(
findIp
(
wechatGroupId
));
LOGGER
.
info
(
"发送分享图消息开始"
+
send
Text
MessageVO
.
toString
());
LOGGER
.
info
(
"发送分享图消息开始"
+
send
Pic
MessageVO
.
toString
());
WxGroupSDK
.
sendPicMessage
(
sendPicMessageVO
);
WxGroupSDK
.
sendPicMessage
(
sendPicMessageVO
);
LOGGER
.
info
(
"发送分享图消息开始"
+
send
Text
MessageVO
.
toString
());
LOGGER
.
info
(
"发送分享图消息开始"
+
send
Pic
MessageVO
.
toString
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
"接收学习报告topic失败"
+
e
.
getMessage
(),
e
);
LOGGER
.
error
(
"接收学习报告topic失败"
+
e
.
getMessage
(),
e
);
}
}
...
...
pcloud-service-book/src/main/resources/mapper/group/JoinGroupCipher.xml
View file @
ae1652f2
...
@@ -8,12 +8,13 @@
...
@@ -8,12 +8,13 @@
<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"
/>
<result
column=
"wx_id"
property=
"wxId"
jdbcType=
"
BIGINT
"
/>
<result
column=
"wx_id"
property=
"wxId"
jdbcType=
"
VARCHAR
"
/>
<result
column=
"has_used"
property=
"hasUsed"
jdbcType=
"BOOLEAN"
/>
<result
column=
"has_used"
property=
"hasUsed"
jdbcType=
"BOOLEAN"
/>
<result
column=
"alt_id"
property=
"altId"
jdbcType=
"VARCHAR"
/>
</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
id, cipher, classify_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"
...
@@ -24,14 +25,16 @@
...
@@ -24,14 +25,16 @@
classify_id,
classify_id,
create_time,
create_time,
wechat_user_id,
wechat_user_id,
has_used
has_used,
alt_id
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
#{cipher,jdbcType=
BIGINT
},
#{cipher,jdbcType=
VARCHAR
},
#{classifyId,jdbcType=BIGINT},
#{classifyId,jdbcType=BIGINT},
now(),
now(),
#{wechatUserId,jdbcType=BIGINT},
#{wechatUserId,jdbcType=BIGINT},
0
0,
#{altId,jdbcType=VARCHAR}
</trim>
</trim>
</insert>
</insert>
...
@@ -65,4 +68,12 @@
...
@@ -65,4 +68,12 @@
update_time=now()
update_time=now()
where cipher=#{cipher}
where cipher=#{cipher}
</update>
</update>
<!--根据微信id和机器人id获取分类集合-->
<select
id=
"getClassifyIdsByWxIdAndAltId"
parameterType=
"map"
resultType=
"long"
>
select classify_id from join_group_cipher where
has_used=1
and alt_id=#{altId}
and wx_id=#{wxId}
</select>
</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