用户对接
This commit is contained in:
parent
ba1ea1439a
commit
79a3144056
|
|
@ -0,0 +1,100 @@
|
||||||
|
package com.dkl.large.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.dkl.large.domain.DklHolidays;
|
||||||
|
import com.dkl.large.service.IDklHolidaysService;
|
||||||
|
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.dkl.common.annotation.Log;
|
||||||
|
import com.dkl.common.core.controller.BaseController;
|
||||||
|
import com.dkl.common.core.domain.AjaxResult;
|
||||||
|
import com.dkl.common.enums.BusinessType;
|
||||||
|
|
||||||
|
import com.dkl.common.utils.poi.ExcelUtil;
|
||||||
|
import com.dkl.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节假日信息Controller
|
||||||
|
*
|
||||||
|
* @author Dkl
|
||||||
|
* @date 2025-11-03
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/large/holidays")
|
||||||
|
public class DklHolidaysController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IDklHolidaysService dklHolidaysService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询节假日信息列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(DklHolidays dklHolidays)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<DklHolidays> list = dklHolidaysService.selectDklHolidaysList(dklHolidays);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出节假日信息列表
|
||||||
|
*/
|
||||||
|
@Log(title = "节假日信息", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, DklHolidays dklHolidays)
|
||||||
|
{
|
||||||
|
List<DklHolidays> list = dklHolidaysService.selectDklHolidaysList(dklHolidays);
|
||||||
|
ExcelUtil<DklHolidays> util = new ExcelUtil<DklHolidays>(DklHolidays.class);
|
||||||
|
util.exportExcel(response, list, "节假日信息数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取节假日信息详细信息
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(dklHolidaysService.selectDklHolidaysById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增节假日信息
|
||||||
|
*/
|
||||||
|
@Log(title = "节假日信息", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody DklHolidays dklHolidays)
|
||||||
|
{
|
||||||
|
return toAjax(dklHolidaysService.insertDklHolidays(dklHolidays));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改节假日信息
|
||||||
|
*/
|
||||||
|
@Log(title = "节假日信息", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody DklHolidays dklHolidays)
|
||||||
|
{
|
||||||
|
return toAjax(dklHolidaysService.updateDklHolidays(dklHolidays));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除节假日信息
|
||||||
|
*/
|
||||||
|
@Log(title = "节假日信息", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(dklHolidaysService.deleteDklHolidaysByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue