Commit 36a6b40b by jinxin

定时任务添加

parent c8c1f4f9
...@@ -247,5 +247,16 @@ public interface WxEnterpriseApiService { ...@@ -247,5 +247,16 @@ public interface WxEnterpriseApiService {
* @return 过滤的好办自建应用appidList * @return 过滤的好办自建应用appidList
*/ */
ServiceResponse<List<String>> filterWxAppidList(List<String> wxAppidList); ServiceResponse<List<String>> filterWxAppidList(List<String> wxAppidList);
/**
* 定时任务,同步自建应用信息
*/
ServiceResponse<Boolean> syncWxEnterpriseInfo(String params);
/**
* 删除
* @param wxEnterpriseId 企业微信id
* @return
*/
ServiceResponse<Boolean> deleteByWxEnterpriseId(String wxEnterpriseId);
} }
...@@ -202,6 +202,11 @@ ...@@ -202,6 +202,11 @@
<artifactId>gic-message-center-api</artifactId> <artifactId>gic-message-center-api</artifactId>
<version>${gic-message-center-api}</version> <version>${gic-message-center-api}</version>
</dependency> </dependency>
<dependency>
<groupId>com.gic.operating</groupId>
<artifactId>gic-operating-api</artifactId>
<version>${gic-operating-api}</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -82,4 +82,11 @@ public interface WxEnterpriseMapper { ...@@ -82,4 +82,11 @@ public interface WxEnterpriseMapper {
* 根据appidList查询appidList * 根据appidList查询appidList
*/ */
List<String> getWxAppidListByList(@Param("wxAppidList")List<String> wxAppidList); List<String> getWxAppidListByList(@Param("wxAppidList")List<String> wxAppidList);
/**
* 根据好办app类型所有企业微信
*
* @return
*/
List<TabHaobanWxEnterprise> listAllByWxSecurityType(@Param("wxSecurityType") Integer wxSecurityType);
void deleteByWxEnterpriseId(@Param("wxEnterpriseId") String wxEnterpriseId) ;
} }
\ No newline at end of file
...@@ -80,4 +80,17 @@ public interface WxEnterpriseService { ...@@ -80,4 +80,17 @@ public interface WxEnterpriseService {
*/ */
List<String> getWxAppidListByList(List<String> wxAppidList); List<String> getWxAppidListByList(List<String> wxAppidList);
/**
* 根据好办app类型所有企业微信
*
* @return
*/
List<TabHaobanWxEnterprise> listAllByWxSecurityType(Integer wxSecurityType);
/**
* 删除
* @param wxEnterpriseId
*/
void deleteByWxEnterpriseId(String wxEnterpriseId) ;
} }
...@@ -301,4 +301,14 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService { ...@@ -301,4 +301,14 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
} }
return this.mapper.getWxAppidListByList(wxAppidList); return this.mapper.getWxAppidListByList(wxAppidList);
} }
@Override
public List<TabHaobanWxEnterprise> listAllByWxSecurityType(Integer wxSecurityType) {
return this.mapper.listAllByWxSecurityType(wxSecurityType);
}
@Override
public void deleteByWxEnterpriseId(String wxEnterpriseId) {
this.mapper.deleteByWxEnterpriseId(wxEnterpriseId);
}
} }
...@@ -23,6 +23,7 @@ import com.gic.haoban.manage.service.dao.mapper.WxEnterpriseRelatedMapper; ...@@ -23,6 +23,7 @@ import com.gic.haoban.manage.service.dao.mapper.WxEnterpriseRelatedMapper;
import com.gic.haoban.manage.service.entity.*; import com.gic.haoban.manage.service.entity.*;
import com.gic.haoban.manage.service.pojo.bo.StaffPrivacyUseLogBO; import com.gic.haoban.manage.service.pojo.bo.StaffPrivacyUseLogBO;
import com.gic.haoban.manage.service.service.*; import com.gic.haoban.manage.service.service.*;
import com.gic.operating.api.service.HaobanWxEnterpriseApiService;
import com.gic.wechat.api.service.qywx.QywxUserApiService; import com.gic.wechat.api.service.qywx.QywxUserApiService;
import com.github.pagehelper.Page; import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
...@@ -65,6 +66,8 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService { ...@@ -65,6 +66,8 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
private HaobanCommonMQApiService haobanCommonMQApiService ; private HaobanCommonMQApiService haobanCommonMQApiService ;
@Autowired @Autowired
private HaobanRoleApiService haobanRoleApiService; private HaobanRoleApiService haobanRoleApiService;
@Autowired
private HaobanWxEnterpriseApiService haobanWxEnterpriseApiService;
@Override @Override
...@@ -554,4 +557,22 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService { ...@@ -554,4 +557,22 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
wxAppidList.removeAll(list); wxAppidList.removeAll(list);
return ServiceResponse.success(wxAppidList); return ServiceResponse.success(wxAppidList);
} }
@Override
public ServiceResponse<Boolean> syncWxEnterpriseInfo(String params) {
log.info("定时同步自建应用信息");
List<TabHaobanWxEnterprise> list = wxEnterpriseService.listAllByWxSecurityType(5);
if (CollUtil.isNotEmpty(list)){
list.stream().forEach(a->{
//haobanWxEnterpriseApiService.saveOrUpdate();
});
}
return null;
}
@Override
public ServiceResponse<Boolean> deleteByWxEnterpriseId(String wxEnterpriseId) {
wxEnterpriseService.deleteByWxEnterpriseId(wxEnterpriseId);
return ServiceResponse.success(true);
}
} }
...@@ -224,5 +224,6 @@ ...@@ -224,5 +224,6 @@
<dubbo:reference interface="com.gic.orderecommerce.api.service.EcommerceOrderOutputApiService" id="ecommerceOrderOutputApiService" timeout="10000" retries="0" check="false"/> <dubbo:reference interface="com.gic.orderecommerce.api.service.EcommerceOrderOutputApiService" id="ecommerceOrderOutputApiService" timeout="10000" retries="0" check="false"/>
<dubbo:reference interface="com.gic.order.api.service.sharding.OrderApiService" id="orderApiService" timeout="10000" retries="0" check="false"/> <dubbo:reference interface="com.gic.order.api.service.sharding.OrderApiService" id="orderApiService" timeout="10000" retries="0" check="false"/>
<dubbo:reference interface="com.gic.member.api.service.MemberOutApiService" id="memberOutApiService" timeout="10000" retries="0" check="false"/> <dubbo:reference interface="com.gic.member.api.service.MemberOutApiService" id="memberOutApiService" timeout="10000" retries="0" check="false"/>
<dubbo:reference interface="com.gic.operating.api.service.HaobanWxEnterpriseApiService" id="haobanWxEnterpriseApiService" timeout="10000" retries="0" check="false"/>
</beans> </beans>
\ No newline at end of file
...@@ -561,4 +561,20 @@ ...@@ -561,4 +561,20 @@
</foreach> </foreach>
</if> </if>
</select> </select>
<select id="listAllByWxSecurityType" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from tab_haoban_wx_enterprise
status_flag = 1
and wx_security_type = #{wxSecurityType}
</select>
<update id="deleteByWxEnterpriseId">
update tab_haoban_wx_enterprise
set status_flag = 0,
update_time = now()
where wx_enterprise_id = #{wxEnterpriseId}
</update>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment