|
|
@@ -4,7 +4,9 @@ import com.java110.acct.bmo.accountWithdrawalApply.ISaveAccountWithdrawalApplyBM
|
|
|
import com.java110.core.annotation.Java110Transactional;
|
|
|
import com.java110.core.factory.GenerateCodeFactory;
|
|
|
|
|
|
+import com.java110.dto.user.UserDto;
|
|
|
import com.java110.intf.acct.IAccountWithdrawalApplyInnerServiceSMO;
|
|
|
+import com.java110.intf.user.IUserInnerServiceSMO;
|
|
|
import com.java110.po.accountWithdrawalApply.AccountWithdrawalApplyPo;
|
|
|
import com.java110.vo.ResultVo;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -17,7 +19,8 @@ public class SaveAccountWithdrawalApplyBMOImpl implements ISaveAccountWithdrawal
|
|
|
|
|
|
@Autowired
|
|
|
private IAccountWithdrawalApplyInnerServiceSMO accountWithdrawalApplyInnerServiceSMOImpl;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private IUserInnerServiceSMO userInnerServiceSMOImpl;
|
|
|
/**
|
|
|
* 添加小区信息
|
|
|
*
|
|
|
@@ -25,16 +28,29 @@ public class SaveAccountWithdrawalApplyBMOImpl implements ISaveAccountWithdrawal
|
|
|
* @return 订单服务能够接受的报文
|
|
|
*/
|
|
|
@Java110Transactional
|
|
|
- public ResponseEntity<String> save(AccountWithdrawalApplyPo accountWithdrawalApplyPo) {
|
|
|
+ public ResponseEntity<String> save(AccountWithdrawalApplyPo accountWithdrawalApplyPo,String userId) {
|
|
|
+
|
|
|
|
|
|
- accountWithdrawalApplyPo.setApplyId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_applyId));
|
|
|
- int flag = accountWithdrawalApplyInnerServiceSMOImpl.saveAccountWithdrawalApply(accountWithdrawalApplyPo);
|
|
|
+ UserDto userDto = new UserDto();
|
|
|
+ userDto.setUserId( userId );
|
|
|
+ //根据登录用户查询用户详细信息
|
|
|
+ List<UserDto> userDtoList = userInnerServiceSMOImpl.getUsers( userDto );
|
|
|
+ if(null != userDtoList && userDtoList.size() > 0){
|
|
|
|
|
|
- if (flag > 0) {
|
|
|
- return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功");
|
|
|
+ accountWithdrawalApplyPo.setApplyUserName( userDtoList.get( 0 ).getUserName() );
|
|
|
+ accountWithdrawalApplyPo.setApplyUserTel( userDtoList.get( 0 ).getTel() );
|
|
|
+ accountWithdrawalApplyPo.setApplyUserId( userDtoList.get( 0 ).getUserId() );
|
|
|
+
|
|
|
+ accountWithdrawalApplyPo.setApplyId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_applyId));
|
|
|
+ int flag = accountWithdrawalApplyInnerServiceSMOImpl.saveAccountWithdrawalApply(accountWithdrawalApplyPo);
|
|
|
+
|
|
|
+ if (flag > 0) {
|
|
|
+ return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败");
|
|
|
+
|
|
|
+ return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败,检查用户信息是否完整");
|
|
|
}
|
|
|
|
|
|
}
|