parent
aabf4510e0
commit
7e0b7e4b2a
@ -0,0 +1,71 @@
|
|||||||
|
package com.xjs.srb.core.controller.admin;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.log.annotation.Log;
|
||||||
|
import com.ruoyi.common.log.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||||
|
import com.xjs.srb.core.entity.IntegralGrade;
|
||||||
|
import com.xjs.srb.core.service.IIntegralGradeService;
|
||||||
|
import com.xjs.web.MyBaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 积分等级表 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xiejs
|
||||||
|
* @since 2022-02-28
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/admin/core/integralGrade")
|
||||||
|
@Api(tags = "尚融宝-积分管理")
|
||||||
|
public class IntegralGradeController extends MyBaseController<IntegralGrade> {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IIntegralGradeService integralGradeService;
|
||||||
|
|
||||||
|
@GetMapping("/list")
|
||||||
|
@ApiOperation("获取积分等级列表")
|
||||||
|
@RequiresPermissions("srb:integralGrade:list")
|
||||||
|
public AjaxResult listAll() {
|
||||||
|
return AjaxResult.success(integralGradeService.list());
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/remove/{id}")
|
||||||
|
@ApiOperation("根据id删除积分等级")
|
||||||
|
@RequiresPermissions("srb:integralGrade:remove")
|
||||||
|
@Log(title = "融-积分管理", businessType = BusinessType.DELETE)
|
||||||
|
public AjaxResult removeId(@PathVariable Long id) {
|
||||||
|
return toAjax(integralGradeService.removeById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("get/{id}")
|
||||||
|
@ApiOperation("根据id获取积分等级")
|
||||||
|
@RequiresPermissions("srb:integralGrade:query")
|
||||||
|
public AjaxResult getById(@PathVariable Long id) {
|
||||||
|
return AjaxResult.success(integralGradeService.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("update")
|
||||||
|
@ApiOperation("根据id更新积分等级")
|
||||||
|
@RequiresPermissions("srb:integralGrade:update")
|
||||||
|
public AjaxResult updateById(IntegralGrade integralGrade) {
|
||||||
|
return toAjax(integralGradeService.updateById(integralGrade));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("save")
|
||||||
|
@ApiOperation("保存积分等级")
|
||||||
|
@RequiresPermissions("srb:integralGrade:save")
|
||||||
|
public AjaxResult save(IntegralGrade integralGrade) {
|
||||||
|
return toAjax(integralGradeService.save(integralGrade));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
|||||||
|
package com.xjs.srb.core.mapper;
|
||||||
|
|
||||||
|
import com.xjs.srb.core.entity.IntegralGrade;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 积分等级表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xiejs
|
||||||
|
* @since 2022-02-28
|
||||||
|
*/
|
||||||
|
public interface IntegralGradeMapper extends BaseMapper<IntegralGrade> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
package com.xjs.srb.core.service;
|
||||||
|
|
||||||
|
import com.xjs.srb.core.entity.IntegralGrade;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 积分等级表 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xiejs
|
||||||
|
* @since 2022-02-28
|
||||||
|
*/
|
||||||
|
public interface IIntegralGradeService extends IService<IntegralGrade> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
package com.xjs.srb.core.service.impl;
|
||||||
|
|
||||||
|
import com.xjs.srb.core.entity.IntegralGrade;
|
||||||
|
import com.xjs.srb.core.mapper.IntegralGradeMapper;
|
||||||
|
import com.xjs.srb.core.service.IIntegralGradeService;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 积分等级表 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xiejs
|
||||||
|
* @since 2022-02-28
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class IntegralGradeServiceImpl extends ServiceImpl<IntegralGradeMapper, IntegralGrade> implements IIntegralGradeService {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.xjs.srb.core.mapper.IntegralGradeMapper">
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in new issue