|
|
|
@ -1,25 +1,19 @@
|
|
|
|
package com.ruoyi.szxc.controller;
|
|
|
|
package com.ruoyi.szxc.controller;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
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 com.ruoyi.common.annotation.Log;
|
|
|
|
import com.ruoyi.common.annotation.Log;
|
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
|
|
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
|
import com.ruoyi.common.enums.BusinessType;
|
|
|
|
import com.ruoyi.common.enums.BusinessType;
|
|
|
|
|
|
|
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
|
import com.ruoyi.szxc.domain.SzxcPublicActivily;
|
|
|
|
import com.ruoyi.szxc.domain.SzxcPublicActivily;
|
|
|
|
import com.ruoyi.szxc.service.ISzxcPublicActivilyService;
|
|
|
|
import com.ruoyi.szxc.service.ISzxcPublicActivilyService;
|
|
|
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 公益活动Controller
|
|
|
|
* 公益活动Controller
|
|
|
|
@ -77,6 +71,11 @@ public class SzxcPublicActivilyController extends BaseController
|
|
|
|
@PostMapping
|
|
|
|
@PostMapping
|
|
|
|
public AjaxResult add(@RequestBody SzxcPublicActivily szxcPublicActivily)
|
|
|
|
public AjaxResult add(@RequestBody SzxcPublicActivily szxcPublicActivily)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
//根据前端传递过来的部门存储,如果没传则存储当前用户的部门
|
|
|
|
|
|
|
|
if(szxcPublicActivily.getDeptId()==null){
|
|
|
|
|
|
|
|
szxcPublicActivily.setDeptId(getDeptId());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
szxcPublicActivily.setUserId(getUserId());
|
|
|
|
return toAjax(szxcPublicActivilyService.insertSzxcPublicActivily(szxcPublicActivily));
|
|
|
|
return toAjax(szxcPublicActivilyService.insertSzxcPublicActivily(szxcPublicActivily));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|