package com.ideabobo.action;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import javax.swing.*;
import org.springframework.stereotype.Controller;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.ideabobo.model.Bill;
import com.ideabobo.model.Dingzuo;
import com.ideabobo.model.Good;
import com.ideabobo.model.Message;
import com.ideabobo.model.Posts;
import com.ideabobo.model.Replay;
import com.ideabobo.model.User;
import com.ideabobo.model.Yzmessage;
import com.ideabobo.service.BaseService;
import com.ideabobo.service.BillService;
import com.ideabobo.service.DingzuoService;
import com.ideabobo.service.GoodService;
import com.ideabobo.service.PostsService;
import com.ideabobo.service.ReplayService;
import com.ideabobo.service.ShopService;
import com.ideabobo.service.TypeService;
import com.ideabobo.service.UserService;
import com.ideabobo.util.GetNowTime;
import com.ideabobo.util.IdeaAction;
@Controller
public class WehallAction extends IdeaAction {
@Resource
private BaseService baseService;
@Resource
private BillService billService;
@Resource
private ShopService shopService;
@Resource
private GoodService goodService;
@Resource
private DingzuoService dingzuoService;
@Resource
private TypeService typeService;
@Resource
private UserService userService;
@Resource
private PostsService postsService;
@Resource
private ReplayService replayService;
public Gson gson = new Gson();
private static final long serialVersionUID = -3218238026025256103L;
public String wehall(){
// String openid = request.getParameter("openid");
// session.put("openid", openid);
return SUCCESS;
}
public void login(){
String username = request.getParameter("username");
String passwd = request.getParameter("passwd");
User user = new User();
user.setPasswd(passwd);
user.setUsername(encodeGet(username));
User r = userService.find(user);
if(r!=null){
renderJsonpObj(r);
}else{
renderJsonpString("fail");
}
}
public void checkUser(){
User u = new User();
String username = request.getParameter("username");
u.setUsername(username);
User r = userService.find(u);
if(r!=null){
renderJsonpString("fail");
}else{
renderJsonpString("success");
}
}
public void updateUser(){
String tel = request.getParameter("tel");
String qq = request.getParameter("qq");
String wechat = request.getParameter("wechat");
String email = request.getParameter("email");
String birth = request.getParameter("birth");
String sex = request.getParameter("sex");
String id = request.getParameter("id");
String address = request.getParameter("address");
User user = userService.find(id);
user.setId(Integer.parseInt(id));
user.setTel(tel);
user.setWechat(wechat);
user.setQq(qq);
user.setEmail(email);
user.setBirth(birth);
user.setSex(encodeGet(sex));
user.setAddress(encodeGet(address));
userService.update(user);
renderJsonpString("success");
}
public void changePasswd(){
String passwd = request.getParameter("passwd");
String id = request.getParameter("id");
User user = userService.find(id);
user.setPasswd(passwd);
userService.update(user);
renderJsonpString("success");
}
public void register(){
User user = (User) getByRequest(new User(), true);
String roletype = "2";
user.setRoletype(roletype);
userService.save(user);
renderJsonpString("success");
}
public void listShop(){
renderJsonpObj(shopService.list());
}
public void listGood(){
String type = request.getParameter("stype");
String sid = request.getParameter("sid");
String uid = request.getParameter("uid");
String statecn = request.getParameter("statecn");
String sex = request.getParameter("sex");
String level = request.getParameter("level");
String hql = "from Good t where 1=1";
if (type != null&& !"".equals(type)) {
hql+=" and t.typeid='"+type+"'";
}
if(sid != null&& !"".equals(sid)){
hql+=" and t.sid='"+sid+"'";
}
if(uid != null&& !"".equals(uid)){
hql+=" and t.uid='"+uid+"'";
}
if(sex != null&& !"".equals(sex)){
sex = encodeGet(sex);
hql+=" and t.sex='"+sex+"'";
}
if(level != null&& !"".equals(level)){
hql+=" and t.level='"+level+"'";
}
if(statecn != null&& !"".equals(statecn)){
statecn = encodeGet(statecn);
hql+=" and t.statecn='"+statecn+"'";
}
renderJsonpObj(baseService.list(hql));
}
public void listType(){
renderJsonpObj(typeService.list());
}
public void saveDingzuo(){
Dingzuo dz = new Dingzuo();
dz.setRenshu(request.getParameter("renshu"));
dz.setXingming(encodeGet(request.getParameter("xingming")));
dz.setShouji(request.getParameter("shouji"));
dz.setShijian(request.getParameter("shijian"));
dz.setTodate(request.getParameter("todate"));
dz.setBeizhu(encodeGet(request.getParameter("beizhu")));
dz.setShopid(request.getParameter("shopid"));
dz.setShopname(encodeGet(request.getParameter("shopname")));
dz.setOpenid(request.getParameter("openid"));
dz.setNdate(GetNowTime.getNowTimeNian());
dingzuoService.save(dz);
renderJsonpString("提交成功!");
}
public void saveBill(){
Bill bill = (Bill) getByRequest(new Bill(), true);
bill.setNdate(GetNowTime.getNowTimeNian());
billService.save(bill);
renderJsonpString("提交成功!");
}
public void updateGoodStatecn(){
String id = request.getParameter("id");
Good g = (Good) baseService.find(Integer.parseInt(id), Good.class);
String statecn = request.getParameter("statecn");
statecn = encodeGet(statecn);
g.setStatecn(statecn);
baseService.update(g);
renderJsonpString("0");
}
public void saveBills(){
String bills = request.getParameter("bills");
bills = encodeGet(bills);
JsonParser parser = new JsonParser();
JsonArray blist = parser.parse(bills).getAsJsonArray();
for(int i=0;i<blist.size();i++){
JsonElement jo = blist.get(i);
JsonObject obj = (JsonObject) parser.parse(jo.toString());
Bill bill = new Bill();
bill.setTotal(obj.get("total").getAsString());
bill.setSid(obj.get("sid").getAsString());
bill.setShop(obj.get("shop").getAsString());
bill.setUid(obj.get("uid").getAsString());
bill.setUser(obj.get("user").getAsString());
bill.setNdate(GetNowTime.getNowTimeNian());
bill.setGids(obj.get("gids").getAsString());
bill.setGnames(obj.get("gnames").getAsString());
bill.setAddress(obj.get("address").getAsString());
bill.setTel(obj.get("tel").getAsString());
bill.setNote(obj.get("note").getAsString());
bill.setWay(obj.get("way").getAsString());
bill.setStatecn("进行中");
billService.save(bill);
}
renderJsonpString("提交成功!");
}
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
(基于微信小程序的毕业设计)出租车打车预约系统(源码) 【项目技术】 微信开发者工具+java 【实现功能】 主要实现管理员通过系统进行查看订单管理、行程记录管理、优惠券管理、通知列表、评分列表、用户列表和司机审核等详细信息内容,用户可以登录客户端通过发布订单或拼车等选项进行出租车的预订,从而实现出租车打车预约系统的功能。
资源推荐
资源详情
资源评论
收起资源包目录
(基于微信小程序的毕业设计)出租车打车预约系统(源码).rar (1605个子文件)
WehallAction.class 19KB
IdeaAction.class 18KB
BaseServiceImp.class 11KB
StringUtil.class 9KB
GoodAction.class 8KB
ShopAction.class 7KB
NoticeAction.class 6KB
GoodServiceImp.class 5KB
BillServiceImp.class 5KB
User.class 5KB
NoticeServiceImp.class 5KB
ReplayServiceImp.class 5KB
UserAction.class 5KB
ShopServiceImp.class 5KB
PostsServiceImp.class 5KB
UserServiceImp.class 5KB
DingzuoServiceImp.class 5KB
Good.class 5KB
TypeServiceImp.class 5KB
VipServiceImp.class 5KB
Bill.class 4KB
GetNowTime.class 4KB
BillAction.class 4KB
DingzuoAction.class 3KB
ReplayAction.class 3KB
PostsAction.class 3KB
CopyFile.class 3KB
VipAction.class 3KB
Dingzuo.class 3KB
Message.class 3KB
Youhuijuan.class 2KB
IndexAction.class 2KB
Shop.class 2KB
Pingfen.class 2KB
Vip.class 2KB
Posts.class 2KB
Yzmessage.class 2KB
DownloadAction.class 2KB
Replay.class 2KB
Notice.class 2KB
Page.class 1KB
Type.class 1KB
BaseService.class 919B
ReplayService.class 703B
NoticeService.class 703B
ShopService.class 683B
BillService.class 683B
GoodService.class 683B
Page2.class 574B
DingzuoService.class 569B
PostsService.class 555B
TypeService.class 548B
UserService.class 548B
VipService.class 541B
UploadAction.class 521B
.classpath 1KB
org.eclipse.wst.common.component 491B
org.eclipse.wst.jsdt.ui.superType.container 49B
nativedroid2.css 271KB
jquery.mobile-1.4.5.css 234KB
jquery.mobile.inline-svg-1.4.5.css 222KB
jquery.mobile.min.css 216KB
jquery.mobile.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.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
bootstrap.css 143KB
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
bootstrap.min.css 118KB
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
animate.css 69KB
jquery.mobile.structure-1.4.5.min.css 67KB
theme-classic.css 67KB
style.css 63KB
font-awesome.css 37KB
easyui.css 34KB
easyui.css 34KB
easyui.css 34KB
easyui.css 32KB
easyui.css 32KB
material-design-iconic-font.min.css 31KB
font-awesome.min.css 30KB
font-awesome.min.css 30KB
easyui.css 29KB
jquery.mobile.theme-1.4.5.css 19KB
swiper-3.3.1.min.css 17KB
共 1605 条
- 1
- 2
- 3
- 4
- 5
- 6
- 17
资源评论
岛上程序猿
- 粉丝: 5639
- 资源: 4236
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功