Commit 9f3645e5 by guojuxing

管理员接口调整

parent e4858b7c
......@@ -187,4 +187,14 @@ public interface UserApiService {
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<java.lang.Integer>>


 */
ServiceResponse<List<Integer>> listAllUser(Integer enterpriseId);
/**
* 查询gic用户列表
* @Title: listGicUser

* @Description:

* @author guojuxing
* @param enterpriseId

* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.auth.dto.UserDTO>>


*/
ServiceResponse<List<UserDTO>> listGicUser(Integer enterpriseId);
}
......@@ -136,4 +136,6 @@ public interface TabSysUserMapper {
* @return java.util.List<java.lang.Integer>


 */
List<Integer> listAllUser(@Param("enterpriseId") Integer enterpriseId);
List<TabSysUser> listGicUser(@Param("enterpriseId")Integer enterpriseId, @Param("isGic") Integer isGic);
}
\ No newline at end of file
......@@ -136,4 +136,12 @@ public interface UserService {
* @return java.util.List<java.lang.Integer>


 */
List<Integer> listAllUser(Integer enterpriseId);
/**
* 查询用户
* @param enterpriseId
* @param isGic 0:gic 1:运营
* @return
*/
List<TabSysUser> listGicUser(Integer enterpriseId, Integer isGic);
}
......@@ -150,4 +150,9 @@ public class UserServiceImpl implements UserService {
public List<Integer> listAllUser(Integer enterpriseId) {
return tabSysUserMapper.listAllUser(enterpriseId);
}
@Override
public List<TabSysUser> listGicUser(Integer enterpriseId, Integer isGic) {
return tabSysUserMapper.listGicUser(enterpriseId, isGic);
}
}
package com.gic.auth.service.outer.impl;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
......@@ -439,6 +440,15 @@ public class UserApiServiceImpl implements UserApiService {
return ServiceResponse.success(userService.listAllUser(enterpriseId));
}
@Override
public ServiceResponse<List<UserDTO>> listGicUser(Integer enterpriseId) {
List<TabSysUser> list = userService.listGicUser(enterpriseId, 0);
if (CollectionUtils.isNotEmpty(list)) {
return ServiceResponse.success(EntityUtil.changeEntityListNew(UserDTO.class, list));
}
return ServiceResponse.success(Collections.emptyList());
}
/**
* 保存关联数据,角色关联、资源关联
* @Title: saveRole

......
......@@ -361,4 +361,14 @@
and enterprise_id = #{enterpriseId}
</if>
</select>
<select id="listGicUser" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_sys_user where status = 1
and enterprise_id = #{enterpriseId}
<if test="isGic != null">
and login_type = #{isGic}
</if>
order by create_time desc
</select>
</mapper>
\ No newline at end of file
package com.gic.auth.web.controller;
import com.gic.auth.web.vo.SuperUserVO;
import com.gic.auth.web.vo.UserOfGicVO;
import com.gic.enterprise.base.EnterpriseInfo;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.LogManager;
......@@ -254,6 +255,11 @@ public class UserController {
return ResultControllerUtils.commonResult(userApiService.listUser(params));
}
@RequestMapping("/list-gic-user")
public RestResponse listGicUser() {
return ResultControllerUtils.commonResult(userApiService.listGicUser(UserDetailUtils.getUserDetail().getEnterpriseId()), UserOfGicVO.class);
}
/**
* 逻辑删除用户对应分组数据
*
......
package com.gic.auth.web.vo;
import java.io.Serializable;
public class UserOfGicVO implements Serializable{
private static final long serialVersionUID = -1568853891785762755L;
/**
* 用户id
*/
private Integer userId;
/**
* 用户名
*/
private String userName;
/**
* 手机号码
*/
private String phoneNumber;
/**
* 国际区号,如中国 86
*/
private String phoneAreaCode;
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public String getPhoneAreaCode() {
return phoneAreaCode;
}
public void setPhoneAreaCode(String phoneAreaCode) {
this.phoneAreaCode = phoneAreaCode;
}
}
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