| @@ -17,6 +17,7 @@ import com.iformall.service.invest.*; | |||||
| import org.apache.commons.collections.CollectionUtils; | import org.apache.commons.collections.CollectionUtils; | ||||
| import org.apache.commons.collections.MapUtils; | import org.apache.commons.collections.MapUtils; | ||||
| import org.apache.commons.compress.utils.Lists; | import org.apache.commons.compress.utils.Lists; | ||||
| import org.apache.commons.lang3.ObjectUtils; | |||||
| import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
| import org.springframework.beans.BeanUtils; | import org.springframework.beans.BeanUtils; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| @@ -80,13 +81,20 @@ public class InvestBizServiceImpl implements InvestBizService { | |||||
| } | } | ||||
| private InvestDemandDto doConvertDemand(InvestDemandQuery params) { | private InvestDemandDto doConvertDemand(InvestDemandQuery params) { | ||||
| InvestCustomerEntity customerEntity = new InvestCustomerEntity(); | |||||
| customerEntity.setId(params.getCustomerId()); | |||||
| customerEntity.setType(params.getCustomerType()); | |||||
| customerEntity.setBusinessId(params.getBusinessId()); | |||||
| InvestCustomerEntity customerEntity = null; | |||||
| if (ObjectUtils.anyNotNull(params.getCustomerId(), params.getCustomerType(), params.getBusinessId())) { | |||||
| customerEntity = new InvestCustomerEntity(); | |||||
| customerEntity.setId(params.getCustomerId()); | |||||
| customerEntity.setType(params.getCustomerType()); | |||||
| customerEntity.setBusinessId(params.getBusinessId()); | |||||
| } | |||||
| InvestDemandEntity demandEntity = null; | |||||
| if (ObjectUtils.anyNotNull(params.getOwner())) { | |||||
| demandEntity = new InvestDemandEntity(); | |||||
| demandEntity.setOwner(params.getOwner()); | |||||
| } | |||||
| InvestDemandEntity demandEntity = new InvestDemandEntity(); | |||||
| demandEntity.setOwner(params.getOwner()); | |||||
| InvestDemandDto demandDto = new InvestDemandDto(); | InvestDemandDto demandDto = new InvestDemandDto(); | ||||
| demandDto.setCustomer(customerEntity); | demandDto.setCustomer(customerEntity); | ||||
| @@ -141,14 +149,20 @@ public class InvestBizServiceImpl implements InvestBizService { | |||||
| private InvestTaskDto doConvertTask(InvestTaskQuery params) { | private InvestTaskDto doConvertTask(InvestTaskQuery params) { | ||||
| InvestTaskEntity task = new InvestTaskEntity(); | |||||
| task.setOwner(params.getTaskOwner()); | |||||
| task.setStatus(params.getTaskStatus()); | |||||
| WxShop shop = new WxShop(); | |||||
| shop.setShopNumber(params.getShopNumber()); | |||||
| shop.setStatus(params.getShopStatus()); | |||||
| shop.setBusinessId(params.getBusinessId()); | |||||
| InvestTaskEntity task = null; | |||||
| if (ObjectUtils.anyNotNull(params.getTaskOwner(), params.getTaskStatus())) { | |||||
| task = new InvestTaskEntity(); | |||||
| task.setOwner(params.getTaskOwner()); | |||||
| task.setStatus(params.getTaskStatus()); | |||||
| } | |||||
| WxShop shop = null; | |||||
| if (ObjectUtils.anyNotNull(params.getShopNumber(), params.getShopStatus(), params.getBusinessId())) { | |||||
| shop = new WxShop(); | |||||
| shop.setShopNumber(params.getShopNumber()); | |||||
| shop.setStatus(params.getShopStatus()); | |||||
| shop.setBusinessId(params.getBusinessId()); | |||||
| } | |||||
| InvestTaskDto taskDto = new InvestTaskDto(); | InvestTaskDto taskDto = new InvestTaskDto(); | ||||
| taskDto.setShop(shop); | taskDto.setShop(shop); | ||||