Browse Source

服务层

master
453530270@qq.com 2 years ago
parent
commit
c9bf012270
  1. 23
      src/main/java/io/xtfs/jwebfs/service/WbFileService.java
  2. 29
      src/main/java/io/xtfs/jwebfs/service/impl/WbFileServiceImpl.java

23
src/main/java/io/xtfs/jwebfs/service/WbFileService.java

@ -0,0 +1,23 @@
package io.xtfs.jwebfs.service;
import io.xtfs.jwebfs.bean.WbFile;
import java.util.List;
import java.util.Map;
public interface WbFileService {
/**
* 列表查询
* @param map
* @param page
* @return
*/
List<WbFile> getWbfileByMap(Map map, int page);
/**
* 新增
* @param wbFile
* @return
*/
int add(WbFile wbFile);
}

29
src/main/java/io/xtfs/jwebfs/service/impl/WbFileServiceImpl.java

@ -0,0 +1,29 @@
package io.xtfs.jwebfs.service.impl;
import io.xtfs.jwebfs.bean.WbFile;
import io.xtfs.jwebfs.constant.ChConstant;
import io.xtfs.jwebfs.mapper.WbFileMapper;
import io.xtfs.jwebfs.service.WbFileService;
import io.xtfs.jwebfs.utils.PageBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
@Service
public class WbFileServiceImpl implements WbFileService {
@Autowired
private WbFileMapper wbFileMapper;
@Override
public List<WbFile> getWbfileByMap(Map map, int page) {
int start = PageBean.calcStartRs(page);
return wbFileMapper.getWbFileByMap(map,start, ChConstant.PAGESIZE);
}
@Override
public int add(WbFile wbFile) {
return wbFileMapper.addRs(wbFile);
}
}
Loading…
Cancel
Save