|
@@ -6,6 +6,8 @@ package com.jeeplus.sys.service;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.jeeplus.sys.domain.Post;
|
|
|
import com.jeeplus.sys.mapper.PostMapper;
|
|
|
+import com.jeeplus.sys.service.dto.PostDTO;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
@@ -19,4 +21,12 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
@Transactional
|
|
|
public class PostService extends ServiceImpl <PostMapper, Post> {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private PostMapper mapper;
|
|
|
+
|
|
|
+ public PostDTO getPostDTOByName(String name){
|
|
|
+ PostDTO postDTO = mapper.getPostDTOByName(name);
|
|
|
+ return postDTO;
|
|
|
+ }
|
|
|
+
|
|
|
}
|