提交 a65911c5 作者: han

Merge branch 'develop' of ssh://git.mmcuav.cn:8222/iuav/cms into develop

流水线 #7626 已通过 于阶段
in 2 分 12 秒
......@@ -227,4 +227,11 @@ public interface UserServiceDao {
* @return {@link UserBaseInfoDTO}
*/
UserBaseInfoDTO getUserBaseInfo(Integer userAccountId);
/**
* 通过用户id获取用户的电话号码
* @param userId 用户的id
* @return {@link String}
*/
String getUserPhoneByUserId(Integer userId);
}
......@@ -150,4 +150,11 @@ public interface PilotCertificationDao {
*/
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;
import com.mmc.iuav.user.model.vo.dronepilot.PilotCertificationVO;
import com.mmc.iuav.user.model.vo.userpoints.UserPointsVO;
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.Value;
import org.springframework.data.redis.core.StringRedisTemplate;
......@@ -292,6 +293,12 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
param.setOperatorUserId(userLoginInfoFromRedis.getUserAccountId());
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()));
certificationDao.insertPilotLog(pilotCertificationLog);
SendCertificationMessage match = SendCertificationMessage.match(param.getAuditStatus());
......
......@@ -6,6 +6,7 @@ import com.mmc.iuav.page.PageResult;
import com.mmc.iuav.response.ResultBody;
import com.mmc.iuav.response.ResultEnum;
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.xzsz.WithdrawalDao;
import com.mmc.iuav.user.dao.xzsz.XzDao;
......@@ -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.service.xzsz.WithdrawalService;
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.xzsz.SingleSubmitResp;
import lombok.extern.slf4j.Slf4j;
......@@ -64,6 +66,9 @@ public class WithdrawalServiceImpl implements WithdrawalService {
@Autowired
private XzService xzService;
@Autowired
private UserServiceDao userServiceDao;
@Override
@Transactional
public ResultBody apply(ApplyWithdrawalVO applyWithdrawalVO, Integer userAccountId) {
......@@ -234,6 +239,8 @@ public class WithdrawalServiceImpl implements WithdrawalService {
return ResultBody.error("操作失败,请稍后重试!");
}
}
String userPhone = userServiceDao.getUserPhoneByUserId(applyInfo.getUserAccountId());
SmsUtil.sendPassWithdrawalApply(userPhone);
return ResultBody.success();
}
......
......@@ -11,7 +11,7 @@ import com.google.gson.Gson;
*/
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 CLOUD_JOIN_WEBSITE = "云享飞Pro";
......@@ -26,6 +26,9 @@ public class SmsUtil {
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_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";
......@@ -42,6 +45,16 @@ public class SmsUtil {
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) {
return send(CLOUD_JOIN_WEBSITE, TemplateCode, param, phone);
}
......
......@@ -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
where ua.id = #{userAccountId}
</select>
<select id="getUserPhoneByUserId" resultType="java.lang.String">
select phone_num from user_account where id = #{userId}
</select>
</mapper>
......@@ -520,5 +520,9 @@
where cbu.back_user_account_id = #{backUserId}
limit 1
</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>
......@@ -18,4 +18,4 @@ patches:
images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms
newTag: 628c7b72ad51a981f1d37235f798cc65ef0963f8
newTag: 17d2c57fba015fd50cb0abb7d976f8e8334d27e3
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论