package com.shop.controller.admin;
import com.shop.entity.Admin;
import com.shop.service.AdminService;
import com.shop.util.Md5Util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
@Controller
@RequestMapping("/admin")
public class LoginController {
@Autowired
private AdminService adminService;
@RequestMapping("/login")
public String adminLogin() {
return "adminLogin";
}
@RequestMapping("/confirmLogin")
public String confirmLogin(Admin admin, Model model, HttpServletRequest request) {
admin.setPassword(Md5Util.MD5Encode(admin.getPassword(),"utf-8"));
Admin selectAdmin = adminService.selectByName(admin);
if (selectAdmin == null) {
model.addAttribute("errorMsg", "用户名或密码错误");
return "adminLogin";
} else {
HttpSession session = request.getSession();
session.setAttribute("admin", selectAdmin);
return "redirect:/admin/user/show";
}
}
@RequestMapping("/logout")
public String adminLogout(HttpServletRequest request) {
HttpSession session = request.getSession();
session.removeAttribute("admin");
return "redirect:/admin/login";
}
/*@RequestMapping("/index")
public String showAdminIndex() {
return "user";
}*/
}










DROP TABLE IF EXISTS `activity`;
CREATE TABLE `activity` (
`activityId` int(12) NOT NULL AUTO_INCREMENT,
`activityName` varchar(50) NOT NULL,
`activityDes` varchar(500) NOT NULL,
`discount` float DEFAULT '1',
`fullPrice` int(12) DEFAULT NULL,
`reducePrice` int(12) DEFAULT NULL,
`fullNum` int(12) DEFAULT NULL,
`reduceNum` int(12) DEFAULT NULL,
PRIMARY KEY (`activityId`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of activity
-- ----------------------------
-- ----------------------------
-- Table structure for address
-- ----------------------------
DROP TABLE IF EXISTS `address`;
CREATE TABLE `address` (
`addressID` int(12) NOT NULL AUTO_INCREMENT,
`userId` int(12) NOT NULL,
`province` varchar(50) NOT NULL,
`city` varchar(50) NOT NULL,
`county` varchar(50) NOT NULL,
`detailAddr` varchar(50) NOT NULL,
`conName` varchar(50) NOT NULL,
`conTel` varchar(50) NOT NULL,
PRIMARY KEY (`addressID`),
KEY `addressID` (`addressID`) USING BTREE,
KEY `userId` (`userId`) USING BTREE,
CONSTRAINT `address_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of address
-- ----------------------------
-- ----------------------------
-- Table structure for admin
-- ----------------------------
DROP TABLE IF EXISTS `admin`;
CREATE TABLE `admin` (
`adminId` int(12) NOT NULL AUTO_INCREMENT,
`adminName` varchar(50) NOT NULL,
`password` varchar(50) NOT NULL,
PRIMARY KEY (`adminId`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of admin
-- ----------------------------
INSERT INTO `admin` VALUES ('1', 'admin', '25d55ad283aa400af464c76d713c07ad');
-- ----------------------------
-- Table structure for category
-- ----------------------------
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` (
`cateId` int(12) NOT NULL AUTO_INCREMENT,
`cateName` varchar(50) NOT NULL,
PRIMARY KEY (`cateId`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of category
-- ----------------------------
INSERT INTO `category` VALUES ('1', '婴儿服');
INSERT INTO `category` VALUES ('2', '纸尿裤');
INSERT INTO `category` VALUES ('3', '玩具');
INSERT INTO `category` VALUES ('4', '奶粉');
INSERT INTO `category` VALUES ('5', '洗护');
INSERT INTO `category` VALUES ('6', '孕产');
INSERT INTO `category` VALUES ('7', '其他');
-- ----------------------------
-- Table structure for collection
-- ----------------------------
DROP TABLE IF EXISTS `collection`;
CREATE TABLE `collection` (
`userId` int(12) NOT NULL,
`goodsId` int(12) NOT NULL,
`collectTime` datetime NOT NULL,
PRIMARY KEY (`userId`,`goodsId`),
KEY `collection_ibfk_2` (`goodsId`) USING BTREE,
CONSTRAINT `collection_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `collection_ibfk_2` FOREIGN KEY (`goodsId`) REFERENCES `goods` (`goodsId`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of collection
-- ----------------------------
-- ----------------------------
-- Table structure for comment
-- ----------------------------
DROP TABLE IF EXISTS `comment`;
CREATE TABLE `comment` (
`commentId` int(12) NOT NULL AUTO_INCREMENT,
`userId` int(12) NOT NULL,
`goodsId` int(12) NOT NULL,
`point` int(8) NOT NULL,
`content` varchar(255) NOT NULL,
`commentTime` datetime NOT NULL,
PRIMARY KEY (`commentId`),
KEY `userId` (`userId`) USING BTREE,
KEY `goodsId` (`goodsId`) USING BTREE,
CONSTRAINT `comment_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `comment_ibfk_2` FOREIGN KEY (`goodsId`) REFERENCES `goods` (`goodsId`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of comment
-- ----------------------------
-- ----------------------------
-- Table structure for deliver
-- ----------------------------
DROP TABLE IF EXISTS `deliver`;
CREATE TABLE `deliver` (
`deliverId` int(12) NOT NULL AUTO_INCREMENT,
`orderId` int(12) NOT NULL,
`sendId` int(12) NOT NULL,
PRIMARY KEY (`deliverId`),
KEY `orderId` (`orderId`) USING BTREE,
CONSTRAINT `deliver_ibfk_1` FOREIGN KEY (`orderId`) REFERENCES `indent` (`orderId`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of deliver
-- ----------------------------
-- ----------------------------
-- Table structure for goods
-- ----------------------------
DROP TABLE IF EXISTS `goods`;
CREATE TABLE `goods` (
`goodsId` int(12) NOT NULL AUTO_INCREMENT,
`goodsName` varchar(50) NOT NULL,
`price` int(12) NOT NULL,
`num` int(12) NOT NULL,
`upTime` datetime NOT NULL,
`category` int(12) NOT NULL,
`detailCate` varchar(50) NOT NULL,
`description` text NOT NULL,
`activityId` int(12) DEFAULT '1',
PRIMARY KEY (`goodsId`),
KEY `activityId` (`activityId`) USING BTREE,
KEY `category` (`category`) USING BTREE,
CONSTRAINT `goods_ibfk_1` FOREIGN KEY (`category`) REFERENCES `category` (`cateId`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=169 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of goods
-- ----------------------------
INSERT INTO `goods` VALUES ('128', '新生婴儿连体衣服可爱超萌哈衣', '69', '187', '2019-12-06 16:11:32', '1', '连体服', '新生婴儿连体衣服可爱超萌哈衣男女宝宝秋冬套装幼儿加厚冬装睡衣\r\n\r\n连帽包脚的棉衣 防御风寒更加保暖', '5');
INSERT INTO `goods` VALUES ('129', '新生婴儿连体衣服女宝宝4秋冬套装', '69', '90', '2019-12-06 16:14:02', '1', '连体服', '新生婴儿连体衣服女宝宝4秋冬套装睡衣可爱1岁0个月秋装3公主哈衣\r\n\r\n可爱卡通 面料舒适透气', '1');
INSERT INTO `goods` VALUES ('130', '童泰婴儿衣服新生儿连体衣宝宝', '89', '80', '2019-12-06 16:14:48', '1', '连体衣', '童泰婴儿衣服新生儿连体衣宝宝蝴蝶哈衣0-3-6个月爬服纯棉春夏装\r\n\r\n舒适透气', '1');
INSERT INTO `goods` VALUES ('131', '婴儿连体衣秋冬装珊瑚绒衣服爬爬服', '99', '100', '2019-12-06 16:15:43', '1', '连体服', '婴儿连体衣秋冬装珊瑚绒衣服爬爬服女保暖哈衣抱衣男宝宝外出服\r\n\r\n珊瑚绒面料 宽松柔软 春秋薄款 夹棉厚款', '1');
INSERT INTO `goods` VALUES ('132', '童泰婴儿衣服加厚保暖冬季宝宝', '79', '90', '2019-12-06 16:21:43', '1', '连体衣', '童泰婴儿衣服加厚保暖冬季宝宝棉衣秋冬新生儿连体衣纯棉外出抱衣\r\n\r\n加厚保暖,很厚实,适合宝宝冬季哦~~ 200g', '1');
INSERT INTO `goods` VALUES ('133', '宝宝纯棉肚兜兜 婴儿背心', '29', '118', '2019-12-06 16:23:10', '1', '背心', '宝宝纯棉肚兜兜 婴儿背心式连腿护肚围 儿童小孩加厚睡觉春秋冬季\r\n\r\n此款分夹棉款 与双层薄款 按需选择哦', '1');
INSERT INTO `goods` VALUES ('135', '巴拉巴拉儿童宝宝外套2019新款', '198', '80', '2019-12-06 16:25:12', '1', '外套', '巴拉巴拉儿童宝宝外套2019新款秋装婴儿外衣男童衣服女童上衣洋气\r\n\r\n森系小萌宝 卡通珊瑚绒外套', '1');
INSERT INTO `goods` VALUES ('136', 'Gap婴儿加绒加厚保暖宝宝毛衣', '179', '80', '2019-12-06 16:27:49', '1', '外套', 'Gap婴儿加绒加厚保暖宝宝毛衣秋冬513709 2019新款针织开衫外套', '1');
INSERT INTO `goods` VALUES ('137', '尤妮佳妈咪宝贝云柔干爽透气纸尿裤', '245', '1800', '2019-12-06 16:31:25', '2', '纸尿裤', '尤妮佳妈咪宝贝云柔干爽透气纸尿裤XL120片婴儿尿不湿\r\n\r\n劲吸速干爽 畅玩一整天', '1');
INSERT INTO `goods` VALUES ('138', 'SOLOVE米菲Miffy芯呼吸干爽超薄', '189', '187', '2019-12-06 16:32:26', '2', '纸尿裤', 'SOLOVE米菲Miffy芯呼吸干爽超薄柔软透气纸尿裤L码3包男女尿不湿\r\n\r\n米菲旗舰店官方旗舰 超薄透气干爽舒适', '1');
INSERT INTO `goods` VALUES ('139', '安儿乐小轻芯纸尿裤L80片', '136', '90', '2019-12-06 16:33:32', '2', '尿片', '安儿乐小轻芯纸尿裤L80片 安尔乐婴儿超薄透气男女宝宝尿不湿官网\r\n\r\n品质推荐 妈妈好评 尿显设计 方便实用', '1');
INSERT INTO `goods` VALUES ('140', '一朵薄觉纸尿裤XL码132片', '168', '800', '2019-12-06 16:55:02', '2', '纸尿裤', '一朵薄觉纸尿裤XL码132片 超薄透气 纤薄干爽 男女婴儿尿不湿', '1');
INSERT INTO `goods` VALUES ('141', '宜婴婴儿空调纸尿裤XXL92片', '108', '188', '2019-12-06 16:56:02', '2', '纸尿裤', '宜婴婴儿空调纸尿裤XXL92片超薄干爽透气新生儿男女宝宝尿不湿\r\n\r\n适用于15kg以上的宝宝', '1');
INSERT INTO `goods` VALUES ('142', 'Nepia/妮飘 Genki! S72片', '168', '880', '2019-12-06 16:57:39', '2', '纸尿裤', '妮飘进口纸尿裤Genki!粘贴型婴儿超薄吸收男女宝宝尿不湿 S码72片\r\n\r\n日本原装进口 海量吸收 透气不潮闷', '1');
INSERT INTO `goods` VALUES ('143', '南极人婴儿L纸尿裤XL', '168', '111', '2019-12-06 16:59:07', '1', '纸尿裤', '南极人婴儿L纸尿裤XL超薄透气经济装S尿不湿M码男女宝宝拉拉裤\r\n\r\n拍1件实发2包 纸尿裤/拉拉裤任选 下单留言', '1');
INSERT INTO `goods` VALUES ('144', '家得宝 金装纸尿裤 L114片', '199', '999', '2019-12-06 17:00:07', '2', '纸尿裤', '家得宝金装纸尿裤L超薄透气秋冬季男女婴儿尿不湿旗舰店官网正品\r\n\r\n1箱减10元,2箱减30元', '1');
INSERT INTO `goods` VALUES ('145', '贝恩施婴儿脚踏琴钢琴健身架器', '98', '1200', '2019-12-06 17:08:03', '3', '玩具', '贝恩施婴儿脚踏琴钢琴健身架器新生儿宝宝音乐儿童玩具0-1岁3个月\r\n\r\n官方旗舰正品保障', '1');
INSERT INTO `goods` VALUES ('146', 'SHILOH成品婴儿床铃生肖玩具', '212', '1111', '2019-12-06 17:08:49', '3', '玩具', 'SHILOH成品婴儿床铃生肖玩具新生儿音乐旋转毛绒布艺安抚床头铃\r\n\r\n宝宝哄睡安抚床铃', '1');
INSERT INTO `goods` VALUES ('147', '婴儿玩具0到1岁半有声会动', '168', '100', '2019-12-06 17:09:41', '3', '玩具', '婴儿玩具0到1岁半有声会动幼儿9个月六3儿童8男孩6宝宝益智早教一\r\n\r\n智能感应 互动游戏 早教启蒙', '1');
INSERT INTO `goods` VALUES ('148', '抖音同款小黄鸭跳舞唱歌会动', '158', '100', '2019-12-06 17:10:35', '3', '玩具', '抖音同款小黄鸭跳舞唱歌会动婴儿0-1岁宝宝2-3男女孩电动儿童玩具\r\n\r\n抖音同款小黄鸭会跳舞唱歌会动的儿童玩具', '1');
INSERT INTO `goods` VALUES ('149', '婴儿童音乐早教故事机0-1岁宝宝', '129', '100', '2019-12-06 17:11:19', '3', '玩具', '婴儿童音乐早教故事机0-1岁宝宝3-6-12个月开发智力8启蒙益智玩具\r\n\r\n遥控版音乐故事机 耳朵会发光 还能远程遥控', '1');
INSERT INTO `goods` VALUES ('150', '汇乐儿童玩具0-1岁', '129', '80', '2019-12-06 17:12:06', '3', '玩具', '汇乐儿童玩具0-1岁女孩宝宝6-12月婴儿益智早教新生男孩3生日礼物\r\n\r\n汇乐品质 值得拥有', '1');
INSERT INTO `goods` VALUES ('151', 'SHILOH毛毛虫多功能安抚玩偶', '89', '100', '2019-12-06 17:12:48', '3', '玩具', 'SHILOH毛毛虫多功能安抚玩偶婴儿新生儿宝宝摇铃响纸毛绒布艺玩具\r\n\r\n色彩艳丽 多功能玩偶 材质安全', '1');
INSERT INTO `goods` VALUES ('152', '汇乐979点头不倒翁娃娃', '19', '100', '2019-12-06 17:13:53', '3', '玩具', '汇乐979点头不倒翁娃娃婴幼儿宝宝益智儿童玩具音乐婴儿玩具0-1岁\r\n\r\n点头摇晃功能 训练抓握抬头 也可做礼品', '1');
INSERT INTO `goods` VALUES ('153', 'Devondale德运全脂奶粉速溶', '54', '100', '2019-12-06 17:15:07', '4', '牛奶', 'Devondale德运全脂成人奶粉速溶牛奶粉高钙奶牛奶粉早餐奶1KG\r\n\r\n好效期新鲜到港', '1');
INSERT INTO `goods` VALUES ('154', '加拿大BabyDdrops婴儿维生素', '120', '80', '2019-12-06 17:16:29', '4', '奶粉', '加拿大BabyDdrops婴儿维生素D3宝宝补钙滴剂新生进口婴幼儿维d\r\n\r\n纯天然VD3 每天一滴 促进钙吸收', '1');
INSERT INTO `goods` VALUES ('155', '新西兰婴儿幼儿配方奶粉1-3岁', '210', '100', '2019-12-06 17:17:47', '4', '奶粉', '澳洲爱他美3段白金版铂金装新西兰进口宝宝婴儿幼儿配方奶粉1-3岁\r\n\r\n日期新鲜 品牌直供', '1');
INSERT INTO `goods` VALUES ('156', '荷兰牛栏婴儿1段原装进口0-6月龄', '190', '89', '2019-12-06 17:18:45', '4', '奶粉', '荷兰牛栏婴儿1段原装进口配方奶粉0-6月龄 诺优能荷兰版 单罐装\r\n\r\n创新包装,与荷兰本地同步', '1');
INSERT INTO `goods` VALUES ('158', 'HiPP喜宝倍喜配方奶粉2段800g', '360', '90', '2019-12-07 10:04:03', '4', '奶粉', '【旗舰店】HiPP喜宝倍喜较大婴儿配方奶粉2段800g 喜宝大白罐\r\n\r\n原装进口 正品保障 扫码可溯源', '1');
INSERT INTO `goods` VALUES ('159', '德国aptamil爱他美婴儿奶粉', '388', '111', '2019-12-07 10:31:43', '4', '奶粉', '德国aptamil爱他美进口白金版婴儿配方奶粉 1段0-6月龄 800g', '1');
INSERT INTO `goods` VALUES ('160', '洗发露婴儿洗发水250ml', '98', '90', '2019-12-07 10:34:33', '5', '洗发水', '施巴德国进口儿童洗发露婴儿洗发水250ml宝宝洗发液温和无泪', '1');
INSERT INTO `goods` VALUES ('161', '红色小象儿童洗发水无硅油', '89', '100', '2019-12-07 10:35:23', '5', '洗发水', '红色小象儿童洗发水无硅油3-15岁男女孩童柔顺洗发露旗舰店正品\r\n\r\n实付满76元 买一送一 3岁以上儿童适用。', '1');
INSERT INTO `goods` VALUES ('162', '孕产妇产褥垫产后专用护理垫', '39', '900', '2019-12-07 10:45:43', '6', '孕产', '十月结晶孕产妇产褥垫产后专用护理垫一次性床单秋冬季月经垫12片\r\n\r\n买就送婴儿柔润纸面巾40抽', '1');
INSERT INTO `goods` VALUES ('163', '子初一次性内裤产妇用品', '30', '90', '2019-12-07 10:47:37', '6', '孕产', '子初一次性内裤产妇用品孕妇产后月子必备纯棉免洗旅行大码内裤女\r\n\r\n独立包装 高弹舒适 双层裆部', '1');
INSERT INTO `goods` VALUES ('164', '孕妇专用孕晚期秋冬季薄款', '89', '900', '2019-12-07 10:48:58', '6', '孕产', '德国托腹带孕妇专用孕晚期秋冬季薄款透气怀孕腰拖托腹带孕妇专用\r\n\r\n欧盟专利 三维一体设计 科学托腹 不压肚子', '1');
INSERT INTO `goods` VALUES ('165', '月子帽秋冬产后秋季防风', '78', '90', '2019-12-07 10:51:24', '7', '月子帽', '月子帽秋冬产后秋季防风坐月子发带产妇包头巾女冬季可爱孕妇帽子\r\n\r\n买就送宝宝帽 秋冬新款', '1');
INSERT INTO `goods` VALUES ('166', '新安怡电动吸奶器', '39', '900', '2019-12-07 10:52:11', '7', '吸奶器', '新安怡电动吸奶器配件适合SCF303/301/903原装花瓣垫鸭嘴阀门导管\r\n\r\n花瓣垫鸭嘴阀门硅胶泵导管', '1');
INSERT INTO `goods` VALUES ('167', '世喜防咬乳头保护罩', '29', '100', '2019-12-07 10:53:00', '7', '奶嘴', '世喜防咬乳头保护罩哺乳奶嘴套内陷牵引器辅助喂奶神器乳盾奶头贴\r\n\r\n防咬 不惧内陷 轻松喂养', '1');
-- ----------------------------
-- Table structure for imagepath
-- ----------------------------
DROP TABLE IF EXISTS `imagepath`;
CREATE TABLE `imagepath` (
`pathId` int(12) NOT NULL AUTO_INCREMENT,
`goodId` int(12) NOT NULL,
`path` varchar(255) NOT NULL,
PRIMARY KEY (`pathId`),
KEY `goodid` (`goodId`) USING BTREE,
CONSTRAINT `imagepath_ibfk_1` FOREIGN KEY (`goodId`) REFERENCES `goods` (`goodsId`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=196 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of imagepath
-- ----------------------------
INSERT INTO `imagepath` VALUES ('155', '128', 'image/2b3e8b62-e653-4b61-abe2-11198bb60df7.jpg');
INSERT INTO `imagepath` VALUES ('156', '129', 'image/90c9a07f-3d8d-43a5-acbf-542a65481571.jpg');
INSERT INTO `imagepath` VALUES ('157', '130', 'image/be2cd700-a90f-44b0-9a65-3e8213f4f329.jpg');
INSERT INTO `imagepath` VALUES ('158', '131', 'image/9e3d0547-a940-446b-85dc-3e38131e8b0d.jpg');
INSERT INTO `imagepath` VALUES ('159', '132', 'image/d14098d4-d12f-4896-8e23-125039f408dd.jpg');
INSERT INTO `imagepath` VALUES ('160', '133', 'image/bee77cb5-bbf8-49b9-bba7-f5dbf3ccf82c.jpg');
INSERT INTO `imagepath` VALUES ('162', '135', 'image/d838423e-ef15-4b95-8dda-e645745820cb.jpg');
INSERT INTO `imagepath` VALUES ('163', '136', 'image/0ea94c6c-357b-4687-9320-16bd21da7e2e.jpg');
INSERT INTO `imagepath` VALUES ('164', '137', 'image/e3987328-a49d-4206-8f6d-c140d9a657e5.jpg');
INSERT INTO `imagepath` VALUES ('165', '138', 'image/f2549b8d-6aa2-44d6-8718-d36a71439557.jpg');
INSERT INTO `imagepath` VALUES ('166', '139', 'image/d0c8cb28-f6a0-4107-a767-a1f645fce625.jpg');
INSERT INTO `imagepath` VALUES ('167', '140', 'image/ce2e5b3f-6794-4b73-bd84-1ad3c7302f4f.jpg');
INSERT INTO `imagepath` VALUES ('168', '141', 'image/2f5d6897-e1a1-4478-9971-c357eaa0de01.jpg');
INSERT INTO `imagepath` VALUES ('169', '142', 'image/9f542930-3b5b-43a1-a902-f05d4ff1533f.jpg');
INSERT INTO `imagepath` VALUES ('170', '143', 'image/574dee91-ce23-40ec-a25e-1cc2158b38ca.jpg');
INSERT INTO `imagepath` VALUES ('171', '144', 'image/ca55a36e-ff25-4640-915e-69aa0fb60386.jpg');
INSERT INTO `imagepath` VALUES ('172', '145', 'image/21a04f0e-c422-4e37-87d8-d5a7f836179f.jpg');
INSERT INTO `imagepath` VALUES ('173', '146', 'image/1aea56f0-01f3-4387-a7a8-c45214757a57.jpg');
INSERT INTO `imagepath` VALUES ('174', '147', 'image/aea65b08-ec24-44c6-9443-6526b21b5baa.jpg');
INSERT INTO `imagepath` VALUES ('175', '148', 'image/72592a63-1a84-4382-9bd3-e3e6372d1b79.jpg');
INSERT INTO `imagepath` VALUES ('176', '149', 'image/5ef0a24b-f43f-4c25-8713-4d37bc157fcd.jpg');
INSERT INTO `imagepath` VALUES ('177', '150', 'image/b37ad44c-1e7c-4c44-8f4f-24fe80568a3e.jpg');
INSERT INTO `imagepath` VALUES ('178', '151', 'image/10ca5284-0fbd-42e4-9b7a-3fd111be2d47.jpg');
INSERT INTO `imagepath` VALUES ('179', '152', 'image/2a970d32-5cd0-4b62-a217-0832a006c23a.jpg');
INSERT INTO `imagepath` VALUES ('180', '153', 'image/232335cc-60ca-4b35-9653-583448ef1a59.jpg');
INSERT INTO `imagepath` VALUES ('181', '154', 'image/8536e0c1-78dd-47cd-a41a-e250df139aa4.jpg');
INSERT INTO `imagepath` VALUES ('182', '155', 'image/8b080003-d41a-45a5-b056-7ee06e2a6fd7.jpg');
INSERT INTO `imagepath` VALUES ('183', '156', 'image/493af197-7b29-4f9e-acd7-f49add26242b.jpg');
INSERT INTO `imagepath` VALUES ('185', '158', 'image/3e812613-610e-4905-9975-12ffc8822b90.jpg');
INSERT INTO `imagepath` VALUES ('186', '159', 'image/bb9c113e-4d3c-4d16-8a73-b61958311ab3.jpg');
INSERT INTO `imagepath` VALUES ('187', '160', 'image/5228d917-d3f0-4363-9c0e-aa8b70b91f5d.jpg');
INSERT INTO `imagepath` VALUES ('188', '161', 'image/587265ed-dc8c-4770-965a-d9740128ce48.jpg');
INSERT INTO `imagepath` VALUES ('189', '162', 'image/28e6337e-02d4-4552-b460-862d6eef0895.jpg');
INSERT INTO `imagepath` VALUES ('190', '163', 'image/c0f5044f-8948-4d41-85a8-84e2dce96e43.jpg');
INSERT INTO `imagepath` VALUES ('191', '164', 'image/2eef49b9-fe80-4f0a-8c7d-cd33f00a4c4b.jpg');
INSERT INTO `imagepath` VALUES ('192', '165', 'image/aa226a25-3cb0-43e3-b112-3086f711b16e.jpg');
INSERT INTO `imagepath` VALUES ('193', '166', 'image/3f5d4dca-031b-4a89-82b2-eb26afad09b0.jpg');
INSERT INTO `imagepath` VALUES ('194', '167', 'image/70c974ba-0e04-4048-b286-8a008cdd231e.jpg');
-- ----------------------------
-- Table structure for indent
-- ----------------------------
DROP TABLE IF EXISTS `indent`;
CREATE TABLE `indent` (
`orderId` int(12) NOT NULL AUTO_INCREMENT,
`userId` int(12) NOT NULL,
`orderTime` datetime NOT NULL,
`oldPrice` float NOT NULL,
`newPrice` float NOT NULL,
`isPay` tinyint(1) NOT NULL,
`isSend` tinyint(1) NOT NULL,
`isReceive` tinyint(1) NOT NULL,
`isComplete` tinyint(1) NOT NULL,
`addressId` int(12) NOT NULL,
PRIMARY KEY (`orderId`),
KEY `userId` (`userId`) USING BTREE,
KEY `orderGoods` (`orderTime`) USING BTREE,
KEY `addressId` (`addressId`) USING BTREE,
CONSTRAINT `indent_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `indent_ibfk_2` FOREIGN KEY (`addressId`) REFERENCES `address` (`addressID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of indent
-- ----------------------------
-- ----------------------------
-- Table structure for orderitem
-- ----------------------------
DROP TABLE IF EXISTS `orderitem`;
CREATE TABLE `orderitem` (
`itemId` int(12) NOT NULL AUTO_INCREMENT,
`orderId` int(12) NOT NULL,
`goodsId` int(12) NOT NULL,
`num` int(12) NOT NULL,
PRIMARY KEY (`itemId`),
KEY `orderId` (`orderId`) USING BTREE,
KEY `goodsId` (`goodsId`) USING BTREE,
CONSTRAINT `orderitem_ibfk_1` FOREIGN KEY (`orderId`) REFERENCES `indent` (`orderId`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `orderitem_ibfk_2` FOREIGN KEY (`goodsId`) REFERENCES `goods` (`goodsId`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of orderitem
-- ----------------------------
-- ----------------------------
-- Table structure for shopcart
-- ----------------------------
DROP TABLE IF EXISTS `shopcart`;
CREATE TABLE `shopcart` (
`userId` int(12) NOT NULL,
`goodsid` int(12) NOT NULL,
`cateDate` datetime NOT NULL,
`goodsNum` int(12) NOT NULL,
PRIMARY KEY (`userId`,`goodsid`),
KEY `userId` (`userId`) USING BTREE,
KEY `goodsid` (`goodsid`) USING BTREE,
CONSTRAINT `shopcart_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `shopcart_ibfk_2` FOREIGN KEY (`goodsid`) REFERENCES `goods` (`goodsId`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;