Browse Source

二维码路径改配置

master
zhangye 5 years ago
parent
commit
f9f32d2a8b
  1. 4
      health/src/main/java/com/ccsens/health/api/AbnormalController.java
  2. 1
      health/src/main/java/com/ccsens/health/service/AbnormalService.java
  3. 2
      health/src/main/java/com/ccsens/health/service/ClockService.java
  4. 9
      health/src/main/java/com/ccsens/health/service/HealthService.java
  5. 2
      health/src/main/java/com/ccsens/health/service/JourneyService.java
  6. 1
      health/src/main/resources/application-dev.yml
  7. 1
      health/src/main/resources/application-prod.yml
  8. 1
      health/src/main/resources/application-test.yml
  9. 4
      health/src/main/resources/application.yml
  10. 7
      util/src/main/java/com/ccsens/util/PropUtil.java

4
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<AbnormalDto.UpdateAbnormal> 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<AbnormalDto.DelAbnormal> params) throws Exception {
log.info("异常人员添加:{}",params);
log.info("删除异常人员信息:{}",params);
abnormalService.delAbnormal(params);
return JsonResponse.newInstance().ok();
}

1
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;
}

2
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);

9
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;
}

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

@ -191,7 +191,7 @@ public class JourneyService implements IJourneyService{
public void updateAbnormalJourney(QueryDto<JourneyDto.UpdateAbnormalJourney> 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())){

1
health/src/main/resources/application-dev.yml

@ -34,3 +34,4 @@ file:
path: /home/cloud/health/uploads/
domain: http://localhost:7080/
imgDomain: http://localhost:7080/uploads
qrCode: https://localhost:7080/gateway/health/uploads/

1
health/src/main/resources/application-prod.yml

@ -36,3 +36,4 @@ file:
path: /home/cloud/health/uploads/
domain: https://sd.tall.com/gateway/health/
imgDomain: https://sd.tall.com/gateway/health/uploads
qrCode: https://www.tall.wiki/gateway/health/uploads/

1
health/src/main/resources/application-test.yml

@ -36,3 +36,4 @@ file:
path: /home/cloud/health/uploads/
domain: https://test.tall.wiki/gateway/health/
imgDomain: https://test.tall.wiki/gateway/health/uploads
qrCode: https://test.tall.wiki/gateway/health/uploads/

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

@ -1,4 +1,4 @@
spring:
profiles:
active: prod
include: common, util-prod
active: test
include: common, util-test

7
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;
}
}

Loading…
Cancel
Save