package com.wanma.baseService.ZhaoSheng.controller; import com.alibaba.fastjson.JSONObject; import com.dsideal.baseSystem.Basecontroller.BaseController; import com.dsideal.baseSystem.Interceptor.EmptyInterface; import com.dsideal.baseSystem.Interceptor.IsLoginInterface; import com.dsideal.baseSystem.Interceptor.IsNumericInterface; import com.dsideal.baseSystem.LogAction.model.LogActionModel; import com.dsideal.baseSystem.Swagger.annotation.ActionApi; import com.dsideal.baseSystem.Swagger.annotation.Api; import com.dsideal.baseSystem.Swagger.annotation.Param; import com.dsideal.baseSystem.Swagger.annotation.Params; import com.dsideal.baseSystem.Util.CommonUtil; import com.jfinal.aop.Before; import com.jfinal.ext.interceptor.GET; import com.jfinal.plugin.activerecord.Page; /** * 作者:黄海 * 时间:2019-09-11 */ public class ZhaoshengPersonTypeController extends BaseController { //实例化model ZhaoshengPersonTypeModel zhaoShengModel=new ZhaoshengPersonTypeModel(); /** * 功能:增加人员类型 * 作者:黄海 * 时间:2019-09-11 * @return */ public void addZhaoshengPersonType(String person_type_name,int sort_id) { int id=zhaoShengModel.addZhaoshengPersonType(person_type_name,sort_id); JSONObject jo=new JSONObject(); jo.put("success",true); jo.put("id",id); jo.put("message","保存成功!"); renderJson(jo); return; } /** * 功能:更新人员类型 * 作者:黄海 * 时间:2019-09-11 * @return */ public void updateZhaoshengPersonType(int person_type_id,String person_type_name,int sort_id) { zhaoShengModel.updateZhaoshengPersonType(person_type_id,person_type_name,sort_id); JSONObject jo=new JSONObject(); jo.put("success",true); jo.put("message","保存成功!"); renderJson(jo); return; } /** * 功能:删除人员类型 * 作者:黄海 * 时间:2019-09-11 * @return */ public void deleteZhaoshengPersonTypeById(int person_type_id) { zhaoShengModel.deleteZhaoshengPersonTypeById(person_type_id); JSONObject jo=new JSONObject(); jo.put("success",true); jo.put("message","保存成功!"); renderJson(jo); return; } /** * 功能:获取人员类型列表 * 作者:黄海 * 时间:2019-09-11 * @return */ public void getZhaoshengPersonTypePage(int page,int limit) { Page pageRecord = zhaoShengModel.getZhaoshengPersonTypePage(page,limit); renderJson(CommonUtil.renderJsonForLayUI(pageRecord)); return; } /** * 功能:获取人员类型某一条记录信息 * 作者:黄海 * 时间:2019-09-11 * @return */ public void getZhaoshengPersonTypeById(int person_type_id { Record record=zhaoShengModel.getZhaoshengPersonTypeById(delete_Params); renderJson(record); return; } }