Commit 386daea6 by guojuxing

dto和实体转换修复

parent d5898337
package com.gic.auth.dao.mapper;
import com.gic.auth.dto.MenuRoleDTO;
import com.gic.auth.entity.TabSysMenuRole;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import com.gic.auth.dto.MenuRoleDTO;
import com.gic.auth.entity.TabSysMenuRole;
public interface TabSysMenuRoleMapper {
/**
......@@ -83,5 +84,5 @@ public interface TabSysMenuRoleMapper {
* @param roleId

* @return java.util.List<com.gic.auth.dto.MenuRoleDTO>


 */
List<MenuRoleDTO> listMenuRoleByRoleId(@Param("roleId") Integer roleId);
List<TabSysMenuRole> listMenuRoleByRoleId(@Param("roleId") Integer roleId);
}
\ No newline at end of file
package com.gic.auth.service.impl;
import com.gic.auth.dao.mapper.TabSysMenuRoleMapper;
import com.gic.auth.dto.MenuRoleDTO;
import com.gic.auth.entity.TabSysMenuRole;
import com.gic.auth.service.MenuRoleService;
import com.gic.commons.util.EntityUtil;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
import com.gic.auth.dao.mapper.TabSysMenuRoleMapper;
import com.gic.auth.dto.MenuRoleDTO;
import com.gic.auth.entity.TabSysMenuRole;
import com.gic.auth.service.MenuRoleService;
import com.gic.commons.util.EntityUtil;
@Service("menuRoleService")
public class MenuRoleServiceImpl implements MenuRoleService{
......@@ -36,9 +37,9 @@ public class MenuRoleServiceImpl implements MenuRoleService{
@Override
public List<MenuRoleDTO> listMenuRoleByRoleId(Integer roleId) {
List<MenuRoleDTO> list = tabSysMenuRoleMapper.listMenuRoleByRoleId(roleId);
List<TabSysMenuRole> list = tabSysMenuRoleMapper.listMenuRoleByRoleId(roleId);
if (CollectionUtils.isNotEmpty(list)) {
return list;
return EntityUtil.changeEntityListNew(MenuRoleDTO.class, list);
}
return new ArrayList<>();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment