添加实体类及其对应的服务、实现类和数据库交互
This commit is contained in:
parent
780ab64d83
commit
6d2fb4c999
|
@ -1,14 +0,0 @@
|
|||
package com.example.takeawaysystemserver.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author Ethereal
|
||||
* @date 2024/7/7
|
||||
* @description
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "订单模块")
|
||||
public class OrderController {
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
package com.example.takeawaysystemserver.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author Ethereal
|
||||
* @date 2024/7/7
|
||||
* @description
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "商家模块")
|
||||
public class ShopController {
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
package com.example.takeawaysystemserver.controller;
|
||||
|
||||
import com.example.takeawaysystemserver.entity.User;
|
||||
import com.example.takeawaysystemserver.service.userService.UserService;
|
||||
import com.example.takeawaysystemserver.util.R;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
||||
/**
|
||||
* @author Ethereal
|
||||
* @date 2024/7/7
|
||||
* @description
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "用户模块")
|
||||
@RequestMapping("user")
|
||||
public class UserController {
|
||||
|
||||
@Resource
|
||||
private UserService userService;
|
||||
|
||||
@PostMapping("/register")
|
||||
@ApiOperation(value = "注册")
|
||||
public R<String> register(){
|
||||
return userService.register();
|
||||
}
|
||||
|
||||
@PostMapping("/login")
|
||||
@ApiOperation(value = "登录")
|
||||
public R<String> login(){
|
||||
return userService.login();
|
||||
}
|
||||
|
||||
@PostMapping("/logout")
|
||||
@ApiOperation(value = "登出")
|
||||
public R<String> logout(){
|
||||
return userService.logout();
|
||||
}
|
||||
|
||||
@PostMapping("/userinfo")
|
||||
@ApiOperation(value = "获取用户信息")
|
||||
public R<User> getUserInfo(){
|
||||
return userService.getUserInfo();
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation(value = "修改用户信息")
|
||||
public R<String> updateUser(){
|
||||
return userService.updateUser();
|
||||
}
|
||||
}
|
|
@ -1,51 +1,101 @@
|
|||
package com.example.takeawaysystemserver.entity;
|
||||
|
||||
import jakarta.annotation.Nullable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Ethereal
|
||||
* @date 2024/7/7
|
||||
* @description
|
||||
*
|
||||
* @TableName dish
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Dish {
|
||||
private String id;
|
||||
public class Dish implements Serializable {
|
||||
/**
|
||||
* 商家的ID
|
||||
* 主键ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* shop_id
|
||||
*/
|
||||
private String shopId;
|
||||
|
||||
/**
|
||||
* 分类名
|
||||
*/
|
||||
private String group;
|
||||
|
||||
/**
|
||||
* 菜品名
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 价格(分)
|
||||
* 价格
|
||||
*/
|
||||
private Integer price;
|
||||
|
||||
/**
|
||||
* 销量
|
||||
* 售出数量
|
||||
*/
|
||||
private Integer sellCount;
|
||||
|
||||
/**
|
||||
* 图片链接
|
||||
* 图片地址
|
||||
*/
|
||||
@Nullable
|
||||
private String image;
|
||||
/**
|
||||
* 子选项
|
||||
* [key: 类型,如“辣度选择”] : [value: 子选项,如["微辣"]]
|
||||
*/
|
||||
@Nullable
|
||||
private Map<String, String[]> subOptions;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Dish other = (Dish) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId()))
|
||||
&& (this.getGroup() == null ? other.getGroup() == null : this.getGroup().equals(other.getGroup()))
|
||||
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
|
||||
&& (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
|
||||
&& (this.getSellCount() == null ? other.getSellCount() == null : this.getSellCount().equals(other.getSellCount()))
|
||||
&& (this.getImage() == null ? other.getImage() == null : this.getImage().equals(other.getImage()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode());
|
||||
result = prime * result + ((getGroup() == null) ? 0 : getGroup().hashCode());
|
||||
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
|
||||
result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
|
||||
result = prime * result + ((getSellCount() == null) ? 0 : getSellCount().hashCode());
|
||||
result = prime * result + ((getImage() == null) ? 0 : getImage().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", shopId=").append(shopId);
|
||||
sb.append(", group=").append(group);
|
||||
sb.append(", name=").append(name);
|
||||
sb.append(", price=").append(price);
|
||||
sb.append(", sellCount=").append(sellCount);
|
||||
sb.append(", image=").append(image);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,101 @@
|
|||
package com.example.takeawaysystemserver.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @TableName dish_flavor
|
||||
*/
|
||||
@Data
|
||||
public class DishFlavor implements Serializable {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 菜品ID
|
||||
*/
|
||||
private String dishId;
|
||||
|
||||
/**
|
||||
* 口味名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 口味数据列表
|
||||
*/
|
||||
private String value;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Long createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Long updateTime;
|
||||
|
||||
/**
|
||||
* 是否删除(1删除,0未删除)
|
||||
*/
|
||||
private Integer isDelete;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
DishFlavor other = (DishFlavor) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getDishId() == null ? other.getDishId() == null : this.getDishId().equals(other.getDishId()))
|
||||
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
|
||||
&& (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue()))
|
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
|
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
|
||||
&& (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getDishId() == null) ? 0 : getDishId().hashCode());
|
||||
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
|
||||
result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode());
|
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
|
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
|
||||
result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", dishId=").append(dishId);
|
||||
sb.append(", name=").append(name);
|
||||
sb.append(", value=").append(value);
|
||||
sb.append(", createTime=").append(createTime);
|
||||
sb.append(", updateTime=").append(updateTime);
|
||||
sb.append(", isDelete=").append(isDelete);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
|
@ -1,44 +1,109 @@
|
|||
package com.example.takeawaysystemserver.entity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Ethereal
|
||||
* @date 2024/7/7
|
||||
* @description
|
||||
*
|
||||
* @TableName order
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Order {
|
||||
private String id;
|
||||
private String userId;
|
||||
private String shopId;
|
||||
public class Order implements Serializable {
|
||||
/**
|
||||
* 订单项
|
||||
* 主键ID
|
||||
*/
|
||||
private List<OrderItem> items;
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 总价(分)
|
||||
* 用户ID
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
private String shopId;
|
||||
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
private Integer price;
|
||||
|
||||
/**
|
||||
* - 0 已取消
|
||||
* - 1 配送中
|
||||
* - 2 已完成
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 送餐地址
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* Unix 时间戳
|
||||
* 创建时间
|
||||
*/
|
||||
private Long createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Long updateTime;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Order other = (Order) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
|
||||
&& (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId()))
|
||||
&& (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
|
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
|
||||
&& (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
|
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
|
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
|
||||
result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode());
|
||||
result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
|
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
|
||||
result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
|
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
|
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", userId=").append(userId);
|
||||
sb.append(", shopId=").append(shopId);
|
||||
sb.append(", price=").append(price);
|
||||
sb.append(", status=").append(status);
|
||||
sb.append(", address=").append(address);
|
||||
sb.append(", createTime=").append(createTime);
|
||||
sb.append(", updateTime=").append(updateTime);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
|
@ -1,35 +1,85 @@
|
|||
package com.example.takeawaysystemserver.entity;
|
||||
|
||||
import jakarta.annotation.Nullable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author spyn
|
||||
* @date 2024/7/10
|
||||
* @description 订单内的子项
|
||||
*
|
||||
* @TableName order_item
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class OrderItem {
|
||||
public class OrderItem implements Serializable {
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* dish_id
|
||||
*/
|
||||
private String dishId;
|
||||
@Nullable
|
||||
private Dish dish;
|
||||
|
||||
/**
|
||||
* order_id
|
||||
*/
|
||||
private String orderId;
|
||||
|
||||
/**
|
||||
* 购买份数
|
||||
*/
|
||||
private Integer count;
|
||||
private Integer price;
|
||||
|
||||
/**
|
||||
* 子选项
|
||||
* [key: 类型,如“辣度选择”] : [value: 子选项,如"微辣"]
|
||||
* 注意这里value是String,而不是String[],和Dish中的subOptions不同
|
||||
* 价格
|
||||
*/
|
||||
@Nullable
|
||||
private Map<String, String> options;
|
||||
}
|
||||
private Integer price;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
OrderItem other = (OrderItem) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getDishId() == null ? other.getDishId() == null : this.getDishId().equals(other.getDishId()))
|
||||
&& (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
|
||||
&& (this.getCount() == null ? other.getCount() == null : this.getCount().equals(other.getCount()))
|
||||
&& (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getDishId() == null) ? 0 : getDishId().hashCode());
|
||||
result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
|
||||
result = prime * result + ((getCount() == null) ? 0 : getCount().hashCode());
|
||||
result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", dishId=").append(dishId);
|
||||
sb.append(", orderId=").append(orderId);
|
||||
sb.append(", count=").append(count);
|
||||
sb.append(", price=").append(price);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
|
@ -1,61 +1,117 @@
|
|||
package com.example.takeawaysystemserver.entity;
|
||||
|
||||
import jakarta.annotation.Nullable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Ethereal
|
||||
* @date 2024/7/7
|
||||
* @description
|
||||
*
|
||||
* @TableName shop
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Shop {
|
||||
private String id;
|
||||
private String name;
|
||||
public class Shop implements Serializable {
|
||||
/**
|
||||
* 评分(暂且不做评论系统,这里写死)
|
||||
* 主键ID
|
||||
*/
|
||||
private Float point;
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 销量
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 评分
|
||||
*/
|
||||
private Double point;
|
||||
|
||||
/**
|
||||
* 售出数
|
||||
*/
|
||||
private Integer sellCount;
|
||||
|
||||
/**
|
||||
* - 0 被删除
|
||||
* - 1 营业中
|
||||
* - 2 休息中
|
||||
* 0被删除,1营业中,2休息中
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 开店和闭店时间,格式为HH:mm:ss
|
||||
* 开业时间
|
||||
*/
|
||||
private String openTime;
|
||||
private String closeTime;
|
||||
|
||||
/**
|
||||
* 店铺地址(字符串)
|
||||
* 休息时间
|
||||
*/
|
||||
private String closeTime;
|
||||
|
||||
/**
|
||||
* 店铺地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* APP首页展示的菜品(最多3份)
|
||||
*
|
||||
*/
|
||||
@Nullable
|
||||
private List<Dish> displayedDishes;
|
||||
/**
|
||||
* 店铺的icon
|
||||
*/
|
||||
@Nullable
|
||||
private String image;
|
||||
/**
|
||||
* 菜品分类
|
||||
* [key: 分类名] : [value: 菜品列表]
|
||||
*/
|
||||
@Nullable
|
||||
private Map<String, Dish[]> groups;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Shop other = (Shop) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
|
||||
&& (this.getPoint() == null ? other.getPoint() == null : this.getPoint().equals(other.getPoint()))
|
||||
&& (this.getSellCount() == null ? other.getSellCount() == null : this.getSellCount().equals(other.getSellCount()))
|
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
|
||||
&& (this.getOpenTime() == null ? other.getOpenTime() == null : this.getOpenTime().equals(other.getOpenTime()))
|
||||
&& (this.getCloseTime() == null ? other.getCloseTime() == null : this.getCloseTime().equals(other.getCloseTime()))
|
||||
&& (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
|
||||
&& (this.getImage() == null ? other.getImage() == null : this.getImage().equals(other.getImage()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
|
||||
result = prime * result + ((getPoint() == null) ? 0 : getPoint().hashCode());
|
||||
result = prime * result + ((getSellCount() == null) ? 0 : getSellCount().hashCode());
|
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
|
||||
result = prime * result + ((getOpenTime() == null) ? 0 : getOpenTime().hashCode());
|
||||
result = prime * result + ((getCloseTime() == null) ? 0 : getCloseTime().hashCode());
|
||||
result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
|
||||
result = prime * result + ((getImage() == null) ? 0 : getImage().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", name=").append(name);
|
||||
sb.append(", point=").append(point);
|
||||
sb.append(", sellCount=").append(sellCount);
|
||||
sb.append(", status=").append(status);
|
||||
sb.append(", openTime=").append(openTime);
|
||||
sb.append(", closeTime=").append(closeTime);
|
||||
sb.append(", address=").append(address);
|
||||
sb.append(", image=").append(image);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
|
@ -1,30 +1,93 @@
|
|||
package com.example.takeawaysystemserver.entity;
|
||||
|
||||
import jakarta.annotation.Nullable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author Ethereal
|
||||
* @date 2024/7/7
|
||||
* @description
|
||||
*
|
||||
* @TableName user
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class User {
|
||||
private String id;
|
||||
private String username;
|
||||
@Nullable
|
||||
private String password;
|
||||
private String phone;
|
||||
@Nullable
|
||||
private String address;
|
||||
public class User implements Serializable {
|
||||
/**
|
||||
* - 0:被删除
|
||||
* - 1:正常
|
||||
* - 2:被封禁
|
||||
* 主键ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 用户状态,0:被删除,1:正常,2:被封禁
|
||||
*/
|
||||
private Integer status;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
User other = (User) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
|
||||
&& (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
|
||||
&& (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
|
||||
&& (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
|
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
|
||||
result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
|
||||
result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
|
||||
result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
|
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", username=").append(username);
|
||||
sb.append(", password=").append(password);
|
||||
sb.append(", phone=").append(phone);
|
||||
sb.append(", address=").append(address);
|
||||
sb.append(", status=").append(status);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.example.takeawaysystemserver.mapper;
|
||||
|
||||
import com.example.takeawaysystemserver.entity.DishFlavor;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author qiushengyu
|
||||
* @description 针对表【dish_flavor】的数据库操作Mapper
|
||||
* @createDate 2024-07-11 17:12:51
|
||||
* @Entity com.example.takeawaysystemserver.entity.DishFlavor
|
||||
*/
|
||||
public interface DishFlavorMapper extends BaseMapper<DishFlavor> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.example.takeawaysystemserver.mapper;
|
||||
|
||||
import com.example.takeawaysystemserver.entity.Dish;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author qiushengyu
|
||||
* @description 针对表【dish】的数据库操作Mapper
|
||||
* @createDate 2024-07-11 17:11:31
|
||||
* @Entity com.example.takeawaysystemserver.entity.Dish
|
||||
*/
|
||||
public interface DishMapper extends BaseMapper<Dish> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.example.takeawaysystemserver.mapper;
|
||||
|
||||
import com.example.takeawaysystemserver.entity.OrderItem;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author qiushengyu
|
||||
* @description 针对表【order_item】的数据库操作Mapper
|
||||
* @createDate 2024-07-11 17:13:53
|
||||
* @Entity com.example.takeawaysystemserver.entity.OrderItem
|
||||
*/
|
||||
public interface OrderItemMapper extends BaseMapper<OrderItem> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.example.takeawaysystemserver.mapper;
|
||||
|
||||
import com.example.takeawaysystemserver.entity.Order;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author qiushengyu
|
||||
* @description 针对表【order】的数据库操作Mapper
|
||||
* @createDate 2024-07-11 17:13:46
|
||||
* @Entity com.example.takeawaysystemserver.entity.Order
|
||||
*/
|
||||
public interface OrderMapper extends BaseMapper<Order> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.example.takeawaysystemserver.mapper;
|
||||
|
||||
import com.example.takeawaysystemserver.entity.Shop;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author qiushengyu
|
||||
* @description 针对表【shop】的数据库操作Mapper
|
||||
* @createDate 2024-07-11 17:13:56
|
||||
* @Entity com.example.takeawaysystemserver.entity.Shop
|
||||
*/
|
||||
public interface ShopMapper extends BaseMapper<Shop> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.example.takeawaysystemserver.mapper;
|
||||
|
||||
import com.example.takeawaysystemserver.entity.User;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author qiushengyu
|
||||
* @description 针对表【user】的数据库操作Mapper
|
||||
* @createDate 2024-07-11 17:14:00
|
||||
* @Entity com.example.takeawaysystemserver.entity.User
|
||||
*/
|
||||
public interface UserMapper extends BaseMapper<User> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.example.takeawaysystemserver.service;
|
||||
|
||||
import com.example.takeawaysystemserver.entity.DishFlavor;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author qiushengyu
|
||||
* @description 针对表【dish_flavor】的数据库操作Service
|
||||
* @createDate 2024-07-11 17:12:51
|
||||
*/
|
||||
public interface DishFlavorService extends IService<DishFlavor> {
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.example.takeawaysystemserver.service;
|
||||
|
||||
import com.example.takeawaysystemserver.entity.Dish;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author qiushengyu
|
||||
* @description 针对表【dish】的数据库操作Service
|
||||
* @createDate 2024-07-11 17:11:31
|
||||
*/
|
||||
public interface DishService extends IService<Dish> {
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.example.takeawaysystemserver.service;
|
||||
|
||||
import com.example.takeawaysystemserver.entity.OrderItem;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author qiushengyu
|
||||
* @description 针对表【order_item】的数据库操作Service
|
||||
* @createDate 2024-07-11 17:13:53
|
||||
*/
|
||||
public interface OrderItemService extends IService<OrderItem> {
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.example.takeawaysystemserver.service;
|
||||
|
||||
import com.example.takeawaysystemserver.entity.Order;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author qiushengyu
|
||||
* @description 针对表【order】的数据库操作Service
|
||||
* @createDate 2024-07-11 17:13:46
|
||||
*/
|
||||
public interface OrderService extends IService<Order> {
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.example.takeawaysystemserver.service;
|
||||
|
||||
import com.example.takeawaysystemserver.entity.Shop;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author qiushengyu
|
||||
* @description 针对表【shop】的数据库操作Service
|
||||
* @createDate 2024-07-11 17:13:56
|
||||
*/
|
||||
public interface ShopService extends IService<Shop> {
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.example.takeawaysystemserver.service;
|
||||
|
||||
import com.example.takeawaysystemserver.entity.User;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author qiushengyu
|
||||
* @description 针对表【user】的数据库操作Service
|
||||
* @createDate 2024-07-11 17:14:00
|
||||
*/
|
||||
public interface UserService extends IService<User> {
|
||||
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
package com.example.takeawaysystemserver.service.fileService;
|
||||
|
||||
/**
|
||||
* @author Ethereal
|
||||
* @date 2024/7/7
|
||||
* @description
|
||||
*/
|
||||
public interface FileService {
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
package com.example.takeawaysystemserver.service.fileService.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author Ethereal
|
||||
* @date 2024/7/7
|
||||
* @description
|
||||
*/
|
||||
@Service
|
||||
public class FileServiceImpl {
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package com.example.takeawaysystemserver.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.example.takeawaysystemserver.entity.DishFlavor;
|
||||
import com.example.takeawaysystemserver.service.DishFlavorService;
|
||||
import com.example.takeawaysystemserver.mapper.DishFlavorMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author qiushengyu
|
||||
* @description 针对表【dish_flavor】的数据库操作Service实现
|
||||
* @createDate 2024-07-11 17:12:51
|
||||
*/
|
||||
@Service
|
||||
public class DishFlavorServiceImpl extends ServiceImpl<DishFlavorMapper, DishFlavor>
|
||||
implements DishFlavorService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.example.takeawaysystemserver.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.example.takeawaysystemserver.entity.Dish;
|
||||
import com.example.takeawaysystemserver.service.DishService;
|
||||
import com.example.takeawaysystemserver.mapper.DishMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author qiushengyu
|
||||
* @description 针对表【dish】的数据库操作Service实现
|
||||
* @createDate 2024-07-11 17:11:31
|
||||
*/
|
||||
@Service
|
||||
public class DishServiceImpl extends ServiceImpl<DishMapper, Dish>
|
||||
implements DishService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.example.takeawaysystemserver.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.example.takeawaysystemserver.entity.OrderItem;
|
||||
import com.example.takeawaysystemserver.service.OrderItemService;
|
||||
import com.example.takeawaysystemserver.mapper.OrderItemMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author qiushengyu
|
||||
* @description 针对表【order_item】的数据库操作Service实现
|
||||
* @createDate 2024-07-11 17:13:53
|
||||
*/
|
||||
@Service
|
||||
public class OrderItemServiceImpl extends ServiceImpl<OrderItemMapper, OrderItem>
|
||||
implements OrderItemService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.example.takeawaysystemserver.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.example.takeawaysystemserver.entity.Order;
|
||||
import com.example.takeawaysystemserver.service.OrderService;
|
||||
import com.example.takeawaysystemserver.mapper.OrderMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author qiushengyu
|
||||
* @description 针对表【order】的数据库操作Service实现
|
||||
* @createDate 2024-07-11 17:13:46
|
||||
*/
|
||||
@Service
|
||||
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order>
|
||||
implements OrderService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.example.takeawaysystemserver.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.example.takeawaysystemserver.entity.Shop;
|
||||
import com.example.takeawaysystemserver.service.ShopService;
|
||||
import com.example.takeawaysystemserver.mapper.ShopMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author qiushengyu
|
||||
* @description 针对表【shop】的数据库操作Service实现
|
||||
* @createDate 2024-07-11 17:13:56
|
||||
*/
|
||||
@Service
|
||||
public class ShopServiceImpl extends ServiceImpl<ShopMapper, Shop>
|
||||
implements ShopService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.example.takeawaysystemserver.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.example.takeawaysystemserver.entity.User;
|
||||
import com.example.takeawaysystemserver.service.UserService;
|
||||
import com.example.takeawaysystemserver.mapper.UserMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author qiushengyu
|
||||
* @description 针对表【user】的数据库操作Service实现
|
||||
* @createDate 2024-07-11 17:14:00
|
||||
*/
|
||||
@Service
|
||||
public class UserServiceImpl extends ServiceImpl<UserMapper, User>
|
||||
implements UserService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
package com.example.takeawaysystemserver.service.orderService;
|
||||
|
||||
/**
|
||||
* @author Ethereal
|
||||
* @date 2024/7/7
|
||||
* @description
|
||||
*/
|
||||
public interface OrderService {
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
package com.example.takeawaysystemserver.service.orderService.impl;
|
||||
|
||||
import com.example.takeawaysystemserver.service.orderService.OrderService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author Ethereal
|
||||
* @date 2024/7/7
|
||||
* @description
|
||||
*/
|
||||
@Service
|
||||
public class OrderServiceImpl implements OrderService {
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
package com.example.takeawaysystemserver.service.userService;
|
||||
|
||||
import com.example.takeawaysystemserver.entity.User;
|
||||
import com.example.takeawaysystemserver.util.R;
|
||||
|
||||
/**
|
||||
* @author Ethereal
|
||||
* @date 2024/7/7
|
||||
* @description
|
||||
*/
|
||||
public interface UserService {
|
||||
|
||||
/**
|
||||
* 登录
|
||||
* @return token
|
||||
*/
|
||||
R<String> login();
|
||||
|
||||
/**
|
||||
* 注册
|
||||
* @return 注册信息
|
||||
*/
|
||||
R<String> register();
|
||||
|
||||
/**
|
||||
* 登出
|
||||
* @return 返回登出成功信息
|
||||
*/
|
||||
R<String> logout();
|
||||
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
* @return 用户信息
|
||||
*/
|
||||
R<User> getUserInfo();
|
||||
|
||||
/**
|
||||
* 更新用户信息
|
||||
* @return 更新成功与否
|
||||
*/
|
||||
R<String> updateUser();
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
package com.example.takeawaysystemserver.service.userService.impl;
|
||||
|
||||
import com.example.takeawaysystemserver.entity.User;
|
||||
import com.example.takeawaysystemserver.service.userService.UserService;
|
||||
import com.example.takeawaysystemserver.util.R;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author Ethereal
|
||||
* @date 2024/7/7
|
||||
* @description
|
||||
*/
|
||||
@Service
|
||||
public class UserServiceImpl implements UserService {
|
||||
@Override
|
||||
public R<String> login() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<String> register() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<String> logout() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<User> getUserInfo() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<String> updateUser() {
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -1,9 +1,15 @@
|
|||
spring:
|
||||
application:
|
||||
name: takeaway-system
|
||||
redis:
|
||||
host: 1.14.105.160
|
||||
port: 6379
|
||||
application:
|
||||
name: takeaway-system
|
||||
data:
|
||||
redis:
|
||||
host: 1.14.105.160
|
||||
port: 6379
|
||||
password: spynsql
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://1.14.105.160:6207/takeaway?serverTimezone=GMT%2B8&useSSL=false&characterEncoding=utf-8
|
||||
username: spyn
|
||||
password: spynsql
|
||||
|
||||
server:
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.example.takeawaysystemserver.mapper.DishFlavorMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.example.takeawaysystemserver.entity.DishFlavor">
|
||||
<id property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="dishId" column="dish_id" jdbcType="VARCHAR"/>
|
||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||
<result property="value" column="value" jdbcType="VARCHAR"/>
|
||||
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
|
||||
<result property="isDelete" column="is_delete" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,dish_id,name,
|
||||
value,create_time,update_time,
|
||||
is_delete
|
||||
</sql>
|
||||
</mapper>
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.example.takeawaysystemserver.mapper.DishMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.example.takeawaysystemserver.entity.Dish">
|
||||
<id property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="VARCHAR"/>
|
||||
<result property="group" column="group" jdbcType="VARCHAR"/>
|
||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||
<result property="price" column="price" jdbcType="INTEGER"/>
|
||||
<result property="sellCount" column="sell_count" jdbcType="INTEGER"/>
|
||||
<result property="image" column="image" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,shop_id,group,
|
||||
name,price,sell_count,
|
||||
image
|
||||
</sql>
|
||||
</mapper>
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.example.takeawaysystemserver.mapper.OrderItemMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.example.takeawaysystemserver.entity.OrderItem">
|
||||
<id property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="dishId" column="dish_id" jdbcType="VARCHAR"/>
|
||||
<result property="orderId" column="order_id" jdbcType="VARCHAR"/>
|
||||
<result property="count" column="count" jdbcType="INTEGER"/>
|
||||
<result property="price" column="price" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,dish_id,order_id,
|
||||
count,price
|
||||
</sql>
|
||||
</mapper>
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.example.takeawaysystemserver.mapper.OrderMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.example.takeawaysystemserver.entity.Order">
|
||||
<id property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="userId" column="user_id" jdbcType="VARCHAR"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="VARCHAR"/>
|
||||
<result property="price" column="price" jdbcType="INTEGER"/>
|
||||
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||
<result property="address" column="address" jdbcType="VARCHAR"/>
|
||||
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,user_id,shop_id,
|
||||
price,status,address,
|
||||
create_time,update_time
|
||||
</sql>
|
||||
</mapper>
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.example.takeawaysystemserver.mapper.ShopMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.example.takeawaysystemserver.entity.Shop">
|
||||
<id property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||
<result property="point" column="point" jdbcType="FLOAT"/>
|
||||
<result property="sellCount" column="sell_count" jdbcType="INTEGER"/>
|
||||
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||
<result property="openTime" column="open_time" jdbcType="VARCHAR"/>
|
||||
<result property="closeTime" column="close_time" jdbcType="VARCHAR"/>
|
||||
<result property="address" column="address" jdbcType="VARCHAR"/>
|
||||
<result property="image" column="image" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,name,point,
|
||||
sell_count,status,open_time,
|
||||
close_time,address,image
|
||||
</sql>
|
||||
</mapper>
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.example.takeawaysystemserver.mapper.UserMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.example.takeawaysystemserver.entity.User">
|
||||
<id property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="username" column="username" jdbcType="VARCHAR"/>
|
||||
<result property="password" column="password" jdbcType="VARCHAR"/>
|
||||
<result property="phone" column="phone" jdbcType="VARCHAR"/>
|
||||
<result property="address" column="address" jdbcType="VARCHAR"/>
|
||||
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,username,password,
|
||||
phone,address,status
|
||||
</sql>
|
||||
</mapper>
|
Loading…
Reference in New Issue