com.base4j.mvc.sys.controller.SysParamController Maven / Gradle / Ivy
The newest version!
package com.base4j.mvc.sys.controller;
import com.base4j.mvc.annotation.AutoLog;
import com.base4j.mvc.base.controller.BaseController;
import com.base4j.mvc.base.service.BaseService;
import com.base4j.mvc.sys.entity.SysDept;
import com.base4j.mvc.sys.entity.SysParam;
import com.base4j.mvc.sys.service.SysParamService;
import com.base4j.mvc.util.Res;
import com.base4j.mybatis.base.QueryParams;
import com.base4j.mybatis.tool.NullUtil;
import com.github.pagehelper.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import java.util.HashMap;
import java.util.Map;
@RequestMapping("sys/param")
@RestController
public class SysParamController extends BaseController {
@Autowired
SysParamService sysParamService;
/**
* 该功能用于激活用户
* @param id 主键
* @param active 是否激活
* @return Res
*/
@AutoLog("修改用户激活状态")
@RequestMapping("/updateActiveByPrimaryKey/{id}/{active}")
public Res updateActiveByPrimaryKey(@PathVariable long id, @PathVariable long active) {
sysParamService.updateActiveByPrimaryKey(id, active);
return Res.ok();
}
}