2124
This commit is contained in:
@@ -77,6 +77,7 @@ public class ScoreRoomDetailController extends BaseController
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ScoreRoomDetail scoreRoomDetail)
|
||||
{
|
||||
System.out.println(scoreRoomDetail);
|
||||
return toAjax(scoreRoomDetailService.insertScoreRoomDetail(scoreRoomDetail));
|
||||
}
|
||||
|
||||
@@ -88,6 +89,8 @@ public class ScoreRoomDetailController extends BaseController
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ScoreRoomDetail scoreRoomDetail)
|
||||
{
|
||||
|
||||
System.out.println(scoreRoomDetail);
|
||||
return toAjax(scoreRoomDetailService.updateScoreRoomDetail(scoreRoomDetail));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.ruoyi.system.controller;
|
||||
package com.ruoyi.web.controller.scoring;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -77,6 +77,7 @@ public class ScoreUserController extends BaseController
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ScoreUser scoreUser)
|
||||
{
|
||||
System.out.println(scoreUser);
|
||||
return toAjax(scoreUserService.insertScoreUser(scoreUser));
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.web.controller.scoring;
|
||||
|
||||
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.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.system.domain.ScoringAdomain;
|
||||
import com.ruoyi.system.service.IScoringAdomainService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 测试Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/adomain")
|
||||
public class ScoringAdomainController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IScoringAdomainService scoringAdomainService;
|
||||
|
||||
/**
|
||||
* 查询测试列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:adomain:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ScoringAdomain scoringAdomain)
|
||||
{
|
||||
startPage();
|
||||
List<ScoringAdomain> list = scoringAdomainService.selectScoringAdomainList(scoringAdomain);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出测试列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:adomain:export')")
|
||||
@Log(title = "测试", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ScoringAdomain scoringAdomain)
|
||||
{
|
||||
List<ScoringAdomain> list = scoringAdomainService.selectScoringAdomainList(scoringAdomain);
|
||||
ExcelUtil<ScoringAdomain> util = new ExcelUtil<ScoringAdomain>(ScoringAdomain.class);
|
||||
util.exportExcel(response, list, "测试数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取测试详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:adomain:query')")
|
||||
@GetMapping(value = "/{name}")
|
||||
public AjaxResult getInfo(@PathVariable("name") String name)
|
||||
{
|
||||
return success(scoringAdomainService.selectScoringAdomainByName(name));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增测试
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:adomain:add')")
|
||||
@Log(title = "测试", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ScoringAdomain scoringAdomain)
|
||||
{
|
||||
return toAjax(scoringAdomainService.insertScoringAdomain(scoringAdomain));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改测试
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:adomain:edit')")
|
||||
@Log(title = "测试", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ScoringAdomain scoringAdomain)
|
||||
{
|
||||
return toAjax(scoringAdomainService.updateScoringAdomain(scoringAdomain));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除测试
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:adomain:remove')")
|
||||
@Log(title = "测试", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{names}")
|
||||
public AjaxResult remove(@PathVariable String[] names)
|
||||
{
|
||||
return toAjax(scoringAdomainService.deleteScoringAdomainByNames(names));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
-- 创建scoring_adomain表
|
||||
CREATE TABLE IF NOT EXISTS scoring_adomain (
|
||||
id BIGINT AUTO_INCREMENT PRIMARY KEY COMMENT '主键ID',
|
||||
name VARCHAR(255) DEFAULT NULL COMMENT '名称',
|
||||
age INT DEFAULT NULL COMMENT '年龄',
|
||||
create_by VARCHAR(64) DEFAULT '' COMMENT '创建者',
|
||||
create_time DATETIME DEFAULT NULL COMMENT '创建时间',
|
||||
update_by VARCHAR(64) DEFAULT '' COMMENT '更新者',
|
||||
update_time DATETIME DEFAULT NULL COMMENT '更新时间',
|
||||
remark VARCHAR(500) DEFAULT NULL COMMENT '备注'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='计分系统域名表';
|
||||
|
||||
-- 插入示例数据
|
||||
INSERT INTO scoring_adomain (name, age) VALUES ('测试名称', 25) ON DUPLICATE KEY UPDATE name='测试名称', age=25;
|
||||
Reference in New Issue
Block a user