|
@@ -1,11 +1,14 @@
|
|
|
package com.idea.customerManagement.service;
|
|
|
|
|
|
+import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.idea.buildManage.mapper.ParkFloorDiscMapper;
|
|
|
import com.idea.buildManage.mapper.ParkInfoMapper;
|
|
|
import com.idea.buildManage.model.ParkFloorDisc;
|
|
|
import com.idea.buildManage.model.ParkInfo;
|
|
|
import com.idea.buildManage.response.ParkRoomResponse;
|
|
|
+import com.idea.customerManagement.dto.IntentionalDepositDto;
|
|
|
import com.idea.customerManagement.mapper.CustomerManagementMapper;
|
|
|
import com.idea.customerManagement.mapper.IntentionalDepositMapper;
|
|
|
import com.idea.customerManagement.model.CustomerManagement;
|
|
@@ -13,6 +16,8 @@ import com.idea.customerManagement.model.IntentionalDeposit;
|
|
|
import com.idea.customerManagement.model.IntentionalDepositExample;
|
|
|
import com.idea.customerManagement.model.RoomSelectionInfoExample;
|
|
|
import com.rockstar.common.base.BaseService;
|
|
|
+import com.rockstar.frame.model.FrameUser;
|
|
|
+import com.rockstar.frame.service.FrameUserService;
|
|
|
import com.rockstar.shiro.util.ShiroUtils;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -32,6 +37,8 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
private ParkInfoMapper parkInfoMapper;
|
|
|
@Autowired
|
|
|
private ParkFloorDiscMapper parkFloorDiscMapper;
|
|
|
+ @Autowired
|
|
|
+ private FrameUserService frameUserService;
|
|
|
|
|
|
|
|
|
@Override
|
|
@@ -145,13 +152,20 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
|
|
|
* @param customerManagementId
|
|
|
* @return
|
|
|
*/
|
|
|
- public IntentionalDeposit getByCustomerManagementId(String customerManagementId){
|
|
|
+ public IntentionalDepositDto getByCustomerManagementId(String customerManagementId){
|
|
|
|
|
|
IntentionalDepositExample example = new IntentionalDepositExample();
|
|
|
example.createCriteria().andCustomerManagementIdEqualTo(customerManagementId);
|
|
|
List<IntentionalDeposit> intentionalDeposits = modelMapper.selectByExampleWithBLOBs(example);
|
|
|
if(CollectionUtils.isNotEmpty(intentionalDeposits)){
|
|
|
- return intentionalDeposits.get(0);
|
|
|
+ IntentionalDepositDto result = new IntentionalDepositDto();
|
|
|
+ IntentionalDeposit intentionalDeposit = intentionalDeposits.get(0);
|
|
|
+ BeanUtil.copyProperties(intentionalDeposit,result);
|
|
|
+ FrameUser frameUser = frameUserService.selectByPrimaryKey(intentionalDeposit.getCreatedId());
|
|
|
+ if(ObjectUtil.isNotNull(frameUser)){
|
|
|
+ result.setCreatedName(frameUser.getTruename());
|
|
|
+ }
|
|
|
+ return result;
|
|
|
}
|
|
|
return null;
|
|
|
|