Przeglądaj źródła

销售驳回功能

wjj 18 godzin temu
rodzic
commit
ca3e60faaa

+ 6 - 8
fs-company/src/main/java/com/fs/company/controller/patient/FsPatientBaseInfoController.java

@@ -7,14 +7,7 @@ import com.fs.framework.security.LoginUser;
 import com.fs.framework.security.SecurityUtils;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import com.fs.common.annotation.Log;
 import com.fs.common.core.controller.BaseController;
 import com.fs.common.core.domain.AjaxResult;
@@ -121,4 +114,9 @@ public class FsPatientBaseInfoController extends BaseController
 
     }
 
+    @PostMapping("/reject")
+    public AjaxResult reject(@RequestBody FsPatientBaseInfo fsPatientBaseInfo){
+        return AjaxResult.success(fsPatientBaseInfoService.reject(fsPatientBaseInfo));
+    }
+
 }

+ 3 - 0
fs-service/src/main/java/com/fs/patient/service/IFsPatientBaseInfoService.java

@@ -85,4 +85,7 @@ public interface IFsPatientBaseInfoService extends IService<FsPatientBaseInfo>{
      * @return
      */
     R sendProjectReward(FsProjectSendRewardUParam param);
+
+    //销售驳回诊断
+    int reject(FsPatientBaseInfo param);
 }

+ 12 - 0
fs-service/src/main/java/com/fs/patient/service/impl/FsPatientBaseInfoServiceImpl.java

@@ -248,6 +248,7 @@ public class FsPatientBaseInfoServiceImpl extends ServiceImpl<FsPatientBaseInfoM
         //红包配置信息
         BigDecimal amount = new BigDecimal("0.1");
         boolean openFlag = false;
+        Long redSecond = 0L;
         String json = getProjectRedPacketConfig();
         if(StringUtils.isNotEmpty(json)) {
             try {
@@ -257,13 +258,16 @@ public class FsPatientBaseInfoServiceImpl extends ServiceImpl<FsPatientBaseInfoM
                     openFlag = true;
                 }
                 amount = jsonObject.getBigDecimal("amount");
+                redSecond = jsonObject.getLong("redSecond");
             } catch (Exception e) {
                 log.error("解析理疗红包配置失败, json={}", json, e);
                 amount = new BigDecimal("0.1");
+                redSecond = 0L;
             }
         }
         patientBaseInfoVO.setAmount(amount);
         patientBaseInfoVO.setOpenFlag(openFlag);
+        patientBaseInfoVO.setRedSecond(redSecond);
         return R.ok().put("data", patientBaseInfoVO);
     }
 
@@ -375,6 +379,14 @@ public class FsPatientBaseInfoServiceImpl extends ServiceImpl<FsPatientBaseInfoM
         return sendProjectRedPacket(param,user,companyUser);
     }
 
+    @Override
+    public int reject(FsPatientBaseInfo param) {
+        FsPatientBaseInfo map = new FsPatientBaseInfo();
+        map.setId(param.getId());
+        map.setDoctorStatus(0);
+        return fsPatientBaseInfoMapper.updateFsPatientBaseInfo(map);
+    }
+
 
     private R sendProjectRedPacket(FsProjectSendRewardUParam param,FsUser user,CompanyUser companyUser){
         //默认0.1红包数据

+ 6 - 0
fs-service/src/main/java/com/fs/patient/vo/PatientBaseInfoVO.java

@@ -50,9 +50,15 @@ public class PatientBaseInfoVO {
     /** 状态 0-未绑定 1-已绑定 */
     private Integer status;
 
+    //销售id
+    private Long companyUserId;
+
     //红包金额
     private BigDecimal amount;
 
     //是否可领取红包
     private Boolean openFlag;
+
+    //阅读秒
+    private Long redSecond;
 }