diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/resiregister/service/impl/ResiRegisterServiceImpl.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/resiregister/service/impl/ResiRegisterServiceImpl.java index 7b48c66926..25f9def7c8 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/resiregister/service/impl/ResiRegisterServiceImpl.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/resiregister/service/impl/ResiRegisterServiceImpl.java @@ -1,8 +1,10 @@ package com.epmet.modules.resiregister.service.impl; import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.UserResiInfoDTO; +import com.epmet.dto.form.InfoSubmitFromDTO; import com.epmet.dto.form.ResiInfoSubmitFormDTO; import com.epmet.dto.form.ResiRegisterFormDTO; import com.epmet.dto.form.VerificationCodeFormDTO; @@ -46,7 +48,8 @@ public class ResiRegisterServiceImpl implements ResiRegisterService { **/ @Override public Result submit(TokenDto tokenDTO, ResiInfoSubmitFormDTO resiInfoSubmitFormDTO) { - UserResiInfoDTO userResiInfoDTO = resiInfoSubmitFormDTO.getResiInfo(); + InfoSubmitFromDTO infoSubmitFromDTO = resiInfoSubmitFormDTO.getResiInfo(); + UserResiInfoDTO userResiInfoDTO = ConvertUtils.sourceToTarget(infoSubmitFromDTO, UserResiInfoDTO.class); userResiInfoDTO.setUserId(tokenDTO.getUserId()); userResiInfoDTO.setApp(tokenDTO.getApp()); userResiInfoDTO.setCustomerId(resiInfoSubmitFormDTO.getCustomerId()); diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/InfoSubmitFromDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/InfoSubmitFromDTO.java new file mode 100644 index 0000000000..3f61da4667 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/InfoSubmitFromDTO.java @@ -0,0 +1,84 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *
+ * 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. + *
+ * 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. + *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see