Browse Source

查询

master
zhizhi wu 5 years ago
parent
commit
d72932e606
  1. 2
      health/src/main/java/com/ccsens/health/api/StudentController.java
  2. 5
      health/src/main/java/com/ccsens/health/bean/vo/MemberVo.java
  3. 2
      health/src/main/java/com/ccsens/health/service/JourneyService.java
  4. 9
      health/src/main/java/com/ccsens/health/service/StudentService.java
  5. 2
      health/src/main/java/com/ccsens/health/util/HealthConstant.java
  6. 4
      tall/src/main/resources/application.yml

2
health/src/main/java/com/ccsens/health/api/StudentController.java

@ -47,7 +47,7 @@ public class StudentController {
return JsonResponse.newInstance().ok(contactPatientVo); return JsonResponse.newInstance().ok(contactPatientVo);
} }
// @MustLogin @MustLogin
@PostMapping("import") @PostMapping("import")
@ApiOperation(value = "导入成员", notes = "") @ApiOperation(value = "导入成员", notes = "")
public JsonResponse importMembers(@RequestParam(required = true) Part file) { public JsonResponse importMembers(@RequestParam(required = true) Part file) {

5
health/src/main/java/com/ccsens/health/bean/vo/MemberVo.java

@ -6,6 +6,7 @@ import lombok.Data;
import javax.validation.constraints.Max; import javax.validation.constraints.Max;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@Data @Data
@ -42,9 +43,9 @@ public class MemberVo {
@ApiModel("接触病患学生列表") @ApiModel("接触病患学生列表")
public static class ContactPatientVo { public static class ContactPatientVo {
@ApiModelProperty("校内打卡") @ApiModelProperty("校内打卡")
private List<ContactPatientInside> contactPatientInsideList; private List<ContactPatientInside> contactPatientInsideList = new ArrayList<>();
@ApiModelProperty("校外行程") @ApiModelProperty("校外行程")
private List<ContactPatientOutside> contactPatientOutsideList; private List<ContactPatientOutside> contactPatientOutsideList = new ArrayList<>();
} }
@Data @Data

2
health/src/main/java/com/ccsens/health/service/JourneyService.java

@ -89,7 +89,7 @@ public class JourneyService implements IJourneyService{
@Override @Override
public long updateBackNum() { public long updateBackNum() {
long total = journeyDao.countByType(HealthConstant.JOURNEY_BACK_SCHOOL); long total = journeyDao.countByType(HealthConstant.JOURNEY_BACK_SCHOOL);
redisUtil.set(HealthConstant.BACK_SCHOOL_TOTAL_REDIS, total); redisUtil.set(HealthConstant.BACK_SCHOOL_TOTAL_REDIS, total, HealthConstant.REDIS_TIME);
log.info("填写返校行程的总人数:{}", total); log.info("填写返校行程的总人数:{}", total);
return total; return total;
} }

9
health/src/main/java/com/ccsens/health/service/StudentService.java

@ -16,6 +16,7 @@ import com.ccsens.health.util.HealthConstant;
import com.ccsens.util.*; import com.ccsens.util.*;
import com.ccsens.util.bean.dto.QueryDto; import com.ccsens.util.bean.dto.QueryDto;
import com.ccsens.util.exception.BaseException; import com.ccsens.util.exception.BaseException;
import io.swagger.annotations.ApiModelProperty;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -100,7 +101,7 @@ public class StudentService implements IStudentService{
public long updateStudentNum() { public long updateStudentNum() {
MemberExample example = new MemberExample(); MemberExample example = new MemberExample();
long total = memberDao.countByExample(example); long total = memberDao.countByExample(example);
redisUtil.set(HealthConstant.MEMBER_TOTAL_REDIS, total); redisUtil.set(HealthConstant.MEMBER_TOTAL_REDIS, total, HealthConstant.REDIS_TIME);
log.info("更新成员总数redis结束:{}", total); log.info("更新成员总数redis结束:{}", total);
return total; return total;
} }
@ -172,6 +173,10 @@ public class StudentService implements IStudentService{
*/ */
@Override @Override
public MemberVo.ContactPatientVo getContactPatient(QueryDto<MemberDto.ContactPatientDto> params) { public MemberVo.ContactPatientVo getContactPatient(QueryDto<MemberDto.ContactPatientDto> params) {
return null; log.info("查询接触病患学生列表:{}", params);
MemberVo.ContactPatientVo vo = new MemberVo.ContactPatientVo();
return vo;
} }
} }

2
health/src/main/java/com/ccsens/health/util/HealthConstant.java

@ -10,6 +10,8 @@ public class HealthConstant {
public static final String MEMBER_TOTAL_REDIS = "health_member_total_redis"; public static final String MEMBER_TOTAL_REDIS = "health_member_total_redis";
/** redis key: 返校行程总人数*/ /** redis key: 返校行程总人数*/
public static final String BACK_SCHOOL_TOTAL_REDIS = "health_back_school_total_redis"; public static final String BACK_SCHOOL_TOTAL_REDIS = "health_back_school_total_redis";
/** redis有效时长:30天 */
public static final long REDIS_TIME = 30 * 24 * 60 * 60;
/**成员表 本科生*/ /**成员表 本科生*/
public static final byte MEMBER_UNDERGRADUATE = 0; public static final byte MEMBER_UNDERGRADUATE = 0;

4
tall/src/main/resources/application.yml

@ -1,4 +1,4 @@
spring: spring:
profiles: profiles:
active: test active: dev
include: util-test,common include: util-dev,common
Loading…
Cancel
Save