Commit e4ea037f by 唐功亮

1.【新增】 服务商列表(不分页)

2. 所有接口增加 @Login注解
parent 02a08d6d
...@@ -3,6 +3,7 @@ package io.office.modules.manage.controller; ...@@ -3,6 +3,7 @@ package io.office.modules.manage.controller;
import java.util.Arrays; import java.util.Arrays;
import java.util.Map; import java.util.Map;
import io.office.modules.app.annotation.Login;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -39,6 +40,7 @@ public class LogLoginController { ...@@ -39,6 +40,7 @@ public class LogLoginController {
* 用户登录 * 用户登录
*/ */
@RequestMapping("/api/login") @RequestMapping("/api/login")
@Login
// @RequiresPermissions("manage:member:list") // @RequiresPermissions("manage:member:list")
public R login(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){ public R login(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
logLoginService.login(params,request,response); logLoginService.login(params,request,response);
......
...@@ -3,6 +3,7 @@ package io.office.modules.manage.controller; ...@@ -3,6 +3,7 @@ package io.office.modules.manage.controller;
import java.util.Arrays; import java.util.Arrays;
import java.util.Map; import java.util.Map;
import io.office.modules.app.annotation.Login;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -36,6 +37,7 @@ public class MemberController { ...@@ -36,6 +37,7 @@ public class MemberController {
/** /**
* 用户注册 * 用户注册
*/ */
@Login
@RequestMapping("/api/userRegistered") @RequestMapping("/api/userRegistered")
// @RequiresPermissions("manage:member:list") // @RequiresPermissions("manage:member:list")
public R userRegistered(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){ public R userRegistered(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
......
...@@ -6,6 +6,7 @@ import java.util.List; ...@@ -6,6 +6,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.modules.app.annotation.Login;
import io.office.modules.manage.entity.ProductEntity; import io.office.modules.manage.entity.ProductEntity;
import io.office.modules.sys.controller.AbstractController; import io.office.modules.sys.controller.AbstractController;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -47,6 +48,17 @@ public class PartnersController extends AbstractController { ...@@ -47,6 +48,17 @@ public class PartnersController extends AbstractController {
return R.ok().put("page", pageUtils); return R.ok().put("page", pageUtils);
} }
/**
* 前台查询列表
*/
@RequestMapping("/api/frontList")
@Login
// @RequiresPermissions("manage:partners:list")
public R frontList(/*@RequestBody Map<String, Object> params*/){
List<PartnersEntity> partnersList = this.partnersService.frontList(null);
return R.ok().put("partnersList", partnersList);
}
/** /**
* 信息 * 信息
......
...@@ -3,6 +3,7 @@ package io.office.modules.manage.controller; ...@@ -3,6 +3,7 @@ package io.office.modules.manage.controller;
import java.util.Arrays; import java.util.Arrays;
import java.util.Map; import java.util.Map;
import io.office.modules.app.annotation.Login;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -38,6 +39,7 @@ public class TimescodeRegiController { ...@@ -38,6 +39,7 @@ public class TimescodeRegiController {
/** /**
* 获取验证码 * 获取验证码
*/ */
@Login
@RequestMapping("/api/getVerificationCode") @RequestMapping("/api/getVerificationCode")
// @RequiresPermissions("manage:timescoderegi:list") // @RequiresPermissions("manage:timescoderegi:list")
public R getVerificationCode(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){ public R getVerificationCode(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
......
...@@ -5,6 +5,7 @@ import io.office.modules.manage.entity.PartnersEntity; ...@@ -5,6 +5,7 @@ import io.office.modules.manage.entity.PartnersEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -20,4 +21,7 @@ import java.util.Map; ...@@ -20,4 +21,7 @@ import java.util.Map;
public interface PartnersDao extends BaseMapper<PartnersEntity> { public interface PartnersDao extends BaseMapper<PartnersEntity> {
List<PartnersEntity> selectPartnersList(@Param("params") Map<String, Object> params, Page page); List<PartnersEntity> selectPartnersList(@Param("params") Map<String, Object> params, Page page);
@Select("select * from Partners where status=#{status} and levels>#{levels} order by id desc")
List<PartnersEntity> selectByStatusAndLevels(@Param("status")String status, @Param("levels")String levels);
} }
...@@ -26,5 +26,7 @@ public interface PartnersService extends IService<PartnersEntity> { ...@@ -26,5 +26,7 @@ public interface PartnersService extends IService<PartnersEntity> {
Page<PartnersEntity> selectPartnersList(Map<String, Object> params, Page page); Page<PartnersEntity> selectPartnersList(Map<String, Object> params, Page page);
R verifyPartners(PartnersEntity partnersEntity, SysUserEntity user); R verifyPartners(PartnersEntity partnersEntity, SysUserEntity user);
List<PartnersEntity> frontList(Map<String, Object> params);
} }
...@@ -74,4 +74,11 @@ public class PartnersServiceImpl extends ServiceImpl<PartnersDao, PartnersEntity ...@@ -74,4 +74,11 @@ public class PartnersServiceImpl extends ServiceImpl<PartnersDao, PartnersEntity
} }
} }
@Override
public List<PartnersEntity> frontList(Map<String, Object> params) {
String status="1";//代表审核状态,编辑从后台提交专题后,默认初始状态为status=0,审核成功status=1,审核失败status=-1
String levels="0";//levels代表级别,取值从0到9。其中,0代表隐藏,1级以上可以显示,9级为最高级
return partnersDao.selectByStatusAndLevels(status,levels);
}
} }
\ 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