|  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.metadata.IPage; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 
|---|
|  |  |  | import com.moral.api.entity.Test; | 
|---|
|  |  |  | import com.moral.api.exception.BusinessException; | 
|---|
|  |  |  | import com.moral.api.mapper.TestMapper; | 
|---|
|  |  |  | import com.moral.api.service.TestService; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Value; | 
|---|
|  |  |  | import org.springframework.boot.context.properties.ConfigurationProperties; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  | import org.springframework.transaction.annotation.Transactional; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.annotation.Resource; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * <p> | 
|---|
|  |  |  | 
|---|
|  |  |  | * @since 2021-02-25 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Service | 
|---|
|  |  |  | @ConfigurationProperties(prefix = "code") | 
|---|
|  |  |  | public class TestServiceImpl extends ServiceImpl<TestMapper, Test> implements TestService { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | @Resource | 
|---|
|  |  |  | private TestMapper testMapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Map<String,String> map; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public void setMap(Map<String, String> map) { | 
|---|
|  |  |  | this.map = map; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public Page<Test> selectByPage(Test test, Integer page, Integer size) { | 
|---|
|  |  |  | //设置分页条件 | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | public void saveTest() throws Exception{ | 
|---|
|  |  |  | Test t=new Test(); | 
|---|
|  |  |  | t.setName("aaaa"); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public Map<String,String> getMap(){ | 
|---|
|  |  |  | return map; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|