package com.ruoyi.web.controller.zhang;
|
|
|
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.utils.ServletUtils;
|
import com.ruoyi.domain.ZfClanManage;
|
import com.ruoyi.service.ZfClanManageService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.security.access.method.P;
|
import org.springframework.web.bind.annotation.*;
|
|
import static com.ruoyi.common.core.page.TableSupport.*;
|
|
@RestController
|
@RequestMapping("/ZfClanManage")
|
public class ZfClanManageController {
|
@Autowired
|
ZfClanManageService zfClanManageService;
|
|
@GetMapping("/all/{clanId}")
|
public AjaxResult listAll(@PathVariable Integer clanId){
|
Integer pageNo = Convert.toInt(ServletUtils.getParameter(PAGE_NO), 1);
|
Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10);
|
return zfClanManageService.selectDataList(clanId, pageNo, pageSize);
|
}
|
|
/**
|
* 新增家族成员
|
*/
|
@Log(title = "家族管理", businessType = BusinessType.INSERT)
|
@PostMapping
|
public AjaxResult add(@RequestBody ZfClanManage zfClanManage)
|
{
|
return zfClanManageService.addData(zfClanManage);
|
}
|
|
|
/**
|
* 批量删除家族成员
|
*/
|
@Log(title = "家族管理", businessType = BusinessType.DELETE)
|
@DeleteMapping("/{clanId}/{id}")
|
public AjaxResult remove(@PathVariable Integer id, @PathVariable Integer clanId) {
|
return zfClanManageService.deleteData(clanId,id);
|
}
|
}
|