From 42a104cf4dbe7a09527a03283f35996084b92c25 Mon Sep 17 00:00:00 2001 From: hwy Date: Mon, 4 Mar 2019 11:08:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=8D=E5=BF=85=E8=A6=81?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yi/script/service/ScriptInfoService.java | 14 ------ .../service/impl/ScriptInfoServiceImpl.java | 49 +++---------------- src/main/resources/application.properties | 2 +- 3 files changed, 8 insertions(+), 57 deletions(-) diff --git a/src/main/java/com/yi/script/service/ScriptInfoService.java b/src/main/java/com/yi/script/service/ScriptInfoService.java index 65f1683..a243bdf 100644 --- a/src/main/java/com/yi/script/service/ScriptInfoService.java +++ b/src/main/java/com/yi/script/service/ScriptInfoService.java @@ -11,24 +11,10 @@ * @date 2018-4-27 16:00:59 */ public interface ScriptInfoService { - long countByExample(ScriptInfoExample example); - - int deleteByExample(ScriptInfoExample example); - - int deleteByPrimaryKey(Long id); - - int insert(ScriptInfo record); - int insertSelective(ScriptInfo record); List selectByExample(ScriptInfoExample example); - ScriptInfo selectByPrimaryKey(Long id); - - int updateByExampleSelective(ScriptInfo record, ScriptInfoExample example); - - int updateByExample(ScriptInfo record, ScriptInfoExample example); - int updateByPrimaryKeySelective(ScriptInfo record); int updateByPrimaryKey(ScriptInfo record); diff --git a/src/main/java/com/yi/script/service/impl/ScriptInfoServiceImpl.java b/src/main/java/com/yi/script/service/impl/ScriptInfoServiceImpl.java index 77001ff..204ac01 100644 --- a/src/main/java/com/yi/script/service/impl/ScriptInfoServiceImpl.java +++ b/src/main/java/com/yi/script/service/impl/ScriptInfoServiceImpl.java @@ -4,9 +4,9 @@ import com.yi.script.model.ScriptInfo; import com.yi.script.model.ScriptInfoExample; import com.yi.script.service.ScriptInfoService; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import javax.annotation.Resource; import java.util.List; /** @@ -16,61 +16,26 @@ */ @Service public class ScriptInfoServiceImpl implements ScriptInfoService { - @Autowired - ScriptInfoMapper scriptInfodao; - - @Override - public long countByExample(ScriptInfoExample example) { - return scriptInfodao.countByExample(example); - } - - @Override - public int deleteByExample(ScriptInfoExample example) { - return scriptInfodao.deleteByExample(example); - } - - @Override - public int deleteByPrimaryKey(Long id) { - return scriptInfodao.deleteByPrimaryKey(id); - } - - @Override - public int insert(ScriptInfo record) { - return scriptInfodao.insert(record); - } + @Resource + ScriptInfoMapper scriptInfoMapper; @Override public int insertSelective(ScriptInfo record) { - return scriptInfodao.insertSelective(record); + return scriptInfoMapper.insertSelective(record); } @Override public List selectByExample(ScriptInfoExample example) { - return scriptInfodao.selectByExample(example); - } - - @Override - public ScriptInfo selectByPrimaryKey(Long id) { - return scriptInfodao.selectByPrimaryKey(id); - } - - @Override - public int updateByExampleSelective(ScriptInfo record, ScriptInfoExample example) { - return scriptInfodao.updateByExampleSelective(record, example); - } - - @Override - public int updateByExample(ScriptInfo record, ScriptInfoExample example) { - return scriptInfodao.updateByExample(record, example); + return scriptInfoMapper.selectByExample(example); } @Override public int updateByPrimaryKeySelective(ScriptInfo record) { - return scriptInfodao.updateByPrimaryKeySelective(record); + return scriptInfoMapper.updateByPrimaryKeySelective(record); } @Override public int updateByPrimaryKey(ScriptInfo record) { - return scriptInfodao.updateByPrimaryKey(record); + return scriptInfoMapper.updateByPrimaryKey(record); } } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 5c762ce..7b46785 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -4,7 +4,7 @@ server.port=8082 spring.datasource.driverClassName = com.mysql.jdbc.Driver spring.datasource.url = jdbc:mysql://localhost:3306/script?useUnicode=true&characterEncoding=utf-8 spring.datasource.username = root -spring.datasource.password = +spring.datasource.password = root #model ×Ô¶¯É¨Ãè mybatis.type-aliases-package=com.yi.script.model