forked from rongchao/epmet-cloud-rizhao
26 changed files with 748 additions and 64 deletions
@ -0,0 +1,39 @@ |
|||
package com.epmet.resi.mine.dto.from; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* |
|||
* 党员认证页面初始化参数 |
|||
* |
|||
* @author zhaoqifeng |
|||
* @date 2020/3/30 11:17 |
|||
*/ |
|||
@Data |
|||
public class PartyMemberInitFromDTO implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
@NotBlank(message = "客户id不能为空") |
|||
private String customerId; |
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
@NotBlank(message = "网格id不能为空") |
|||
private String gridId; |
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private String userId; |
|||
/** |
|||
* 访问来源 |
|||
*/ |
|||
@NotBlank(message = "访问来源") |
|||
private String visitFrom; |
|||
|
|||
} |
@ -0,0 +1,34 @@ |
|||
package com.epmet.resi.mine.dto.from; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/3/30 16:45 |
|||
*/ |
|||
@Data |
|||
public class VerificationCodeFromDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
@NotBlank(message = "手机号不能为空") |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 行为记录表ID |
|||
*/ |
|||
@NotBlank(message = "行为记录表ID不能为空") |
|||
private String visitId; |
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.epmet.resi.mine.dto.result; |
|||
|
|||
import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 党员认证页面初始化返回结果 |
|||
* |
|||
* @author zhaoqifeng |
|||
* @date 2020/3/30 11:05 |
|||
*/ |
|||
@Data |
|||
public class PartyMemberInitResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 提交状态 0:未提交,1:已提交 |
|||
*/ |
|||
private String submitStatus; |
|||
|
|||
/** |
|||
* 党员认证行为记录表ID |
|||
*/ |
|||
private String visitId; |
|||
/** |
|||
* 党员认证信息 |
|||
*/ |
|||
private PartymemberInfoDTO partyMemberInfo; |
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.epmet.modules.feign; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.modules.feign.fallback.PartyMemberConfirmFeignClientFallBack; |
|||
import com.epmet.resi.mine.dto.from.PartyMemberInitFromDTO; |
|||
import com.epmet.resi.mine.dto.from.VerificationCodeFromDTO; |
|||
import com.epmet.resi.mine.dto.result.PartyMemberInitResultDTO; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/3/30 16:03 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.RESI_PARTYMEMBER_SERVER, fallback = PartyMemberConfirmFeignClientFallBack.class) |
|||
public interface PartyMemberConfirmFeignClient { |
|||
@PostMapping("/resi/partymember/confirm/init") |
|||
Result<PartyMemberInitResultDTO> init(@RequestBody PartyMemberInitFromDTO fromDto); |
|||
|
|||
@PostMapping("/resi/partymember/confirm/getverificationcode") |
|||
Result getVerificationCode(@RequestBody VerificationCodeFromDTO fromDto); |
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.epmet.modules.feign.fallback; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.ModuleUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.modules.feign.PartyMemberConfirmFeignClient; |
|||
import com.epmet.resi.mine.dto.from.PartyMemberInitFromDTO; |
|||
import com.epmet.resi.mine.dto.from.VerificationCodeFromDTO; |
|||
import com.epmet.resi.mine.dto.result.PartyMemberInitResultDTO; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/3/30 16:04 |
|||
*/ |
|||
@Component |
|||
public class PartyMemberConfirmFeignClientFallBack implements PartyMemberConfirmFeignClient { |
|||
@Override |
|||
public Result<PartyMemberInitResultDTO> init(PartyMemberInitFromDTO fromDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "init", fromDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result getVerificationCode(VerificationCodeFromDTO fromDto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.RESI_PARTYMEMBER_SERVER, "getVerificationCode", fromDto); |
|||
} |
|||
} |
@ -0,0 +1,52 @@ |
|||
package com.epmet.modules.partymember.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.modules.partymember.service.PartyMemberService; |
|||
import com.epmet.resi.mine.dto.from.PartyMemberInitFromDTO; |
|||
import com.epmet.resi.mine.dto.from.VerificationCodeFromDTO; |
|||
import com.epmet.resi.mine.dto.result.PartyMemberInitResultDTO; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
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.RestController; |
|||
|
|||
/** |
|||
* 党员认证 |
|||
* |
|||
* @author zhaoqifeng |
|||
* @date 2020/3/30 16:11 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("partymemberbaseinfo") |
|||
public class PartyMemberController { |
|||
|
|||
@Autowired |
|||
private PartyMemberService partyMemberService; |
|||
|
|||
/** |
|||
* 党员认证页面初始化 |
|||
* |
|||
* @param fromDto param |
|||
* @return Result<PartyMemberInitResultDto> |
|||
*/ |
|||
@PostMapping("init") |
|||
public Result<PartyMemberInitResultDTO> init(@LoginUser TokenDto tokenDto, @RequestBody PartyMemberInitFromDTO fromDto) { |
|||
fromDto.setUserId(tokenDto.getUserId()); |
|||
return partyMemberService.init(fromDto); |
|||
} |
|||
|
|||
/** |
|||
* 党员认证页获取手机验证码 |
|||
* |
|||
* @param fromDto 参数 |
|||
* @return Result<PartyMemberInitResultDto> |
|||
* @date 2020/3/30 13:50 |
|||
*/ |
|||
@PostMapping("getverificationcode") |
|||
public Result getVerificationCode(@LoginUser TokenDto tokenDto, @RequestBody VerificationCodeFromDTO fromDto) { |
|||
return partyMemberService.getVerificationCode(tokenDto, fromDto); |
|||
} |
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.epmet.modules.partymember.service; |
|||
|
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.resi.mine.dto.from.PartyMemberInitFromDTO; |
|||
import com.epmet.resi.mine.dto.from.VerificationCodeFromDTO; |
|||
import com.epmet.resi.mine.dto.result.PartyMemberInitResultDTO; |
|||
|
|||
/** |
|||
* 党员认证 |
|||
* |
|||
* @author zhaoqifeng |
|||
* @date 2020/3/30 11:00 |
|||
*/ |
|||
public interface PartyMemberService { |
|||
/** |
|||
* 党员认证页面初始化 |
|||
* |
|||
* @param fromDto param |
|||
* @return Result<PartyMemberInitResultDto> |
|||
*/ |
|||
Result<PartyMemberInitResultDTO> init(PartyMemberInitFromDTO fromDto); |
|||
|
|||
/** |
|||
* 获取手机验证码 |
|||
* |
|||
* @param tokenDto token |
|||
* @param fromDTO 参数 |
|||
* @return Result |
|||
*/ |
|||
Result getVerificationCode(TokenDto tokenDto, VerificationCodeFromDTO fromDTO); |
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.epmet.modules.partymember.service.impl; |
|||
|
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.modules.feign.PartyMemberConfirmFeignClient; |
|||
import com.epmet.modules.partymember.service.PartyMemberService; |
|||
import com.epmet.resi.mine.dto.from.PartyMemberInitFromDTO; |
|||
import com.epmet.resi.mine.dto.from.VerificationCodeFromDTO; |
|||
import com.epmet.resi.mine.dto.result.PartyMemberInitResultDTO; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* 党员认证页面初始化 |
|||
* |
|||
* @author zhaoqifeng |
|||
* @date 2020/3/30 11:01 |
|||
*/ |
|||
@Service |
|||
public class PartyMemberServiceImpl implements PartyMemberService { |
|||
|
|||
@Autowired |
|||
PartyMemberConfirmFeignClient partyMemberConfirmFeignClient; |
|||
|
|||
@Override |
|||
public Result<PartyMemberInitResultDTO> init(PartyMemberInitFromDTO fromDto) { |
|||
return partyMemberConfirmFeignClient.init(fromDto); |
|||
} |
|||
|
|||
@Override |
|||
public Result getVerificationCode(TokenDto tokenDto, VerificationCodeFromDTO fromDTO) { |
|||
fromDTO.setUserId(tokenDto.getUserId()); |
|||
return partyMemberConfirmFeignClient.getVerificationCode(fromDTO); |
|||
} |
|||
} |
@ -0,0 +1,43 @@ |
|||
package com.epmet.constant; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/3/30 15:24 |
|||
*/ |
|||
public interface PartyMemberConstant { |
|||
/** |
|||
* 初始化 |
|||
*/ |
|||
String OPERATE_INITIALIZE = "initialize"; |
|||
|
|||
/** |
|||
* 获取验证码 |
|||
*/ |
|||
String OPERATE_OPERATE_SMS_CODE = "sms_code"; |
|||
|
|||
/** |
|||
* 自动认证成功 |
|||
*/ |
|||
String OPERATE_AUTO_SUCCESS = "auto_success"; |
|||
|
|||
/** |
|||
* 自动认证失败 |
|||
*/ |
|||
String OPERATE_AUTO_FAILED = "auto_failed"; |
|||
|
|||
/** |
|||
* 信息补充 |
|||
*/ |
|||
String OPERATE_EXTRA = "auto_extra"; |
|||
|
|||
/** |
|||
* 未提交 |
|||
*/ |
|||
String NOT_SUBMITTED = "0"; |
|||
|
|||
/** |
|||
* 已提交 |
|||
*/ |
|||
String SUBMITTED = "1"; |
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.epmet.modules.feign; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.UserResiInfoDTO; |
|||
import com.epmet.dto.form.UserResiInfoFormDTO; |
|||
import com.epmet.modules.feign.fallback.UserResiInfoFeignClientFallBack; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/3/30 14:51 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallback = UserResiInfoFeignClientFallBack.class) |
|||
public interface UserResiInfoFeignClient { |
|||
|
|||
/** |
|||
* 查询用户注册信息 |
|||
* @param userResiInfoFormDTO 参数 |
|||
* @return Result<UserResiInfoDTO> |
|||
*/ |
|||
@PostMapping("/epmetuser/userresiinfo/getUserResiInfoDTO") |
|||
Result<UserResiInfoDTO> getUserResiInfoDTO(@RequestBody UserResiInfoFormDTO userResiInfoFormDTO); |
|||
|
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.epmet.modules.feign.fallback; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.ModuleUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.UserResiInfoDTO; |
|||
import com.epmet.dto.form.UserResiInfoFormDTO; |
|||
import com.epmet.modules.feign.UserResiInfoFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/3/30 14:53 |
|||
*/ |
|||
@Component |
|||
public class UserResiInfoFeignClientFallBack implements UserResiInfoFeignClient { |
|||
@Override |
|||
public Result<UserResiInfoDTO> getUserResiInfoDTO(UserResiInfoFormDTO userResiInfoFormDTO) { |
|||
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getUserResiInfoDTO", userResiInfoFormDTO); |
|||
} |
|||
} |
@ -0,0 +1,51 @@ |
|||
package com.epmet.modules.partymember.controller; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.modules.partymember.service.PartyMemberConfirmService; |
|||
import com.epmet.resi.mine.dto.from.PartyMemberInitFromDTO; |
|||
import com.epmet.resi.mine.dto.from.VerificationCodeFromDTO; |
|||
import com.epmet.resi.mine.dto.result.PartyMemberInitResultDTO; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
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.RestController; |
|||
|
|||
/** |
|||
* |
|||
* 党员认证 |
|||
* |
|||
* @author zhaoqifeng |
|||
* @date 2020/3/30 13:49 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("confirm") |
|||
public class PartyMemberConfirmController { |
|||
|
|||
@Autowired |
|||
private PartyMemberConfirmService partyMemberConfirmService; |
|||
|
|||
/** |
|||
* 党员认证页面初始化 |
|||
* |
|||
* @param fromDto 参数 |
|||
* @return Result<PartyMemberInitResultDto> |
|||
* @date 2020/3/30 13:50 |
|||
*/ |
|||
@PostMapping("init") |
|||
public Result<PartyMemberInitResultDTO> init(@RequestBody PartyMemberInitFromDTO fromDto) { |
|||
return partyMemberConfirmService.init(fromDto); |
|||
} |
|||
|
|||
/** |
|||
* 党员认证页获取手机验证码 |
|||
* |
|||
* @param fromDto 参数 |
|||
* @return Result<PartyMemberInitResultDto> |
|||
* @date 2020/3/30 13:50 |
|||
*/ |
|||
@PostMapping("getverificationcode") |
|||
public Result getVerificationCode(@RequestBody VerificationCodeFromDTO fromDto) { |
|||
return partyMemberConfirmService.getVerificationCode(fromDto); |
|||
} |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.epmet.modules.partymember.service; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.resi.mine.dto.from.PartyMemberInitFromDTO; |
|||
import com.epmet.resi.mine.dto.from.VerificationCodeFromDTO; |
|||
import com.epmet.resi.mine.dto.result.PartyMemberInitResultDTO; |
|||
|
|||
/** |
|||
* |
|||
* 党员认证 |
|||
* |
|||
* @author zhaoqifeng |
|||
* @date 2020/3/30 13:58 |
|||
*/ |
|||
public interface PartyMemberConfirmService { |
|||
|
|||
/** |
|||
* |
|||
* 党员认证页面初始化 |
|||
* |
|||
* @param fromDto 参数 |
|||
* @return Result<PartyMemberInitResultDto> |
|||
*/ |
|||
Result<PartyMemberInitResultDTO> init(PartyMemberInitFromDTO fromDto); |
|||
|
|||
/** |
|||
* 获取手机验证码 |
|||
* @param fromDTO 参数 |
|||
* @return Result |
|||
*/ |
|||
Result getVerificationCode( VerificationCodeFromDTO fromDTO); |
|||
|
|||
} |
@ -0,0 +1,112 @@ |
|||
package com.epmet.modules.partymember.service.impl; |
|||
|
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.constant.PartyMemberConstant; |
|||
import com.epmet.dto.UserResiInfoDTO; |
|||
import com.epmet.dto.form.UserResiInfoFormDTO; |
|||
import com.epmet.modules.feign.UserResiInfoFeignClient; |
|||
import com.epmet.modules.partymember.entity.PartymemberInfoEntity; |
|||
import com.epmet.modules.partymember.entity.PartymemberVisitEntity; |
|||
import com.epmet.modules.partymember.redis.PartymemberInfoRedis; |
|||
import com.epmet.modules.partymember.service.PartyMemberConfirmService; |
|||
import com.epmet.modules.partymember.service.PartymemberInfoService; |
|||
import com.epmet.modules.partymember.service.PartymemberVisitService; |
|||
import com.epmet.resi.mine.dto.from.PartyMemberInitFromDTO; |
|||
import com.epmet.resi.mine.dto.from.VerificationCodeFromDTO; |
|||
import com.epmet.resi.mine.dto.result.PartyMemberInitResultDTO; |
|||
import com.epmet.resi.partymember.dto.partymember.PartymemberInfoDTO; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 党员认证 |
|||
* |
|||
* @author zhaoqifeng |
|||
* @date 2020/3/30 14:01 |
|||
*/ |
|||
@Service |
|||
public class PartyMemberConfirmServiceImpl implements PartyMemberConfirmService { |
|||
|
|||
@Autowired |
|||
private UserResiInfoFeignClient userResiInfoFeignClient; |
|||
@Autowired |
|||
private PartymemberInfoService partymemberInfoService; |
|||
@Autowired |
|||
private PartymemberVisitService partymemberVisitService; |
|||
@Autowired |
|||
private PartymemberInfoRedis partyMemberInfoRedis; |
|||
|
|||
@Override |
|||
public Result<PartyMemberInitResultDTO> init(PartyMemberInitFromDTO fromDto) { |
|||
|
|||
PartyMemberInitResultDTO result = new PartyMemberInitResultDTO(); |
|||
// 获取党员认证信息,判断是否提交认证
|
|||
PartymemberInfoDTO partyMemberInfoParam = new PartymemberInfoDTO(); |
|||
partyMemberInfoParam.setCustomerId(fromDto.getCustomerId()); |
|||
partyMemberInfoParam.setGridId(fromDto.getGridId()); |
|||
partyMemberInfoParam.setUserId(fromDto.getUserId()); |
|||
PartymemberInfoDTO partyMemberInfoResult = partymemberInfoService.getPartyMemberInfo(partyMemberInfoParam); |
|||
// 若已提交,获取提交的党员信息
|
|||
if (null != partyMemberInfoResult) { |
|||
result.setSubmitStatus(PartyMemberConstant.SUBMITTED); |
|||
result.setPartyMemberInfo(partyMemberInfoResult); |
|||
return new Result<PartyMemberInitResultDTO>().ok(result); |
|||
} else { |
|||
// 若没有提交,获取注册居民信息,判断是否已注册居民
|
|||
result.setSubmitStatus(PartyMemberConstant.NOT_SUBMITTED); |
|||
|
|||
UserResiInfoFormDTO userResiInfoFormDTO = new UserResiInfoFormDTO(); |
|||
userResiInfoFormDTO.setCustomerId(fromDto.getCustomerId()); |
|||
userResiInfoFormDTO.setUserId(fromDto.getUserId()); |
|||
Result<UserResiInfoDTO> userResiInfoResult = userResiInfoFeignClient.getUserResiInfoDTO(userResiInfoFormDTO); |
|||
result.setPartyMemberInfo(ConvertUtils.sourceToTarget(userResiInfoResult.getData(), PartymemberInfoDTO.class)); |
|||
} |
|||
|
|||
// 将访问行为存入热心居民申请行为记录表
|
|||
PartymemberVisitEntity partymemberVisitEntity = new PartymemberVisitEntity(); |
|||
partymemberVisitEntity.setCustomerId(fromDto.getCustomerId()); |
|||
partymemberVisitEntity.setGridId(fromDto.getGridId()); |
|||
partymemberVisitEntity.setUserId(fromDto.getUserId()); |
|||
partymemberVisitEntity.setOperateVisit(PartyMemberConstant.OPERATE_INITIALIZE); |
|||
partymemberVisitEntity.setVisitFrom(fromDto.getVisitFrom()); |
|||
partymemberVisitEntity.setVisitTime(new Date()); |
|||
partymemberVisitService.insert(partymemberVisitEntity); |
|||
|
|||
result.setVisitId(partymemberVisitEntity.getId()); |
|||
|
|||
return new Result<PartyMemberInitResultDTO>().ok(result); |
|||
} |
|||
|
|||
@Override |
|||
public Result getVerificationCode(VerificationCodeFromDTO fromDTO) { |
|||
Result result = new Result(); |
|||
//手机是否可用
|
|||
PartymemberInfoEntity partyMemberInfoParam= new PartymemberInfoEntity(); |
|||
partyMemberInfoParam.setMobile(fromDTO.getMobile()); |
|||
PartymemberInfoDTO partyMemberInfoResult = partymemberInfoService.getPartyMemberInfoByMobile(partyMemberInfoParam); |
|||
if (null != partyMemberInfoResult) { |
|||
//TODO
|
|||
result.setCode(0); |
|||
result.setMsg(""); |
|||
return result; |
|||
} |
|||
|
|||
//TODO 生成短信验证码
|
|||
String code = "0000"; |
|||
|
|||
//将验证码存入Redis
|
|||
partyMemberInfoRedis.setUserMobileCode(fromDTO.getUserId(), fromDTO.getMobile(), code); |
|||
|
|||
//将访问记录更新到热心居民申请行为记录表
|
|||
PartymemberVisitEntity partymemberVisitEntity = new PartymemberVisitEntity(); |
|||
partymemberVisitEntity.setId(fromDTO.getVisitId()); |
|||
partymemberVisitEntity.setVisitTime(new Date()); |
|||
partymemberVisitEntity.setOperateVisit(PartyMemberConstant.OPERATE_OPERATE_SMS_CODE); |
|||
partymemberVisitService.updateById(partymemberVisitEntity); |
|||
|
|||
return result; |
|||
} |
|||
} |
Loading…
Reference in new issue