diff --git a/health/src/main/java/com/ccsens/health/api/AbnormalController.java b/health/src/main/java/com/ccsens/health/api/AbnormalController.java index 935ff6bf..9907c730 100644 --- a/health/src/main/java/com/ccsens/health/api/AbnormalController.java +++ b/health/src/main/java/com/ccsens/health/api/AbnormalController.java @@ -61,7 +61,7 @@ public class AbnormalController { @ApiOperation(value = "修改异常人员信息", notes = "") @RequestMapping(value = "update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public JsonResponse updateAbnormal(@ApiParam @Validated @RequestBody QueryDto params) throws Exception { - log.info("异常人员添加:{}",params); + log.info("修改异常人员信息:{}",params); abnormalService.updateAbnormal(params); return JsonResponse.newInstance().ok(); } @@ -70,7 +70,7 @@ public class AbnormalController { @ApiOperation(value = "删除异常人员信息", notes = "") @RequestMapping(value = "delAbnormal", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public JsonResponse deleteAbnormal(@ApiParam @Validated @RequestBody QueryDto params) throws Exception { - log.info("异常人员添加:{}",params); + log.info("删除异常人员信息:{}",params); abnormalService.delAbnormal(params); return JsonResponse.newInstance().ok(); } diff --git a/health/src/main/java/com/ccsens/health/service/AbnormalService.java b/health/src/main/java/com/ccsens/health/service/AbnormalService.java index 93ec5792..3ee49e4f 100644 --- a/health/src/main/java/com/ccsens/health/service/AbnormalService.java +++ b/health/src/main/java/com/ccsens/health/service/AbnormalService.java @@ -73,6 +73,7 @@ public class AbnormalService implements IAbnormalService{ AbnormalVo.AbnormalStatisticsVo abnormalStatisticsVo = new AbnormalVo.AbnormalStatisticsVo(); BeanUtil.copyProperties(healthAbnormal,abnormalStatisticsVo); + abnormalStatisticsVo.setHealthType(healthAbnormal.getHealthStatus()); return abnormalStatisticsVo; } diff --git a/health/src/main/java/com/ccsens/health/service/ClockService.java b/health/src/main/java/com/ccsens/health/service/ClockService.java index 9bcb3bd6..d66185d0 100644 --- a/health/src/main/java/com/ccsens/health/service/ClockService.java +++ b/health/src/main/java/com/ccsens/health/service/ClockService.java @@ -263,7 +263,7 @@ public class ClockService implements IClockService { String path = WebConstant.UPLOAD_PATH_BASE + fileName; WxXcxUtil.getWxCode(WebConstant.QRCODE_SITE , "d=" + siteQrcode.getId() + "&t=" + createQRCode.getType(), null, path); - qrcodePath = WebConstant.TEST_URL_BASE_HEALTH + fileName; + qrcodePath = PropUtil.qrCode + fileName; siteQrcode.setQrcodePath(qrcodePath); //添加数据库 siteQrcodeDao.insertSelective(siteQrcode); diff --git a/health/src/main/java/com/ccsens/health/service/HealthService.java b/health/src/main/java/com/ccsens/health/service/HealthService.java index cd82eaa9..c8411f48 100644 --- a/health/src/main/java/com/ccsens/health/service/HealthService.java +++ b/health/src/main/java/com/ccsens/health/service/HealthService.java @@ -13,13 +13,11 @@ import com.ccsens.health.bean.vo.HealthVo; import com.ccsens.health.persist.dao.HealthQRCodeDao; import com.ccsens.health.persist.dao.HealthRecordsDao; import com.ccsens.health.persist.dao.HealthTypeDao; -import com.ccsens.util.CodeEnum; -import com.ccsens.util.DateUtil; -import com.ccsens.util.QrCodeUtil; -import com.ccsens.util.WebConstant; +import com.ccsens.util.*; import com.ccsens.util.bean.dto.QueryDto; import com.ccsens.util.exception.BaseException; import com.ccsens.util.wx.WxXcxUtil; +import com.fasterxml.jackson.databind.annotation.JsonAppend; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import io.micrometer.shaded.org.pcollections.PCollection; @@ -104,7 +102,7 @@ public class HealthService implements IHealthService{ String path = WebConstant.UPLOAD_PATH_BASE+fileName; WxXcxUtil.getWxCode(WebConstant.QRCODE_HEALTH ,"d="+userId,color,path); - String qrcodePath = WebConstant.TEST_URL_BASE_HEALTH + fileName; + String qrcodePath = PropUtil.qrCode + fileName; //5、将健康码信息存入数据库 HealthQRCode healthQRCode = new HealthQRCode(); @@ -118,6 +116,7 @@ public class HealthService implements IHealthService{ BeanUtil.copyProperties(healthRecords,healthInfoVo); healthInfoVo.setUserId(userId); healthInfoVo.setHealthCode(qrcodePath); + return healthInfoVo; } diff --git a/health/src/main/java/com/ccsens/health/service/JourneyService.java b/health/src/main/java/com/ccsens/health/service/JourneyService.java index f32a9274..2338f1f4 100644 --- a/health/src/main/java/com/ccsens/health/service/JourneyService.java +++ b/health/src/main/java/com/ccsens/health/service/JourneyService.java @@ -191,7 +191,7 @@ public class JourneyService implements IJourneyService{ public void updateAbnormalJourney(QueryDto params) { JourneyDto.UpdateAbnormalJourney journey = params.getParam(); JourneyAbnormal journeyAbnormal = journeyAbnormalDao.selectByPrimaryKey(journey.getId()); - if(ObjectUtil.isNotNull(journeyAbnormal)){ + if(ObjectUtil.isNull(journeyAbnormal)){ throw new BaseException(CodeEnum.PARAM_ERROR); } if(ObjectUtil.isNotNull(journey.getTripMode())){ diff --git a/health/src/main/resources/application-dev.yml b/health/src/main/resources/application-dev.yml index eb398e73..1a4eac84 100644 --- a/health/src/main/resources/application-dev.yml +++ b/health/src/main/resources/application-dev.yml @@ -33,4 +33,5 @@ swagger: file: path: /home/cloud/health/uploads/ domain: http://localhost:7080/ - imgDomain: http://localhost:7080/uploads \ No newline at end of file + imgDomain: http://localhost:7080/uploads + qrCode: https://localhost:7080/gateway/health/uploads/ \ No newline at end of file diff --git a/health/src/main/resources/application-prod.yml b/health/src/main/resources/application-prod.yml index 4e45e18b..82993fe4 100644 --- a/health/src/main/resources/application-prod.yml +++ b/health/src/main/resources/application-prod.yml @@ -35,4 +35,5 @@ eureka: file: path: /home/cloud/health/uploads/ domain: https://sd.tall.com/gateway/health/ - imgDomain: https://sd.tall.com/gateway/health/uploads \ No newline at end of file + imgDomain: https://sd.tall.com/gateway/health/uploads + qrCode: https://www.tall.wiki/gateway/health/uploads/ \ No newline at end of file diff --git a/health/src/main/resources/application-test.yml b/health/src/main/resources/application-test.yml index bb0b8d3f..a395f7d4 100644 --- a/health/src/main/resources/application-test.yml +++ b/health/src/main/resources/application-test.yml @@ -35,4 +35,5 @@ eureka: file: path: /home/cloud/health/uploads/ domain: https://test.tall.wiki/gateway/health/ - imgDomain: https://test.tall.wiki/gateway/health/uploads \ No newline at end of file + imgDomain: https://test.tall.wiki/gateway/health/uploads + qrCode: https://test.tall.wiki/gateway/health/uploads/ \ No newline at end of file diff --git a/health/src/main/resources/application.yml b/health/src/main/resources/application.yml index 5abf2423..c3b11fb6 100644 --- a/health/src/main/resources/application.yml +++ b/health/src/main/resources/application.yml @@ -1,4 +1,4 @@ spring: profiles: - active: prod - include: common, util-prod + active: test + include: common, util-test diff --git a/util/src/main/java/com/ccsens/util/PropUtil.java b/util/src/main/java/com/ccsens/util/PropUtil.java index dedd75f4..eaa353e5 100644 --- a/util/src/main/java/com/ccsens/util/PropUtil.java +++ b/util/src/main/java/com/ccsens/util/PropUtil.java @@ -17,6 +17,7 @@ public class PropUtil { public static String projectName; public static String contextPath; public static String gatewayUrl; + public static String qrCode; @Value("${gatewayUrl:}") public void setGatewayUrl(String gatewayUrl) { @@ -34,7 +35,10 @@ public class PropUtil { public void setImgDomain(String imgDomain) { PropUtil.imgDomain = imgDomain; } - + @Value("${file.qrCode:}") + public void setQrCode(String qrCode) { + PropUtil.qrCode = qrCode; + } @Value("${ht.project.name:}") public void setProjectName(String projectName) { PropUtil.projectName = projectName; @@ -44,4 +48,5 @@ public class PropUtil { public void setContextPath(String contextPath) { PropUtil.contextPath = contextPath; } + }