前端::vue
后端::springboot +mysql8.0+mybatisplus+redis6.0
目前所使用的技术都是在当今企业,主流的技术栈,SpringBoot框架没有过多的繁杂的配置,能够实现快速开发,
通过Mysql8.0优化之后,优化了数据的存储,对于经常性不变的数据,通过使用redis作为缓存…
如果大家感兴趣,可以联系我哦!
package com.stum.web.controller.stum;
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.stum.common.annotation.Log;
import com.stum.common.core.controller.baseController;
import com.stum.common.core.domain.AjaxResult;
import com.stum.common.enums.BusinessType;
import com.stum.web.domain.TbAdmin;
import com.stum.web.service.ITbAdminService;
import com.stum.common.utils.poi.ExcelUtil;
import com.stum.common.core.page.TableDataInfo;
@RestController
@RequestMapping("/system/admin")
public class TbAdminController extends baseController
{
@Autowired
private ITbAdminService tbAdminService;
@PreAuthorize("@ss.hasPermi('system:admin:list')")
@GetMapping("/list")
public TableDataInfo list(TbAdmin tbAdmin)
{
startPage();
List list = tbAdminService.selectTbAdminList(tbAdmin);
return getDataTable(list);
}
@PreAuthorize("@ss.hasPermi('system:admin:export')")
@Log(title = "管理员", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TbAdmin tbAdmin)
{
List list = tbAdminService.selectTbAdminList(tbAdmin);
ExcelUtil util = new ExcelUtil(TbAdmin.class);
util.exportExcel(response, list, "管理员数据");
}
@PreAuthorize("@ss.hasPermi('system:admin:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tbAdminService.selectTbAdminById(id));
}
@PreAuthorize("@ss.hasPermi('system:admin:add')")
@Log(title = "管理员", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TbAdmin tbAdmin)
{
return toAjax(tbAdminService.insertTbAdmin(tbAdmin));
}
@PreAuthorize("@ss.hasPermi('system:admin:edit')")
@Log(title = "管理员", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TbAdmin tbAdmin)
{
return toAjax(tbAdminService.updateTbAdmin(tbAdmin));
}
@PreAuthorize("@ss.hasPermi('system:admin:remove')")
@Log(title = "管理员", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tbAdminService.deleteTbAdminByIds(ids));
}
}
欢迎大家来交流学习



