package com.ideabobo.controller;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import com.ideabobo.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.util.ResourceUtils;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import com.alibaba.fastjson.JSON;
import com.ideabobo.model.Dbservice;
import com.ideabobo.model.Dbtablemapping;
import com.ideabobo.service.DatabaseService;
@CrossOrigin(origins="*")
@Controller
@RequestMapping(value = "/database")
public class DatabaseController {
//private static final Logger logger = Logger.getLogger(DatabaseController.class);
@Autowired
private DatabaseService databaseService;
@RequestMapping(value = "/list", produces = "application/json; charset=utf-8", method = { RequestMethod.GET,
RequestMethod.POST })
@ResponseBody
public List<Map<String,Object>> list(HttpServletRequest req) {
Dbservice dbm = new Dbservice(databaseService);
String table = Dbservice.getTableName(req.getParameter("table"));
Object objectObj = Common.getByRequest(Dbtablemapping.getModelByTable(table), req, false);
//Robj robj = new Robj();
List<Map<String,Object>> list = null;
try {
String sql = dbm.list(table,objectObj,null);
list = databaseService.find(sql);
} catch (Exception e) {
e.printStackTrace();
}
return list;
}
@RequestMapping(value = "/listJ", produces = "text/plain; charset=utf-8", method = { RequestMethod.GET,
RequestMethod.POST })
@ResponseBody
public String listJ(HttpServletRequest req) {
Dbservice dbm = new Dbservice(databaseService);
String table = Dbservice.getTableName(req.getParameter("table"));
Object objectObj = Common.getByRequest(Dbtablemapping.getModelByTable(table), req, false);
//Robj robj = new Robj();
List<Map<String,Object>> list = null;
try {
String ordersql = null;
String sort = req.getParameter("sort");
String order = req.getParameter("order");
if (StringUtil.isNotNullOrEmpty(order)&&StringUtil.isNotNullOrEmpty(sort)){
ordersql = " order by "+sort+" "+order;
}
String sql = dbm.list(table,objectObj,ordersql);
list = databaseService.find(sql);
} catch (Exception e) {
e.printStackTrace();
}
return renderJsonp(list, req);
}
@RequestMapping(value = "/find", produces = "application/json; charset=utf-8", method = { RequestMethod.GET,
RequestMethod.POST })
@ResponseBody
public Map<String,Object> find(HttpServletRequest req) {
Dbservice dbm = new Dbservice(databaseService);
String table = Dbservice.getTableName(req.getParameter("table"));
Object objectObj = Common.getByRequest(Dbtablemapping.getModelByTable(table), req, false);
//Robj robj = new Robj();
List<Map<String,Object>> list = null;
try {
String sql = dbm.list(table,objectObj,true);
list = databaseService.find(sql);
} catch (Exception e) {
e.printStackTrace();
}
if (list!=null && list.size()>0) {
return list.get(0);
}else{
return null;
}
}
@RequestMapping(value = "/findJ", produces = "text/plain; charset=utf-8", method = { RequestMethod.GET,
RequestMethod.POST })
@ResponseBody
public String findJ(HttpServletRequest req) {
Dbservice dbm = new Dbservice(databaseService);
String table = Dbservice.getTableName(req.getParameter("table"));
Object objectObj = Common.getByRequest(Dbtablemapping.getModelByTable(table), req, false);
//Robj robj = new Robj();
List<Map<String,Object>> list = null;
try {
String sql = dbm.list(table,objectObj,true);
list = databaseService.find(sql);
} catch (Exception e) {
e.printStackTrace();
}
if (list!=null && list.size()>0) {
return renderJsonp(list.get(0), req);
}else{
return renderJsonp(null, req);
}
}
@RequestMapping(value = "/listApp", produces = "application/json; charset=utf-8", method = { RequestMethod.GET,
RequestMethod.POST })
@ResponseBody
public List<Map<String,Object>> listApp(HttpServletRequest req) {
Dbservice dbm = new Dbservice(databaseService);
String table = Dbservice.getTableName(req.getParameter("table"));
//Robj robj = new Robj();
List<Map<String,Object>> list = null;
try {
String object = req.getParameter("object");
//if(StringUtil.isNotNullOrEmpty(object)){
Object objectObj = Dbtablemapping.parseStringModel(object, table);
String sql = dbm.list(table,objectObj,null);
list = databaseService.find(sql);
//robj.setData(databaseService.find(sql));
//}
} catch (Exception e) {
e.printStackTrace();
}
return list;
}
@RequestMapping(value = "/listC", produces = "text/plain; charset=utf-8", method = { RequestMethod.GET,
RequestMethod.POST })
@ResponseBody
public String listC(HttpServletRequest req) {
Dbservice dbm = new Dbservice(databaseService);
String table = Dbservice.getTableName(req.getParameter("table"));
//Robj robj = new Robj();
List<Map<String,Object>> list = null;
try {
String object = req.getParameter("object");
//if(StringUtil.isNotNullOrEmpty(object)){
Object objectObj = Dbtablemapping.parseStringModel(object, table);
String sql = dbm.list(table,objectObj,null);
list = databaseService.find(sql);
//robj.setData(databaseService.find(sql));
//}
} catch (Exception e) {
e.printStackTrace();
}
return renderJsonp(list, req);
}
@RequestMapping(value = "/findApp", produces = "application/json; charset=utf-8", method = { RequestMethod.GET,
RequestMethod.POST })
@ResponseBody
public Map<String,Object> findApp(HttpServletRequest req) {
Dbservice dbm = new Dbservice(databaseService);
String table = Dbservice.getTableName(req.getParameter("table"));
//Robj robj = new Robj();
List<Map<String,Object>> list = null;
try {
String object = req.getParameter("object");
//if(StringUtil.isNotNullOrEmpty(object)){
Object objectObj = Dbtablemapping.parseStringModel(object, table);
String sql = dbm.list(table,objectObj,null);
list = databaseService.find(sql);
//robj.setData(databaseService.find(sql));
//}
} catch (Exception e) {
e.printStackTrace();
}
if (list!=null && list.size()>0) {
return list.get(0);
}else{
return null;
}
}
@RequestMapping(value = "/findC", produces = "text/plain; charset=utf-8", method = { RequestMethod.GET,
RequestMethod.POST })
@ResponseBody
public String findC(HttpServletRequest req) {
Dbservice dbm = new Dbservice(databaseService);
String table = Dbservice.getTableName(req.getParameter("table"));
//Robj robj = new Robj();
List<Map<String,Object>> list = null;
try {
String object = req.getParameter("object");
//if(StringUtil.isNotNullOrEmpty(object)){
Object objectObj = Dbtablemapping.parseStringModel(object, table);
String sql = dbm.list(table,objectObj,null);
list = databaseService.find(sql);
//robj.setData(databaseService.find(sql));
//}
} catch (Exception e) {
e.printStackTrace();
}
if (list!=null && list.size()>0) {
return renderJsonp(list.get(0), req);
}else{
return renderJsonp(
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
功能说明: 手机客户端 1.底部导航栏:推荐 影片 购物车 我的 2.推荐:一些新上的影片(为用户提供最新的电影资讯,实时了解最新上演的电影是什么) 3.影片:顶部做一个搜索栏和一个分类展开按钮,可以直接通过搜索查找也可以通过分类自己查找,对于每一部影片可以查看价格简介,对影片可以收藏分享,可以在影片下评论,可以把影片加入到购物车中,影片购买后可以下载 4.购物车:做一个可以对添加的影片进行删除和购买 5.用户 用户的注册与登录 账号与安全(账号密码的修改) 消息(平台通知)观看历史 收藏栏 下载栏 钱包栏(充值,剩余金额,提现) App版本号 后台管理 系统设置、用户管理、财务管理、商城管理、影片管理、消息管理、订单管理。 环境说明: 开发语言:Java JDK版本:JDK1.8 数据库:mysql 5.7及以上 数据库工具:Navicat11及以上 开发软件:eclipse/idea 安卓框架:uniapp 安卓开发软件:HBuilder X 开发模式:混合开发
资源推荐
资源详情
资源评论
收起资源包目录
【安卓毕业设计】基于andriod的网上影院app的设计与实现源码(完整前后端+mysql+说明文档+LW).zip (2000个子文件)
resources.ap_ 2.75MB
Shoppay2021video_ssm2Client.apk 3.33MB
gradlew.bat 2KB
jarlist.cache 120B
MyObj.class 13KB
FileTool.class 11KB
Plugs.class 7KB
BaiduLocation.class 3KB
BaiduLocation$MyLocationListener.class 2KB
Command.class 2KB
MainActivity.class 2KB
MyObj$1.class 1017B
SessionStorage.class 950B
R.class 471B
R$string.class 466B
R$drawable.class 394B
R$xml.class 381B
BuildConfig.class 341B
R$attr.class 334B
.classpath 475B
jquery.mobile-1.4.5.css 234KB
jquery.mobile-1.4.5.css 234KB
jquery.mobile.inline-svg-1.4.5.css 222KB
jquery.mobile.inline-svg-1.4.5.css 222KB
jquery.mobile-1.4.5.min.css 203KB
jquery.mobile-1.4.5.min.css 203KB
jquery.mobile-1.4.5.min.css 203KB
jquery.mobile-1.4.5.min.css 203KB
jquery.mobile-1.4.3.min.css 202KB
jquery.mobile-1.4.3.min.css 202KB
jquery.mobile.inline-svg-1.4.5.min.css 191KB
jquery.mobile.inline-svg-1.4.5.min.css 191KB
jquery.mobile.flatui.css 163KB
jquery.mobile.flatui.css 163KB
jquery.mobile.inline-png-1.4.5.css 146KB
jquery.mobile.inline-png-1.4.5.css 146KB
jquery.mobile.icons-1.4.5.css 126KB
jquery.mobile.icons-1.4.5.css 126KB
jquery.mobile.icons.min.css 124KB
jquery.mobile.icons-1.4.5.min.css 124KB
jquery.mobile.icons.min.css 124KB
jquery.mobile.icons.min.css 124KB
jquery.mobile.icons-1.4.5.min.css 124KB
jquery.mobile.icons.min.css 124KB
jquery.mobile.skyd-1.4.5.css 120KB
jquery.mobile.skyd-1.4.5.css 120KB
skyd.css 120KB
skyd.css 120KB
jquery.mobile.external-png-1.4.5.css 119KB
jquery.mobile.external-png-1.4.5.css 119KB
jquery.mobile.inline-png-1.4.5.min.css 115KB
jquery.mobile.inline-png-1.4.5.min.css 115KB
jquery.mobile.structure-1.4.5.css 89KB
jquery.mobile.structure-1.4.5.css 89KB
jquery.mobile.external-png-1.4.5.min.css 89KB
jquery.mobile.external-png-1.4.5.min.css 89KB
jquery.mobile.skyd-1.4.5.min.css 80KB
jquery.mobile.skyd-1.4.5.min.css 80KB
skyd.min.css 80KB
skyd.min.css 80KB
layui.css 71KB
jquery.mobile.structure-1.4.5.min.css 67KB
jquery.mobile.structure-1.4.5.min.css 67KB
theme-classic.css 67KB
theme-classic.css 67KB
easyui.css 59KB
easyui.css 58KB
easyui.css 51KB
easyui.css 51KB
easyui.css 51KB
easyui.css 50KB
easyui.css 50KB
easyui.css 50KB
easyui.css 50KB
easyui.css 47KB
easyui.css 47KB
easyui.css 47KB
easyui.css 47KB
easyui.css 47KB
easyui.css 47KB
easyui.css 47KB
font-awesome.css 37KB
font-awesome.css 37KB
font-awesome.css 32KB
font-awesome.min.css 30KB
font-awesome.min.css 30KB
font-awesome.min.css 27KB
style.css 23KB
layuimini.css 20KB
jquery.mobile.theme-1.4.5.css 19KB
jquery.mobile.theme-1.4.5.css 19KB
animations.css 18KB
wangEditor.css 17KB
wangEditor.css 17KB
swiper-3.3.1.min.css 17KB
swiper-3.3.1.min.css 17KB
wangEditor.min.css 15KB
wangEditor.min.css 15KB
layer.css 14KB
index.css 12KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
风月歌
- 粉丝: 1643
- 资源: 3307
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功