Bladeren bron

userID未赋值,导致异常

buzhanyi 6 maanden geleden
bovenliggende
commit
71775b08d9

+ 6 - 0
application-webadmin/src/main/java/com/ankaibei/workFlow/webadmin/ankaibei/controller/ApplyForCostController.java

@@ -82,6 +82,7 @@ public class ApplyForCostController {
      */
     @RequestMapping("/communicationSubmitBySave")
     public ResMsg communicationSubmitBySave(@RequestBody CommunicationInfoVo communicationInfoVo) {
+        communicationInfoVo.setCreateUser(TokenData.takeFromRequest().getUserId());
         communicationInfoVo.setTotalMoney(communicationInfoVo.getApplicationFee());
         return applyForCostService.communicationSubmitBySave(communicationInfoVo);
     }
@@ -139,6 +140,7 @@ public class ApplyForCostController {
      */
     @RequestMapping("/purchaseSubmitBySave")
     public ResMsg purchaseSubmitBySave(@RequestBody PurchaseInfoVo purchaseInfoVo) {
+        purchaseInfoVo.setCreateUser(TokenData.takeFromRequest().getUserId());
         return applyForCostService.purchaseSubmitBySave(purchaseInfoVo);
     }
 
@@ -191,6 +193,7 @@ public class ApplyForCostController {
      */
     @RequestMapping("/restSubmitBySave")
     public ResMsg restSubmitBySave(@RequestBody RestsInfoVo restsInfoVo) {
+        restsInfoVo.setCreateUser(TokenData.takeFromRequest().getUserId());
         return applyForCostService.restSubmitBySave(restsInfoVo);
     }
 
@@ -250,6 +253,7 @@ public class ApplyForCostController {
      */
     @RequestMapping("/trafficSubmitBySave")
     public ResMsg trafficSubmitBySave(@RequestBody TrafficExpenseVo trafficExpenseVo) {
+        trafficExpenseVo.setApplicant(TokenData.takeFromRequest().getUserId());
         return applyForCostService.trafficSubmitBySave(trafficExpenseVo);
     }
 
@@ -308,6 +312,7 @@ public class ApplyForCostController {
      */
     @RequestMapping("/repastSubmitBySave")
     public ResMsg repastSubmitBySave(@RequestBody RepastExpenseVo RepastExpenseVo) {
+        RepastExpenseVo.setApplicant(TokenData.takeFromRequest().getUserId());
         return applyForCostService.repastSubmitBySave(RepastExpenseVo);
 
     }
@@ -360,6 +365,7 @@ public class ApplyForCostController {
      */
     @RequestMapping("/travelSubmitBySave")
     public ResMsg travelSubmitBySave(@RequestBody TravelExpenseVo travelExpenseVo) {
+        travelExpenseVo.setApplicant(TokenData.takeFromRequest().getUserId());
         return applyForCostService.travelSubmitBySave(travelExpenseVo);
     }
 

+ 1 - 4
application-webadmin/src/main/java/com/ankaibei/workFlow/webadmin/ankaibei/vo/CommunicationInfoVo.java

@@ -1,13 +1,10 @@
 package com.ankaibei.workFlow.webadmin.ankaibei.vo;
 
-import com.alibaba.fastjson.annotation.JSONField;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
-import org.springframework.web.multipart.MultipartFile;
 
 import java.math.BigDecimal;
 import java.util.Date;
-import java.util.List;
 
 /**
  * @author
@@ -20,7 +17,7 @@ import java.util.List;
 public class CommunicationInfoVo extends BaseVo {
     private Integer communicationId;
     /**
-     * 项目名称
+     * 项目id
      */
     private String projectName;
     /**