增加创建者与更新者的获取

This commit is contained in:
liumingxiy 2024-11-12 08:52:46 +08:00
parent ed19d0cfd7
commit 2e6403fdee

View File

@ -2,6 +2,7 @@ package com.ktg.mes.md.controller;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -29,8 +30,7 @@ import com.ktg.common.core.page.TableDataInfo;
*/ */
@RestController @RestController
@RequestMapping("/md/CONFIGURE") @RequestMapping("/md/CONFIGURE")
public class WmsInventoryConfigureController extends BaseController public class WmsInventoryConfigureController extends BaseController {
{
@Autowired @Autowired
private IWmsInventoryConfigureService wmsInventoryConfigureService; private IWmsInventoryConfigureService wmsInventoryConfigureService;
@ -39,8 +39,7 @@ public class WmsInventoryConfigureController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('md:CONFIGURE:list')") @PreAuthorize("@ss.hasPermi('md:CONFIGURE:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(WmsInventoryConfigure wmsInventoryConfigure) public TableDataInfo list(WmsInventoryConfigure wmsInventoryConfigure) {
{
startPage(); startPage();
List<WmsInventoryConfigure> list = wmsInventoryConfigureService.selectWmsInventoryConfigureList(wmsInventoryConfigure); List<WmsInventoryConfigure> list = wmsInventoryConfigureService.selectWmsInventoryConfigureList(wmsInventoryConfigure);
return getDataTable(list); return getDataTable(list);
@ -52,8 +51,7 @@ public class WmsInventoryConfigureController extends BaseController
@PreAuthorize("@ss.hasPermi('md:CONFIGURE:export')") @PreAuthorize("@ss.hasPermi('md:CONFIGURE:export')")
@Log(title = "盘点计划配置", businessType = BusinessType.EXPORT) @Log(title = "盘点计划配置", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, WmsInventoryConfigure wmsInventoryConfigure) public void export(HttpServletResponse response, WmsInventoryConfigure wmsInventoryConfigure) {
{
List<WmsInventoryConfigure> list = wmsInventoryConfigureService.selectWmsInventoryConfigureList(wmsInventoryConfigure); List<WmsInventoryConfigure> list = wmsInventoryConfigureService.selectWmsInventoryConfigureList(wmsInventoryConfigure);
ExcelUtil<WmsInventoryConfigure> util = new ExcelUtil<WmsInventoryConfigure>(WmsInventoryConfigure.class); ExcelUtil<WmsInventoryConfigure> util = new ExcelUtil<WmsInventoryConfigure>(WmsInventoryConfigure.class);
util.exportExcel(response, list, "盘点计划配置数据"); util.exportExcel(response, list, "盘点计划配置数据");
@ -64,8 +62,7 @@ public class WmsInventoryConfigureController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('md:CONFIGURE:query')") @PreAuthorize("@ss.hasPermi('md:CONFIGURE:query')")
@GetMapping(value = "/{wmsInventoryConfigureId}") @GetMapping(value = "/{wmsInventoryConfigureId}")
public AjaxResult getInfo(@PathVariable("wmsInventoryConfigureId") Long wmsInventoryConfigureId) public AjaxResult getInfo(@PathVariable("wmsInventoryConfigureId") Long wmsInventoryConfigureId) {
{
return AjaxResult.success(wmsInventoryConfigureService.selectWmsInventoryConfigureByWmsInventoryConfigureId(wmsInventoryConfigureId)); return AjaxResult.success(wmsInventoryConfigureService.selectWmsInventoryConfigureByWmsInventoryConfigureId(wmsInventoryConfigureId));
} }
@ -75,8 +72,8 @@ public class WmsInventoryConfigureController extends BaseController
@PreAuthorize("@ss.hasPermi('md:CONFIGURE:add')") @PreAuthorize("@ss.hasPermi('md:CONFIGURE:add')")
@Log(title = "盘点计划配置", businessType = BusinessType.INSERT) @Log(title = "盘点计划配置", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody WmsInventoryConfigure wmsInventoryConfigure) public AjaxResult add(@RequestBody WmsInventoryConfigure wmsInventoryConfigure) {
{ wmsInventoryConfigure.setCreateBy(getUsername());
return toAjax(wmsInventoryConfigureService.insertWmsInventoryConfigure(wmsInventoryConfigure)); return toAjax(wmsInventoryConfigureService.insertWmsInventoryConfigure(wmsInventoryConfigure));
} }
@ -86,8 +83,8 @@ public class WmsInventoryConfigureController extends BaseController
@PreAuthorize("@ss.hasPermi('md:CONFIGURE:edit')") @PreAuthorize("@ss.hasPermi('md:CONFIGURE:edit')")
@Log(title = "盘点计划配置", businessType = BusinessType.UPDATE) @Log(title = "盘点计划配置", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody WmsInventoryConfigure wmsInventoryConfigure) public AjaxResult edit(@RequestBody WmsInventoryConfigure wmsInventoryConfigure) {
{ wmsInventoryConfigure.setUpdateBy(getUsername());
return toAjax(wmsInventoryConfigureService.updateWmsInventoryConfigure(wmsInventoryConfigure)); return toAjax(wmsInventoryConfigureService.updateWmsInventoryConfigure(wmsInventoryConfigure));
} }
@ -97,8 +94,7 @@ public class WmsInventoryConfigureController extends BaseController
@PreAuthorize("@ss.hasPermi('md:CONFIGURE:remove')") @PreAuthorize("@ss.hasPermi('md:CONFIGURE:remove')")
@Log(title = "盘点计划配置", businessType = BusinessType.DELETE) @Log(title = "盘点计划配置", businessType = BusinessType.DELETE)
@DeleteMapping("/{wmsInventoryConfigureIds}") @DeleteMapping("/{wmsInventoryConfigureIds}")
public AjaxResult remove(@PathVariable Long[] wmsInventoryConfigureIds) public AjaxResult remove(@PathVariable Long[] wmsInventoryConfigureIds) {
{
return toAjax(wmsInventoryConfigureService.deleteWmsInventoryConfigureByWmsInventoryConfigureIds(wmsInventoryConfigureIds)); return toAjax(wmsInventoryConfigureService.deleteWmsInventoryConfigureByWmsInventoryConfigureIds(wmsInventoryConfigureIds));
} }
} }