mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
update 会员组
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
package com.jsowell.pile.controller;
|
||||
|
||||
import com.jsowell.common.annotation.Log;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.common.core.page.TableDataInfo;
|
||||
import com.jsowell.common.enums.BusinessType;
|
||||
import com.jsowell.common.util.poi.ExcelUtil;
|
||||
import com.jsowell.pile.domain.MemberGroup;
|
||||
import com.jsowell.pile.service.MemberGroupService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 会员组Controller
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2023-12-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/member/memberGroup")
|
||||
public class MemberGroupController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private MemberGroupService memberGroupService;
|
||||
|
||||
/**
|
||||
* 查询会员组列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('member:memberGroup:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MemberGroup memberGroup)
|
||||
{
|
||||
startPage();
|
||||
List<MemberGroup> list = memberGroupService.selectMemberGroupList(memberGroup);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出会员组列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('member:memberGroup:export')")
|
||||
@Log(title = "会员组", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MemberGroup memberGroup)
|
||||
{
|
||||
List<MemberGroup> list = memberGroupService.selectMemberGroupList(memberGroup);
|
||||
ExcelUtil<MemberGroup> util = new ExcelUtil<MemberGroup>(MemberGroup.class);
|
||||
util.exportExcel(response, list, "会员组数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员组详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('member:memberGroup:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(memberGroupService.selectMemberGroupById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增会员组
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('member:memberGroup:add')")
|
||||
@Log(title = "会员组", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MemberGroup memberGroup)
|
||||
{
|
||||
return toAjax(memberGroupService.insertMemberGroup(memberGroup));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改会员组
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('member:memberGroup:edit')")
|
||||
@Log(title = "会员组", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MemberGroup memberGroup)
|
||||
{
|
||||
return toAjax(memberGroupService.updateMemberGroup(memberGroup));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除会员组
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('member:memberGroup:remove')")
|
||||
@Log(title = "会员组", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(memberGroupService.deleteMemberGroupByIds(ids));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user