|
|
@@ -2,20 +2,20 @@ package com.tuoheng.api.service.impl; |
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.tuoheng.api.entity.domain.Identity; |
|
|
|
import com.tuoheng.api.entity.domain.IdentityApply; |
|
|
|
import com.tuoheng.api.entity.domain.WestreamUser; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
|
|
|
import com.tuoheng.api.constants.DictConstants; |
|
|
|
import com.tuoheng.api.entity.domain.*; |
|
|
|
import com.tuoheng.api.entity.request.IdentityQuery; |
|
|
|
import com.tuoheng.api.mapper.IdentityApplyMapper; |
|
|
|
import com.tuoheng.api.mapper.IdentityMapper; |
|
|
|
import com.tuoheng.api.mapper.WestreamUserMapper; |
|
|
|
import com.tuoheng.api.mapper.*; |
|
|
|
import com.tuoheng.api.service.IIdentityService; |
|
|
|
import com.tuoheng.api.utils.SmsUtil; |
|
|
|
import com.tuoheng.common.common.BaseServiceImpl; |
|
|
|
import com.tuoheng.common.utils.JsonResult; |
|
|
|
import com.tuoheng.common.utils.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
/** |
|
|
@@ -36,6 +36,12 @@ public class IdentityServiceImpl extends BaseServiceImpl<IdentityMapper, Identit |
|
|
|
@Autowired |
|
|
|
private WestreamUserMapper westreamUserMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ThDictMapper thDictMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ThDictDataMapper thDictDataMapper; |
|
|
|
|
|
|
|
@Override |
|
|
|
public JsonResult getListInfo(IdentityQuery identityQuery) { |
|
|
|
if(null == identityQuery.getTenantId()){ |
|
|
@@ -73,7 +79,25 @@ public class IdentityServiceImpl extends BaseServiceImpl<IdentityMapper, Identit |
|
|
|
} |
|
|
|
identityApplyMapper.insert(identityApply); |
|
|
|
|
|
|
|
//TODO 发送短信 |
|
|
|
|
|
|
|
//发送短信 |
|
|
|
ThDict thDict = thDictMapper.selectOne(new LambdaQueryWrapper<ThDict>() |
|
|
|
.eq(ThDict::getTenantId, identityApply.getTenantId()) |
|
|
|
.eq(ThDict::getCode, DictConstants.MSG_RULE_CODE) |
|
|
|
.eq(ThDict::getMark, 1)); |
|
|
|
if(ObjectUtils.isNotNull(thDict)){ |
|
|
|
ThDictData thDictData = thDictDataMapper.selectOne(new LambdaQueryWrapper<ThDictData>() |
|
|
|
.eq(ThDictData::getDictId, thDict.getId()) |
|
|
|
.eq(ThDictData::getName, DictConstants.MSG_RULE_PHONE)); |
|
|
|
if(ObjectUtils.isNotNull(thDictData)){ |
|
|
|
if(StringUtils.isNotEmpty(thDictData.getValue())){ |
|
|
|
List<String> phoneList = Arrays.asList(thDictData.getValue().split(",")); |
|
|
|
for (String phone : phoneList) { |
|
|
|
SmsUtil.sendSyncSms(phone,DictConstants.SMS_276426880,DictConstants.SMS_SMART_LAKE,null); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return JsonResult.success(); |
|
|
|
} |
|
|
|
} |