Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
170b119b
Commit
170b119b
authored
Jul 16, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临时活码删除
parent
a1fcec0b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
78 additions
and
21 deletions
+78
-21
HaobanTimerApiService.java
.../gic/haoban/manage/api/service/HaobanTimerApiService.java
+26
-0
TabHmQrcodeTemp.java
.../gic/haoban/manage/service/entity/hm/TabHmQrcodeTemp.java
+9
-0
HmQrcodeTempService.java
...haoban/manage/service/service/hm/HmQrcodeTempService.java
+9
-1
HmQrcodeTempServiceImpl.java
...nage/service/service/hm/impl/HmQrcodeTempServiceImpl.java
+20
-9
HmLinkApiServiceImpl.java
...age/service/service/out/impl/hm/HmLinkApiServiceImpl.java
+1
-1
HmLinkStoreMapper.xml
...ervice/src/main/resources/mapper/hm/HmLinkStoreMapper.xml
+6
-5
HmQrcodeTempMapper.xml
...rvice/src/main/resources/mapper/hm/HmQrcodeTempMapper.xml
+7
-5
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/HaobanTimerApiService.java
0 → 100644
View file @
170b119b
package
com
.
gic
.
haoban
.
manage
.
api
.
service
;
import
com.gic.api.base.commons.ServiceResponse
;
/**
*
* @ClassName: HaobanTimerApiService
* @Description: 好办定时入口
* @author xugh
* @date 2022年7月16日 上午9:25:11
*
*/
public
interface
HaobanTimerApiService
{
/**
*
* @Title: deleteTempWxHm
* @Description: 定时删除企微临时活码
* @author xugh
* @param params
* @return
* @throws
*/
public
ServiceResponse
<
Void
>
deleteTempWxHm
(
String
params
)
;
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/hm/TabHmQrcodeTemp.java
View file @
170b119b
...
@@ -24,6 +24,15 @@ public class TabHmQrcodeTemp implements Serializable {
...
@@ -24,6 +24,15 @@ public class TabHmQrcodeTemp implements Serializable {
/**1有效 0已删除*/
/**1有效 0已删除*/
private
Integer
statusFlag
;
private
Integer
statusFlag
;
private
String
relationId
;
private
String
relationId
;
private
String
corpid
;
public
String
getCorpid
()
{
return
corpid
;
}
public
void
setCorpid
(
String
corpid
)
{
this
.
corpid
=
corpid
;
}
public
String
getRelationId
()
{
public
String
getRelationId
()
{
return
relationId
;
return
relationId
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/HmQrcodeTempService.java
View file @
170b119b
...
@@ -26,6 +26,13 @@ public interface HmQrcodeTempService {
...
@@ -26,6 +26,13 @@ public interface HmQrcodeTempService {
// 删除临时活码
// 删除临时活码
public
void
deleteQrcode
(
String
relationId
);
public
void
deleteQrcode
(
String
relationId
);
public
void
deleteQrcodeById
(
Long
id
);
/**
*
* @Title: deleteForTimer
* @Description: 定时删除
* @author xugh
* @throws
*/
public
void
deleteForTimer
();
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/impl/HmQrcodeTempServiceImpl.java
View file @
170b119b
...
@@ -4,9 +4,12 @@ import java.util.Date;
...
@@ -4,9 +4,12 @@ import java.util.Date;
import
java.util.List
;
import
java.util.List
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.config.Config
;
...
@@ -14,18 +17,20 @@ import com.gic.haoban.manage.service.dao.mapper.hm.HmQrcodeTempMapper;
...
@@ -14,18 +17,20 @@ import com.gic.haoban.manage.service.dao.mapper.hm.HmQrcodeTempMapper;
import
com.gic.haoban.manage.service.entity.hm.TabHmQrcodeTemp
;
import
com.gic.haoban.manage.service.entity.hm.TabHmQrcodeTemp
;
import
com.gic.haoban.manage.service.pojo.qo.HmQrcodeTempQO
;
import
com.gic.haoban.manage.service.pojo.qo.HmQrcodeTempQO
;
import
com.gic.haoban.manage.service.service.hm.HmQrcodeTempService
;
import
com.gic.haoban.manage.service.service.hm.HmQrcodeTempService
;
import
com.gic.wechat.api.dto.qywx.response.QywxResponseDTO
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
@Service
@Service
public
class
HmQrcodeTempServiceImpl
implements
HmQrcodeTempService
{
public
class
HmQrcodeTempServiceImpl
implements
HmQrcodeTempService
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
HmQrcodeTempService
.
class
);
@Autowired
@Autowired
private
HmQrcodeTempMapper
hmQrcodeTempMapper
;
private
HmQrcodeTempMapper
hmQrcodeTempMapper
;
@Autowired
@Autowired
private
QywxUserApiService
qywxUserApiService
;
private
QywxUserApiService
qywxUserApiService
;
@Autowired
@Autowired
private
Config
config
;
private
Config
config
;
@Override
@Override
public
void
save
(
HmQrcodeTempQO
qo
)
{
public
void
save
(
HmQrcodeTempQO
qo
)
{
...
@@ -43,16 +48,22 @@ public class HmQrcodeTempServiceImpl implements HmQrcodeTempService {
...
@@ -43,16 +48,22 @@ public class HmQrcodeTempServiceImpl implements HmQrcodeTempService {
}
}
@Override
@Override
public
void
deleteQrcodeById
(
Long
id
)
{
public
void
deleteForTimer
()
{
this
.
hmQrcodeTempMapper
.
deleteByPrimaryKey
(
id
);
}
public
void
del
()
{
List
<
TabHmQrcodeTemp
>
list
=
this
.
hmQrcodeTempMapper
.
listAll
();
List
<
TabHmQrcodeTemp
>
list
=
this
.
hmQrcodeTempMapper
.
listAll
();
String
suiteId
=
config
.
getWxSuiteid
();
if
(
CollectionUtils
.
isEmpty
(
list
))
{
if
(
CollectionUtils
.
isEmpty
(
list
))
{
for
(
TabHmQrcodeTemp
item
:
list
)
{
//this.qywxUserApiService.delContactWay(corpid, suiteId, configId) ;
try
{
String
corpid
=
item
.
getCorpid
();
String
configId
=
item
.
getWxConfigId
();
QywxResponseDTO
resp
=
this
.
qywxUserApiService
.
delContactWay
(
corpid
,
suiteId
,
configId
);
log
.
info
(
"删除临时活码={}{},返回={}"
,
configId
,
corpid
,
JSON
.
toJSONString
(
resp
));
this
.
hmQrcodeTempMapper
.
deleteByPrimaryKey
(
item
.
getId
());
}
catch
(
Exception
e
)
{
log
.
info
(
"删除临时活码异常={}"
,
e
);
}
}
}
}
}
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmLinkApiServiceImpl.java
View file @
170b119b
...
@@ -279,7 +279,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
...
@@ -279,7 +279,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
if
(
openFlag
==
1
)
{
if
(
openFlag
==
1
)
{
// 门店规则1推荐门店 2附件门店
// 门店规则1推荐门店 2附件门店
int
storeType
=
storeRuleObj
.
getIntValue
(
"store_type"
);
int
storeType
=
storeRuleObj
.
getIntValue
(
"store_type"
);
//
过滤有
活码的门店
// 活码的门店
List
<
HmLinkStoreDTO
>
storeList
=
this
.
hmLinkStoreService
.
listByLinkId
(
wxEnterpriseId
,
enterpriseId
,
List
<
HmLinkStoreDTO
>
storeList
=
this
.
hmLinkStoreService
.
listByLinkId
(
wxEnterpriseId
,
enterpriseId
,
linkId
);
linkId
);
log
.
info
(
"门店规则={},推荐门店列表={}"
,
storeType
,
JSON
.
toJSONString
(
storeList
));
log
.
info
(
"门店规则={},推荐门店列表={}"
,
storeType
,
JSON
.
toJSONString
(
storeList
));
...
...
haoban-manage3-service/src/main/resources/mapper/hm/HmLinkStoreMapper.xml
View file @
170b119b
...
@@ -49,26 +49,26 @@
...
@@ -49,26 +49,26 @@
</foreach>
</foreach>
</insert>
</insert>
<
dele
te
id=
"deleteByLinkId"
parameterType=
"long"
>
<
upda
te
id=
"deleteByLinkId"
parameterType=
"long"
>
UPDATE
UPDATE
tab_haoban_hm_link_store SET status_flag = 0 , update_time=now() WHERE
tab_haoban_hm_link_store SET status_flag = 0 , update_time=now() WHERE
link_id = #{linkId} and status_flag = 1
link_id = #{linkId} and status_flag = 1
</
dele
te>
</
upda
te>
<
dele
te
id=
"deleteById"
>
<
upda
te
id=
"deleteById"
>
UPDATE
UPDATE
tab_haoban_hm_link_store SET status_flag = 0 , update_time=now() WHERE
tab_haoban_hm_link_store SET status_flag = 0 , update_time=now() WHERE
id in
<foreach
collection=
"list"
item=
"item"
separator=
","
open=
"("
close=
")"
>
id in
<foreach
collection=
"list"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
#{item}
</foreach>
</foreach>
and status_flag = 1
and status_flag = 1
</
dele
te>
</
upda
te>
<select
id=
"listByLinkId"
<select
id=
"listByLinkId"
parameterType=
"com.gic.haoban.manage.service.entity.hm.TabHmLinkStore"
parameterType=
"com.gic.haoban.manage.service.entity.hm.TabHmLinkStore"
resultMap=
"result-map-tabHaobanHmLinkStore"
>
resultMap=
"result-map-tabHaobanHmLinkStore"
>
select
*
from tab_haoban_hm_link_store where link_id=#{linkId} and status_flag = 1
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_hm_link_store where link_id=#{linkId} and status_flag = 1
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/hm/HmQrcodeTempMapper.xml
View file @
170b119b
...
@@ -11,11 +11,12 @@
...
@@ -11,11 +11,12 @@
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"status_flag"
property=
"statusFlag"
/>
<result
column=
"status_flag"
property=
"statusFlag"
/>
<result
column=
"relation_id"
property=
"relationId"
/>
<result
column=
"relation_id"
property=
"relationId"
/>
<result
column=
"corpid"
property=
"corpid"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
wx_config_id,
wx_config_id,
wx_qrcode,
wx_qrcode,
wx_enterprise_id,
wx_enterprise_id,
corpid ,
create_time,
create_time,
update_time,
update_time,
status_flag , relation_id
status_flag , relation_id
...
@@ -30,7 +31,7 @@
...
@@ -30,7 +31,7 @@
wx_enterprise_id,
wx_enterprise_id,
create_time,
create_time,
update_time,
update_time,
status_flag , relation_id
status_flag , relation_id
, corpid
)VALUES(
)VALUES(
#{id} ,
#{id} ,
#{wxConfigId,jdbcType=VARCHAR},
#{wxConfigId,jdbcType=VARCHAR},
...
@@ -38,7 +39,7 @@
...
@@ -38,7 +39,7 @@
#{wxEnterpriseId,jdbcType=CHAR},
#{wxEnterpriseId,jdbcType=CHAR},
#{createTime,jdbcType=TIMESTAMP},
#{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP},
#{statusFlag,jdbcType=INTEGER} , #{relationId}
#{statusFlag,jdbcType=INTEGER} , #{relationId}
, ${corpid}
)
)
]]>
]]>
</insert>
</insert>
...
@@ -56,10 +57,10 @@
...
@@ -56,10 +57,10 @@
<!-- ============ 查询============= -->
<!-- ============ 查询============= -->
<select
id=
"selectByRelationId"
parameterType=
"String"
<select
id=
"selectByRelationId"
parameterType=
"String"
resultMap=
"result-map-tabHaobanHmQrcodeTemp"
>
resultMap=
"result-map-tabHaobanHmQrcodeTemp"
>
SELECT
*
FROM tab_haoban_hm_qrcode_temp WHERE relation_id = #{relationId}
SELECT
<include
refid=
"Base_Column_List"
/>
FROM tab_haoban_hm_qrcode_temp WHERE relation_id = #{relationId}
</select>
</select>
<select
id=
"listAll"
resultMap=
"result-map-tabHaobanHmQrcodeTemp"
>
<select
id=
"listAll"
resultMap=
"result-map-tabHaobanHmQrcodeTemp"
>
select
* from tab_haoban_hm_qrcode_temp where create_time >= DATE_ADD(now(),INTERVAL 6 HOUR) and status_flag = 1
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_hm_qrcode_temp where create_time >= DATE_ADD(now(),INTERVAL -6 HOUR) and create_time
<![CDATA[<=]]>
DATE_ADD(now(),INTERVAL -1 HOUR) and status_flag = 1 limit 10000
</select>
</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