|
@@ -1,17 +1,17 @@
|
|
|
package com.ruoyi.web.work.controller;
|
|
|
|
|
|
-import com.ruoyi.common.annotation.Log;
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
-import com.ruoyi.common.enums.BusinessType;
|
|
|
import com.ruoyi.web.work.domain.Record;
|
|
|
import com.ruoyi.web.work.service.IRecordService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
-import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -28,6 +28,7 @@ public class RecordController extends BaseController {
|
|
|
@PreAuthorize("@ss.hasPermi('work:record:list')")
|
|
|
@GetMapping("/list")
|
|
|
public TableDataInfo list(Record record){
|
|
|
+ record.setCompanyId(getLoginUser().getUser().getCompanyId());
|
|
|
startPage();
|
|
|
List<Record> list = recordService.selectList(record);
|
|
|
return getDataTable(list);
|
|
@@ -39,24 +40,4 @@ public class RecordController extends BaseController {
|
|
|
return AjaxResult.success(recordService.getById(id));
|
|
|
}
|
|
|
|
|
|
- @PreAuthorize("@ss.hasPermi('work:record:add')")
|
|
|
- @Log(title = "资金交易记录", businessType = BusinessType.INSERT)
|
|
|
- @PostMapping("/add")
|
|
|
- public AjaxResult add(@RequestBody Record record){
|
|
|
- return toAjax(recordService.save(record));
|
|
|
- }
|
|
|
-
|
|
|
- @PreAuthorize("@ss.hasPermi('work:record:edit')")
|
|
|
- @Log(title = "资金交易记录", businessType = BusinessType.UPDATE)
|
|
|
- @PostMapping("/edit")
|
|
|
- public AjaxResult edit(@RequestBody Record record){
|
|
|
- return toAjax(recordService.updateById(record));
|
|
|
- }
|
|
|
-
|
|
|
- @PreAuthorize("@ss.hasPermi('work:record:remove')")
|
|
|
- @Log(title = "资金交易记录", businessType = BusinessType.DELETE)
|
|
|
- @GetMapping("/remove/{ids}")
|
|
|
- public AjaxResult remove(@PathVariable Long[] ids){
|
|
|
- return toAjax(recordService.removeByIds(Arrays.asList(ids)));
|
|
|
- }
|
|
|
}
|