2 changed files with 52 additions and 0 deletions
@ -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); |
|||
} |
|||
@ -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…
Reference in new issue