测试问题代码修改

This commit is contained in:
纪寒 2023-11-08 17:02:12 +08:00
parent d3812c786b
commit d3cc7b4001
6 changed files with 67 additions and 78 deletions

View File

@ -249,8 +249,8 @@ xss:
# 家医配置
fd:
dz: http://8.131.93.145:54089/fd/mp
dy: http://8.131.93.145:54089/fd/mp
dz: http://8.131.93.145:54007/fd/mp
dy: http://8.131.93.145:54008/fd/mp
# 签约附近的机构多少公里内 <=0时不限制
distance: 0
@ -281,15 +281,15 @@ applet-page-config:
# 首页跳转路径
page-url: pages/startup/startup
# 个人中心-优惠券页面跳转路径
coupon-page-url: pages/coupon/coupon
coupon-page-url: pagesB/coupon/coupon
# 商品订单页面跳转路径
goods-order-page-url: pages/CommodityOrder/CommodityOrder
goods-order-page-url: pagesB/CommodityOrder/CommodityOrder
# 预约订单页面跳转路径
appoint-order-page-url: pages/Nursingstationserviceorder/Nursingstationserviceorder
appoint-order-page-url: pagesB/Nursingstationserviceorder/Nursingstationserviceorder
# 积分页面跳转路径
integral-page-url: pages/integral/integral
integral-page-url: pagesB/integral/integral
# 护理结构详情页面跳转路径
nursestation-details-page-url: pages/nursestation/nursestation
nursestation-details-page-url: pagesB/nursestation/nursestation
# 新医路微信商户号配置参数
xyl-we-chat-config:

View File

