基于javaweb+mysql的ssm+maven手机商城管理系统(java+ssm+layui+echarts+jsp+mysql)
私信源码获取及调试交流
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb的SSM+Maven手机商城管理系统(java+ssm+layui+echarts+jsp+mysql)
后台管理员:
admin 123456
前台用户(注册):
寒冰 123456
纳尔 123456
卡莎 123456
提莫 123456
....
项目介绍
前台 登陆 注册 注销
查看商品详情、商品评论、热销商品
按照关键词搜索商品
收藏、取消收藏商品
加入购物车、下单
购物车增删改查
收藏中心
分状态查看所有订单,已发货可查看快递单号
支付宝付款、确认收货、删除已完成订单
收货地址的增删改查
修改登陆密码
按照商品点击量定制猜你喜欢
修改个人资料,修改头像
评价已确认收货商品,带评分以及多图上传
后台
所有后台管理展示均使用带条件查询的分页
利用Echarts图表框架展示销量排行、月销售额和订单量趋势、商品浏览量和待办事件等
商品管理:商品的增删改查,按照名称查找、批量删除
订单管理:所有订单查看、删除、修改收货信息、发货,带日期和订单状态等的条件查询
用户管理:所有用户信息的查看、删除、修改、禁用、条件查找及批量删除
轮播图管理:增加、删除、修改、查看轮播图,禁用轮播以及批量删除等
评论管理:查看、删除、批量删除、关键词搜索评价功能
商品分类管理:增加、删除、修改、禁用、批量删除、条件搜索功能
账户管理:更新管理员资料、修改密码功能
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.是否Maven项目: 否;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目 6.数据库:MySql 5.7/8.0等版本均可;
技术栈
后台技术选型:SSM(Spring SpringMVC Mybatis)
前端技术选型:LayUI、echarts、JSP
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,修改配置,运行项目; 3. 将项目中db.xml配置文件中的数据库配置改为自己的配置,然后运行;
return "fail";
}
}
@RequestMapping("findGoodsByVolume")
@ResponseBody
public JSONObject findGoodsByVolume(){
List<Goods> goodsList = goodsService.findGoodsByVolume(5);
String[] name=new String[5];
Integer[] volume=new Integer[5];
for(int i=0;i<goodsList.size();i++){
name[i]=goodsList.get(i).getGoodsName();
volume[i]=goodsList.get(i).getGoodsVolume();
}
JSONObject obj=new JSONObject();
obj.put("name", name);
obj.put("volume", volume);
return obj;
}
}
return "success";
}else{
return "fail";
}
}
@RequestMapping("addBanner")
@ResponseBody
public String addBanner(Banner banner){
Integer rs = bannerService.addBanner(banner);
if(rs>0){
return "success";
}else{
return "fail";
}
}
}
@Controller
@RequestMapping("/cart")
public class CartController {
@Autowired
private ICartService cartService;
@Autowired
private IGoodsService goodsService;
@Autowired
private IAddressService addressService;
return "success";
}else{
return "fail";
}
}
@RequestMapping("deleteOrder")
@ResponseBody
public String deleteOrder(String orderId){
Integer rs = orderService.deleteOrder(orderId);
if(rs>0){
return "success";
}else{
return "fail";
}
}
@RequestMapping("findOrderBySplitPage")
@ResponseBody
public JSONObject findOrderBySplitPage(Integer page,Integer limit,OrderSearchVO vo){
if(vo!=null){
System.out.println(vo.getOrderState()+"========================");
}
PageInfo<Order> info = orderService.findOrdersBySplitPage(page, limit,vo);
JSONObject obj=new JSONObject();
obj.put("msg", "");
obj.put("code", 0);
obj.put("count", info.getTotal());
obj.put("data", info.getList());
return obj;
}
@RequestMapping("updateOrder")
@ResponseBody
public String updateOrder(Order order){
Integer rs = orderService.updateOrder(order);
if(rs>0){
return "success";
}else{
return "fail";
}
}
@RequestMapping("deliverOrder")
@ResponseBody
public String deliverOrder(String orderId,String expressNo){
if(!expressNo.trim().equals("")){
Integer rs = orderService.deliverOrder(orderId, expressNo);
if(rs>0){
return "success";
}else{
return "fail";
Users user=(Users) session.getAttribute("user");
Date orderDate=new Date();
Address address = addressService.findAddresById(addr);
String a=address.getAddrProvince()+address.getAddrCity()+address.getAddrArea()+address.getAddrDetail();
Order order=new Order(user, orderDate, totalPrice, 1, address.getAddrNickname(), address.getAddrPhone(), a);
order.setDetailList(detailList);
Order takeOrder = orderService.takeOrder(order);
for (Cart c : cartList) {
Goods goods = goodsService.findById(c.getCartGoods().getGoodsId());
goods.setGoodsNum(goods.getGoodsNum()-c.getCartNum());
goods.setGoodsVolume(goods.getGoodsVolume()+c.getCartNum());
goodsService.update(goods);
cartService.deleteCart(c.getCartId());
}
model.addAttribute("order",takeOrder);
List<Guess> guessList = guessService.findGuessGoodsByUserId(user.getUserId(), 4);
model.addAttribute("guessList", guessList);
return "userview/takeorder";
}
@RequestMapping("findReadPayOrder")
@ResponseBody
public List<Order> findReadyPayOrder(HttpServletRequest request){
HttpSession session = request.getSession();
Users user=(Users) session.getAttribute("user");
List<Order> orderList = orderService.findOrdersByUserIdAndState(user.getUserId(), 1);
return orderList;
}
@RequestMapping("findReadyToDeliverOrder")
@ResponseBody
public List<Order> findReadyToDeliverOrder(HttpServletRequest request){
HttpSession session = request.getSession();
Users user = (Users) session.getAttribute("user");
List<Order> orderList = orderService.findOrdersByUserIdAndState(user.getUserId(), 2);
return orderList;
}
@RequestMapping("findReadyToReceiveOrder")
@ResponseBody
public List<Order> findReadToReceiveOrder(HttpServletRequest request){
HttpSession session = request.getSession();
Users user = (Users) session.getAttribute("user");
List<Order> orderList = orderService.findOrdersByUserIdAndState(user.getUserId(), 3);
return orderList;
}
@RequestMapping("findReadyToEvaluateOrder")
@ResponseBody
obj.put("msg", "");
obj.put("code", 0);
obj.put("count", info.getTotal());
obj.put("data", info.getList());
return obj;
}
@RequestMapping("updateOrder")
@ResponseBody
public String updateOrder(Order order){
Integer rs = orderService.updateOrder(order);
if(rs>0){
return "success";
}else{
return "fail";
}
}
@RequestMapping("deliverOrder")
@ResponseBody
public String deliverOrder(String orderId,String expressNo){
if(!expressNo.trim().equals("")){
Integer rs = orderService.deliverOrder(orderId, expressNo);
if(rs>0){
return "success";
}else{
return "fail";
}
}else{
return "fail";
}
}
@RequestMapping("findOrderById")
@ResponseBody
public Order findOrderById(String orderId){
Order order = orderService.findOrderById(orderId);
return order;
}
@RequestMapping("findTotalOrder")
@ResponseBody
public JSONObject findOrderTotalMoney(){
List<OrderVO> list = orderService.findTotalMoneyByMonth(6);
String[] month=new String[6];
Long[] total=new Long[6];
Integer[] sheets=new Integer[6];
for(int i=0;i<list.size();i++){
month[i]=list.get(i).getOrderMonth();
total[i]=list.get(i).getTotalMoney();
sheets[i]=list.get(i).getSheets();
}
JSONObject obj=new JSONObject();
obj.put("month", month);
}else{
return "fail";
}
}
@RequestMapping("deliverOrder")
@ResponseBody
public String deliverOrder(String orderId,String expressNo){
if(!expressNo.trim().equals("")){
Integer rs = orderService.deliverOrder(orderId, expressNo);
if(rs>0){
return "success";
}else{
return "fail";
}
}else{
return "fail";
}
}
@RequestMapping("findOrderById")
@ResponseBody
public Order findOrderById(String orderId){
Order order = orderService.findOrderById(orderId);
return order;
}
@RequestMapping("findTotalOrder")
@ResponseBody
public JSONObject findOrderTotalMoney(){
List<OrderVO> list = orderService.findTotalMoneyByMonth(6);
String[] month=new String[6];
Long[] total=new Long[6];
Integer[] sheets=new Integer[6];
for(int i=0;i<list.size();i++){
month[i]=list.get(i).getOrderMonth();
total[i]=list.get(i).getTotalMoney();
sheets[i]=list.get(i).getSheets();
}
JSONObject obj=new JSONObject();
obj.put("month", month);
obj.put("total", total);
obj.put("sheets", sheets);
return obj;
}
@RequestMapping("findToDo")
@ResponseBody
public JSONObject findToDo(){
Integer totalOrder = orderService.findTotalOrder();
Integer totalDediver = orderService.findTotalDeliverOrder();
JSONObject obj=new JSONObject();
obj.put("total", totalOrder);
public JSONObject uploadBannerImg(@PathVariable(value="file")MultipartFile file,HttpServletRequest request){
String originalFilename = file.getOriginalFilename();
String name=UUIDUtil.getUUID()+originalFilename.substring(originalFilename.lastIndexOf("."));
String path=request.getServletContext().getRealPath("/upload")+"/"+name;
try {
file.transferTo(new File(path));
} catch (IllegalStateException | IOException e) {
e.printStackTrace();
}
JSONObject obj=new JSONObject();
obj.put("src", name);
return obj;
}
@RequestMapping("changeBannerState")
@ResponseBody
public String changeBannerState(Integer state,Integer bannerId){
Integer rs = bannerService.changeBannerState(state, bannerId);
if(rs>0){
return "success";
}else{
return "fail";
}
}
@RequestMapping("deleteBanner")
@ResponseBody
public String deleteBanner(Integer bannerId){
Integer rs = bannerService.deleteBanner(bannerId);
if(rs>0){
return "success";
}else{
return "fail";
}
}
@RequestMapping("batchDelete")
@ResponseBody
public String batchDelete(String batchId){
String[] list = batchId.split(",");
boolean flag=true;
for (String id : list) {
Integer bannerId = Integer.valueOf(id);
Integer rs = bannerService.deleteBanner(bannerId);
if(rs<0){
flag=false;
Users u = userService.findUserById(user.getUserId());
HttpSession session = request.getSession();
session.setAttribute("user", u);
model.addAttribute("user", u);
return "userview/amend_info";
}
@RequestMapping("modifyUserPass")
@ResponseBody
public String modifyUserPass(String oldPass, String newPass, String rePass, HttpServletRequest request) {
HttpSession session = request.getSession();
Users user = (Users) session.getAttribute("user");
if (MD5Utils.passToMD5(oldPass).equals(user.getUserPass()) && newPass.equals(rePass)) {
user.setUserPass(MD5Utils.passToMD5(newPass));
userService.updateUserInfo(user);
session.removeAttribute("user");
return "success";
} else {
return "fail";
}
}
@RequestMapping("findAllUser")
@ResponseBody
public JSONObject findAllUser(Integer page, Integer limit, String keyword) {
PageInfo<Users> info = userService.findAllUsersBySplitPage(page, limit, keyword);
JSONObject obj = new JSONObject();
obj.put("msg", "");
obj.put("code", 0);
obj.put("count", info.getTotal());
obj.put("data", info.getList());
return obj;
}
@RequestMapping("changeUserState")
@ResponseBody
public String changeUserState(Integer userId, Integer state) {
Integer rs = userService.changeUserState(state, userId);
if (rs > 0) {
return "success";
} else {
return "fail";
}
@ResponseBody
public Evaluate findEvaluateById(Integer evaId) {
return evaluateService.findEvaluteById(evaId);
}
}
@Controller
@RequestMapping("/address")
public class AddressController {
@Autowired
private IAddressService addressService;
@Autowired
private IProCityAreaService pService;
@RequestMapping("findAddrByUserId")
@ResponseBody
public List<Address> findAddrByUserId(HttpServletRequest request) {
HttpSession session = request.getSession();
Users user = (Users) session.getAttribute("user");
List<Address> list = addressService.findAddressByUserId(user.getUserId());
return list;
}
@RequestMapping("addAddress")
@ResponseBody
@ResponseBody
public JSONObject uploadHeaderPic(@PathVariable(value = "file") MultipartFile file, HttpServletRequest request) {
String str = file.getOriginalFilename();
String name = UUIDUtil.getUUID() + str.substring(str.lastIndexOf("."));
String path = request.getServletContext().getRealPath("/upload") + "/" + name;
try {
file.transferTo(new File(path));
} catch (IllegalStateException | IOException e) {
e.printStackTrace();
}
JSONObject obj = new JSONObject();
obj.put("userImg", name);
return obj;
}
@RequestMapping("updateUserInfo")
public String updateUserInfo(Users user, Model model, HttpServletRequest request) {
Integer rs = userService.updateUserInfo(user);
Users u = userService.findUserById(user.getUserId());
HttpSession session = request.getSession();
session.setAttribute("user", u);
model.addAttribute("user", u);
return "userview/amend_info";
}
@RequestMapping("modifyUserPass")
@ResponseBody
public String modifyUserPass(String oldPass, String newPass, String rePass, HttpServletRequest request) {
HttpSession session = request.getSession();
Users user = (Users) session.getAttribute("user");
if (MD5Utils.passToMD5(oldPass).equals(user.getUserPass()) && newPass.equals(rePass)) {
user.setUserPass(MD5Utils.passToMD5(newPass));
userService.updateUserInfo(user);
session.removeAttribute("user");
return "success";
} else {
return "fail";
}
}
@RequestMapping("findAllUser")
@ResponseBody
public JSONObject findAllUser(Integer page, Integer limit, String keyword) {
PageInfo<Users> info = userService.findAllUsersBySplitPage(page, limit, keyword);
JSONObject obj = new JSONObject();
obj.put("msg", "");
obj.put("code", 0);
obj.put("count", info.getTotal());
obj.put("data", info.getList());
return obj;
}
@RequestMapping("changeUserState")
@ResponseBody
public String addAddress(Address addr,HttpServletRequest request) {
String provinceId = addr.getAddrProvince();
String cityId = addr.getAddrCity();
String areaId = addr.getAddrArea();
Provinces province = pService.findProvinceById(provinceId);
Cities city = pService.findCityById(cityId);
Areas area = pService.findAreaById(areaId);
addr.setAddrProvince(province.getProvinceName());
addr.setAddrCity(city.getCityName());
addr.setAddrArea(area.getAreaName());
HttpSession session = request.getSession();
Users user = (Users) session.getAttribute("user");
addr.setAddrUser(user.getUserId());
Integer rs = addressService.addAddress(addr);
if(rs>0){
return "success";
}else{
return "fail";
}
}
@RequestMapping("findAddressById")
@ResponseBody
public Address findAddrByAddrId(Integer addrId){
Address addr = addressService.findAddresById(addrId);
Provinces province = pService.findProvinceByName(addr.getAddrProvince());
Cities city = pService.findCityByName(addr.getAddrCity(),province.getProvinceId());
Areas area = pService.findAreaByName(addr.getAddrArea(),city.getCityId());
addr.setAddrProvince(province.getProvinceId());
addr.setAddrCity(city.getCityId());
addr.setAddrArea(area.getAreaId());
return addr;
}
@RequestMapping("modifyAddress")
@ResponseBody
public String modifyAddress(Address addr){
String provinceId = addr.getAddrProvince();
String cityId = addr.getAddrCity();
String areaId = addr.getAddrArea();
Provinces province = pService.findProvinceById(provinceId);
Cities city = pService.findCityById(cityId);
Areas area = pService.findAreaById(areaId);
addr.setAddrProvince(province.getProvinceName());
addr.setAddrCity(city.getCityName());
addr.setAddrArea(area.getAreaName());
Integer rs = addressService.updateAddress(addr);
@RequestMapping("modifyAddress")
@ResponseBody
public String modifyAddress(Address addr){
String provinceId = addr.getAddrProvince();
String cityId = addr.getAddrCity();
String areaId = addr.getAddrArea();
Provinces province = pService.findProvinceById(provinceId);
Cities city = pService.findCityById(cityId);
Areas area = pService.findAreaById(areaId);
addr.setAddrProvince(province.getProvinceName());
addr.setAddrCity(city.getCityName());
addr.setAddrArea(area.getAreaName());
Integer rs = addressService.updateAddress(addr);
if(rs>0){
return "success";
}else{
return "fail";
}
}
@RequestMapping("deleteAddress")
@ResponseBody
public String deleteAddress(Integer addrId){
Integer rs = addressService.deleteAddress(addrId);
if(rs>0){
return "success";
}else{
return "fail";
}
}
}
// }
// return null;
}
@RequestMapping("notify_url")
public void notifyUrl(HttpServletRequest request,HttpServletResponse response){
Map<String,String> params = new HashMap<String,String>();
Map<String,String[]> requestParams = request.getParameterMap();
for (Iterator<String> iter = requestParams.keySet().iterator(); iter.hasNext();) {
String name = (String) iter.next();
String[] values = (String[]) requestParams.get(name);
String valueStr = "";
for (int i = 0; i < values.length; i++) {
valueStr = (i == values.length - 1) ? valueStr + values[i]
: valueStr + values[i] + ",";
}
//乱码解决,这段代码在出现乱码时使用
try {
valueStr = new String(valueStr.getBytes("ISO-8859-1"), "utf-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
params.put(name, valueStr);
}
boolean signVerified=false;
try {
signVerified = AlipaySignature.rsaCheckV1(params, AlipayConfig.alipay_public_key, AlipayConfig.charset, AlipayConfig.sign_type);
} catch (AlipayApiException e1) {
e1.printStackTrace();
} //调用SDK验证签名
//——请在这里编写您的程序(以下代码仅作参考)——
/* 实际验证过程建议商户务必添加以下校验:
1、需要验证该通知数据中的out_trade_no是否为商户系统中创建的订单号,
2、判断total_amount是否确实为该订单的实际金额(即商户订单创建时的金额),
3、校验通知中的seller_id(或者seller_email) 是否为out_trade_no这笔单据的对应的操作方(有的时候,一个商户可能有多个seller_id/seller_email)
4、验证app_id是否为该商户本身。
*/
PrintWriter out=null;
try {
out = response.getWriter();
} catch (IOException e) {
e.printStackTrace();
}
if(signVerified) {//验证成功
//商户订单号
String out_trade_no="";
//交易状态
String trade_status="";
try {
out_trade_no = new String(request.getParameter("out_trade_no").getBytes("ISO-8859-1"),"UTF-8");
public String toAddGoods(){
return "admin/goodsadd";
}
@RequestMapping("login")
public String toLogin(){
return "login";
}
@RequestMapping("register")
public String toRegister(){
return "register";
}
@RequestMapping("usercenter")
public String toUserCenter(){
return "userview/usercenter";
}
@RequestMapping("index")
public String toIndex(){
return "index";
}
@RequestMapping("cart")
public String toCart(){
return "userview/shopping_cart";
}
@RequestMapping("admin")
public String toAdmin(){
return "adminlogin";
}
@RequestMapping("orderlist")
public String toOrderList(){
return "admin/orderlist";
}
@RequestMapping("userlist")
public String toUserList(){
return "admin/userlist";
}
@RequestMapping("bannerlist")
public String toBannerList(){
return "admin/bannerlist";
}
@RequestMapping("addbanner")
public String toAddBanner(){
return "admin/banneradd";
}
@RequestMapping("evaluate")
public String toEva(){
return "userview/evaluate";
}
@RequestMapping("evalist")
public String toEvalist(){
return "admin/evalist";
}
@RequestMapping("welcome")
}
}
@RequestMapping("isFaorite")
@ResponseBody
public String isFavorite(Integer goodsId,HttpServletRequest request){
HttpSession session = request.getSession();
Users user = (Users) session.getAttribute("user");
if(user!=null){
Guess guess = guessService.findGuessByUserId(user.getUserId(), goodsId);
Integer rs = guess.getFavorite();
if(rs>0){
return "true";
}else{
return "false";
}
}else{
return "false";
}
}
@RequestMapping("removeFavorite")
@ResponseBody
public String removeFavorite(Integer goodsId,HttpServletRequest request){
HttpSession session = request.getSession();
Users user = (Users) session.getAttribute("user");
Integer rs = guessService.removeFavorite(user.getUserId(), goodsId);
if(rs>0){
return "success";
}else{
return "fail";
}
}
@RequestMapping("findRecentGoods")
@ResponseBody
public List<Guess> findRecentViewGoods(HttpServletRequest request){
HttpSession session = request.getSession();
Users user = (Users) session.getAttribute("user");
List<Guess> list = guessService.findRecentViewGoods(user.getUserId(), 8);
return list;
}
@RequestMapping("findMostHotGoods")
@ResponseBody
public JSONArray findHotGoods(){
List<Map<String, Object>> list = guessService.findMostHotGoods(6);
JSONArray arr=new JSONArray();
for (Map<String, Object> map : list) {
JSONObject obj=new JSONObject();
Integer goodsId = (Integer) map.get("g");
Number n=(Number) map.get("num");
Goods g = goodsService.findById(goodsId);
obj.put("name", g.getGoodsName());
public Object uploadGoodsImg(@PathVariable(value="file")MultipartFile file,HttpServletRequest request){
String str = file.getOriginalFilename();
String name=UUIDUtil.getUUID()+str.substring(str.lastIndexOf("."));
String path=request.getSession().getServletContext().getRealPath("/upload")+"/"+name;
try {
file.transferTo(new File(path));
} catch (IllegalStateException | IOException e) {
e.printStackTrace();
}
JSONObject obj=new JSONObject();
obj.put("src", name);
return obj;
}
@RequestMapping("addGoods")
@ResponseBody
public String addGoods(Goods goods){
Integer rs = goodsService.addGoods(goods);
if(rs>0){
return "success";
}else{
return "fail";
}
}
@RequestMapping("findGoodsByVolume")
@ResponseBody
public JSONObject findGoodsByVolume(){
List<Goods> goodsList = goodsService.findGoodsByVolume(5);
String[] name=new String[5];
Integer[] volume=new Integer[5];
for(int i=0;i<goodsList.size();i++){
name[i]=goodsList.get(i).getGoodsName();
volume[i]=goodsList.get(i).getGoodsVolume();
}
JSONObject obj=new JSONObject();
obj.put("name", name);
obj.put("volume", volume);
return obj;
}
}
Users user = (Users) session.getAttribute("user");
List<Guess> guessList = guessService.findAllFavoriteByUserId(user.getUserId());
return guessList;
}
@RequestMapping("addToFavorite")
@ResponseBody
public String addGoodsToFavorite(Integer goodsId,HttpServletRequest request){
HttpSession session = request.getSession();
Users user=(Users) session.getAttribute("user");
Integer rs = guessService.addGoodsToFavorite(user.getUserId(), goodsId);
if(rs>0){
return "success";
}else{
return "fail";
}
}
@RequestMapping("isFaorite")
@ResponseBody
public String isFavorite(Integer goodsId,HttpServletRequest request){
HttpSession session = request.getSession();
Users user = (Users) session.getAttribute("user");
if(user!=null){
Guess guess = guessService.findGuessByUserId(user.getUserId(), goodsId);
Integer rs = guess.getFavorite();
if(rs>0){
return "true";
}else{
return "false";
}
}else{
return "false";
}
}
@RequestMapping("removeFavorite")
@ResponseBody
public String removeFavorite(Integer goodsId,HttpServletRequest request){
HttpSession session = request.getSession();
Users user = (Users) session.getAttribute("user");
Integer rs = guessService.removeFavorite(user.getUserId(), goodsId);
if(rs>0){
return "success";
}else{
return "fail";
if(vo!=null){
System.out.println(vo.getOrderState()+"========================");
}
PageInfo<Order> info = orderService.findOrdersBySplitPage(page, limit,vo);
JSONObject obj=new JSONObject();
obj.put("msg", "");
obj.put("code", 0);
obj.put("count", info.getTotal());
obj.put("data", info.getList());
return obj;
}
@RequestMapping("updateOrder")
@ResponseBody
public String updateOrder(Order order){
Integer rs = orderService.updateOrder(order);
if(rs>0){
return "success";
}else{
return "fail";
}
}
@RequestMapping("deliverOrder")
@ResponseBody
public String deliverOrder(String orderId,String expressNo){
if(!expressNo.trim().equals("")){
Integer rs = orderService.deliverOrder(orderId, expressNo);
if(rs>0){
return "success";
}else{
return "fail";
}
}else{
return "fail";
}
}
@RequestMapping("findOrderById")
@ResponseBody
public Order findOrderById(String orderId){
Order order = orderService.findOrderById(orderId);
return order;
}
@RequestMapping("findTotalOrder")
@ResponseBody
public JSONObject findOrderTotalMoney(){
List<OrderVO> list = orderService.findTotalMoneyByMonth(6);