소스 검색

用户表、订单表、口罩表基础代码

yegang 2 년 전
부모
커밋
70baa7e0dd

+ 15 - 0
src/main/java/com/sw/dao/SysUserDao.java

@@ -0,0 +1,15 @@
+package com.sw.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.sw.domain.SysUser;
+
+/**
+ * (SysUser)表数据库访问层
+ *
+ * @author yegang
+ * @since 2022-02-18 10:27:22
+ */
+public interface SysUserDao extends BaseMapper<SysUser> {
+
+
+}

+ 15 - 0
src/main/java/com/sw/dao/TMaskDao.java

@@ -0,0 +1,15 @@
+package com.sw.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.sw.domain.TMask;
+
+/**
+ * (TMask)表数据库访问层
+ *
+ * @author yegang
+ * @since 2022-02-18 10:29:23
+ */
+public interface TMaskDao extends BaseMapper<TMask> {
+
+
+}

+ 15 - 0
src/main/java/com/sw/dao/TOrderDao.java

@@ -0,0 +1,15 @@
+package com.sw.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.sw.domain.TOrder;
+
+/**
+ * (TOrder)表数据库访问层
+ *
+ * @author yegang
+ * @since 2022-02-18 10:28:01
+ */
+public interface TOrderDao extends BaseMapper<TOrder> {
+
+
+}

+ 22 - 0
src/main/java/com/sw/domain/SysUser.java

@@ -0,0 +1,22 @@
+package com.sw.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * (SysUser)实体类
+ *
+ * @author yegang
+ * @since 2022-02-18 10:27:19
+ */
+@Data
+@TableName("sys_user")
+public class SysUser implements Serializable {
+    private static final long serialVersionUID = 616589298019846813L;
+
+    private String id;
+
+
+}

+ 33 - 0
src/main/java/com/sw/domain/TMask.java

@@ -0,0 +1,33 @@
+package com.sw.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * (TMask)实体类
+ *
+ * @author yegang
+ * @since 2022-02-18 10:27:45
+ */
+@Data
+@TableName("t_mask")
+public class TMask implements Serializable {
+    private static final long serialVersionUID = 291254347916525434L;
+    /**
+     * 主键
+     */
+    private Integer id;
+
+    private Integer maskTotal;
+
+    private Integer maskStock;
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+
+}

+ 39 - 0
src/main/java/com/sw/domain/TOrder.java

@@ -0,0 +1,39 @@
+package com.sw.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * (TOrder)实体类
+ *
+ * @author yegang
+ * @since 2022-02-18 10:28:01
+ */
+@Data
+@TableName("t_order")
+public class TOrder implements Serializable {
+    private static final long serialVersionUID = 456314406106326807L;
+    /**
+     * 主键
+     */
+    private Integer id;
+    /**
+     * 用户标识
+     */
+    private String uid;
+
+    private Integer mid;
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+    /**
+     * 状态 1 订单未支付 2 订单支付成功 3 订单支付失败
+     */
+    private String state;
+
+
+}

+ 15 - 0
src/main/java/com/sw/service/SysUserService.java

@@ -0,0 +1,15 @@
+package com.sw.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.sw.domain.SysUser;
+
+/**
+ * (SysUser)表服务接口
+ *
+ * @author yegang
+ * @since 2022-02-18 10:27:22
+ */
+public interface SysUserService extends IService<SysUser> {
+
+
+}

+ 15 - 0
src/main/java/com/sw/service/TMaskService.java

@@ -0,0 +1,15 @@
+package com.sw.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.sw.domain.TMask;
+
+/**
+ * (TMask)表服务接口
+ *
+ * @author yegang
+ * @since 2022-02-18 10:27:45
+ */
+public interface TMaskService extends IService<TMask> {
+
+
+}

+ 15 - 0
src/main/java/com/sw/service/TOrderService.java

@@ -0,0 +1,15 @@
+package com.sw.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.sw.domain.TOrder;
+
+/**
+ * (TOrder)表服务接口
+ *
+ * @author yegang
+ * @since 2022-02-18 10:28:01
+ */
+public interface TOrderService extends IService<TOrder> {
+
+
+}

+ 23 - 0
src/main/java/com/sw/service/impl/SysUserServiceImpl.java

@@ -0,0 +1,23 @@
+package com.sw.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.sw.dao.SysUserDao;
+import com.sw.domain.SysUser;
+import com.sw.service.SysUserService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * (SysUser)表服务实现类
+ *
+ * @author yegang
+ * @since 2022-02-18 10:27:22
+ */
+@Service("sysUserService")
+public class SysUserServiceImpl extends ServiceImpl<SysUserDao, SysUser> implements SysUserService {
+    @Resource
+    private SysUserDao sysUserDao;
+
+
+}

+ 23 - 0
src/main/java/com/sw/service/impl/TMaskServiceImpl.java

@@ -0,0 +1,23 @@
+package com.sw.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.sw.dao.TMaskDao;
+import com.sw.domain.TMask;
+import com.sw.service.TMaskService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * (TMask)表服务实现类
+ *
+ * @author yegang
+ * @since 2022-02-18 10:27:46
+ */
+@Service("tMaskService")
+public class TMaskServiceImpl extends ServiceImpl<TMaskDao, TMask> implements TMaskService {
+    @Resource
+    private TMaskDao tMaskDao;
+
+
+}

+ 23 - 0
src/main/java/com/sw/service/impl/TOrderServiceImpl.java

@@ -0,0 +1,23 @@
+package com.sw.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.sw.dao.TOrderDao;
+import com.sw.domain.TOrder;
+import com.sw.service.TOrderService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+ * (TOrder)表服务实现类
+ *
+ * @author yegang
+ * @since 2022-02-18 10:28:01
+ */
+@Service("tOrderService")
+public class TOrderServiceImpl extends ServiceImpl<TOrderDao, TOrder> implements TOrderService {
+    @Resource
+    private TOrderDao tOrderDao;
+
+
+}

+ 6 - 0
src/main/resources/mapper/SysUserMapper.xml

@@ -0,0 +1,6 @@
+<?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.sw.dao.SysUserDao">
+
+
+</mapper>

+ 6 - 0
src/main/resources/mapper/TMaskMapper.xml

@@ -0,0 +1,6 @@
+<?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.sw.dao.TMaskDao">
+
+
+</mapper>

+ 6 - 0
src/main/resources/mapper/TOrderMapper.xml

@@ -0,0 +1,6 @@
+<?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.sw.dao.TOrderDao">
+
+
+</mapper>