|
@@ -48,8 +48,6 @@ import java.util.concurrent.TimeUnit;
|
|
|
import java.util.function.Consumer;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
-import static com.ym.mec.biz.service.impl.TenantInfoSendMsgServiceImpl.*;
|
|
|
-
|
|
|
@Service
|
|
|
public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo> implements TenantInfoService {
|
|
|
private static final Logger log = LoggerFactory.getLogger(TenantInfoServiceImpl.class);
|
|
@@ -345,7 +343,7 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
|
tenantProductInfoService.updateById(productInfo);
|
|
|
//发送邮件及短信提醒
|
|
|
Object[] msg = {tenantInfo.getName(), tenantInfo.getPhone(), "123456", "https://online.dayaedu.com"};
|
|
|
- tenantInfoSendMsgService.platformSendToAll(PLATFORM_SEND, tenantInfo.getEmail(), tenantInfo.getPhone(), msg);
|
|
|
+ tenantInfoSendMsgService.platformSendToAll(tenantInfo.getEmail(), tenantInfo.getPhone(), msg);
|
|
|
//释放锁
|
|
|
bucket.delete();
|
|
|
}
|
|
@@ -443,7 +441,7 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
|
*/
|
|
|
public Map<String, Object> tenantOpenPay(Integer tenantId) throws Exception {
|
|
|
SysConfig config = sysConfigService.findByParamName("platform_collection_organ");
|
|
|
- if(Objects.isNull(config)){
|
|
|
+ if (Objects.isNull(config)) {
|
|
|
throw new BizException("未查询到机构收款分部信息!");
|
|
|
}
|
|
|
|
|
@@ -489,7 +487,7 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
|
*/
|
|
|
public Map<String, Object> tenantRenewPay(Integer tenantId, Integer val) throws Exception {
|
|
|
SysConfig config = sysConfigService.findByParamName("platform_collection_organ");
|
|
|
- if(Objects.isNull(config)){
|
|
|
+ if (Objects.isNull(config)) {
|
|
|
throw new BizException("未查询到机构收款分部信息!");
|
|
|
}
|
|
|
|
|
@@ -574,7 +572,7 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
|
TenantInfo tenantInfo = this.getById(tenantId);
|
|
|
//发送邮件及短信提醒
|
|
|
Object[] msg = {tenantInfo.getName()};
|
|
|
- tenantInfoSendMsgService.platformSendToAll(PLATFORM_SEND, tenantInfo.getEmail(), tenantInfo.getPhone(), msg);
|
|
|
+ tenantInfoSendMsgService.platformSendToAll(tenantInfo.getEmail(), tenantInfo.getPhone(), msg);
|
|
|
//释放锁
|
|
|
bucket.delete();
|
|
|
}
|
|
@@ -707,7 +705,7 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
|
@Override
|
|
|
public Map<String, Object> recharge(Integer tenantId, BigDecimal amount) throws Exception {
|
|
|
SysConfig config = sysConfigService.findByParamName("platform_collection_organ");
|
|
|
- if(Objects.isNull(config)){
|
|
|
+ if (Objects.isNull(config)) {
|
|
|
throw new BizException("未查询到机构收款分部信息!");
|
|
|
}
|
|
|
log.error("机构 " + tenantId.toString() + "充值");
|
|
@@ -777,14 +775,14 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
|
|
|
|
@Override
|
|
|
public void saveTenantContextHolder(HttpServletRequest request) {
|
|
|
-
|
|
|
- final String TENANT_ID = "tenantId";
|
|
|
+
|
|
|
+ final String TENANT_ID = "tenantId";
|
|
|
String tenantId = request.getParameter(TENANT_ID);
|
|
|
-
|
|
|
- if(StringUtils.isBlank(tenantId)){
|
|
|
- tenantId = request.getHeader(TENANT_ID);
|
|
|
+
|
|
|
+ if (StringUtils.isBlank(tenantId)) {
|
|
|
+ tenantId = request.getHeader(TENANT_ID);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (StringUtils.isBlank(tenantId)) {
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
if (sysUser != null && sysUser.getTenantId() != null) {
|
|
@@ -842,7 +840,7 @@ public class TenantInfoServiceImpl extends ServiceImpl<TenantInfoDao, TenantInfo
|
|
|
private void send(List<TenantInfo> infoList, String dateStr) {
|
|
|
infoList.forEach(t -> {
|
|
|
Object[] objects = {t.getName(), dateStr};
|
|
|
- tenantInfoSendMsgService.platformSendToAll(PLATFORM_SEND, t.getEmail(), t.getPhone(), objects);
|
|
|
+ tenantInfoSendMsgService.platformSendToAll(t.getEmail(), t.getPhone(), objects);
|
|
|
});
|
|
|
}
|
|
|
|