提交 17d2c57f 作者: 刘明祎-运维用途

添加短信服务

上级 1e733f44
流水线 #7622 已通过 于阶段
in 2 分 20 秒
...@@ -227,4 +227,11 @@ public interface UserServiceDao { ...@@ -227,4 +227,11 @@ public interface UserServiceDao {
* @return {@link UserBaseInfoDTO} * @return {@link UserBaseInfoDTO}
*/ */
UserBaseInfoDTO getUserBaseInfo(Integer userAccountId); UserBaseInfoDTO getUserBaseInfo(Integer userAccountId);
/**
* 通过用户id获取用户的电话号码
* @param userId 用户的id
* @return {@link String}
*/
String getUserPhoneByUserId(Integer userId);
} }
...@@ -150,4 +150,11 @@ public interface PilotCertificationDao { ...@@ -150,4 +150,11 @@ public interface PilotCertificationDao {
*/ */
Integer selectUserIdByBackUserId(Integer backUserId); Integer selectUserIdByBackUserId(Integer backUserId);
/**
* 获取审核通过飞手的电话号码
* @param pilotId 飞手表id
* @return {@link String}
*/
String getPilotApplyPhone(Integer pilotId);
} }
...@@ -28,6 +28,7 @@ import com.mmc.iuav.user.model.vo.dronepilot.PilotAbilityVO; ...@@ -28,6 +28,7 @@ import com.mmc.iuav.user.model.vo.dronepilot.PilotAbilityVO;
import com.mmc.iuav.user.model.vo.dronepilot.PilotCertificationVO; import com.mmc.iuav.user.model.vo.dronepilot.PilotCertificationVO;
import com.mmc.iuav.user.model.vo.userpoints.UserPointsVO; import com.mmc.iuav.user.model.vo.userpoints.UserPointsVO;
import com.mmc.iuav.user.service.dronepilot.PilotCertificationService; import com.mmc.iuav.user.service.dronepilot.PilotCertificationService;
import com.mmc.iuav.user.util.SmsUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.core.StringRedisTemplate;
...@@ -292,6 +293,12 @@ public class PilotCertificationServiceImpl implements PilotCertificationService ...@@ -292,6 +293,12 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
param.setOperatorUserId(userLoginInfoFromRedis.getUserAccountId()); param.setOperatorUserId(userLoginInfoFromRedis.getUserAccountId());
certificationDao.updateAuditStatus(param); certificationDao.updateAuditStatus(param);
//审核通过
if (param.getAuditStatus() == 1) {
String pilotApplyPhone = certificationDao.getPilotApplyPhone(param.getId());
SmsUtil.sendPassPilotApply(pilotApplyPhone);
}
PilotCertificationLogDO pilotCertificationLog = new PilotCertificationLogDO(userAccountDO.getId(), userLoginInfoFromRedis.getUserAccountId(), CertificationMessage.match(param.getAuditStatus())); PilotCertificationLogDO pilotCertificationLog = new PilotCertificationLogDO(userAccountDO.getId(), userLoginInfoFromRedis.getUserAccountId(), CertificationMessage.match(param.getAuditStatus()));
certificationDao.insertPilotLog(pilotCertificationLog); certificationDao.insertPilotLog(pilotCertificationLog);
SendCertificationMessage match = SendCertificationMessage.match(param.getAuditStatus()); SendCertificationMessage match = SendCertificationMessage.match(param.getAuditStatus());
......
...@@ -6,6 +6,7 @@ import com.mmc.iuav.page.PageResult; ...@@ -6,6 +6,7 @@ import com.mmc.iuav.page.PageResult;
import com.mmc.iuav.response.ResultBody; import com.mmc.iuav.response.ResultBody;
import com.mmc.iuav.response.ResultEnum; import com.mmc.iuav.response.ResultEnum;
import com.mmc.iuav.user.dao.RealNameAuthDao; import com.mmc.iuav.user.dao.RealNameAuthDao;
import com.mmc.iuav.user.dao.UserServiceDao;
import com.mmc.iuav.user.dao.wallet.PayWalletDao; import com.mmc.iuav.user.dao.wallet.PayWalletDao;
import com.mmc.iuav.user.dao.xzsz.WithdrawalDao; import com.mmc.iuav.user.dao.xzsz.WithdrawalDao;
import com.mmc.iuav.user.dao.xzsz.XzDao; import com.mmc.iuav.user.dao.xzsz.XzDao;
...@@ -27,6 +28,7 @@ import com.mmc.iuav.user.model.vo.XzWithdrawalVO; ...@@ -27,6 +28,7 @@ import com.mmc.iuav.user.model.vo.XzWithdrawalVO;
import com.mmc.iuav.user.model.vo.wallet.ApplyWithdrawalVO; import com.mmc.iuav.user.model.vo.wallet.ApplyWithdrawalVO;
import com.mmc.iuav.user.service.xzsz.WithdrawalService; import com.mmc.iuav.user.service.xzsz.WithdrawalService;
import com.mmc.iuav.user.service.xzsz.XzService; import com.mmc.iuav.user.service.xzsz.XzService;
import com.mmc.iuav.user.util.SmsUtil;
import com.mmc.iuav.user.util.TDateUtil; import com.mmc.iuav.user.util.TDateUtil;
import com.mmc.iuav.user.xzsz.SingleSubmitResp; import com.mmc.iuav.user.xzsz.SingleSubmitResp;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -64,6 +66,9 @@ public class WithdrawalServiceImpl implements WithdrawalService { ...@@ -64,6 +66,9 @@ public class WithdrawalServiceImpl implements WithdrawalService {
@Autowired @Autowired
private XzService xzService; private XzService xzService;
@Autowired
private UserServiceDao userServiceDao;
@Override @Override
@Transactional @Transactional
public ResultBody apply(ApplyWithdrawalVO applyWithdrawalVO, Integer userAccountId) { public ResultBody apply(ApplyWithdrawalVO applyWithdrawalVO, Integer userAccountId) {
...@@ -234,6 +239,8 @@ public class WithdrawalServiceImpl implements WithdrawalService { ...@@ -234,6 +239,8 @@ public class WithdrawalServiceImpl implements WithdrawalService {
return ResultBody.error("操作失败,请稍后重试!"); return ResultBody.error("操作失败,请稍后重试!");
} }
} }
String userPhone = userServiceDao.getUserPhoneByUserId(applyInfo.getUserAccountId());
SmsUtil.sendPassWithdrawalApply(userPhone);
return ResultBody.success(); return ResultBody.success();
} }
......
...@@ -11,7 +11,7 @@ import com.google.gson.Gson; ...@@ -11,7 +11,7 @@ import com.google.gson.Gson;
*/ */
public class SmsUtil { public class SmsUtil {
public static String ALIYUN_OSS_ACCESS_KEY_ID = "LTAI5tAAbkYDUQ4j5m8m2nkf"; public static String ALIYUN_OSS_ACCESS_KEY_ID = "LTAI5tS3GNPRZAkG9LCQBZmc";
public static String ALIYUN_OSS_ACCESS_KEY_SECRET = "ZkPrv1u2mN2DmOIc7GfPKRuy4Risqe"; public static String ALIYUN_OSS_ACCESS_KEY_SECRET = "ZkPrv1u2mN2DmOIc7GfPKRuy4Risqe";
public static String CLOUD_JOIN_WEBSITE = "云享飞Pro"; public static String CLOUD_JOIN_WEBSITE = "云享飞Pro";
...@@ -26,6 +26,9 @@ public class SmsUtil { ...@@ -26,6 +26,9 @@ public class SmsUtil {
private static String COOPERATION_TEMPLATE_PASS_CODE_3 = "SMS_462620535"; private static String COOPERATION_TEMPLATE_PASS_CODE_3 = "SMS_462620535";
private static String COOPERATION_TEMPLATE_PASS_CODE_4 = "SMS_462605558"; private static String COOPERATION_TEMPLATE_PASS_CODE_4 = "SMS_462605558";
private static String COOPERATION_TEMPLATE_PASS_CODE_5 = "SMS_464125992"; private static String COOPERATION_TEMPLATE_PASS_CODE_5 = "SMS_464125992";
private static String COOPERATION_TEMPLATE_PASS_CODE_6 = "SMS_464380042";
private static String COOPERATION_TEMPLATE_PASS_CODE_7 = "SMS_464335035";
//短信验证码模板 //短信验证码模板
private static String VERIFYCODE="SMS_211825548"; private static String VERIFYCODE="SMS_211825548";
...@@ -42,6 +45,16 @@ public class SmsUtil { ...@@ -42,6 +45,16 @@ public class SmsUtil {
return send(CLOUD_JOIN_WEBSITE, COOPERATION_TEMPLATE_CODE_1, null, phone); return send(CLOUD_JOIN_WEBSITE, COOPERATION_TEMPLATE_CODE_1, null, phone);
} }
// 飞手审核通过通知
public static String sendPassPilotApply(String phone) {
return send(CLOUD_JOIN_WEBSITE, COOPERATION_TEMPLATE_PASS_CODE_6, null, phone);
}
//飞手提现通知
public static String sendPassWithdrawalApply(String phone) {
return send(CLOUD_JOIN_WEBSITE, COOPERATION_TEMPLATE_PASS_CODE_7, null, phone);
}
public static String send(String TemplateCode, String param, String phone) { public static String send(String TemplateCode, String param, String phone) {
return send(CLOUD_JOIN_WEBSITE, TemplateCode, param, phone); return send(CLOUD_JOIN_WEBSITE, TemplateCode, param, phone);
} }
......
...@@ -663,5 +663,8 @@ ...@@ -663,5 +663,8 @@
select rna.user_account_id,ua.nick_name,rna.user_name,ua.phone_num from user_account ua left join real_name_auth rna on ua.id = rna.user_account_id select rna.user_account_id,ua.nick_name,rna.user_name,ua.phone_num from user_account ua left join real_name_auth rna on ua.id = rna.user_account_id
where ua.id = #{userAccountId} where ua.id = #{userAccountId}
</select> </select>
<select id="getUserPhoneByUserId" resultType="java.lang.String">
select phone_num from user_account where id = #{userId}
</select>
</mapper> </mapper>
...@@ -520,5 +520,9 @@ ...@@ -520,5 +520,9 @@
where cbu.back_user_account_id = #{backUserId} where cbu.back_user_account_id = #{backUserId}
limit 1 limit 1
</select> </select>
<select id="getPilotApplyPhone" resultType="java.lang.String">
select phone_num from pilot_certification pc left join user_account ua on pc.user_account_id = ua.id
where pc.id = #{pilotId}
</select>
</mapper> </mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论