Browse Source

Merge remote-tracking branch 'origin/dev0.2' into dev0.2

dev
hosinokamui 5 years ago
parent
commit
3e89fb4b56
  1. 6
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/resiregister/controller/ResiRegisterController.java
  2. 4
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/resiregister/service/ResiRegisterService.java
  3. 23
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/resiregister/service/impl/ResiRegisterServiceImpl.java
  4. 60
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiInfoSubmitFormDTO.java

6
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/resiregister/controller/ResiRegisterController.java

@ -3,7 +3,7 @@ package com.epmet.modules.resiregister.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.dto.UserResiInfoDTO;
import com.epmet.dto.form.ResiInfoSubmitFormDTO;
import com.epmet.dto.form.ResiRegisterFormDTO;
import com.epmet.dto.form.VerificationCodeFormDTO;
import com.epmet.dto.result.ResiRegisterResultDTO;
@ -43,8 +43,8 @@ public class ResiRegisterController {
* @Description 居民端-居民注册信息提交
**/
@PostMapping("submit")
public Result submit(@LoginUser TokenDto tokenDTO, @RequestBody UserResiInfoDTO userResiInfoDTO) {
return resiRegisterService.submit(tokenDTO, userResiInfoDTO);
public Result submit(@LoginUser TokenDto tokenDTO, @RequestBody ResiInfoSubmitFormDTO resiInfoSubmitFormDTO) {
return resiRegisterService.submit(tokenDTO, resiInfoSubmitFormDTO);
}
/**

4
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/resiregister/service/ResiRegisterService.java

@ -2,7 +2,7 @@ package com.epmet.modules.resiregister.service;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.UserResiInfoDTO;
import com.epmet.dto.form.ResiInfoSubmitFormDTO;
import com.epmet.dto.form.ResiRegisterFormDTO;
import com.epmet.dto.form.VerificationCodeFormDTO;
import com.epmet.dto.result.ResiRegisterResultDTO;
@ -31,7 +31,7 @@ public interface ResiRegisterService {
* @return void
* @author sun
*/
Result submit(TokenDto tokenDTO, UserResiInfoDTO userResiInfoDTO);
Result submit(TokenDto tokenDTO, ResiInfoSubmitFormDTO resiInfoSubmitFormDTO);
/**
* 居民端-居民注册根据手机号获取验证码

23
epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/resiregister/service/impl/ResiRegisterServiceImpl.java

@ -3,6 +3,7 @@ package com.epmet.modules.resiregister.service.impl;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.UserResiInfoDTO;
import com.epmet.dto.form.ResiInfoSubmitFormDTO;
import com.epmet.dto.form.ResiRegisterFormDTO;
import com.epmet.dto.form.VerificationCodeFormDTO;
import com.epmet.dto.result.ResiRegisterResultDTO;
@ -49,18 +50,22 @@ public class ResiRegisterServiceImpl implements ResiRegisterService {
* @Description 居民端-居民注册信息提交
**/
@Override
public Result submit(TokenDto tokenDTO, UserResiInfoDTO formDTO) {
public Result submit(TokenDto tokenDTO, ResiInfoSubmitFormDTO resiInfoSubmitFormDTO) {
if (null == tokenDTO || StringUtils.isBlank(tokenDTO.getUserId())) {
return new Result<ResiRegisterResultDTO>().error(ModuleConstant.USER_NOT_NULL);
return new Result().error(ModuleConstant.USER_NOT_NULL);
}
if (null == formDTO || StringUtils.isBlank(formDTO.getCustomerId())
|| StringUtils.isBlank(formDTO.getGridId())
|| StringUtils.isBlank(formDTO.getResiVisitId())) {
return new Result<ResiRegisterResultDTO>().error(ModuleConstant.PARAMETER_EXCEPTION);
if (null == resiInfoSubmitFormDTO || StringUtils.isBlank(resiInfoSubmitFormDTO.getCustomerId())
|| StringUtils.isBlank(resiInfoSubmitFormDTO.getGridId())
|| StringUtils.isBlank(resiInfoSubmitFormDTO.getResiVisitId())) {
return new Result().error(ModuleConstant.PARAMETER_EXCEPTION);
}
formDTO.setUserId(tokenDTO.getUserId());
formDTO.setApp(tokenDTO.getApp());
return epmetUserFeignClient.submit(formDTO);
UserResiInfoDTO userResiInfoDTO = resiInfoSubmitFormDTO.getResiInfo();
userResiInfoDTO.setUserId(tokenDTO.getUserId());
userResiInfoDTO.setApp(tokenDTO.getApp());
userResiInfoDTO.setCustomerId(resiInfoSubmitFormDTO.getCustomerId());
userResiInfoDTO.setGridId(resiInfoSubmitFormDTO.getGridId());
userResiInfoDTO.setResiVisitId(resiInfoSubmitFormDTO.getResiVisitId());
return epmetUserFeignClient.submit(userResiInfoDTO);
}
/**

60
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/ResiInfoSubmitFormDTO.java

@ -0,0 +1,60 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.form;
import com.epmet.dto.UserResiInfoDTO;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 用户居民端注册接口
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-30
*/
@Data
public class ResiInfoSubmitFormDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 客户Id (customer.id)
*/
private String customerId;
/**
* 网格Id (customer_grid.id)
*/
private String gridId;
/**
* 居民注册行为记录表Id resi_visit.id
*/
private String resiVisitId;
/**
* 用户在居民端完善的个人信息
*/
private UserResiInfoDTO resiInfo;
}
Loading…
Cancel
Save