| | |
| | | package com.java110.community.smo.impl; |
| | | |
| | | |
| | | import com.java110.common.util.BeanConvertUtil; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.community.dao.IAppServiceDao; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.core.smo.app.IAppInnerServiceSMO; |
| | | import com.java110.core.smo.user.IUserInnerServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.UserDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.dto.app.AppDto; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | |
| | | @Autowired |
| | | private IUserInnerServiceSMO userInnerServiceSMOImpl; |
| | | |
| | | |
| | | @Override |
| | | public List<AppDto> queryApps(@RequestBody AppDto appDto) { |
| | | |
| | |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | appDto.setPage((page - 1) * appDto.getRow()); |
| | | appDto.setRow(page * appDto.getRow()); |
| | | } |
| | | |
| | | List<AppDto> apps = BeanConvertUtil.covertBeanList(appServiceDaoImpl.getAppInfo(BeanConvertUtil.beanCovertMap(appDto)), AppDto.class); |
| | | |
| | | if (apps == null || apps.size() == 0) { |
| | | return apps; |
| | | } |
| | | |
| | | String[] userIds = getUserIds(apps); |
| | | //根据 userId 查询用户信息 |
| | | List<UserDto> users = userInnerServiceSMOImpl.getUserInfo(userIds); |
| | | |
| | | for (AppDto app : apps) { |
| | | refreshApp(app, users); |
| | | } |
| | | return apps; |
| | | } |
| | | |