fix: 攀枝花东区-缴费分支代码处理
This commit is contained in:
-58
@@ -1,58 +0,0 @@
|
||||
package com.yida.data.system.dto;
|
||||
|
||||
import com.yida.data.common.core.entity.system.Dept;
|
||||
import com.yida.data.common.core.entity.system.EduQywxServiceProvider;
|
||||
import com.yida.data.common.core.entity.system.EduQywxServiceProviderSchool;
|
||||
import com.yida.data.common.core.enums.QywxCallbackTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 企业微信回调处理类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/10/27 16:25
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class QywxCallbackHandleDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 820667804126969451L;
|
||||
|
||||
/**
|
||||
* 回调返回的节点信息
|
||||
*/
|
||||
private Element root;
|
||||
|
||||
/**
|
||||
* 对应的企业微信corpId
|
||||
*/
|
||||
private String corpId;
|
||||
|
||||
/**
|
||||
* 学校信息
|
||||
*/
|
||||
private Dept school;
|
||||
|
||||
/**
|
||||
* 企业微信服务商信息
|
||||
*/
|
||||
private EduQywxServiceProvider eduQywxServiceProvider;
|
||||
|
||||
/**
|
||||
* 企业微信服务商-学校密文corpId对照信息
|
||||
*/
|
||||
private EduQywxServiceProviderSchool providerSchool;
|
||||
|
||||
/**
|
||||
* 回调类型枚举
|
||||
*/
|
||||
private QywxCallbackTypeEnum qywxCallbackTypeEnum;
|
||||
}
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
package com.yida.data.system.fallback;
|
||||
|
||||
import com.yida.data.common.core.annotation.Fallback;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.system.BaiduApiConfig;
|
||||
import com.yida.data.common.core.entity.system.ConstructionPayConfig;
|
||||
import com.yida.data.system.feign.RemoteBaiDuApiConfigService;
|
||||
import com.yida.data.system.feign.RemoteConstructionPayConfigService;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* RemoteBaiDuApiConfigService fallback处理类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/6/20
|
||||
*/
|
||||
@Slf4j
|
||||
@Fallback
|
||||
public class RemoteBaiDuApiConfigServiceFallback implements FallbackFactory<RemoteBaiDuApiConfigService> {
|
||||
|
||||
@Override
|
||||
public RemoteBaiDuApiConfigService create(Throwable throwable) {
|
||||
log.error("RemoteBaiDuApiConfigService fallback reason:{}", throwable.getMessage());
|
||||
|
||||
return new RemoteBaiDuApiConfigService() {
|
||||
@Override
|
||||
public ResultBean<BaiduApiConfig> getBaiDuApiConfigByDept(Long deptId, String moduleName) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
package com.yida.data.system.fallback;
|
||||
|
||||
import com.yida.data.common.core.annotation.Fallback;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.system.EduBaseApp;
|
||||
import com.yida.data.system.feign.RemoteBaseAppService;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
@Fallback
|
||||
public class RemoteBaseAppServiceFallback implements FallbackFactory<RemoteBaseAppService> {
|
||||
|
||||
@Override
|
||||
public RemoteBaseAppService create(Throwable throwable) {
|
||||
log.error("RemoteBaseAppService fallback reason:{}", throwable.getMessage());
|
||||
return new RemoteBaseAppService() {
|
||||
@Override
|
||||
public ResultBean<EduBaseApp> getById(Long id) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
package com.yida.data.system.fallback;
|
||||
|
||||
import com.yida.data.common.core.annotation.Fallback;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.system.ConstructionPayConfig;
|
||||
import com.yida.data.common.core.entity.system.UnionPayConfig;
|
||||
import com.yida.data.system.feign.RemoteConstructionPayConfigService;
|
||||
import com.yida.data.system.feign.RemoteUnionPayConfigService;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* RemoteConstructionPayConfigService fallback处理类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/6/19
|
||||
*/
|
||||
@Slf4j
|
||||
@Fallback
|
||||
public class RemoteConstructionPayConfigServiceFallback implements FallbackFactory<RemoteConstructionPayConfigService> {
|
||||
|
||||
@Override
|
||||
public RemoteConstructionPayConfigService create(Throwable throwable) {
|
||||
log.error("RemoteConstructionPayConfigService fallback reason:{}", throwable.getMessage());
|
||||
|
||||
return new RemoteConstructionPayConfigService() {
|
||||
@Override
|
||||
public ResultBean<ConstructionPayConfig> getConstructionPayConfigByDept(Long deptId) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
package com.yida.data.system.fallback;
|
||||
|
||||
import com.yida.data.common.core.annotation.Fallback;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.consume.EduConsumeConfig;
|
||||
import com.yida.data.system.feign.RemoteConsumeConfigService;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* RemoteConsumeConfigService fallback处理类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/4/6
|
||||
*/
|
||||
@Slf4j
|
||||
@Fallback
|
||||
public class RemoteConsumeConfigServiceFallback implements FallbackFactory<RemoteConsumeConfigService> {
|
||||
|
||||
@Override
|
||||
public RemoteConsumeConfigService create(Throwable throwable) {
|
||||
log.error("RemoteConsumeConfigService fallback reason:{}", throwable.getMessage());
|
||||
|
||||
return new RemoteConsumeConfigService() {
|
||||
@Override
|
||||
public ResultBean<EduConsumeConfig> getConsumeConfigByDept(Long deptId) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
package com.yida.data.system.fallback;
|
||||
|
||||
import com.yida.data.common.core.annotation.Fallback;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.system.EduDeptFunction;
|
||||
import com.yida.data.system.feign.RemoteDeptFunctionService;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* RemoteDeptFunctionService fallback处理类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/2/21
|
||||
*/
|
||||
@Slf4j
|
||||
@Fallback
|
||||
public class RemoteDeptFunctionServiceFallback implements FallbackFactory<RemoteDeptFunctionService> {
|
||||
|
||||
@Override
|
||||
public RemoteDeptFunctionService create(Throwable throwable) {
|
||||
log.error("RemoteDeptFunctionService fallback reason:{}", throwable.getMessage());
|
||||
|
||||
return new RemoteDeptFunctionService() {
|
||||
@Override
|
||||
public ResultBean<EduDeptFunction> getDeptFunction(String functionName, Long deptId) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
package com.yida.data.system.fallback;
|
||||
|
||||
import com.yida.data.common.core.annotation.Fallback;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.system.EduDeptPayType;
|
||||
import com.yida.data.common.core.entity.system.EduQywxServiceProviderSchool;
|
||||
import com.yida.data.system.feign.RemotePayTypeService;
|
||||
import com.yida.data.system.feign.RemoteQywxService;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* RemoteQywxService fallback处理类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/8/26
|
||||
*/
|
||||
@Slf4j
|
||||
@Fallback
|
||||
public class RemoteQywxServiceFallback implements FallbackFactory<RemoteQywxService> {
|
||||
|
||||
@Override
|
||||
public RemoteQywxService create(Throwable throwable) {
|
||||
log.error("RemoteQywxService fallback reason:{}", throwable.getMessage());
|
||||
|
||||
return new RemoteQywxService() {
|
||||
@Override
|
||||
public ResultBean<EduQywxServiceProviderSchool> getCorpByOriginalData(String providerCorpId, String deptOriginalCorpId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultBean<EduQywxServiceProviderSchool> getCorpByEncryptionData(String providerCorpId, String deptEncryptionCorpId) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
package com.yida.data.system.fallback;
|
||||
|
||||
import com.yida.data.common.core.annotation.Fallback;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.system.UPayConfig;
|
||||
import com.yida.data.system.feign.RemoteUPayConfigService;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* RemoteUPayConfigService fallback处理类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/3/21
|
||||
*/
|
||||
@Slf4j
|
||||
@Fallback
|
||||
public class RemoteUPayConfigServiceFallback implements FallbackFactory<RemoteUPayConfigService> {
|
||||
|
||||
@Override
|
||||
public RemoteUPayConfigService create(Throwable throwable) {
|
||||
log.error("RemoteUPayConfigService fallback reason:{}", throwable.getMessage());
|
||||
|
||||
return new RemoteUPayConfigService() {
|
||||
@Override
|
||||
public ResultBean<UPayConfig> getUPayConfigByDept(Long deptId) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
package com.yida.data.system.fallback;
|
||||
|
||||
import com.yida.data.common.core.annotation.Fallback;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.system.WhiteList;
|
||||
import com.yida.data.system.feign.RemoteWhiteListService;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* RemoteWhiteListService fallback处理类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/8/26
|
||||
*/
|
||||
@Slf4j
|
||||
@Fallback
|
||||
public class RemoteWhiteListServiceFallback implements FallbackFactory<RemoteWhiteListService> {
|
||||
|
||||
@Override
|
||||
public RemoteWhiteListService create(Throwable throwable) {
|
||||
log.error("RemoteWhiteListService fallback reason:{}", throwable.getMessage());
|
||||
|
||||
return new RemoteWhiteListService() {
|
||||
@Override
|
||||
public ResultBean<WhiteList> getWhiteList(String functionName) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
package com.yida.data.system.feign;
|
||||
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.constant.FebsServerConstant;
|
||||
import com.yida.data.common.core.entity.system.BaiduApiConfig;
|
||||
import com.yida.data.common.core.entity.system.ConstructionPayConfig;
|
||||
import com.yida.data.system.fallback.RemoteBaiDuApiConfigServiceFallback;
|
||||
import com.yida.data.system.fallback.RemoteConstructionPayConfigServiceFallback;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@FeignClient(value = FebsServerConstant.FEBS_SERVER_SYSTEM, contextId = "baiDuApiConfigServiceClient",
|
||||
fallbackFactory = RemoteBaiDuApiConfigServiceFallback.class)
|
||||
public interface RemoteBaiDuApiConfigService {
|
||||
|
||||
/**
|
||||
* 根据学校id查询百度api配置
|
||||
*/
|
||||
@GetMapping("/in/baiDuApiConfig/getBaiDuApiConfigByDept")
|
||||
ResultBean<BaiduApiConfig> getBaiDuApiConfigByDept(@RequestParam("deptId") Long deptId,
|
||||
@RequestParam("moduleName") String moduleName);
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
package com.yida.data.system.feign;
|
||||
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.constant.FebsServerConstant;
|
||||
import com.yida.data.common.core.entity.system.EduBaseApp;
|
||||
import com.yida.data.system.fallback.RemoteBaseAppServiceFallback;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@FeignClient(value = FebsServerConstant.FEBS_SERVER_SYSTEM, contextId = "baseAppServiceClient",
|
||||
fallbackFactory = RemoteBaseAppServiceFallback.class)
|
||||
public interface RemoteBaseAppService {
|
||||
|
||||
@GetMapping("/in/deptHomeApp/getById")
|
||||
ResultBean<EduBaseApp> getById(@RequestParam("id") Long id);
|
||||
}
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
package com.yida.data.system.feign;
|
||||
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.constant.FebsServerConstant;
|
||||
import com.yida.data.common.core.entity.system.ConstructionPayConfig;
|
||||
import com.yida.data.common.core.entity.system.UnionPayConfig;
|
||||
import com.yida.data.system.fallback.RemoteConstructionPayConfigServiceFallback;
|
||||
import com.yida.data.system.fallback.RemoteUnionPayConfigServiceFallback;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@FeignClient(value = FebsServerConstant.FEBS_SERVER_SYSTEM, contextId = "constructionPayConfigServiceClient",
|
||||
fallbackFactory = RemoteConstructionPayConfigServiceFallback.class)
|
||||
public interface RemoteConstructionPayConfigService {
|
||||
|
||||
@GetMapping("/in/constructionPayConfig/getConstructionPayConfigByDept")
|
||||
ResultBean<ConstructionPayConfig> getConstructionPayConfigByDept(@RequestParam("deptId") Long deptId);
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
package com.yida.data.system.feign;
|
||||
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.constant.FebsServerConstant;
|
||||
import com.yida.data.common.core.entity.consume.EduConsumeConfig;
|
||||
import com.yida.data.system.fallback.RemoteConsumeConfigServiceFallback;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@FeignClient(value = FebsServerConstant.FEBS_SERVER_SYSTEM, contextId = "consumeConfigServiceClient",
|
||||
fallbackFactory = RemoteConsumeConfigServiceFallback.class)
|
||||
public interface RemoteConsumeConfigService {
|
||||
|
||||
@GetMapping("/in/consumeConfig/getConsumeConfigByDept")
|
||||
ResultBean<EduConsumeConfig> getConsumeConfigByDept(@RequestParam("deptId") Long deptId);
|
||||
}
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
package com.yida.data.system.feign;
|
||||
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.constant.FebsServerConstant;
|
||||
import com.yida.data.common.core.entity.system.EduDeptFunction;
|
||||
import com.yida.data.system.fallback.RemoteDeptFunctionServiceFallback;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@FeignClient(value = FebsServerConstant.FEBS_SERVER_SYSTEM, contextId = "deptFunctionServiceClient", fallbackFactory =
|
||||
RemoteDeptFunctionServiceFallback.class)
|
||||
public interface RemoteDeptFunctionService {
|
||||
|
||||
/**
|
||||
* 获取部门是否开通当前功能
|
||||
*
|
||||
* @param functionName 功能名称
|
||||
* @param deptId 部门id
|
||||
* @return com.yida.data.common.core.common.ResultBean<com.yida.data.common.core.entity.system.EduDeptFunction>
|
||||
* @author ZYJ
|
||||
* @date 2023/2/21 15:06
|
||||
*/
|
||||
@GetMapping("/in/function/getDeptFunction")
|
||||
ResultBean<EduDeptFunction> getDeptFunction(@RequestParam("functionName") String functionName,
|
||||
@RequestParam("deptId") Long deptId);
|
||||
}
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
package com.yida.data.system.feign;
|
||||
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.Dict;
|
||||
import com.yida.data.common.core.entity.constant.FebsServerConstant;
|
||||
import com.yida.data.system.fallback.RemoteAreaServiceFallback;
|
||||
import java.util.List;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@FeignClient(value = FebsServerConstant.FEBS_SERVER_SYSTEM, contextId = "dictServiceClient",
|
||||
fallbackFactory = RemoteAreaServiceFallback.class)
|
||||
public interface RemoteDictService {
|
||||
|
||||
@GetMapping("/in/dict/selectDict")
|
||||
ResultBean<List<Dict>> selectDict(@RequestParam String type);
|
||||
|
||||
|
||||
@GetMapping("/in/dict/getDictByTypeAndValueOrLabel")
|
||||
ResultBean<Dict> getDictByTypeAndValueOrLabel(@RequestParam String type, @RequestParam String value,
|
||||
@RequestParam String label);
|
||||
|
||||
}
|
||||
-40
@@ -1,40 +0,0 @@
|
||||
package com.yida.data.system.feign;
|
||||
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.constant.FebsServerConstant;
|
||||
import com.yida.data.common.core.entity.system.EduQywxServiceProviderSchool;
|
||||
import com.yida.data.system.fallback.RemoteQywxServiceFallback;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@FeignClient(value = FebsServerConstant.FEBS_SERVER_SYSTEM, contextId = "qywxServiceClient",
|
||||
fallbackFactory = RemoteQywxServiceFallback.class)
|
||||
public interface RemoteQywxService {
|
||||
|
||||
/**
|
||||
* 服务商对应学校加密corpId数据(原始值为key)
|
||||
*
|
||||
* @param providerCorpId 服务商corpId
|
||||
* @param deptOriginalCorpId 部门原始corpId
|
||||
* @return com.yida.data.common.core.common.ResultBean<com.yida.data.common.core.entity.system.EduQywxServiceProviderSchool>
|
||||
* @author ZYJ
|
||||
* @date 2023/9/25 17:48
|
||||
*/
|
||||
@GetMapping("/in/qywx/getCorpByOriginalData")
|
||||
ResultBean<EduQywxServiceProviderSchool> getCorpByOriginalData(@RequestParam("providerCorpId") String providerCorpId,
|
||||
@RequestParam("deptOriginalCorpId") String deptOriginalCorpId);
|
||||
|
||||
/**
|
||||
* 服务商对应学校加密corpId数据(加密值为key)
|
||||
*
|
||||
* @param providerCorpId 服务商corpId
|
||||
* @param deptEncryptionCorpId 部门加密corpId
|
||||
* @return com.yida.data.common.core.common.ResultBean<com.yida.data.common.core.entity.system.EduQywxServiceProviderSchool>
|
||||
* @author ZYJ
|
||||
* @date 2023/9/25 17:48
|
||||
*/
|
||||
@GetMapping("/in/qywx/getCorpByEncryptionData")
|
||||
ResultBean<EduQywxServiceProviderSchool> getCorpByEncryptionData(@RequestParam("providerCorpId") String providerCorpId,
|
||||
@RequestParam("deptEncryptionCorpId") String deptEncryptionCorpId);
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
package com.yida.data.system.feign;
|
||||
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.constant.FebsServerConstant;
|
||||
import com.yida.data.common.core.entity.system.UPayConfig;
|
||||
import com.yida.data.system.fallback.RemoteUnionPayConfigServiceFallback;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@FeignClient(value = FebsServerConstant.FEBS_SERVER_SYSTEM, contextId = "uPayConfigServiceClient",
|
||||
fallbackFactory = RemoteUnionPayConfigServiceFallback.class)
|
||||
public interface RemoteUPayConfigService {
|
||||
|
||||
@GetMapping("/in/uPayConfig/getUPayConfigByDept")
|
||||
ResultBean<UPayConfig> getUPayConfigByDept(@RequestParam("deptId") Long deptId);
|
||||
}
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
package com.yida.data.system.feign;
|
||||
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.constant.FebsServerConstant;
|
||||
import com.yida.data.common.core.entity.system.WhiteList;
|
||||
import com.yida.data.system.fallback.RemoteWhiteListServiceFallback;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@FeignClient(value = FebsServerConstant.FEBS_SERVER_SYSTEM, contextId = "whiteListServiceClient", fallbackFactory =
|
||||
RemoteWhiteListServiceFallback.class)
|
||||
public interface RemoteWhiteListService {
|
||||
|
||||
/**
|
||||
* 根据功能名称获取对应的白名单信息
|
||||
*
|
||||
* @param functionName 功能名称
|
||||
* @return com.yida.data.common.core.common.ResultBean<com.yida.data.common.core.entity.system.WhiteList>
|
||||
* @author ZYJ
|
||||
* @date 2023/2/21 15:05
|
||||
*/
|
||||
@GetMapping("/in/whiteList/getWhiteList")
|
||||
ResultBean<WhiteList> getWhiteList(@RequestParam("functionName") String functionName);
|
||||
}
|
||||
-70
@@ -1,70 +0,0 @@
|
||||
package com.yida.data.system.configure;
|
||||
|
||||
import com.rabbitmq.client.Channel;
|
||||
import com.yida.data.common.core.entity.WxPublicQr;
|
||||
import com.yida.data.common.core.exception.FebsException;
|
||||
import com.yida.data.rabbit.constant.RabbitConstant;
|
||||
import com.yida.data.system.dto.QywxCallbackHandleDTO;
|
||||
import com.yida.data.system.service.EduAgentWxPublicReceiverService;
|
||||
import com.yida.data.system.service.QywxHandleService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.amqp.core.Message;
|
||||
import org.springframework.amqp.rabbit.annotation.Exchange;
|
||||
import org.springframework.amqp.rabbit.annotation.Queue;
|
||||
import org.springframework.amqp.rabbit.annotation.QueueBinding;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* 企业微信回调mq处理类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/10/26
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class QywxHandleRabbitReceiver {
|
||||
|
||||
private final QywxHandleService qywxHandleService;
|
||||
|
||||
/**
|
||||
* 企业微信处理接收者
|
||||
*/
|
||||
@RabbitListener(bindings = @QueueBinding(
|
||||
value = @Queue(RabbitConstant.QYWX_HANDLE_QUEUE),
|
||||
exchange = @Exchange(RabbitConstant.QYWX_HANDLE_EXCHANGE)
|
||||
))
|
||||
public void qywxHandleRabbitReceiver(QywxCallbackHandleDTO dto, Channel channel, Message message) throws IOException {
|
||||
long deliveryTag = message.getMessageProperties().getDeliveryTag();
|
||||
try {
|
||||
// 处理企业微信回调信息
|
||||
switch (dto.getQywxCallbackTypeEnum()) {
|
||||
// 自开发回调
|
||||
case POST:
|
||||
qywxHandleService.handlePostCallback(dto);
|
||||
break;
|
||||
// 代开发应用模板回调
|
||||
case POST_NORMAL:
|
||||
qywxHandleService.handlePostNormalCallback(dto);
|
||||
break;
|
||||
// 处理企业微信代开发应用回调信息
|
||||
case POST_EVENT:
|
||||
qywxHandleService.handlePostEventCallback(dto);
|
||||
break;
|
||||
default:
|
||||
throw new FebsException("回调类型错误");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("rabbitmq处理企业微信回调消息失败, msg: {}", dto, e);
|
||||
// 重新回到队列
|
||||
// channel.basicNack(deliveryTag, false, true);
|
||||
} finally {
|
||||
// 确认收到消息,只确认当前消费者的一个消息收到
|
||||
channel.basicAck(deliveryTag, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
package com.yida.data.system.controller;
|
||||
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.system.EduBaseApp;
|
||||
import com.yida.data.system.service.EduBaseAppService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 基础应用信息(本地配置) Controller
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-06-28 14:57:58
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("eduBaseApp")
|
||||
@Api(tags = "基础应用信息配置信息")
|
||||
public class EduBaseAppController {
|
||||
|
||||
private final EduBaseAppService eduBaseAppService;
|
||||
|
||||
@PostMapping(value = "listBaseApp")
|
||||
@ApiOperation(value = "查询基础应用列表数据")
|
||||
public ResultBean<List<EduBaseApp>> listBaseApp() {
|
||||
return ResultBean.buildSuccess(eduBaseAppService.list());
|
||||
}
|
||||
}
|
||||
-42
@@ -1,42 +0,0 @@
|
||||
package com.yida.data.system.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.system.BaiduApiConfig;
|
||||
import com.yida.data.common.core.entity.system.UnionPayConfig;
|
||||
import com.yida.data.common.core.utils.Asserts;
|
||||
import com.yida.data.system.service.BaiduApiConfigService;
|
||||
import com.yida.data.system.service.UnionPayConfigService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 百度api配置信息 Controller
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/6/20
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "百度api配置信息(无鉴权)")
|
||||
@RequestMapping("/in/baiDuApiConfig")
|
||||
public class InBaiDuApiConfigController {
|
||||
|
||||
private final BaiduApiConfigService baiduApiConfigService;
|
||||
|
||||
@ApiOperation("根据学校id查询百度api配置")
|
||||
@GetMapping("/getBaiDuApiConfigByDept")
|
||||
public ResultBean<BaiduApiConfig> getBaiDuApiConfigByDept(@RequestParam Long deptId, @RequestParam String moduleName) {
|
||||
Asserts.isNotNull(deptId, "部门不能为空");
|
||||
return ResultBean.buildSuccess(baiduApiConfigService.getOne(Wrappers.lambdaQuery(new BaiduApiConfig())
|
||||
.eq(BaiduApiConfig::getSchoolId, deptId)
|
||||
.eq(BaiduApiConfig::getModuleName, moduleName)
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
package com.yida.data.system.controller;
|
||||
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.system.EduBaseApp;
|
||||
import com.yida.data.system.service.EduBaseAppService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 基础app管理(无鉴权)
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-06-28 15:24:25
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "基础app管理(无鉴权)")
|
||||
@RestController
|
||||
@RequestMapping("/in/deptHomeApp")
|
||||
@RequiredArgsConstructor
|
||||
public class InBaseDeptHomeAppController {
|
||||
|
||||
private final EduBaseAppService eduBaseAppService;
|
||||
|
||||
@ApiOperation("根据id查询基础应用")
|
||||
@GetMapping("/getById")
|
||||
public ResultBean<EduBaseApp> getById(@RequestParam Long id) {
|
||||
return ResultBean.buildSuccess(eduBaseAppService.getById(id));
|
||||
}
|
||||
|
||||
}
|
||||
-39
@@ -1,39 +0,0 @@
|
||||
package com.yida.data.system.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.system.ConstructionPayConfig;
|
||||
import com.yida.data.common.core.entity.system.UnionPayConfig;
|
||||
import com.yida.data.common.core.utils.Asserts;
|
||||
import com.yida.data.system.service.ConstructionPayConfigService;
|
||||
import com.yida.data.system.service.UnionPayConfigService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 建行学习支付配置信息 Controller
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/6/19
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "建行学习支付配置信息(无鉴权)")
|
||||
@RequestMapping("/in/constructionPayConfig")
|
||||
public class InConstructionPayConfigController {
|
||||
|
||||
private final ConstructionPayConfigService constructionPayConfigService;
|
||||
|
||||
@ApiOperation("根据部门查询建行支付配置")
|
||||
@GetMapping("/getConstructionPayConfigByDept")
|
||||
public ResultBean<ConstructionPayConfig> getConstructionPayConfigByDept(Long deptId) {
|
||||
Asserts.isNotNull(deptId, "部门不能为空");
|
||||
return ResultBean.buildSuccess(constructionPayConfigService.getOne(Wrappers.lambdaQuery(new ConstructionPayConfig())
|
||||
.eq(ConstructionPayConfig::getDeptId, deptId)));
|
||||
}
|
||||
|
||||
}
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
package com.yida.data.system.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.consume.EduConsumeConfig;
|
||||
import com.yida.data.common.core.utils.Asserts;
|
||||
import com.yida.data.system.service.EduConsumeConfigService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 学校消费机服务器信息 Controller
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/4/6
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "学校消费机服务器信息(无鉴权)")
|
||||
@RequestMapping("/in/consumeConfig")
|
||||
public class InConsumeConfigController {
|
||||
|
||||
private final EduConsumeConfigService eduConsumeConfigService;
|
||||
|
||||
@ApiOperation("根据部门查询收钱吧支付配置信息")
|
||||
@GetMapping("/getConsumeConfigByDept")
|
||||
public ResultBean<EduConsumeConfig> getConsumeConfigByDept(Long deptId) {
|
||||
Asserts.isNotNull(deptId, "部门不能为空");
|
||||
return ResultBean.buildSuccess(eduConsumeConfigService.getOne(Wrappers.lambdaQuery(new EduConsumeConfig())
|
||||
.eq(EduConsumeConfig::getDeptId, deptId))
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
package com.yida.data.system.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.system.EduDeptFunction;
|
||||
import com.yida.data.system.service.EduDeptFunctionService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 系统功能 Controller
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/2/21
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "系统功能(无鉴权)")
|
||||
@RequestMapping("/in/function")
|
||||
public class InDeptFunctionController {
|
||||
|
||||
private final EduDeptFunctionService eduDeptFunctionService;
|
||||
|
||||
@ApiOperation("获取部门是否开通当前功能")
|
||||
@GetMapping("/getDeptFunction")
|
||||
public ResultBean<EduDeptFunction> getDeptFunction(String functionName, Long deptId) {
|
||||
return ResultBean.buildSuccess(eduDeptFunctionService.getOne(Wrappers.lambdaQuery(new EduDeptFunction())
|
||||
.eq(EduDeptFunction::getFunctionName, functionName)
|
||||
.eq(EduDeptFunction::getDeptId, deptId)
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
-65
@@ -1,65 +0,0 @@
|
||||
package com.yida.data.system.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.yida.data.common.core.common.ModuleName;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.Dict;
|
||||
import com.yida.data.common.core.entity.system.enums.OperationLogTypeEnum;
|
||||
import com.yida.data.log.annotation.OperationLog;
|
||||
import com.yida.data.system.service.DictService;
|
||||
import com.yida.data.system.vo.DictTypePageVO;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 字典crud
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Slf4j
|
||||
@Validated
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/in/dict")
|
||||
public class InDictController {
|
||||
|
||||
@Resource
|
||||
private DictService dictService;
|
||||
|
||||
@GetMapping("/selectDict")
|
||||
@OperationLog(module = ModuleName.SYSTEM, methods = "查询字典")
|
||||
public ResultBean<List<Dict>> selectDict(@ApiParam("类型") @RequestParam String type) {
|
||||
return ResultBean.buildSuccess(dictService.list(Wrappers.lambdaQuery(new Dict())
|
||||
.eq(Dict::getType, type).orderByAsc(Dict::getSort)));
|
||||
}
|
||||
|
||||
@GetMapping("/getDictByTypeAndValueOrLabel")
|
||||
public ResultBean getDictCode(String type, String value, String label) {
|
||||
log.info("参数信息: {},{},{}", type, value, label);
|
||||
if (ObjectUtil.isNotNull(value)) {
|
||||
return ResultBean
|
||||
.buildSuccess(
|
||||
dictService.getOne(Wrappers.lambdaQuery(new Dict()).eq(Dict::getType, type).eq(Dict::getValue, value)));
|
||||
}
|
||||
if (ObjectUtil.isNotNull(label)) {
|
||||
return ResultBean
|
||||
.buildSuccess(
|
||||
dictService.getOne(Wrappers.lambdaQuery(new Dict()).eq(Dict::getType, type).eq(Dict::getLabel, label)));
|
||||
}
|
||||
return ResultBean.buildSuccess();
|
||||
}
|
||||
|
||||
}
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
package com.yida.data.system.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.system.UPayConfig;
|
||||
import com.yida.data.common.core.utils.Asserts;
|
||||
import com.yida.data.system.service.UPayConfigService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 收钱吧支付配置信息 Controller
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/3/21
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "收钱吧支付配置信息(无鉴权)")
|
||||
@RequestMapping("/in/uPayConfig")
|
||||
public class InUPayConfigController {
|
||||
|
||||
private final UPayConfigService uPayConfigService;
|
||||
|
||||
@ApiOperation("根据部门查询收钱吧支付配置信息")
|
||||
@GetMapping("/getUPayConfigByDept")
|
||||
public ResultBean<UPayConfig> getUPayConfigByDept(Long deptId) {
|
||||
Asserts.isNotNull(deptId, "部门不能为空");
|
||||
return ResultBean.buildSuccess(uPayConfigService.getOne(Wrappers.lambdaQuery(new UPayConfig())
|
||||
.eq(UPayConfig::getDeptId, deptId))
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
-35
@@ -1,35 +0,0 @@
|
||||
package com.yida.data.system.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.yida.data.common.core.common.ResultBean;
|
||||
import com.yida.data.common.core.entity.system.WhiteList;
|
||||
import com.yida.data.system.service.WhiteListService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 白名单 Controller
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/2/21
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "白名单(无鉴权)")
|
||||
@RequestMapping("/in/whiteList")
|
||||
public class InWhiteListController {
|
||||
|
||||
private final WhiteListService whiteListService;
|
||||
|
||||
@ApiOperation("根据功能名称获取对应的白名单信息")
|
||||
@GetMapping("/getWhiteList")
|
||||
public ResultBean<WhiteList> getWhiteList(String functionName) {
|
||||
return ResultBean.buildSuccess(whiteListService.getOne(Wrappers.lambdaQuery(new WhiteList())
|
||||
.eq(WhiteList::getFunctionName, functionName)));
|
||||
}
|
||||
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package com.yida.data.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yida.data.common.core.entity.system.BaiduApiConfig;
|
||||
|
||||
/**
|
||||
* 百度api配置信息 Mapper
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-06-20 20:42:47
|
||||
*/
|
||||
public interface BaiduApiConfigMapper extends BaseMapper<BaiduApiConfig> {
|
||||
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package com.yida.data.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yida.data.common.core.entity.system.ConstructionPayConfig;
|
||||
|
||||
/**
|
||||
* 建行学校信息配置 Mapper
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-06-19 16:30:18
|
||||
*/
|
||||
public interface ConstructionPayConfigMapper extends BaseMapper<ConstructionPayConfig> {
|
||||
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package com.yida.data.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yida.data.common.core.entity.system.EduAppTemplate;
|
||||
|
||||
/**
|
||||
* 企业微信服务商代开发应用模板dao
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/11/3
|
||||
*/
|
||||
public interface EduAppTemplateMapper extends BaseMapper<EduAppTemplate> {
|
||||
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package com.yida.data.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yida.data.common.core.entity.system.EduBaseApp;
|
||||
|
||||
/**
|
||||
* 基础应用信息(本地配置) Mapper
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-06-28 14:57:58
|
||||
*/
|
||||
public interface EduBaseAppMapper extends BaseMapper<EduBaseApp> {
|
||||
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package com.yida.data.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yida.data.common.core.entity.consume.EduConsumeConfig;
|
||||
|
||||
/**
|
||||
* 学校消费机服务器信息Mapper
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-04-06 17:31:11
|
||||
*/
|
||||
public interface EduConsumeConfigMapper extends BaseMapper<EduConsumeConfig> {
|
||||
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package com.yida.data.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yida.data.common.core.entity.system.EduDeptFunction;
|
||||
|
||||
/**
|
||||
* 部门对应的第三方系统功能Mapper
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-02-20 15:29:05
|
||||
*/
|
||||
public interface EduDeptFunctionMapper extends BaseMapper<EduDeptFunction> {
|
||||
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package com.yida.data.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yida.data.common.core.entity.system.EduQywxServiceProvider;
|
||||
|
||||
/**
|
||||
* 企业微信服务商dao
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/11/3
|
||||
*/
|
||||
public interface EduQywxServiceProviderMapper extends BaseMapper<EduQywxServiceProvider> {
|
||||
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package com.yida.data.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yida.data.common.core.entity.system.EduQywxServiceProviderSchool;
|
||||
|
||||
/**
|
||||
* 企业微信服务商-学校密文corpId对照表dao
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/11/9
|
||||
*/
|
||||
public interface EduQywxServiceProviderSchoolMapper extends BaseMapper<EduQywxServiceProviderSchool> {
|
||||
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package com.yida.data.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yida.data.common.core.entity.system.UPayConfig;
|
||||
|
||||
/**
|
||||
* 收钱吧学校信息配置Mapper
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-03-20 17:53:13
|
||||
*/
|
||||
public interface UPayConfigMapper extends BaseMapper<UPayConfig> {
|
||||
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package com.yida.data.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yida.data.common.core.entity.system.WhiteList;
|
||||
|
||||
/**
|
||||
* 白名单Mapper
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-02-20 14:15:49
|
||||
*/
|
||||
public interface WhiteListMapper extends BaseMapper<WhiteList> {
|
||||
|
||||
}
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
package com.yida.data.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yida.data.common.core.entity.system.BaiduApiConfig;
|
||||
|
||||
/**
|
||||
* 百度api配置信息 Service接口
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-06-20 20:42:47
|
||||
*/
|
||||
public interface BaiduApiConfigService extends IService<BaiduApiConfig> {
|
||||
}
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
package com.yida.data.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yida.data.common.core.entity.system.ConstructionPayConfig;
|
||||
|
||||
/**
|
||||
* 建行学校信息配置 Service接口
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-06-19 16:30:18
|
||||
*/
|
||||
public interface ConstructionPayConfigService extends IService<ConstructionPayConfig> {
|
||||
|
||||
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package com.yida.data.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yida.data.common.core.entity.system.EduAppTemplate;
|
||||
|
||||
/**
|
||||
* 企业微信服务商代开发应用模板service
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/11/3
|
||||
*/
|
||||
public interface EduAppTemplateService extends IService<EduAppTemplate> {
|
||||
|
||||
}
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
package com.yida.data.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yida.data.common.core.entity.system.EduBaseApp;
|
||||
|
||||
/**
|
||||
* 基础应用信息(本地配置) Service接口
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-06-28 14:57:58
|
||||
*/
|
||||
public interface EduBaseAppService extends IService<EduBaseApp> {
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package com.yida.data.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yida.data.common.core.entity.consume.EduConsumeConfig;
|
||||
|
||||
/**
|
||||
* 学校消费机服务器信息Service接口
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-04-06 17:31:11
|
||||
*/
|
||||
public interface EduConsumeConfigService extends IService<EduConsumeConfig> {
|
||||
|
||||
}
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
package com.yida.data.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yida.data.common.core.entity.system.EduDeptFunction;
|
||||
|
||||
/**
|
||||
* 部门对应的第三方系统功能Service接口
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-02-20 15:29:05
|
||||
*/
|
||||
public interface EduDeptFunctionService extends IService<EduDeptFunction> {
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package com.yida.data.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yida.data.common.core.entity.system.EduQywxServiceProviderSchool;
|
||||
|
||||
/**
|
||||
* 企业微信服务商-学校密文corpId对照表service
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/11/9
|
||||
*/
|
||||
public interface EduQywxServiceProviderSchoolService extends IService<EduQywxServiceProviderSchool> {
|
||||
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package com.yida.data.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yida.data.common.core.entity.system.EduQywxServiceProvider;
|
||||
|
||||
/**
|
||||
* 企业微信服务商service
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/11/3
|
||||
*/
|
||||
public interface EduQywxServiceProviderService extends IService<EduQywxServiceProvider> {
|
||||
|
||||
}
|
||||
-39
@@ -1,39 +0,0 @@
|
||||
package com.yida.data.system.service;
|
||||
|
||||
import com.yida.data.system.dto.QywxCallbackHandleDTO;
|
||||
|
||||
/**
|
||||
* 企业微信回调mq处理类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/10/27 16:42
|
||||
*/
|
||||
public interface QywxHandleService {
|
||||
|
||||
/**
|
||||
* 处理企业微信自开发回调信息
|
||||
*
|
||||
* @param dto 企业微信回调处理类
|
||||
* @author ZYJ
|
||||
* @date 2023/10/27 16:49
|
||||
*/
|
||||
void handlePostCallback(QywxCallbackHandleDTO dto);
|
||||
|
||||
/**
|
||||
* 处理企业微信代开发应用模板回调信息
|
||||
*
|
||||
* @param dto 企业微信回调处理类
|
||||
* @author ZYJ
|
||||
* @date 2023/10/27 16:54
|
||||
*/
|
||||
void handlePostNormalCallback(QywxCallbackHandleDTO dto);
|
||||
|
||||
/**
|
||||
* 处理企业微信代开发应用回调信息
|
||||
*
|
||||
* @param dto 企业微信回调处理类
|
||||
* @author ZYJ
|
||||
* @date 2023/10/27 16:54
|
||||
*/
|
||||
void handlePostEventCallback(QywxCallbackHandleDTO dto);
|
||||
}
|
||||
-104
@@ -1,104 +0,0 @@
|
||||
package com.yida.data.system.service;
|
||||
|
||||
import com.yida.data.common.core.entity.system.Dept;
|
||||
import com.yida.data.common.core.entity.system.EduQywxServiceProvider;
|
||||
import com.yida.data.common.core.entity.system.EduQywxServiceProviderSchool;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
/**
|
||||
* 企业微信服务商处理方法service
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/11/3
|
||||
*/
|
||||
public interface QywxServiceProviderService {
|
||||
|
||||
/**
|
||||
* 授权安装模板应用
|
||||
*
|
||||
* @param suiteId 模板id
|
||||
* @param authCode 临时授权码
|
||||
* @param serviceProvider 企业微信服务商信息
|
||||
* @author ZYJ
|
||||
* @date 2022/11/3 16:22
|
||||
*/
|
||||
void installTemplateApp(String suiteId, String authCode, EduQywxServiceProvider serviceProvider);
|
||||
|
||||
/**
|
||||
* 处理服务商代开发应用模板ticket值
|
||||
*
|
||||
* @param suiteId 模板id
|
||||
* @param suiteTicket ticket值
|
||||
* @author ZYJ
|
||||
* @date 2022/11/3 11:13
|
||||
*/
|
||||
void handleTemplateSuiteTicket(String suiteId, String suiteTicket);
|
||||
|
||||
/**
|
||||
* 客户删除应用
|
||||
*
|
||||
* @param suiteId 模板id
|
||||
* @param authCorpId 授权企业微信id
|
||||
* @param serviceProvider 企业微信服务商信息
|
||||
* @author ZYJ
|
||||
* @date 2022/11/11 14:26
|
||||
*/
|
||||
void deleteTemplateApp(String suiteId, String authCorpId, EduQywxServiceProvider serviceProvider);
|
||||
|
||||
/**
|
||||
* 代开发应用重置secret
|
||||
*
|
||||
* @param suiteId 模板id
|
||||
* @param resetAuthCode 临时授权码
|
||||
* @param serviceProvider 企业微信服务商信息
|
||||
* @author ZYJ
|
||||
* @date 2022/11/11 16:01
|
||||
*/
|
||||
void resetTemplateAppAuthCode(String suiteId, String resetAuthCode, EduQywxServiceProvider serviceProvider);
|
||||
|
||||
/**
|
||||
* 处理通讯录事件
|
||||
* 通讯录授权编辑回调
|
||||
*
|
||||
* @param root xml明文
|
||||
* @param serviceProvider 企业微信服务商信息
|
||||
* @param suiteId 模板id
|
||||
* @author ZYJ
|
||||
* @date 2022/11/21 16:10
|
||||
*/
|
||||
// @Async
|
||||
void handleConcat(Element root, EduQywxServiceProvider serviceProvider, String suiteId);
|
||||
|
||||
/**
|
||||
* 处理通讯录事件
|
||||
* 家校沟通应用回调
|
||||
*
|
||||
* @param root xml明文
|
||||
* @param providerSchool 企业微信服务商-学校密文
|
||||
* @author ZYJ
|
||||
* @date 2023/2/24 15:59
|
||||
*/
|
||||
void handleConcat(Element root, EduQywxServiceProviderSchool providerSchool);
|
||||
|
||||
/**
|
||||
* 处理家校沟通通讯录事件
|
||||
*
|
||||
* @param root xml明文
|
||||
* @param providerSchool 企业微信服务商-学校密文corpId
|
||||
* @param school 学校信息
|
||||
* @author ZYJ
|
||||
* @date 2022/12/6 10:57
|
||||
*/
|
||||
void handleSchoolConcat(Element root, EduQywxServiceProviderSchool providerSchool, Dept school);
|
||||
|
||||
/**
|
||||
* 加密对应服务商的学校corpId
|
||||
*
|
||||
* @param providerCorpId 服务商企业微信id
|
||||
* @param corpId 学校企业微信id
|
||||
* @author ZYJ
|
||||
* @date 2023/1/14 15:02
|
||||
*/
|
||||
void changeCorpId(String providerCorpId, String corpId);
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package com.yida.data.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yida.data.common.core.entity.system.UPayConfig;
|
||||
|
||||
/**
|
||||
* 收钱吧学校信息配置Service接口
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-03-20 17:53:13
|
||||
*/
|
||||
public interface UPayConfigService extends IService<UPayConfig> {
|
||||
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package com.yida.data.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yida.data.common.core.entity.system.WhiteList;
|
||||
|
||||
/**
|
||||
* 白名单Service接口
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-02-20 14:15:49
|
||||
*/
|
||||
public interface WhiteListService extends IService<WhiteList> {
|
||||
|
||||
}
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
package com.yida.data.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yida.data.common.core.entity.system.BaiduApiConfig;
|
||||
import com.yida.data.system.mapper.BaiduApiConfigMapper;
|
||||
import com.yida.data.system.service.BaiduApiConfigService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 百度api配置信息 Service实现
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-06-20 20:42:47
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
|
||||
public class BaiduApiConfigServiceImpl extends ServiceImpl
|
||||
<BaiduApiConfigMapper, BaiduApiConfig> implements BaiduApiConfigService {
|
||||
|
||||
|
||||
}
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
package com.yida.data.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yida.data.common.core.entity.system.ConstructionPayConfig;
|
||||
import com.yida.data.system.mapper.ConstructionPayConfigMapper;
|
||||
import com.yida.data.system.service.ConstructionPayConfigService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 建行学校信息配置 Service实现
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-06-19 16:30:18
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class ConstructionPayConfigServiceImpl extends ServiceImpl
|
||||
<ConstructionPayConfigMapper, ConstructionPayConfig> implements ConstructionPayConfigService {
|
||||
|
||||
|
||||
}
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
package com.yida.data.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yida.data.common.core.entity.system.EduAppTemplate;
|
||||
import com.yida.data.system.mapper.EduAppTemplateMapper;
|
||||
import com.yida.data.system.service.EduAppTemplateService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 企业微信服务商代开发应用模板service
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/11/3
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class EduAppTemplateServiceImpl extends ServiceImpl<EduAppTemplateMapper,
|
||||
EduAppTemplate> implements EduAppTemplateService {
|
||||
}
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
package com.yida.data.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yida.data.common.core.entity.system.EduBaseApp;
|
||||
import com.yida.data.system.mapper.EduBaseAppMapper;
|
||||
import com.yida.data.system.service.EduBaseAppService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 基础应用信息(本地配置) Service实现
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-06-28 14:57:58
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class EduBaseAppServiceImpl extends ServiceImpl
|
||||
<EduBaseAppMapper, EduBaseApp> implements EduBaseAppService {
|
||||
|
||||
|
||||
}
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
package com.yida.data.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yida.data.common.core.entity.consume.EduConsumeConfig;
|
||||
import com.yida.data.system.mapper.EduConsumeConfigMapper;
|
||||
import com.yida.data.system.service.EduConsumeConfigService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 学校消费机服务器信息Service实现
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-04-06 17:31:11
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class EduConsumeConfigServiceImpl extends ServiceImpl
|
||||
<EduConsumeConfigMapper, EduConsumeConfig> implements EduConsumeConfigService {
|
||||
|
||||
}
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
package com.yida.data.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yida.data.common.core.entity.system.EduDeptFunction;
|
||||
import com.yida.data.system.mapper.EduDeptFunctionMapper;
|
||||
import com.yida.data.system.service.EduDeptFunctionService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 部门对应的第三方系统功能Service实现
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-02-20 15:29:05
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
|
||||
public class EduDeptFunctionServiceImpl extends ServiceImpl
|
||||
<EduDeptFunctionMapper, EduDeptFunction> implements EduDeptFunctionService {
|
||||
|
||||
|
||||
}
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
package com.yida.data.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yida.data.common.core.entity.system.EduQywxServiceProviderSchool;
|
||||
import com.yida.data.system.mapper.EduQywxServiceProviderSchoolMapper;
|
||||
import com.yida.data.system.service.EduQywxServiceProviderSchoolService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 企业微信服务商-学校密文corpId对照表service
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/11/9
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class EduQywxServiceProviderSchoolServiceImpl extends ServiceImpl<EduQywxServiceProviderSchoolMapper,
|
||||
EduQywxServiceProviderSchool> implements EduQywxServiceProviderSchoolService {
|
||||
|
||||
|
||||
}
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
package com.yida.data.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yida.data.common.core.entity.system.EduQywxServiceProvider;
|
||||
import com.yida.data.system.mapper.EduQywxServiceProviderMapper;
|
||||
import com.yida.data.system.service.EduQywxServiceProviderService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 企业微信服务商service
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/11/3
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class EduQywxServiceProviderServiceImpl extends ServiceImpl<EduQywxServiceProviderMapper,
|
||||
EduQywxServiceProvider> implements EduQywxServiceProviderService {
|
||||
}
|
||||
-246
@@ -1,246 +0,0 @@
|
||||
package com.yida.data.system.service.impl;
|
||||
|
||||
import cn.hutool.core.thread.ThreadUtil;
|
||||
import com.yida.data.common.core.entity.constant.AppConstant;
|
||||
import com.yida.data.common.core.entity.constant.QywxConstant;
|
||||
import com.yida.data.common.core.entity.constant.QywxServiceProviderConstant;
|
||||
import com.yida.data.common.core.entity.system.Dept;
|
||||
import com.yida.data.common.core.entity.system.EduApp;
|
||||
import com.yida.data.common.core.entity.system.EduQywxServiceProvider;
|
||||
import com.yida.data.common.core.entity.system.EduQywxServiceProviderSchool;
|
||||
import com.yida.data.common.core.utils.WxUtil;
|
||||
import com.yida.data.common.service.CommonService;
|
||||
import com.yida.data.system.dto.QywxCallbackHandleDTO;
|
||||
import com.yida.data.system.service.QywxHandleService;
|
||||
import com.yida.data.system.service.QywxService;
|
||||
import com.yida.data.system.service.QywxServiceProviderService;
|
||||
import io.seata.spring.annotation.GlobalTransactional;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
/**
|
||||
* 企业微信回调mq处理类
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023/10/27 16:43
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class QywxHandleServiceImpl implements QywxHandleService {
|
||||
|
||||
private final QywxService qywxService;
|
||||
private final QywxServiceProviderService qywxServiceProviderService;
|
||||
|
||||
private final WxUtil wxUtil;
|
||||
private final CommonService commonService;
|
||||
|
||||
@Override
|
||||
@GlobalTransactional
|
||||
public void handlePostCallback(QywxCallbackHandleDTO dto) {
|
||||
Element root = dto.getRoot();
|
||||
String corpId = dto.getCorpId();
|
||||
Dept school = dto.getSchool();
|
||||
|
||||
NodeList nodeList1 = root.getElementsByTagName("ChangeType");
|
||||
String changeType = nodeList1.item(0).getTextContent();
|
||||
|
||||
NodeList nodeList2 = root.getElementsByTagName("Event");
|
||||
String event = nodeList2.item(0).getTextContent();
|
||||
|
||||
if (QywxConstant.SCHOOL_CONTACT_EVENT.equals(event)) {
|
||||
|
||||
EduApp app = commonService.getAppByCodeAndSchool(AppConstant.CONTACT_SCHOOL, null, school.getDeptId());
|
||||
String id = root.getElementsByTagName("Id").item(0).getTextContent();
|
||||
|
||||
switch (changeType) {
|
||||
case QywxConstant.SCHOOL_DEPT_CREATE_TYPE:
|
||||
qywxService.createSchoolDept(corpId, wxUtil.getAccessToken(app.getWxCorpId(),
|
||||
app.getWxSecret()), Long.valueOf(id), school);
|
||||
break;
|
||||
case QywxConstant.SCHOOL_DEPT_UPDATE_TYPE:
|
||||
qywxService.updateSchoolDept(wxUtil.getAccessToken(app.getWxCorpId(),
|
||||
app.getWxSecret()), Long.valueOf(id), school);
|
||||
break;
|
||||
case QywxConstant.SCHOOL_DEPT_DELETE_TYPE:
|
||||
qywxService.deleteSchoolDept(Long.valueOf(id), school);
|
||||
break;
|
||||
case QywxConstant.STUDENT_CREATE_TYPE:
|
||||
case QywxConstant.STUDENT_UPDATE_TYPE:
|
||||
qywxService.changeStudent(wxUtil.getAccessToken(app.getWxCorpId(),
|
||||
app.getWxSecret()), id, school);
|
||||
break;
|
||||
case QywxConstant.STUDENT_DELETE_TYPE:
|
||||
qywxService.deleteStudent(id, school.getDeptId());
|
||||
break;
|
||||
case QywxConstant.PARENT_CREATE_TYPE:
|
||||
// 新增家长可能是创建学生时创建,等待2s确保学生创建完成
|
||||
ThreadUtil.sleep(2000);
|
||||
case QywxConstant.PARENT_UPDATE_TYPE:
|
||||
qywxService.updateParent(wxUtil.getAccessToken(app.getWxCorpId(),
|
||||
app.getWxSecret()), id, school.getDeptId());
|
||||
break;
|
||||
case QywxConstant.PARENT_DELETE_TYPE:
|
||||
qywxService.deleteParent(id, school.getDeptId());
|
||||
break;
|
||||
case QywxConstant.PARENT_SUBSCRIBE_TYPE:
|
||||
log.info("进入家长关注事件回调");
|
||||
// 调用家长关注发送通知方法
|
||||
qywxService.sendParentSubscribeMessage(id, school.getDeptId());
|
||||
break;
|
||||
case QywxConstant.PARENT_UNSUBSCRIBE_TYPE:
|
||||
log.info("进入家长取消关注事件回调");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (QywxConstant.CONTACT_EVENT.equals(event)) {
|
||||
String userid = null, phone = null, name = null, gender = null, avatar = null, department = null,
|
||||
isLeader = null, mainDepartment = null, email = null;
|
||||
if (root.getElementsByTagName("UserID").getLength() != 0) {
|
||||
userid = root.getElementsByTagName("UserID").item(0).getTextContent();
|
||||
}
|
||||
if (root.getElementsByTagName("Mobile").getLength() != 0) {
|
||||
phone = root.getElementsByTagName("Mobile").item(0).getTextContent();
|
||||
}
|
||||
if (root.getElementsByTagName("Name").getLength() != 0) {
|
||||
name = root.getElementsByTagName("Name").item(0).getTextContent();
|
||||
}
|
||||
if (root.getElementsByTagName("Gender").getLength() != 0) {
|
||||
gender = root.getElementsByTagName("Gender").item(0).getTextContent();
|
||||
}
|
||||
if (root.getElementsByTagName("Avatar").getLength() != 0) {
|
||||
avatar = root.getElementsByTagName("Avatar").item(0).getTextContent();
|
||||
}
|
||||
if (root.getElementsByTagName("Department").getLength() != 0) {
|
||||
department = root.getElementsByTagName("Department").item(0).getTextContent();
|
||||
}
|
||||
if (root.getElementsByTagName("IsLeaderInDept").getLength() != 0) {
|
||||
isLeader = root.getElementsByTagName("IsLeaderInDept").item(0).getTextContent();
|
||||
}
|
||||
if (root.getElementsByTagName("MainDepartment").getLength() != 0) {
|
||||
mainDepartment = root.getElementsByTagName("MainDepartment").item(0).getTextContent();
|
||||
}
|
||||
if (root.getElementsByTagName("Email").getLength() != 0) {
|
||||
email = root.getElementsByTagName("Email").item(0).getTextContent();
|
||||
}
|
||||
|
||||
|
||||
String deptId = null, deptName = null, deptParentId = null, order = null;
|
||||
if (root.getElementsByTagName("Id").getLength() != 0) {
|
||||
deptId = root.getElementsByTagName("Id").item(0).getTextContent();
|
||||
}
|
||||
if (root.getElementsByTagName("Name").getLength() != 0) {
|
||||
deptName = root.getElementsByTagName("Name").item(0).getTextContent();
|
||||
}
|
||||
if (root.getElementsByTagName("ParentId").getLength() != 0) {
|
||||
deptParentId = root.getElementsByTagName("ParentId").item(0).getTextContent();
|
||||
}
|
||||
if (root.getElementsByTagName("Order").getLength() != 0) {
|
||||
order = root.getElementsByTagName("Order").item(0).getTextContent();
|
||||
}
|
||||
|
||||
switch (changeType) {
|
||||
case QywxConstant.USER_CREATE_TYPE:
|
||||
qywxService.createUser(name, userid, phone, email, gender, avatar, department, isLeader,
|
||||
mainDepartment, school);
|
||||
break;
|
||||
case QywxConstant.USER_UPDATE_TYPE:
|
||||
qywxService.updateUser(name, userid, phone, email, gender, avatar, department, isLeader,
|
||||
mainDepartment, school);
|
||||
break;
|
||||
case QywxConstant.USER_DELETE_TYPE:
|
||||
qywxService.deleteUser(userid, school.getDeptId());
|
||||
break;
|
||||
case QywxConstant.DEPT_CREATE_TYPE:
|
||||
qywxService.createDept(deptId, deptName, deptParentId, order, school);
|
||||
break;
|
||||
case QywxConstant.DEPT_UPDATE_TYPE:
|
||||
qywxService.updateDept(deptId, deptName, deptParentId, school.getDeptId());
|
||||
break;
|
||||
case QywxConstant.DEPT_DELETE_TYPE:
|
||||
qywxService.deleteDept(deptId, school.getDeptId());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@GlobalTransactional
|
||||
public void handlePostNormalCallback(QywxCallbackHandleDTO dto) {
|
||||
Element root = dto.getRoot();
|
||||
EduQywxServiceProvider serviceProvider = dto.getEduQywxServiceProvider();
|
||||
|
||||
// 通知消息类型
|
||||
NodeList nodeList = root.getElementsByTagName("InfoType");
|
||||
String infoType = nodeList.item(0).getTextContent();
|
||||
// 模板id
|
||||
NodeList nodeListSuiteId = root.getElementsByTagName("SuiteId");
|
||||
String suiteId = nodeListSuiteId.item(0).getTextContent();
|
||||
// 通讯录变更
|
||||
if (QywxConstant.CONTACT_EVENT.equals(infoType)) {
|
||||
log.info("模板回调进入通讯录变更事件");
|
||||
qywxServiceProviderService.handleConcat(root, serviceProvider, suiteId);
|
||||
}
|
||||
switch (infoType) {
|
||||
// 安装应用授权
|
||||
case QywxServiceProviderConstant.SERVICE_CREATE_AUTH:
|
||||
// 临时授权码
|
||||
NodeList nodeListAuthCode = root.getElementsByTagName("AuthCode");
|
||||
String authCode = nodeListAuthCode.item(0).getTextContent();
|
||||
qywxServiceProviderService.installTemplateApp(suiteId, authCode, serviceProvider);
|
||||
break;
|
||||
// 客户删除应用
|
||||
case QywxServiceProviderConstant.SERVICE_CANCEL_AUTH:
|
||||
// 授权企业加密corpId
|
||||
NodeList nodeListAuthCorpId = root.getElementsByTagName("AuthCorpId");
|
||||
String authCorpId = nodeListAuthCorpId.item(0).getTextContent();
|
||||
qywxServiceProviderService.deleteTemplateApp(suiteId, authCorpId, serviceProvider);
|
||||
break;
|
||||
// 待开发应用模板suite_ticket
|
||||
case QywxServiceProviderConstant.TEMPLATE_SUITE_TICKET:
|
||||
// 模板id
|
||||
NodeList nodeListTicket = root.getElementsByTagName("SuiteTicket");
|
||||
String suiteTicket = nodeListTicket.item(0).getTextContent();
|
||||
qywxServiceProviderService.handleTemplateSuiteTicket(suiteId, suiteTicket);
|
||||
break;
|
||||
// 代开发应用重置secret
|
||||
case QywxServiceProviderConstant.RESET_PERMANENT_CODE:
|
||||
// 临时授权码
|
||||
NodeList nodeListResetAuthCode = root.getElementsByTagName("AuthCode");
|
||||
String resetAuthCode = nodeListResetAuthCode.item(0).getTextContent();
|
||||
qywxServiceProviderService.resetTemplateAppAuthCode(suiteId, resetAuthCode, serviceProvider);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@GlobalTransactional
|
||||
public void handlePostEventCallback(QywxCallbackHandleDTO dto) {
|
||||
Element root = dto.getRoot();
|
||||
Dept school = dto.getSchool();
|
||||
EduQywxServiceProviderSchool providerSchool = dto.getProviderSchool();
|
||||
|
||||
NodeList nodeListEvent = root.getElementsByTagName("Event");
|
||||
String event = nodeListEvent.item(0).getTextContent();
|
||||
|
||||
if (QywxConstant.SCHOOL_CONTACT_EVENT.equals(event)) {
|
||||
log.info("进入家校沟通通讯录处理事件");
|
||||
qywxServiceProviderService.handleSchoolConcat(root, providerSchool, school);
|
||||
}
|
||||
// 通讯录变更
|
||||
if (QywxConstant.CONTACT_EVENT.equals(event)) {
|
||||
log.info("进入通讯录变更事件");
|
||||
qywxServiceProviderService.handleConcat(root, providerSchool);
|
||||
}
|
||||
}
|
||||
}
|
||||
-371
@@ -1,371 +0,0 @@
|
||||
package com.yida.data.system.service.impl;
|
||||
|
||||
import cc.mrbird.febs.common.redis.service.RedisService;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.thread.ThreadUtil;
|
||||
import cn.hutool.json.JSONArray;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.yida.data.common.core.entity.constant.AppConstant;
|
||||
import com.yida.data.common.core.entity.constant.CachePrefixConstant;
|
||||
import com.yida.data.common.core.entity.constant.QywxConstant;
|
||||
import com.yida.data.common.core.entity.constant.QywxServiceProviderConstant;
|
||||
import com.yida.data.common.core.entity.notice.qywx.BaseStaffNotice;
|
||||
import com.yida.data.common.core.entity.notice.qywx.inside.Text;
|
||||
import com.yida.data.common.core.entity.system.*;
|
||||
import com.yida.data.common.core.entity.user.EduStaff;
|
||||
import com.yida.data.common.core.enums.QywxAppTypeEnum;
|
||||
import com.yida.data.common.core.utils.WxServiceProviderUtil;
|
||||
import com.yida.data.common.core.utils.WxUtil;
|
||||
import com.yida.data.common.service.CommonService;
|
||||
import com.yida.data.system.service.*;
|
||||
import com.yida.data.user.feign.RemoteStaffService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 企业微信服务商处理方法service
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2022/11/3
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class QywxServiceProviderServiceImpl implements QywxServiceProviderService {
|
||||
|
||||
private final QywxService qywxService;
|
||||
private final IDeptService deptService;
|
||||
private final EduAppService eduAppService;
|
||||
private final EduQywxServiceProviderService eduQywxServiceProviderService;
|
||||
private final EduQywxServiceProviderSchoolService eduQywxServiceProviderSchoolService;
|
||||
|
||||
private final WxUtil wxUtil;
|
||||
private final RedisService redisService;
|
||||
private final CommonService commonService;
|
||||
private final WxServiceProviderUtil wxServiceProviderUtil;
|
||||
|
||||
private final RemoteStaffService remoteStaffService;
|
||||
|
||||
@Value("${febs.authRedirectUrl}")
|
||||
private String authRedirectUrl;
|
||||
|
||||
@Override
|
||||
public void installTemplateApp(String suiteId, String authCode, EduQywxServiceProvider serviceProvider) {
|
||||
Object oSuiteTicket = redisService.get(QywxServiceProviderConstant.SERVICE_SUITE_TICKET + suiteId);
|
||||
if (Objects.isNull(oSuiteTicket)) {
|
||||
log.error("安装授权应用失败, suiteId: {}, authCode: {}", suiteId, authCode);
|
||||
return;
|
||||
}
|
||||
// 处理授权的企业微信信息
|
||||
handleAuthQywx(suiteId, authCode, String.valueOf(oSuiteTicket), serviceProvider);
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理授权的企业微信信息
|
||||
*/
|
||||
@Async
|
||||
public void handleAuthQywx(String suiteId, String authCode, String suiteTicket, EduQywxServiceProvider serviceProvider) {
|
||||
// 获取应用模板信息
|
||||
EduAppTemplate appTemplate = commonService.getAppTemplateByTemplateId(suiteId, serviceProvider.getCorpId());
|
||||
// 获取第三方应用凭证
|
||||
String suiteAccessToken = wxServiceProviderUtil.getSuiteAccessToken(appTemplate.getTemplateId(),
|
||||
appTemplate.getTemplateSecret(), suiteTicket);
|
||||
// 获取企业永久授权码
|
||||
JSONObject jsonObject = wxServiceProviderUtil.getPermanentCode(suiteAccessToken, authCode);
|
||||
// 获取授权企业微信id密文
|
||||
String authCorpId = jsonObject.getJSONObject("auth_corp_info").getStr("corpid");
|
||||
// 获取企业微信信息
|
||||
// EduQywxServiceProviderSchool providerSchool = (EduQywxServiceProviderSchool) redisService.hget(QywxServiceProviderConstant.PROVIDER_SCHOOL_CORP_DATA, serviceProvider.getCorpId() + "." + authCorpId);
|
||||
EduQywxServiceProviderSchool providerSchool = commonService.getCorpByEncryptionData(serviceProvider.getCorpId(), authCorpId);
|
||||
log.info("匹配的corpId信息: {}", providerSchool);
|
||||
// 查询对应的部门信息
|
||||
Dept dept = deptService.getOne(Wrappers.lambdaQuery(new Dept()).eq(Dept::getCorpId, providerSchool.getDeptOriginalCorpId()));
|
||||
// 生成企业应用信息
|
||||
EduApp eduApp = new EduApp();
|
||||
eduApp.setDeptId(dept.getDeptId());
|
||||
eduApp.setName(appTemplate.getTemplateName());
|
||||
eduApp.setCode(appTemplate.getTemplateCode());
|
||||
eduApp.setWxCorpId(dept.getCorpId());
|
||||
eduApp.setAppType(QywxAppTypeEnum.SERVICE_PROVIDER_APPLICATION_TYPE.getType());
|
||||
eduApp.setTemplateId(appTemplate.getTemplateId());
|
||||
eduApp.setWxSecret(jsonObject.getStr("permanent_code"));
|
||||
eduApp.setServiceCorpId(serviceProvider.getCorpId());
|
||||
// 应用信息
|
||||
JSONArray agentArray = jsonObject.getJSONObject("auth_info").getJSONArray("agent");
|
||||
if (CollUtil.isNotEmpty(agentArray)) {
|
||||
Object object = agentArray.get(0);
|
||||
JSONObject obj = JSONUtil.parseObj(object);
|
||||
eduApp.setWxAgentId(obj.getStr("agentid"));
|
||||
}
|
||||
eduAppService.save(eduApp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleTemplateSuiteTicket(String suiteId, String suiteTicket) {
|
||||
redisService.set(QywxServiceProviderConstant.SERVICE_SUITE_TICKET + suiteId, suiteTicket);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteTemplateApp(String suiteId, String authCorpId, EduQywxServiceProvider serviceProvider) {
|
||||
// 获取企业微信信息
|
||||
// EduQywxServiceProviderSchool providerSchool = (EduQywxServiceProviderSchool) redisService.hget(QywxServiceProviderConstant.PROVIDER_SCHOOL_CORP_DATA, serviceProvider.getCorpId() + "." + authCorpId);
|
||||
EduQywxServiceProviderSchool providerSchool = commonService.getCorpByEncryptionData(serviceProvider.getCorpId(), authCorpId);
|
||||
// 查询对应的部门信息
|
||||
Dept dept = deptService.getOne(Wrappers.lambdaQuery(new Dept()).eq(Dept::getCorpId, providerSchool.getDeptOriginalCorpId()));
|
||||
// 查询对应应用信息
|
||||
EduApp eduApp = eduAppService.getOne(Wrappers.lambdaQuery(new EduApp())
|
||||
.eq(EduApp::getDeptId, dept.getDeptId())
|
||||
.eq(EduApp::getWxCorpId, dept.getCorpId())
|
||||
.eq(EduApp::getTemplateId, suiteId));
|
||||
// 删除对应应用
|
||||
eduAppService.removeById(eduApp.getId());
|
||||
redisService.hdel(CachePrefixConstant.SYS_APP + dept.getDeptId(), eduApp.getCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetTemplateAppAuthCode(String suiteId, String resetAuthCode, EduQywxServiceProvider serviceProvider) {
|
||||
Object oSuiteTicket = redisService.get(QywxServiceProviderConstant.SERVICE_SUITE_TICKET + suiteId);
|
||||
// 获取应用模板信息
|
||||
EduAppTemplate appTemplate = commonService.getAppTemplateByTemplateId(suiteId, serviceProvider.getCorpId());
|
||||
// 获取第三方应用凭证
|
||||
String suiteAccessToken = wxServiceProviderUtil.getSuiteAccessToken(appTemplate.getTemplateId(),
|
||||
appTemplate.getTemplateSecret(), String.valueOf(oSuiteTicket));
|
||||
// 获取企业永久授权码
|
||||
JSONObject jsonObject = wxServiceProviderUtil.getPermanentCode(suiteAccessToken, resetAuthCode);
|
||||
// 获取授权企业微信id密文
|
||||
String authCorpId = jsonObject.getJSONObject("auth_corp_info").getStr("corpid");
|
||||
// 获取企业微信信息
|
||||
// EduQywxServiceProviderSchool providerSchool = (EduQywxServiceProviderSchool) redisService.hget(QywxServiceProviderConstant.PROVIDER_SCHOOL_CORP_DATA, serviceProvider.getCorpId() + "." + authCorpId);
|
||||
EduQywxServiceProviderSchool providerSchool = commonService.getCorpByEncryptionData(serviceProvider.getCorpId(), authCorpId);
|
||||
|
||||
eduAppService.update(Wrappers.lambdaUpdate(new EduApp())
|
||||
.eq(EduApp::getWxCorpId, providerSchool.getDeptOriginalCorpId())
|
||||
.eq(EduApp::getTemplateId, suiteId)
|
||||
.set(EduApp::getWxSecret, jsonObject.getStr("permanent_code")));
|
||||
|
||||
// 查询对应的部门信息
|
||||
Dept dept = deptService.getOne(Wrappers.lambdaQuery(new Dept()).eq(Dept::getCorpId, providerSchool.getDeptOriginalCorpId()));
|
||||
// 处理应用缓存
|
||||
EduApp eduApp = eduAppService.getOne(Wrappers.lambdaQuery(new EduApp())
|
||||
.eq(EduApp::getDeptId, dept.getDeptId())
|
||||
.eq(EduApp::getWxCorpId, dept.getCorpId())
|
||||
.eq(EduApp::getTemplateId, suiteId));
|
||||
redisService.hset(CachePrefixConstant.SYS_APP + dept.getDeptId(), eduApp.getCode(), eduApp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleConcat(Element root, EduQywxServiceProvider serviceProvider, String suiteId) {
|
||||
// 授权企业加密corpId
|
||||
NodeList nodeListAuthCorpId = root.getElementsByTagName("AuthCorpId");
|
||||
String authCorpId = nodeListAuthCorpId.item(0).getTextContent();
|
||||
// 获取企业微信信息
|
||||
EduQywxServiceProviderSchool providerSchool = commonService.getCorpByEncryptionData(serviceProvider.getCorpId(), authCorpId);
|
||||
|
||||
// 查询对应的学校信息
|
||||
Dept school = deptService.getOne(Wrappers.lambdaQuery(new Dept())
|
||||
.eq(Dept::getCorpId, providerSchool.getDeptOriginalCorpId()));
|
||||
// 此处获取对应学校通讯录(人力资源)应用
|
||||
EduApp app = commonService.getAppByCodeAndSchool(AppConstant.CONTACT_SELECT, null, school.getDeptId());
|
||||
|
||||
// 操作通讯录人员
|
||||
String userId = null;
|
||||
if (root.getElementsByTagName("UserID").getLength() != 0) {
|
||||
userId = root.getElementsByTagName("UserID").item(0).getTextContent();
|
||||
}
|
||||
|
||||
// 操作通讯录部门
|
||||
String deptId = null;
|
||||
String deptParentId = null;
|
||||
if (root.getElementsByTagName("Id").getLength() != 0) {
|
||||
deptId = root.getElementsByTagName("Id").item(0).getTextContent();
|
||||
}
|
||||
if (root.getElementsByTagName("ParentId").getLength() != 0) {
|
||||
deptParentId = root.getElementsByTagName("ParentId").item(0).getTextContent();
|
||||
}
|
||||
|
||||
// 获取修改类型
|
||||
NodeList nodeListChangeType = root.getElementsByTagName("ChangeType");
|
||||
String changeType = nodeListChangeType.item(0).getTextContent();
|
||||
switch (changeType) {
|
||||
case QywxConstant.USER_CREATE_TYPE:
|
||||
// 查询用户数据是否已存在
|
||||
EduStaff eduStaff = remoteStaffService.getStaffByWxOrMobileOrOpenId(userId, null, null, school.getDeptId()).getData();
|
||||
if (Objects.nonNull(eduStaff)) {
|
||||
break;
|
||||
}
|
||||
String authUrl = commonService.setAuthUrl(school.getCorpId(), authRedirectUrl + "?schoolId=" + school.getDeptId(), app.getWxAgentId());
|
||||
// 发送授权消息给创建人员
|
||||
BaseStaffNotice textSchoolNotice = new BaseStaffNotice();
|
||||
Text text = new Text();
|
||||
textSchoolNotice.setText(text);
|
||||
textSchoolNotice.setAgentid(app.getWxAgentId());
|
||||
text.setContent("<a href='" + authUrl + "'>智慧校园系统信息授权:请点击授权(请务必授权手机号!)</a>");
|
||||
textSchoolNotice.setTouser(userId);
|
||||
wxUtil.pushStaffNotice(wxUtil.getAccessToken(app.getWxCorpId(), app.getWxSecret()), textSchoolNotice);
|
||||
break;
|
||||
case QywxConstant.USER_UPDATE_TYPE:
|
||||
// 仅在成员修改部门时回调
|
||||
// qywxService.updateUserInfo(userId, school, app);
|
||||
break;
|
||||
case QywxConstant.USER_DELETE_TYPE:
|
||||
qywxService.deleteUser(userId, school.getDeptId());
|
||||
break;
|
||||
case QywxConstant.DEPT_CREATE_TYPE:
|
||||
// 获取单个部门详情
|
||||
JSONObject deptInfo = wxUtil.getDeptInfo(wxUtil.getAccessToken(app.getWxCorpId(), app.getWxSecret()), deptId);
|
||||
String deptName = deptInfo.get("name").toString();
|
||||
String order = deptInfo.get("order").toString();
|
||||
qywxService.createDept(deptId, deptName, deptParentId, order, school);
|
||||
break;
|
||||
case QywxConstant.DEPT_UPDATE_TYPE:
|
||||
// 仅在变更父部门时回调,且部门属性仅回调Id/ParentId两个字段
|
||||
// 获取单个部门详情
|
||||
// JSONObject updateDeptInfo = wxUtil.getDeptInfo(wxUtil.getAccessToken(app.getWxCorpId(), app.getWxSecret()), deptId);
|
||||
// qywxService.updateDept(deptId, updateDeptInfo.get("name").toString(), deptParentId, school.getDeptId());
|
||||
break;
|
||||
case QywxConstant.DEPT_DELETE_TYPE:
|
||||
qywxService.deleteDept(deptId, school.getDeptId());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleConcat(Element root, EduQywxServiceProviderSchool providerSchool) {
|
||||
// 查询对应的学校信息
|
||||
Dept school = deptService.getOne(Wrappers.lambdaQuery(new Dept())
|
||||
.eq(Dept::getCorpId, providerSchool.getDeptOriginalCorpId()));
|
||||
// 此处获取对应学校通讯录(人力资源)应用
|
||||
EduApp app = commonService.getAppByCodeAndSchool(AppConstant.CONTACT_SELECT, null, school.getDeptId());
|
||||
|
||||
// 操作通讯录人员
|
||||
String userId = null;
|
||||
if (root.getElementsByTagName("UserID").getLength() != 0) {
|
||||
userId = root.getElementsByTagName("UserID").item(0).getTextContent();
|
||||
}
|
||||
|
||||
// 操作通讯录部门
|
||||
String deptId = null;
|
||||
String deptParentId = null;
|
||||
if (root.getElementsByTagName("Id").getLength() != 0) {
|
||||
deptId = root.getElementsByTagName("Id").item(0).getTextContent();
|
||||
}
|
||||
if (root.getElementsByTagName("ParentId").getLength() != 0) {
|
||||
deptParentId = root.getElementsByTagName("ParentId").item(0).getTextContent();
|
||||
}
|
||||
// 获取修改类型
|
||||
NodeList nodeListChangeType = root.getElementsByTagName("ChangeType");
|
||||
String changeType = nodeListChangeType.item(0).getTextContent();
|
||||
switch (changeType) {
|
||||
case QywxConstant.USER_UPDATE_TYPE:
|
||||
// 仅在成员修改部门时回调
|
||||
qywxService.updateUserInfo(userId, school, app);
|
||||
break;
|
||||
case QywxConstant.DEPT_UPDATE_TYPE:
|
||||
// 仅在变更父部门时回调,且部门属性仅回调Id/ParentId两个字段
|
||||
// 获取单个部门详情
|
||||
JSONObject updateDeptInfo = wxUtil.getDeptInfo(wxUtil.getAccessToken(app.getWxCorpId(), app.getWxSecret()), deptId);
|
||||
qywxService.updateDept(deptId, updateDeptInfo.get("name").toString(), deptParentId, school.getDeptId());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleSchoolConcat(Element root, EduQywxServiceProviderSchool providerSchool, Dept school) {
|
||||
// 获取修改类型
|
||||
NodeList nodeListChangeType = root.getElementsByTagName("ChangeType");
|
||||
String changeType = nodeListChangeType.item(0).getTextContent();
|
||||
// 此处获取对应学校家校通讯录应用
|
||||
EduApp app = commonService.getAppByCodeAndSchool(AppConstant.CONTACT_SCHOOL, null, school.getDeptId());
|
||||
String id = root.getElementsByTagName("Id").item(0).getTextContent();
|
||||
// 学校对应corpId
|
||||
String corpId = providerSchool.getDeptOriginalCorpId();
|
||||
|
||||
switch (changeType) {
|
||||
case QywxConstant.SCHOOL_DEPT_CREATE_TYPE:
|
||||
qywxService.createSchoolDept(corpId, wxUtil.getAccessToken(app.getWxCorpId(),
|
||||
app.getWxSecret()), Long.valueOf(id), school);
|
||||
break;
|
||||
case QywxConstant.SCHOOL_DEPT_UPDATE_TYPE:
|
||||
qywxService.updateSchoolDept(wxUtil.getAccessToken(app.getWxCorpId(),
|
||||
app.getWxSecret()), Long.valueOf(id), school);
|
||||
break;
|
||||
case QywxConstant.SCHOOL_DEPT_DELETE_TYPE:
|
||||
qywxService.deleteSchoolDept(Long.valueOf(id), school);
|
||||
break;
|
||||
case QywxConstant.STUDENT_CREATE_TYPE:
|
||||
case QywxConstant.STUDENT_UPDATE_TYPE:
|
||||
// 判断是否为修改学生唯一键. 修改id会返回NewId字段作为唯一键
|
||||
if (root.getElementsByTagName("NewId").getLength() != 0) {
|
||||
id = root.getElementsByTagName("NewId").item(0).getTextContent();
|
||||
}
|
||||
qywxService.changeStudent(wxUtil.getAccessToken(app.getWxCorpId(),
|
||||
app.getWxSecret()), id, school);
|
||||
break;
|
||||
case QywxConstant.STUDENT_DELETE_TYPE:
|
||||
qywxService.deleteStudent(id, school.getDeptId());
|
||||
break;
|
||||
case QywxConstant.PARENT_CREATE_TYPE:
|
||||
// 新增家长可能是创建学生时创建,等待2s确保学生创建完成
|
||||
ThreadUtil.sleep(2000);
|
||||
case QywxConstant.PARENT_UPDATE_TYPE:
|
||||
qywxService.updateParent(wxUtil.getAccessToken(app.getWxCorpId(),
|
||||
app.getWxSecret()), id, school.getDeptId());
|
||||
break;
|
||||
case QywxConstant.PARENT_DELETE_TYPE:
|
||||
qywxService.deleteParent(id, school.getDeptId());
|
||||
break;
|
||||
case QywxConstant.PARENT_SUBSCRIBE_TYPE:
|
||||
log.info("进入家长关注事件回调");
|
||||
// 调用家长关注发送通知方法
|
||||
qywxService.sendParentSubscribeMessage(id, school.getDeptId());
|
||||
break;
|
||||
case QywxConstant.PARENT_UNSUBSCRIBE_TYPE:
|
||||
log.info("进入家长取消关注事件回调");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeCorpId(String providerCorpId, String corpId) {
|
||||
// 查询是否有关联数据
|
||||
EduQywxServiceProviderSchool providerSchool = eduQywxServiceProviderSchoolService.getOne(Wrappers.lambdaQuery(new EduQywxServiceProviderSchool())
|
||||
.eq(EduQywxServiceProviderSchool::getProviderCorpId, providerCorpId)
|
||||
.eq(EduQywxServiceProviderSchool::getDeptOriginalCorpId, corpId));
|
||||
if (Objects.isNull(providerSchool)) {
|
||||
providerSchool = new EduQywxServiceProviderSchool();
|
||||
providerSchool.setProviderCorpId(providerCorpId);
|
||||
providerSchool.setDeptOriginalCorpId(corpId);
|
||||
|
||||
EduQywxServiceProvider provider = eduQywxServiceProviderService.getOne(Wrappers.lambdaQuery(new EduQywxServiceProvider())
|
||||
.eq(EduQywxServiceProvider::getCorpId, providerCorpId));
|
||||
|
||||
// 转换corpId
|
||||
String providerToken = wxServiceProviderUtil.getProviderToken(provider.getCorpId(), provider.getServiceProviderSecret());
|
||||
String convertCorpId = wxServiceProviderUtil.convertCorpId(providerToken, corpId);
|
||||
providerSchool.setDeptEncryptionCorpId(convertCorpId);
|
||||
eduQywxServiceProviderSchoolService.save(providerSchool);
|
||||
|
||||
redisService.hset(QywxServiceProviderConstant.PROVIDER_SCHOOL_CORP_DATA,
|
||||
provider.getCorpId() + "." + providerSchool.getDeptEncryptionCorpId(), providerSchool);
|
||||
redisService.hset(QywxServiceProviderConstant.PROVIDER_SCHOOL_CORP_ORIGINAL_DATA,
|
||||
provider.getCorpId() + "." + providerSchool.getDeptOriginalCorpId(), providerSchool);
|
||||
}
|
||||
}
|
||||
}
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
package com.yida.data.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yida.data.common.core.entity.system.UPayConfig;
|
||||
import com.yida.data.system.mapper.UPayConfigMapper;
|
||||
import com.yida.data.system.service.UPayConfigService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 收钱吧学校信息配置Service实现
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-03-20 17:53:13
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class UPayConfigServiceImpl extends ServiceImpl
|
||||
<UPayConfigMapper, UPayConfig> implements UPayConfigService {
|
||||
|
||||
}
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
package com.yida.data.system.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yida.data.common.core.entity.system.WhiteList;
|
||||
import com.yida.data.system.mapper.WhiteListMapper;
|
||||
import com.yida.data.system.service.WhiteListService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 白名单Service实现
|
||||
*
|
||||
* @author ZYJ
|
||||
* @date 2023-02-20 14:15:49
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
|
||||
public class WhiteListServiceImpl extends ServiceImpl
|
||||
<WhiteListMapper, WhiteList> implements WhiteListService {
|
||||
|
||||
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yida.data.system.mapper.EduBaseAppMapper">
|
||||
|
||||
</mapper>
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yida.data.system.mapper.EduConsumeConfigMapper">
|
||||
|
||||
</mapper>
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yida.data.system.mapper.EduDeptFunctionMapper">
|
||||
|
||||
</mapper>
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yida.data.system.mapper.UPayConfigMapper">
|
||||
|
||||
</mapper>
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yida.data.system.mapper.WhiteListMapper">
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user