Commit e6c5fea1 by guojuxing

Merge remote-tracking branch 'origin/developer' into developer

# Conflicts:
#	gic-data-cloud-service/src/main/java/com/gic/cloud/dao/mapper/TabSysUserMapper.java
#	gic-data-cloud-service/src/main/java/com/gic/cloud/service/UserService.java
#	gic-data-cloud-service/src/main/java/com/gic/cloud/service/impl/UserServiceImpl.java
#	gic-data-cloud-service/src/main/resources/mapper/TabSysUserMapper.xml
parents f1822143 76715c79
......@@ -61,4 +61,14 @@ public interface UserApiService {
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


*/
ServiceResponse<Void> bulkTransferAccountGroup(List<Integer> userIdList, Integer targetAccountGroupId);
/**
* @Title: listUserByPhone

* @Description:

* @author guojuxing
* @param nationCode 手机区号
* @param phone
手机号
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.cloud.dto.UserDTO>>


*/
ServiceResponse<List<UserDTO>> listUserByPhone(String nationCode, String phone);
}
......@@ -69,7 +69,9 @@ public interface TabSysUserMapper {
void bulkTransferAccountGroup(@Param("userIdList") List<Integer> userIdList, @Param("targetAccountGroupId") Integer targetAccountGroupId);
List<UserDTO> countGroupByAccountGroupId(@Param("enterpriseId") Integer enterpriseId);
List<UserDTO> countGroupByAccountGroupId(@Param("enterpriseId")Integer enterpriseId);
List<TabSysUser> listUserByPhone(@Param("nationCode") String nationCode, @Param("phone") String phone);
List<UserDTO> countGroupByFunctionAuthId(@Param("enterpriseId")Integer enterpriseId,
@Param("functionIdList") List<Integer> functionIdList);
......
......@@ -35,5 +35,7 @@ public interface UserService {
List<UserDTO> countGroupByAccountGroupId(Integer enterpriseId);
List<TabSysUser> listUserByPhone(String nationCode, String phone);
List<UserDTO> countGroupByFunctionAuthId(Integer enterpriseId, List<Integer> functionIdList);
}
......@@ -81,6 +81,11 @@ public class UserServiceImpl implements UserService{
}
@Override
public List<TabSysUser> listUserByPhone(String nationCode, String phone) {
return tabSysUserMapper.listUserByPhone(nationCode, phone);
}
@Override
public List<UserDTO> countGroupByFunctionAuthId(Integer enterpriseId, List<Integer> functionIdList) {
return tabSysUserMapper.countGroupByFunctionAuthId(enterpriseId, functionIdList);
}
......
......@@ -9,13 +9,16 @@ import com.gic.cloud.qo.UserQO;
import com.gic.cloud.service.AccountGroupService;
import com.gic.cloud.service.UserApiService;
import com.gic.cloud.service.UserService;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.PageHelperUtils;
import com.gic.enterprise.constants.Constants;
import com.gic.enterprise.error.ErrorCode;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Collections;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
......@@ -76,6 +79,15 @@ public class UserApiServiceImpl implements UserApiService{
return ServiceResponse.success();
}
@Override
public ServiceResponse<List<UserDTO>> listUserByPhone(String nationCode, String phone) {
List<TabSysUser> list = userService.listUserByPhone(nationCode, phone);
if (CollectionUtils.isNotEmpty(list)) {
return ServiceResponse.success(EntityUtil.changeEntityListNew(UserDTO.class, list));
}
return ServiceResponse.success(Collections.emptyList());
}
private ServiceResponse<Void> validParam(UserDTO dto) {
if (dto.getUserId() != null) {
TabSysUser record = userService.getUser(dto.getUserId());
......
......@@ -224,6 +224,14 @@
group by account_group_id
</select>
<select id="listUserByPhone" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_sys_user
where nation_code = #{nationCode}
and phone = #{phone}
and status = 1
</select>
<select id="countGroupByFunctionAuthId" resultType="com.gic.cloud.dto.UserDTO">
select function_auth_id functionAuthId, count(user_id) memberCount
from tab_sys_user
......
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