小程序代码移植
This commit is contained in:
parent
2f85d88146
commit
5d0e66f568
@ -35,6 +35,22 @@ public class NurseAppLoginController extends BaseController {
|
|||||||
@Resource
|
@Resource
|
||||||
private NurseAppLoginService nurseAppLoginService;
|
private NurseAppLoginService nurseAppLoginService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断用户是否完善信息-微信小程序和APP共用
|
||||||
|
*
|
||||||
|
* @param patientId 用户id
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@MobileRequestAuthorization
|
||||||
|
@GetMapping("/AppIdentification")
|
||||||
|
public AjaxResult getIdentification(Long patientId) {
|
||||||
|
if (Objects.isNull(patientId)) {
|
||||||
|
return AjaxResult.error("当前用户信息不存在,无法完善个人信息!");
|
||||||
|
}
|
||||||
|
return nurseAppLoginService.getIdentification(patientId);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询护理人列表信息(会员小程序和App共用)
|
* 查询护理人列表信息(会员小程序和App共用)
|
||||||
*
|
*
|
||||||
|
|||||||
@ -14,6 +14,14 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public interface NurseAppLoginService {
|
public interface NurseAppLoginService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断用户是否完善信息-微信小程序和APP共用
|
||||||
|
*
|
||||||
|
* @param patientId 用户id
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
AjaxResult getIdentification(Long patientId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询护理人列表信息
|
* 查询护理人列表信息
|
||||||
*
|
*
|
||||||
|
|||||||
@ -1,67 +1,36 @@
|
|||||||
package com.xinelu.applet.service.nurseapplogin.impl;
|
package com.xinelu.applet.service.nurseapplogin.impl;
|
||||||
|
|
||||||
import com.xinelu.applet.dto.appletlogin.AppletUserInfoDTO;
|
|
||||||
import com.xinelu.applet.dto.appletlogin.StationItemInfoDTO;
|
import com.xinelu.applet.dto.appletlogin.StationItemInfoDTO;
|
||||||
import com.xinelu.applet.mapper.appletlogin.AppletLoginMapper;
|
import com.xinelu.applet.mapper.appletlogin.AppletLoginMapper;
|
||||||
import com.xinelu.applet.mapper.nurseapplogin.NurseAppLoginMapper;
|
import com.xinelu.applet.mapper.nurseapplogin.NurseAppLoginMapper;
|
||||||
import com.xinelu.applet.mapper.patientcenter.PatientCenterMapper;
|
|
||||||
import com.xinelu.applet.service.messagepush.MessagePushService;
|
|
||||||
import com.xinelu.applet.service.nurseapplogin.NurseAppLoginService;
|
import com.xinelu.applet.service.nurseapplogin.NurseAppLoginService;
|
||||||
import com.xinelu.applet.utils.AppointmentTimeUtil;
|
import com.xinelu.applet.utils.AppointmentTimeUtil;
|
||||||
import com.xinelu.applet.vo.appletlogin.NurserStationItemConsumableVO;
|
import com.xinelu.applet.vo.appletlogin.NurserStationItemConsumableVO;
|
||||||
import com.xinelu.applet.vo.appletlogin.NurserStationItemInfoVO;
|
import com.xinelu.applet.vo.appletlogin.NurserStationItemInfoVO;
|
||||||
|
import com.xinelu.applet.vo.nurseapplogin.AppLoginVO;
|
||||||
import com.xinelu.applet.vo.nurseapplogin.PatientAndDiseaseVO;
|
import com.xinelu.applet.vo.nurseapplogin.PatientAndDiseaseVO;
|
||||||
import com.xinelu.applet.vo.nursepersonapplogin.OrderAndItemVO;
|
import com.xinelu.applet.vo.nursepersonapplogin.OrderAndItemVO;
|
||||||
import com.xinelu.applet.vo.specialdisease.WeekDaysVO;
|
import com.xinelu.applet.vo.specialdisease.WeekDaysVO;
|
||||||
import com.xinelu.common.config.AppletChatConfig;
|
|
||||||
import com.xinelu.common.config.XinELuConfig;
|
|
||||||
import com.xinelu.common.constant.Constants;
|
|
||||||
import com.xinelu.common.core.domain.AjaxResult;
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
import com.xinelu.common.enums.*;
|
import com.xinelu.common.enums.AppointmentTimeIntervalEnum;
|
||||||
import com.xinelu.common.exception.ServiceException;
|
import com.xinelu.common.enums.GooodsOrderStatusEnum;
|
||||||
import com.xinelu.common.utils.AgeUtil;
|
import com.xinelu.common.utils.AgeUtil;
|
||||||
import com.xinelu.common.utils.bean.BeanUtils;
|
|
||||||
import com.xinelu.common.utils.codes.GenerateSystemCodeUtil;
|
|
||||||
import com.xinelu.common.utils.regex.RegexUtil;
|
|
||||||
import com.xinelu.manage.domain.coupon.Coupon;
|
|
||||||
import com.xinelu.manage.domain.goodsOrder.GoodsOrder;
|
import com.xinelu.manage.domain.goodsOrder.GoodsOrder;
|
||||||
import com.xinelu.manage.domain.patientcouponreceive.PatientCouponReceive;
|
|
||||||
import com.xinelu.manage.domain.patientdiseaseinfo.PatientDiseaseInfo;
|
|
||||||
import com.xinelu.manage.domain.patientinfo.PatientInfo;
|
|
||||||
import com.xinelu.manage.domain.patientintegralchange.PatientIntegralChange;
|
|
||||||
import com.xinelu.manage.domain.receiveAddressInfo.ReceiveAddressInfo;
|
|
||||||
import com.xinelu.manage.domain.subscribemessagerecord.SubscribeMessageRecord;
|
|
||||||
import com.xinelu.manage.domain.systemsettingsinfo.SystemSettingsInfo;
|
|
||||||
import com.xinelu.manage.mapper.coupon.CouponMapper;
|
|
||||||
import com.xinelu.manage.mapper.patientcouponreceive.PatientCouponReceiveMapper;
|
|
||||||
import com.xinelu.manage.mapper.patientdiseaseinfo.PatientDiseaseInfoMapper;
|
|
||||||
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
|
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
|
||||||
import com.xinelu.manage.mapper.patientintegralchange.PatientIntegralChangeMapper;
|
|
||||||
import com.xinelu.manage.mapper.receiveAddressInfo.ReceiveAddressInfoMapper;
|
|
||||||
import com.xinelu.manage.mapper.subscribemessagerecord.SubscribeMessageRecordMapper;
|
|
||||||
import com.xinelu.manage.mapper.sysarea.SysAreaMapper;
|
import com.xinelu.manage.mapper.sysarea.SysAreaMapper;
|
||||||
import com.xinelu.manage.mapper.systemsettingsinfo.SystemSettingsInfoMapper;
|
|
||||||
import com.xinelu.manage.vo.patientcouponreceive.PatientCouponReceiveInfoVO;
|
|
||||||
import com.xinelu.manage.vo.patientinfo.PatientInfoVO;
|
import com.xinelu.manage.vo.patientinfo.PatientInfoVO;
|
||||||
import com.xinelu.manage.vo.sysarea.SysAreaVO;
|
import com.xinelu.manage.vo.sysarea.SysAreaVO;
|
||||||
import com.xinelu.system.domain.SysConfig;
|
import com.xinelu.system.domain.SysConfig;
|
||||||
import com.xinelu.system.mapper.SysConfigMapper;
|
import com.xinelu.system.mapper.SysConfigMapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.compress.utils.Lists;
|
|
||||||
import org.apache.commons.lang3.BooleanUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.io.File;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.LocalTime;
|
import java.time.LocalTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -83,6 +52,27 @@ public class NurseAppLoginServiceImpl implements NurseAppLoginService {
|
|||||||
private AppointmentTimeUtil appointmentTimeUtil;
|
private AppointmentTimeUtil appointmentTimeUtil;
|
||||||
@Resource
|
@Resource
|
||||||
private SysConfigMapper sysConfigMapper;
|
private SysConfigMapper sysConfigMapper;
|
||||||
|
@Resource
|
||||||
|
private PatientInfoMapper patientInfoMapper;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断用户是否完善信息-微信小程序和APP共用
|
||||||
|
*
|
||||||
|
* @param patientId 用户id
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult getIdentification(Long patientId) {
|
||||||
|
//判断当前用户信息是否存在
|
||||||
|
PatientInfoVO patientInfo = patientInfoMapper.getPatientInfoById(patientId);
|
||||||
|
if (Objects.isNull(patientInfo)) {
|
||||||
|
return AjaxResult.error("当前用户信息不存在,无法完善个人信息!");
|
||||||
|
}
|
||||||
|
AppLoginVO appLoginVO = new AppLoginVO();
|
||||||
|
appLoginVO.setLoginFlag(Objects.nonNull(patientInfo.getLoginFlag()) && patientInfo.getLoginFlag() == 1);
|
||||||
|
return AjaxResult.success(appLoginVO);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询护理人列表信息
|
* 查询护理人列表信息
|
||||||
|
|||||||
@ -0,0 +1,45 @@
|
|||||||
|
package com.xinelu.applet.vo.nurseapplogin;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录信息返回标识
|
||||||
|
*
|
||||||
|
* @author zhangheng
|
||||||
|
* @date 2022-10-12
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AppLoginVO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1820130502268738492L;
|
||||||
|
/**
|
||||||
|
* 返回提示信息
|
||||||
|
*/
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录标识标识
|
||||||
|
*/
|
||||||
|
private Boolean registerFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完善信息标识
|
||||||
|
*/
|
||||||
|
private Boolean loginFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
private Long patientId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户姓名
|
||||||
|
*/
|
||||||
|
private String patientName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户手机号
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user