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);
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 sql = dbm.list(table,objectObj);
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);
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);
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);
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);
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(null, req);
}
}
@RequestMapping(value = "/listPage", produces = "application/json; charset=utf-8", method = { RequestMethod.GET,
RequestMethod.POST })
@ResponseBody
public Page listPage(HttpServletRequest req) {
Dbservice dbm = new Dbservice(databaseService);
没有合适的资源?快使用搜索试试~ 我知道了~
微信小程序开发项目实例-快递代取系统设计与实现代码(源码).rar
共2000个文件
png:703个
css:538个
html:308个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 151 浏览量
2023-05-21
14:51:06
上传
评论 1
收藏 14.04MB RAR 举报
温馨提示
微信小程序开发项目实例,源码完整,亲测可正常运行。 【项目技术】 微信开发者工具+java 【实现功能】 主要划分为了六大模块:用户信息查看、快递物流变化、快递代收地址、快递收入统计、取走包裹的统计、代取费用的结算。 (1)用户信息查看 本模块主要为用户通过微信小程序查看、修改用户的个人信息。 (2)快递物流变化模块 该模块主要为用户通过微信小程序检测快递包裹的物流信息变化。 (3)快递代收地址模块 该模块主要用户通过微信小程序可以填写、更改快递代收的地址。 (4)查看快递收入统计模块 本模块是用户通过微信小程序查看已获得的收入。 (5)取走包裹的统计模块 本模块是用户通过微信小程序统计所有已经取走的包裹。 (6)代取支付功能模块 本模块是代取服务完成以后,用此功能结算代取费用。
资源推荐
资源详情
资源评论
收起资源包目录
微信小程序开发项目实例-快递代取系统设计与实现代码(源码).rar (2000个子文件)
jquery.mobile-1.4.5.css 234KB
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.3.min.css 202KB
jquery.mobile.inline-svg-1.4.5.min.css 191KB
jquery.mobile.flatui.css 163KB
jquery.mobile.inline-png-1.4.5.css 146KB
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.skyd-1.4.5.css 120KB
skyd.css 120KB
jquery.mobile.external-png-1.4.5.css 119KB
jquery.mobile.inline-png-1.4.5.min.css 115KB
jquery.mobile.structure-1.4.5.css 89KB
jquery.mobile.external-png-1.4.5.min.css 89KB
jquery.mobile.skyd-1.4.5.min.css 80KB
skyd.min.css 80KB
layui.css 71KB
jquery.mobile.structure-1.4.5.min.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
animations.css 18KB
wangEditor.css 17KB
wangEditor.css 17KB
swiper-3.3.1.min.css 17KB
wangEditor.min.css 15KB
wangEditor.min.css 15KB
layer.css 14KB
superBlueDark.css 12KB
jquery.mobile.theme-1.4.5.min.css 12KB
index.css 11KB
superGreen.css 11KB
superYellow.css 11KB
superBlue.css 11KB
chatplugs.css 10KB
layui.mobile.css 10KB
tabs.css 9KB
tabs.css 9KB
zyupload-1.0.0.min.css 9KB
tabs.css 8KB
tabs.css 8KB
tabs.css 8KB
tabs.css 8KB
tabs.css 8KB
tabs.css 8KB
tabs.css 8KB
laydate.css 7KB
mobile.css 7KB
color.css 6KB
tabs.css 6KB
tabs.css 6KB
tabs.css 6KB
tabs.css 6KB
tabs.css 6KB
tabs.css 6KB
tabs.css 6KB
datagrid.css 6KB
datagrid.css 6KB
datagrid.css 5KB
datagrid.css 5KB
datagrid.css 5KB
datagrid.css 5KB
datagrid.css 5KB
datagrid.css 5KB
datagrid.css 5KB
datagrid.css 5KB
datagrid.css 5KB
datagrid.css 5KB
datagrid.css 5KB
datagrid.css 5KB
datagrid.css 5KB
datagrid.css 5KB
app.css 5KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
岛上程序猿
- 粉丝: 5515
- 资源: 4237
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功