瀏覽代碼

Merge remote-tracking branch 'origin/dev' into dev

18339543638 7 月之前
父節點
當前提交
44baa8fd95

+ 5 - 3
nb-service/web-service/src/main/java/com/nb/web/service/bus/service/LocalBusPatientService.java

@@ -1,5 +1,7 @@
 package com.nb.web.service.bus.service;
 
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.bean.copier.CopyOptions;
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.date.DateField;
@@ -799,11 +801,11 @@ public class LocalBusPatientService extends BaseService<BusPatientMapper, BusPat
         contactQuery.setDoctorId(String.valueOf(SecurityUtil.getId()));
         String doctorId = contactQuery.getDoctorId();
         AppDoctorUserEntity appDoctorUserEntity = iAppDoctorUserClient.selectDoctor(doctorId);
-        if (appDoctorUserEntity != null && ObjectUtil.isNotNull(appDoctorUserEntity.getIsEdit()) && appDoctorUserEntity.getIsEdit() == 1){
-            return clinicService.updateById(busClinic);
-        } else {
+        if(appDoctorUserEntity == null || ObjectUtil.isNull(appDoctorUserEntity.getIsEdit()) || appDoctorUserEntity.getIsEdit() != 1){
             throw new CustomException("没有权限修改");
         }
+        BeanUtil.copyProperties(busClinic,clinic, CopyOptions.create().ignoreNullValue());
+        return clinicService.updateById(clinic);
     }
 
     @Override