xiao547607 4 роки тому
батько
коміт
9f52ceb380

+ 1 - 0
web/src/main/java/com/jpsoft/enterprise/config/WebMvcConfig.java

@@ -79,6 +79,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
 				.excludePathPatterns("/mobile/whisperingWallApi/whisperingWallInfoList")
 				.excludePathPatterns("/mobile/whisperingWallApi/whisperingWallInfoDetail")
                 .excludePathPatterns("/mobile/billInfoApi/dueList")
+				.excludePathPatterns("/mobile/doubleHundred/submitInformation")
                 .excludePathPatterns("/wechat/**")
 				.excludePathPatterns("/wxPay/**")
 				.excludePathPatterns("/aliPay/**")

+ 7 - 6
web/src/main/java/com/jpsoft/enterprise/modules/mobile/controller/DoubleHundredApiController.java

@@ -3,6 +3,7 @@ package com.jpsoft.enterprise.modules.mobile.controller;
 import com.jpsoft.enterprise.modules.base.entity.DoubleHundred;
 import com.jpsoft.enterprise.modules.base.service.DoubleHundredService;
 import com.jpsoft.enterprise.modules.common.dto.MessageResult;
+import com.jpsoft.enterprise.modules.common.utils.StringUtils;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
@@ -31,14 +32,13 @@ public class DoubleHundredApiController {
     @PostMapping("submitInformation")
     @ApiOperation(value = "个人互助信息提交")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "token", value = "令牌", required = true, paramType = "form"),
-            @ApiImplicitParam(name = "subject", value = "目标(不传)", paramType = "form"),
             @ApiImplicitParam(name = "information", value = "企业信息", required = true, paramType = "form"),
             @ApiImplicitParam(name = "person", value = "联系人", required = true, paramType = "form"),
             @ApiImplicitParam(name = "phone", value = "联系电话", required = true, paramType = "form"),
             @ApiImplicitParam(name = "introduction", value = "企业介绍", required = true, paramType = "form"),
             @ApiImplicitParam(name = "income", value = "收入", required = true, paramType = "form"),
-            @ApiImplicitParam(name = "payTaxes", value = "纳税", required = true, paramType = "form")
+            @ApiImplicitParam(name = "payTaxes", value = "纳税", required = true, paramType = "form"),
+            @ApiImplicitParam(name = "personId", value = "提交用户ID(没有则不传)", paramType = "form")
     })
     public MessageResult<Map> submitInformation(
             @RequestParam(value="information",defaultValue="") String information,
@@ -47,8 +47,7 @@ public class DoubleHundredApiController {
             @RequestParam(value="introduction",defaultValue="") String introduction,
             @RequestParam(value="income",defaultValue="") String income,
             @RequestParam(value="payTaxes",defaultValue="") String payTaxes,
-            String token,
-            @RequestAttribute String subject) {
+            @RequestParam(value="personId",defaultValue="") String personId) {
         MessageResult<Map> messageResult = new MessageResult<>();
         try {
             DoubleHundred dh = new DoubleHundred();
@@ -59,7 +58,9 @@ public class DoubleHundredApiController {
             dh.setIntroduction(introduction);
             dh.setIncome(income);
             dh.setPayTaxes(payTaxes);
-            dh.setCreateBy(subject);
+            if(StringUtils.isNotEmpty(personId)) {
+                dh.setCreateBy(personId);
+            }
             dh.setCreateTime(new Date());
             dh.setDelFlag(false);
             int num = doubleHundredService.insert(dh);