|
@ -24,6 +24,7 @@ import com.epmet.commons.tools.constant.FieldConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
|
|
import com.epmet.commons.tools.security.user.LoginUserUtil; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.dao.GovRoleDao; |
|
|
import com.epmet.dao.GovRoleDao; |
|
|
import com.epmet.dto.GovRoleDTO; |
|
|
import com.epmet.dto.GovRoleDTO; |
|
@ -56,6 +57,8 @@ public class GovRoleServiceImpl extends BaseServiceImpl<GovRoleDao, GovRoleEntit |
|
|
private GovRoleMenuService govRoleMenuService; |
|
|
private GovRoleMenuService govRoleMenuService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private GovRoleUserService govRoleUserService; |
|
|
private GovRoleUserService govRoleUserService; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private LoginUserUtil loginUserUtil; |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public PageData<GovRoleDTO> page(Map<String, Object> params) { |
|
|
public PageData<GovRoleDTO> page(Map<String, Object> params) { |
|
@ -68,6 +71,7 @@ public class GovRoleServiceImpl extends BaseServiceImpl<GovRoleDao, GovRoleEntit |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public List<GovRoleDTO> list(Map<String, Object> params) { |
|
|
public List<GovRoleDTO> list(Map<String, Object> params) { |
|
|
|
|
|
params.put("customerId", loginUserUtil.getLoginUserCustomerId()); |
|
|
List<GovRoleEntity> entityList = baseDao.selectList(getWrapper(params)); |
|
|
List<GovRoleEntity> entityList = baseDao.selectList(getWrapper(params)); |
|
|
|
|
|
|
|
|
return ConvertUtils.sourceToTarget(entityList, GovRoleDTO.class); |
|
|
return ConvertUtils.sourceToTarget(entityList, GovRoleDTO.class); |
|
@ -79,7 +83,7 @@ public class GovRoleServiceImpl extends BaseServiceImpl<GovRoleDao, GovRoleEntit |
|
|
String customerId = (String)params.get(FieldConstant.CUSTOMER_ID_HUMP); |
|
|
String customerId = (String)params.get(FieldConstant.CUSTOMER_ID_HUMP); |
|
|
QueryWrapper<GovRoleEntity> wrapper = new QueryWrapper<>(); |
|
|
QueryWrapper<GovRoleEntity> wrapper = new QueryWrapper<>(); |
|
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id).like(StringUtils.isNotBlank(name), FieldConstant.NAME, name) |
|
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id).like(StringUtils.isNotBlank(name), FieldConstant.NAME, name) |
|
|
.eq(StringUtils.isNotBlank(customerId), FieldConstant.CUSTOMER_ID_HUMP, customerId); |
|
|
.eq(StringUtils.isNotBlank(customerId), FieldConstant.CUSTOMER_ID, customerId); |
|
|
|
|
|
|
|
|
return wrapper; |
|
|
return wrapper; |
|
|
} |
|
|
} |
|
|