Commit 7913f00a by guojuxing

报名修改

parent ad052f2e
......@@ -24,4 +24,11 @@ public interface UserApiService {
ServiceResponse editUser(UserDTO userDTO);
ServiceResponse<UserDTO> getUserById(Integer userId);
/**
* 企业查询超级管理员
* @param enterpriseId
* @return
*/
ServiceResponse<UserDTO> getUserByEnterpriseId(Integer enterpriseId);
}
......@@ -59,4 +59,6 @@ public interface TabUserMapper {
* @return
*/
int countByPhone(@Param("phone") String phone, @Param("userId") Integer userId);
TabUser selectByEnterpriseId(@Param("enterpriseId") Integer enterpriseId);
}
\ No newline at end of file
......@@ -32,4 +32,6 @@ public interface UserService {
* @return
*/
boolean isPhoneRepeat(Integer userId, String phone);
TabUser getUserByEnterpriseId(Integer enterpriseId);
}
......@@ -42,4 +42,9 @@ public class UserServiceImpl implements UserService{
}
return false;
}
@Override
public TabUser getUserByEnterpriseId(Integer enterpriseId) {
return null;
}
}
......@@ -65,4 +65,13 @@ public class UserApiServiceImpl implements UserApiService{
}
return ServiceResponse.success(EntityUtil.changeEntityNew(UserDTO.class, tabUser));
}
@Override
public ServiceResponse<UserDTO> getUserByEnterpriseId(Integer enterpriseId) {
TabUser tabUser = userService.getUserByEnterpriseId(enterpriseId);
if (enterpriseId == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "商户ID输入有误");
}
return ServiceResponse.success(EntityUtil.changeEntityNew(UserDTO.class, tabUser));
}
}
......@@ -159,4 +159,14 @@
</if>
and phone_number = #{phone}
</select>
<select id="selectByEnterpriseId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_user
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
and status = 1
and super_admin = 1
</select>
</mapper>
\ No newline at end of file
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