健康报告查询接口

This commit is contained in:
limqhz
2021-03-08 00:08:14 +08:00
parent d35edae11e
commit 2ec2494a01
6 changed files with 216 additions and 354 deletions

View File

@@ -1,6 +1,9 @@
package com.sv.mapper;
import com.sv.entity.HealthDoc;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface HealthDocMapper {
int deleteByPrimaryKey(Integer id);
@@ -14,4 +17,6 @@ public interface HealthDocMapper {
int updateByPrimaryKeySelective(HealthDoc record);
int updateByPrimaryKey(HealthDoc record);
}
List<HealthDoc> findMemAll();
}

View File

@@ -0,0 +1,66 @@
package com.sv.service.common;
import com.github.pagehelper.PageHelper;
import com.sv.entity.HealthDoc;
import com.sv.mapper.HealthDocMapper;
import com.ydd.framework.core.common.Pagination;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
/**
* Service - 用户会员卡
*
* @author yechanglin
* @since 2018-08-02
*/
@Service
@Transactional
public class MemberHealthDocService extends MemberCardCommonService {
private final Logger logger = LoggerFactory.getLogger(MemberHealthDocService.class);
@Resource
private HealthDocMapper healthDocMapper;
/**
* 上传健康报告
*
* @param healthDoc 健康报告
*/
@Transactional
public void save(HealthDoc healthDoc) {
healthDocMapper.insert(healthDoc);
}
/**
* 删除用户健康报告
*
* @param id 编号
* @return 删除数量
*/
public Integer delete(Integer id) {
if (id == null || id <= 0) {
return 0;
}
return healthDocMapper.deleteByPrimaryKey(id);
}
/**
* 查询用户健康报告
*
* @param pagination 分页信息
* @return 分页结果
*/
public Pagination findPage(Pagination pagination) {
PageHelper.startPage(pagination.getPage(), pagination.getPageSize());
PageHelper.orderBy("id desc");
pagination.setQueryResult(healthDocMapper.findMemAll());
return pagination;
}
}