Commit 8b29fd89 authored by Quxl's avatar Quxl

xx

parent dc00bb4c
......@@ -6,6 +6,7 @@ import java.util.Map;
import com.egolm.common.jdbc.Page;
import com.egolm.film.bean.Fc_admin;
import com.egolm.film.bean.Fc_admin_group;
import com.egolm.film.bean.Fc_admin_menu;
public interface AdminAuthService {
......@@ -27,4 +28,6 @@ public interface AdminAuthService {
void updateGroupAuth(Integer group_id, Integer[] menu_ids, Integer[] film_types);
void saveOrUpdateMenu(Fc_admin_menu menu);
}
......@@ -16,6 +16,7 @@ import com.egolm.film.bean.Fc_admin;
import com.egolm.film.bean.Fc_admin_group;
import com.egolm.film.bean.Fc_admin_group_filmtype;
import com.egolm.film.bean.Fc_admin_group_menu;
import com.egolm.film.bean.Fc_admin_menu;
import com.egolm.film.util.SqlWhere;
@Service
......@@ -120,4 +121,9 @@ public class AdminAuthServiceImpl implements AdminAuthService {
jdbcTemplate.batchSave(gtypeList);
}
@Override
public void saveOrUpdateMenu(Fc_admin_menu menu) {
jdbcTemplate.saveOrUpdate(menu);
}
}
......@@ -18,6 +18,7 @@ import com.egolm.film.api.service.AdminAuthService;
import com.egolm.film.api.service.AdminTokenService;
import com.egolm.film.bean.Fc_admin;
import com.egolm.film.bean.Fc_admin_group;
import com.egolm.film.bean.Fc_admin_menu;
import com.egolm.film.config.WebMvcConfig;
import com.egolm.film.config.XException;
import com.egolm.film.util.Common;
......@@ -154,30 +155,20 @@ public class AdminAuthController {
}
@ResponseBody
@PostMapping("saveMenu")
@PostMapping("saveOrUpdateMenu")
@ApiOperation("保存菜单")
@ApiImplicitParams({
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="menu_type", value="菜单类型 [0 目录, 1 菜单, 2 按钮或其他功能或页面元素]"),
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="parent_id", value="状态"),
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="order_num", value="排序顺序"),
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="menu_id", value="菜单ID"),
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="menu_type", value="菜单类型 [0 目录, 1 菜单, 2 按钮或其他功能或页面元素]"),
@ApiImplicitParam(paramType="query", dataType="int", required=true, name="parent_id", value="上级菜单ID"),
@ApiImplicitParam(paramType="query", dataType="int", required=false,name="order_num", value="排序顺序"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="menu_name", value="菜单名(显示名)"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="menu_no", value="菜单编号[英文的菜单标记,如果没有可以填VUE路由名]"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="menu_link", value="菜单连接[URI或VUE路由]"),
@ApiImplicitParam(paramType="query", dataType="string", required=true, name="menu_icon", value="菜单图标"),
})
public Object saveMenu(Integer group_id, String group_name, Integer state) {
Fc_admin_group group = new Fc_admin_group();
group.setGroup_id(group_id);
group.setGroup_name(group_name);
group.setState(state);
if(group.getGroup_id() == null) {
group.setAdminid((Integer)tokenService.getToken().getId());
String remoteIp = WebMvcConfig.getRemoteIp();
group.setUser_num(0L);
group.setCreate_ip(remoteIp);
group.setCreate_time(System.currentTimeMillis());
}
service.mergeGroup(group);
public Object saveOrUpdateMenu(Fc_admin_menu menu) {
service.saveOrUpdateMenu(menu);
return Rjx.jsonOk();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment