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
661240ed
Commit
661240ed
authored
Mar 23, 2020
by
桂前礼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add listQrCode4Android
parent
1e609894
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
1 deletions
+32
-1
WeixinQrcodeService.java
...va/com/pcloud/book/group/service/WeixinQrcodeService.java
+4
-0
WeixinQrcodeDao.java
.../main/java/com/pcloud/book/group/dao/WeixinQrcodeDao.java
+5
-0
WeixinQrcodeDaoImpl.java
...a/com/pcloud/book/group/dao/impl/WeixinQrcodeDaoImpl.java
+8
-0
WeixinQrcodeServiceImpl.java
...loud/book/group/service/impl/WeixinQrcodeServiceImpl.java
+7
-1
WeixinQrcode.Mapper.xml
...k/src/main/resources/mapper/group/WeixinQrcode.Mapper.xml
+8
-0
No files found.
pcloud-facade-book/src/main/java/com/pcloud/book/group/service/WeixinQrcodeService.java
View file @
661240ed
...
@@ -112,4 +112,8 @@ public interface WeixinQrcodeService {
...
@@ -112,4 +112,8 @@ public interface WeixinQrcodeService {
@ApiOperation
(
"根据版本号获取机器人ip"
)
@ApiOperation
(
"根据版本号获取机器人ip"
)
@GetMapping
(
"getRobotIpByGeneration"
)
@GetMapping
(
"getRobotIpByGeneration"
)
ResponseEntity
<
ResponseDto
<
String
>>
getRobotIpByGeneration
(
@RequestParam
(
"generation"
)
Integer
generation
);
ResponseEntity
<
ResponseDto
<
String
>>
getRobotIpByGeneration
(
@RequestParam
(
"generation"
)
Integer
generation
);
@ApiOperation
(
"安卓Hook拉取待更新群二维码"
)
@RequestMapping
(
value
=
"/listQrCode4Android"
,
method
=
RequestMethod
.
GET
)
ResponseEntity
<
ResponseDto
<
List
<
UpdateQrDTO
>>>
listQrCode4Android
(
Integer
generation
,
Integer
num
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/WeixinQrcodeDao.java
View file @
661240ed
...
@@ -174,4 +174,9 @@ public interface WeixinQrcodeDao extends BaseDao<WeixinQrcode> {
...
@@ -174,4 +174,9 @@ public interface WeixinQrcodeDao extends BaseDao<WeixinQrcode> {
List
<
UpdateQrDTO
>
listUpdateQrByGeneration
(
Integer
generation
,
Integer
limit
);
List
<
UpdateQrDTO
>
listUpdateQrByGeneration
(
Integer
generation
,
Integer
limit
);
Integer
getCanUseCount
(
Integer
version
);
Integer
getCanUseCount
(
Integer
version
);
/**
* 根据generation获取群信息 用于更新
*/
List
<
UpdateQrDTO
>
listQrCode4Android
(
Integer
generation
,
Integer
num
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/impl/WeixinQrcodeDaoImpl.java
View file @
661240ed
...
@@ -193,4 +193,12 @@ public class WeixinQrcodeDaoImpl extends BaseDaoImpl<WeixinQrcode> implements We
...
@@ -193,4 +193,12 @@ public class WeixinQrcodeDaoImpl extends BaseDaoImpl<WeixinQrcode> implements We
public
Integer
getCanUseCount
(
Integer
version
)
{
public
Integer
getCanUseCount
(
Integer
version
)
{
return
this
.
getSessionTemplate
().
selectOne
(
getStatement
(
"getCanUseCount"
),
version
);
return
this
.
getSessionTemplate
().
selectOne
(
getStatement
(
"getCanUseCount"
),
version
);
}
}
@Override
public
List
<
UpdateQrDTO
>
listQrCode4Android
(
Integer
generation
,
Integer
num
)
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"generation"
,
generation
);
paramMap
.
put
(
"num"
,
num
);
return
this
.
getSessionTemplate
().
selectList
(
getStatement
(
"listQrCode4Android"
),
paramMap
);
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/service/impl/WeixinQrcodeServiceImpl.java
View file @
661240ed
...
@@ -133,7 +133,7 @@ public class WeixinQrcodeServiceImpl implements WeixinQrcodeService {
...
@@ -133,7 +133,7 @@ public class WeixinQrcodeServiceImpl implements WeixinQrcodeService {
public
ResponseEntity
<
ResponseDto
<
String
>>
getWxGroupId
(
@RequestParam
(
"classifyId"
)
Long
classifyId
)
{
public
ResponseEntity
<
ResponseDto
<
String
>>
getWxGroupId
(
@RequestParam
(
"classifyId"
)
Long
classifyId
)
{
List
<
ClassifyQrcodeVO
>
qrcodeByClassify
=
groupQrcodeBiz
.
getQrcodeByClassify
(
null
,
classifyId
);
List
<
ClassifyQrcodeVO
>
qrcodeByClassify
=
groupQrcodeBiz
.
getQrcodeByClassify
(
null
,
classifyId
);
String
wxGroupId
=
null
;
String
wxGroupId
=
null
;
if
(!
ListUtils
.
isEmpty
(
qrcodeByClassify
)){
if
(!
ListUtils
.
isEmpty
(
qrcodeByClassify
))
{
wxGroupId
=
qrcodeByClassify
.
get
(
0
).
getWeixinGroupId
();
wxGroupId
=
qrcodeByClassify
.
get
(
0
).
getWeixinGroupId
();
}
}
return
ResponseHandleUtil
.
toResponse
(
wxGroupId
);
return
ResponseHandleUtil
.
toResponse
(
wxGroupId
);
...
@@ -178,4 +178,10 @@ public class WeixinQrcodeServiceImpl implements WeixinQrcodeService {
...
@@ -178,4 +178,10 @@ public class WeixinQrcodeServiceImpl implements WeixinQrcodeService {
public
ResponseEntity
<
ResponseDto
<
String
>>
getRobotIpByGeneration
(
@RequestParam
(
"generation"
)
Integer
generation
)
{
public
ResponseEntity
<
ResponseDto
<
String
>>
getRobotIpByGeneration
(
@RequestParam
(
"generation"
)
Integer
generation
)
{
return
ResponseHandleUtil
.
toResponse
(
weixinQrcodeBiz
.
getRobotIpByGeneration
(
generation
));
return
ResponseHandleUtil
.
toResponse
(
weixinQrcodeBiz
.
getRobotIpByGeneration
(
generation
));
}
}
@RequestMapping
(
value
=
"/listQrCode4Android"
,
method
=
RequestMethod
.
GET
)
@Override
public
ResponseEntity
<
ResponseDto
<
List
<
UpdateQrDTO
>>>
listQrCode4Android
(
@RequestParam
(
"generation"
)
Integer
generation
,
@RequestParam
(
"num"
)
Integer
num
)
{
return
ResponseHandleUtil
.
toResponse
(
weixinQrcodeDao
.
listQrCode4Android
(
generation
,
num
));
}
}
}
pcloud-service-book/src/main/resources/mapper/group/WeixinQrcode.Mapper.xml
View file @
661240ed
...
@@ -314,6 +314,14 @@
...
@@ -314,6 +314,14 @@
LIMIT #{num}
LIMIT #{num}
</select>
</select>
<select
id=
"listQrCode4Android"
parameterType=
"map"
resultType=
"com.pcloud.book.group.dto.UpdateQrDTO"
>
SELECT id, weixin_group_id url, update_qr_time, generation
FROM weixin_qrcode
WHERE generation = #{generation}
ORDER BY update_qr_time ASC
LIMIT #{num}
</select>
<select
id=
"getCanUseCount"
parameterType=
"int"
resultType=
"integer"
>
<select
id=
"getCanUseCount"
parameterType=
"int"
resultType=
"integer"
>
SELECT ifnull(COUNT(1), 0) FROM weixin_qrcode WHERE update_state !=2 AND use_state = 0
SELECT ifnull(COUNT(1), 0) FROM weixin_qrcode WHERE update_state !=2 AND use_state = 0
and generation = #{_parameter}
and generation = #{_parameter}
...
...
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