@ -212,7 +212,7 @@ public class Constants {
/**
* 微信小程序ACCESS_TOKEN前缀
*/
public static final String NURSE_STATION_APPLET_ACCESS_TOKEN = "NURSE_STATION_APPLET_ACCESS_TOKEN";
public static final String NURSE_STATION_APPLET_ACCESS_TOKEN = "NURSE_STATION_APPLET_ACCESS_TOKEN_XYL_";
/**
* 护理员微信小程序ACCESS_TOKEN前缀
@ -259,34 +259,34 @@ public class Constants {
*/
public static final String ATTRIBUTE_PICTURE_URL = "attributePitureUrl";
/**
* 筛查预约条码图片地址
*/
public static final String APPLY_BARCODE_PICTURE_URL = "applyBarcodePitureUrl";
/**
* 筛查预约条码图片地址
*/
public static final String APPLY_BARCODE_PICTURE_URL = "applyBarcodePitureUrl";
/**
* 筛查预约条码图片地址
*/
public static final String REGISTER_BARCODE_PICTURE_URL = "registerBarcodePitureUrl";
/**
* 筛查预约条码图片地址
*/
public static final String REGISTER_BARCODE_PICTURE_URL = "registerBarcodePitureUrl";
/**
* 血小板筛查图片地址
*/
public static final String PLATELET_PICTURE_URL = "plateletPitureUrl";
/**
* 血小板筛查图片地址
*/
public static final String PLATELET_PICTURE_URL = "plateletPitureUrl";
/**
* 眼底病变筛查左眼图片地址
*/
public static final String LEFT_EYE_PICTURE_URL = "leftEyePitureUrl";
/**
* 眼底病变筛查右眼图片地址
*/
public static final String RIGHT_EYE_PICTURE_URL = "rightEyePitureUrl";
/**
* 眼底病变筛查左眼图片地址
*/
public static final String LEFT_EYE_PICTURE_URL = "leftEyePitureUrl";
/**
* 眼底病变筛查右眼图片地址
*/
public static final String RIGHT_EYE_PICTURE_URL = "rightEyePitureUrl";
/**
* 阿尔兹海默症结果文件地址
*/
public static final String ALZHEIMER_FILE_URL = "alzheimerFileUrl";
/**
* 阿尔兹海默症结果文件地址
*/
public static final String ALZHEIMER_FILE_URL = "alzheimerFileUrl";
/**
* 护理站模板信息下载
*/

View File

@ -39,20 +39,10 @@ import java.util.concurrent.TimeUnit;
@Component
public class AppletChatUtil {
private static RedisTemplate<String, Object> redisTemplate;
private static AppletChatConfig appletChatConfig;
@Resource
public void redisTemplate(RedisTemplate<String, Object> redisTemplate) {
AppletChatUtil.redisTemplate = redisTemplate;
}
private RedisTemplate<String, Object> redisTemplate;
@Resource
public void appletChatConfig(AppletChatConfig appletChatConfig) {
AppletChatUtil.appletChatConfig = appletChatConfig;
}
private AppletChatConfig appletChatConfig;
/**
* 返回成功状态码
@ -164,7 +154,7 @@ public class AppletChatUtil {
* @param filePathWeChatCodeUrl 文件保存路径
* @return java.lang.String 二维码地址
*/
public static String createAppletCode(Long weChatCodeId, boolean failFlag, String fileName, String appletPageUrl, String filePathWeChatCodeUrl) {
public String createAppletCode(Long weChatCodeId, boolean failFlag, String fileName, String appletPageUrl, String filePathWeChatCodeUrl) {
if (BooleanUtils.isTrue(failFlag)) {
//删除原有Redis中的key值
String accessTokenKey = Constants.NURSE_STATION_APPLET_ACCESS_TOKEN + "accessToken";
@ -250,7 +240,7 @@ public class AppletChatUtil {
*
* @return 小程序的AccessToken
*/
public static String getAppletAccessToken() {
public String getAppletAccessToken() {
String accessToken;
String accessTokenKey = Constants.NURSE_STATION_APPLET_ACCESS_TOKEN + "accessToken";
//从Redis中取出accessToken

View File

@ -30,10 +30,7 @@ import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.*;
import java.util.stream.Collectors;
/**
@ -192,10 +189,9 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
} else {
patientInfo.setDisease("0");
}
patientInfo.setLoginFlag(Long.valueOf(1));
patientInfo.setLoginFlag(1L);
patientInfo.setBindOpenid(body.getOpenid());
updatePatientInfo(patientInfo);
// 新增
} else {
patientInfo = residentPatientInfoMapper.isRegisterByCardNo(body.getCardNo());
@ -216,7 +212,7 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
patientInfo.setUpdateBy(body.getCardNo());
patientInfo.setHeadPictureUrl(body.getHeadPictureUrl());
patientInfo.setDelFlag(0);
patientInfo.setLoginFlag(Long.valueOf(1));
patientInfo.setLoginFlag(1L);
if (body.getDiseaseList() != null) {
patientInfo.setDisease(body.getDiseaseList().stream().collect(Collectors.joining(",")));
} else {
@ -245,7 +241,7 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
entity.setIsChecked("0");
entity.setCreateTime(new Date());
entity.setCreateBy(body.getCardNo());
entity.setLoginFlag(Long.valueOf(1));
entity.setLoginFlag(1L);
entity.setDelFlag(0);
entity.setBindOpenid(body.getOpenid());
residentPatientInfoMapper.insertPatientInfo(entity);

View File

@ -6,7 +6,6 @@ import com.xinelu.applet.dto.patientcenter.PatientCenterCouponDTO;
import com.xinelu.applet.mapper.nurseapplogin.NurseAppLoginMapper;
import com.xinelu.applet.mapper.nursingstationgoods.NursingStationGoodsMapper;
import com.xinelu.applet.mapper.patientcenter.PatientCenterMapper;
import com.xinelu.manage.service.messagepush.MessagePushService;
import com.xinelu.applet.service.patientcenter.PatientCenterService;
import com.xinelu.applet.vo.coupon.CouponVO;
import com.xinelu.applet.vo.patientcenter.PatientCenterCouponVO;
@ -43,6 +42,7 @@ import com.xinelu.manage.mapper.patientintegralchange.PatientIntegralChangeMappe
import com.xinelu.manage.mapper.patientsignininfo.PatientSignInInfoMapper;
import com.xinelu.manage.mapper.subscribemessagerecord.SubscribeMessageRecordMapper;
import com.xinelu.manage.mapper.systemsettingsinfo.SystemSettingsInfoMapper;
import com.xinelu.manage.service.messagepush.MessagePushService;
import com.xinelu.manage.vo.patientcouponreceive.PatientCouponReceiveInfoVO;
import com.xinelu.manage.vo.patientinfo.PatientInfoVO;
import lombok.extern.slf4j.Slf4j;
@ -108,7 +108,8 @@ public class PatientCenterServiceImpl implements PatientCenterService {
private SubscribeMessageRecordMapper subscribeMessageRecordMapper;
@Resource
private MessagePushService messagePushService;
@Resource
private AppletChatUtil appletChatUtil;
/**
* 用户第一次签到次数
*/
@ -262,10 +263,10 @@ public class PatientCenterServiceImpl implements PatientCenterService {
String appletPageUrl = appletPageConfig.getPageUrl();
//邀请人二维码存放路径
String filePathWeChatCodeUrl = xinYiLuConfig.getPersonalWeChatCodeUrl();
String appletCodePicture = AppletChatUtil.createAppletCode(inviteId, false, fileName, appletPageUrl, filePathWeChatCodeUrl);
String appletCodePicture = appletChatUtil.createAppletCode(inviteId, false, fileName, appletPageUrl, filePathWeChatCodeUrl);
if (StringUtils.isNotBlank(appletCodePicture) && StringUtils.equals(FAIL, appletCodePicture)) {
//第一次调用获取小程序二维码信息失败重新递归调用一次第二次失败直接返回提示信息
appletCodePicture = AppletChatUtil.createAppletCode(inviteId, true, fileName, appletPageUrl, filePathWeChatCodeUrl);
appletCodePicture = appletChatUtil.createAppletCode(inviteId, true, fileName, appletPageUrl, filePathWeChatCodeUrl);
if (StringUtils.isNotBlank(appletCodePicture) && StringUtils.equals(FAIL, appletCodePicture)) {
return AjaxResult.error("获取小程序二维码信息失败,请联系管理员!");
}

View File

@ -69,6 +69,8 @@ public class NurseStationServiceImpl implements INurseStationService {
private AppletPageConfig appletPageConfig;
@Resource
private XinELuConfig xinYiLuConfig;
@Resource
private AppletChatUtil appletChatUtil;
/**
* 护理站营业时间默认值
@ -457,18 +459,18 @@ public class NurseStationServiceImpl implements INurseStationService {
case Constants.PERSON_CERTIFICATE_URL:
uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getPersonCertificateUrl();
break;
case Constants.PLATELET_PICTURE_URL:
uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getPlateletPitureUrl();
break;
case Constants.LEFT_EYE_PICTURE_URL:
uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getLeftEyePitureUrl();
break;
case Constants.RIGHT_EYE_PICTURE_URL:
uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getRightEyePitureUrl();
break;
case Constants.ALZHEIMER_FILE_URL:
uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getAlzheimerFileUrl();
break;
case Constants.PLATELET_PICTURE_URL:
uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getPlateletPitureUrl();
break;
case Constants.LEFT_EYE_PICTURE_URL:
uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getLeftEyePitureUrl();
break;
case Constants.RIGHT_EYE_PICTURE_URL:
uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getRightEyePitureUrl();
break;
case Constants.ALZHEIMER_FILE_URL:
uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getAlzheimerFileUrl();
break;
default:
break;
}
@ -476,12 +478,12 @@ public class NurseStationServiceImpl implements INurseStationService {
return AjaxResult.success();
}
//上传
String pictureName = "";
if (StringUtils.isNotBlank(type) && StringUtils.equals(type, Constants.ALZHEIMER_FILE_URL)) {
pictureName = FileUploadUtils.uploadNurseStationPath(uploadPathUrl, multipartFile, MimeTypeUtils.FILE_EXTENSION);
} else {
pictureName = FileUploadUtils.uploadNurseStationPath(uploadPathUrl, multipartFile, MimeTypeUtils.IMAGE_EXTENSION);
}
String pictureName = "";
if (StringUtils.isNotBlank(type) && StringUtils.equals(type, Constants.ALZHEIMER_FILE_URL)) {
pictureName = FileUploadUtils.uploadNurseStationPath(uploadPathUrl, multipartFile, MimeTypeUtils.FILE_EXTENSION);
} else {
pictureName = FileUploadUtils.uploadNurseStationPath(uploadPathUrl, multipartFile, MimeTypeUtils.IMAGE_EXTENSION);
}
if (StringUtils.isBlank(pictureName)) {
throw new ServiceException("图片上传失败,请联系管理员!");
@ -617,10 +619,10 @@ public class NurseStationServiceImpl implements INurseStationService {
String appletPageUrl = appletPageConfig.getNurseStationDetailsPageUrl();
//机构二维码存放路径
String filePathWeChatCodeUrl = xinYiLuConfig.getStationWechatCodeUrl();
String appletCodePicture = AppletChatUtil.createAppletCode(nurseStationId, false, fileName, appletPageUrl, filePathWeChatCodeUrl);
String appletCodePicture = appletChatUtil.createAppletCode(nurseStationId, false, fileName, appletPageUrl, filePathWeChatCodeUrl);
if (StringUtils.isNotBlank(appletCodePicture) && StringUtils.equals(FAIL, appletCodePicture)) {
//第一次调用获取小程序二维码信息失败重新递归调用一次第二次失败直接返回提示信息
appletCodePicture = AppletChatUtil.createAppletCode(nurseStationId, true, fileName, appletPageUrl, filePathWeChatCodeUrl);
appletCodePicture = appletChatUtil.createAppletCode(nurseStationId, true, fileName, appletPageUrl, filePathWeChatCodeUrl);
if (StringUtils.isNotBlank(appletCodePicture) && StringUtils.equals(FAIL, appletCodePicture)) {
return AjaxResult.error("获取小程序二维码信息失败,请联系管理员!");
}