Skip to content

Commit

Permalink
删除不必要代码
Browse files Browse the repository at this point in the history
  • Loading branch information
HWYWL committed Mar 4, 2019
1 parent 64b303b commit 42a104c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 57 deletions.
14 changes: 0 additions & 14 deletions src/main/java/com/yi/script/service/ScriptInfoService.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<ScriptInfo> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand All @@ -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<ScriptInfo> 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);
}
}
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 42a104c

Please sign in to comment.