| | |
| | | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.PermitMapper; |
| | | import com.whyc.pojo.DocUser; |
| | | import com.whyc.util.ActionUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class PermitService { |
| | | @Autowired(required = false) |
| | | private PermitMapper mapper; |
| | | |
| | | |
| | | //登录后根据用户名查询该用户的权限 |
| | | public Response getPermitsByUname() { |
| | | DocUser docUser= ActionUtil.getUser(); |
| | | List list=mapper.getPermitsByUname(docUser.getName()); |
| | | return new Response().setII(1,list.size()>0?true:false,list,"返回"); |
| | | } |
| | | } |