From b85c38cf3f843629cc0c206a2aa119117e82a6b4 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Mon, 22 Feb 2021 14:15:40 +0800
Subject: [PATCH] add score shop code
---
zq-erp/src/main/java/com/matrix/system/score/entity/ScoreOrderEntity.java | 21 +++++
zq-erp/pom.xml | 10 ++
zq-erp/src/main/resources/mybatis/mapper/score/ScoreOrderDao.xml | 5 +
zq-erp/src/main/resources/config/application.properties | 4
zq-erp/src/main/resources/config/test/application.properties | 5
zq-erp/src/main/java/com/matrix/system/score/dto/ScoreOrderDto.java | 8 ++
zq-erp/src/main/java/com/matrix/system/score/vo/ScoreOrderVo.java | 8 ++
zq-erp/src/main/java/com/matrix/system/score/entity/BaseEntity.java | 69 +++++++++++++++++
zq-erp/src/main/java/com/matrix/system/score/dao/ScoreOrderDao.java | 11 ++
zq-erp/src/main/java/com/matrix/system/score/service/ScoreOrderService.java | 23 +++++
zq-erp/src/main/java/com/matrix/config/MybatisPlusConfig.java | 22 +++++
zq-erp/src/main/java/com/matrix/system/score/mapper/ScoreOrderMapper.java | 8 ++
zq-erp/src/main/java/com/matrix/system/score/action/ScoreOrderAction.java | 28 +++++++
13 files changed, 216 insertions(+), 6 deletions(-)
diff --git a/zq-erp/pom.xml b/zq-erp/pom.xml
index ca46822..0646994 100644
--- a/zq-erp/pom.xml
+++ b/zq-erp/pom.xml
@@ -377,6 +377,12 @@
<artifactId>hutool-all</artifactId>
<version>5.3.1</version>
</dependency>
+
+ <dependency>
+ <groupId>com.baomidou</groupId>
+ <artifactId>mybatis-plus-boot-starter</artifactId>
+ <version>3.2.0</version>
+ </dependency>
</dependencies>
<build>
<resources>
@@ -390,11 +396,11 @@
<exclude>config/test/*</exclude>
<exclude>config/xcx/*</exclude>
- <!---->
+ <!--
<exclude>config/config.json</exclude>
<exclude>config/application.properties</exclude>
<exclude>config/system.properties</exclude>
-
+-->
diff --git a/zq-erp/src/main/java/com/matrix/config/MybatisPlusConfig.java b/zq-erp/src/main/java/com/matrix/config/MybatisPlusConfig.java
new file mode 100644
index 0000000..e08b37d
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/config/MybatisPlusConfig.java
@@ -0,0 +1,22 @@
+package com.matrix.config;
+
+import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author wzy
+ * @date 2021-02-22
+ **/
+@Configuration
+@MapperScan("com.matrix.system.*.dao")
+public class MybatisPlusConfig {
+
+ @Bean
+ public PaginationInterceptor paginationInterceptor(){
+ return new PaginationInterceptor();
+ }
+
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/score/action/ScoreOrderAction.java b/zq-erp/src/main/java/com/matrix/system/score/action/ScoreOrderAction.java
new file mode 100644
index 0000000..0338524
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/score/action/ScoreOrderAction.java
@@ -0,0 +1,28 @@
+package com.matrix.system.score.action;
+
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.system.score.service.ScoreOrderService;
+import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author wzy
+ * @date 2021-02-22
+ **/
+@Api(value = "积分订单", tags = "积分订单")
+@RestController
+@RequestMapping(value = "/score/order")
+public class ScoreOrderAction {
+
+ @Autowired
+ private ScoreOrderService scoreOrderService;
+
+ @GetMapping(value = "/testApi")
+ public AjaxResult testApi() {
+ scoreOrderService.testMethod();
+ return AjaxResult.buildSuccessInstance("success");
+ }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/score/dao/ScoreOrderDao.java b/zq-erp/src/main/java/com/matrix/system/score/dao/ScoreOrderDao.java
new file mode 100644
index 0000000..50282ef
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/score/dao/ScoreOrderDao.java
@@ -0,0 +1,11 @@
+package com.matrix.system.score.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.matrix.system.score.entity.ScoreOrderEntity;
+
+/**
+ * @author wzy
+ * @date 2021-02-22
+ **/
+public interface ScoreOrderDao extends BaseMapper<ScoreOrderEntity> {
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/score/dto/ScoreOrderDto.java b/zq-erp/src/main/java/com/matrix/system/score/dto/ScoreOrderDto.java
new file mode 100644
index 0000000..353b216
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/score/dto/ScoreOrderDto.java
@@ -0,0 +1,8 @@
+package com.matrix.system.score.dto;
+
+/**
+ * @author wzy
+ * @date 2021-02-22
+ **/
+public class ScoreOrderDto {
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/score/entity/BaseEntity.java b/zq-erp/src/main/java/com/matrix/system/score/entity/BaseEntity.java
new file mode 100644
index 0000000..3e1a1e0
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/score/entity/BaseEntity.java
@@ -0,0 +1,69 @@
+package com.matrix.system.score.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author wzy
+ * @date 2020-04-24 14:58
+ **/
+public class BaseEntity implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ @TableId(value = "id",type = IdType.AUTO)
+ private Long id;
+
+ private String createBy;
+
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private Date createTime;
+
+ private String updateBy;
+
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private Date updateTime;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getCreateBy() {
+ return createBy;
+ }
+
+ public void setCreateBy(String createBy) {
+ this.createBy = createBy;
+ }
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getUpdateBy() {
+ return updateBy;
+ }
+
+ public void setUpdateBy(String updateBy) {
+ this.updateBy = updateBy;
+ }
+
+ public Date getUpdateTime() {
+ return updateTime;
+ }
+
+ public void setUpdateTime(Date updateTime) {
+ this.updateTime = updateTime;
+ }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/score/entity/ScoreOrderEntity.java b/zq-erp/src/main/java/com/matrix/system/score/entity/ScoreOrderEntity.java
new file mode 100644
index 0000000..bf7884c
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/score/entity/ScoreOrderEntity.java
@@ -0,0 +1,21 @@
+package com.matrix.system.score.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+/**
+ * @author wzy
+ * @date 2021-02-22
+ **/
+@TableName("score_order")
+public class ScoreOrderEntity extends BaseEntity {
+
+ private String orderNo;
+
+ public String getOrderNo() {
+ return orderNo;
+ }
+
+ public void setOrderNo(String orderNo) {
+ this.orderNo = orderNo;
+ }
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/score/mapper/ScoreOrderMapper.java b/zq-erp/src/main/java/com/matrix/system/score/mapper/ScoreOrderMapper.java
new file mode 100644
index 0000000..eade724
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/score/mapper/ScoreOrderMapper.java
@@ -0,0 +1,8 @@
+package com.matrix.system.score.mapper;
+
+/**
+ * @author wzy
+ * @date 2021-02-22
+ **/
+public class ScoreOrderMapper {
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/score/service/ScoreOrderService.java b/zq-erp/src/main/java/com/matrix/system/score/service/ScoreOrderService.java
new file mode 100644
index 0000000..4799126
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/score/service/ScoreOrderService.java
@@ -0,0 +1,23 @@
+package com.matrix.system.score.service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.matrix.system.score.dao.ScoreOrderDao;
+import com.matrix.system.score.entity.ScoreOrderEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author wzy
+ * @date 2021-02-22
+ **/
+@Service
+public class ScoreOrderService extends ServiceImpl<ScoreOrderDao, ScoreOrderEntity> {
+
+ @Autowired
+ private ScoreOrderDao scoreOrderDao;
+
+ public void testMethod() {
+ scoreOrderDao.selectById(1L);
+ }
+
+}
diff --git a/zq-erp/src/main/java/com/matrix/system/score/vo/ScoreOrderVo.java b/zq-erp/src/main/java/com/matrix/system/score/vo/ScoreOrderVo.java
new file mode 100644
index 0000000..2de7909
--- /dev/null
+++ b/zq-erp/src/main/java/com/matrix/system/score/vo/ScoreOrderVo.java
@@ -0,0 +1,8 @@
+package com.matrix.system.score.vo;
+
+/**
+ * @author wzy
+ * @date 2021-02-22
+ **/
+public class ScoreOrderVo {
+}
diff --git a/zq-erp/src/main/resources/config/application.properties b/zq-erp/src/main/resources/config/application.properties
index 0c3083e..35f77d7 100644
--- a/zq-erp/src/main/resources/config/application.properties
+++ b/zq-erp/src/main/resources/config/application.properties
@@ -28,8 +28,6 @@
spring.datasource.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
spring.thymeleaf.prefix: classpath:/templates/views/
spring.thymeleaf.cache=false
-mybatis.config-location=classpath:mybatis/mybatis-config.xml
-mybatis.mapper-locations=classpath*:mybatis/mapper/*/*.xml
#设置全局时间返回格式 第三行设置为true表示返回时间戳
#spring.jackson.date-format=yyyy-MM-dd
#spring.jackson.time-zone=GMT+8
@@ -70,3 +68,5 @@
default.vip.photo.woman=https://filehive2.jyymatrix.cc/uploadeFile/20210125/db53552e688040afb286686f081e1e68f3fe946f75624598828f01898635152e.png
default.vip.photo.man=https://filehive2.jyymatrix.cc/uploadeFile/20210125/3642f1d827c44c76832fea106c85e0f89e089c16cbcc4dd0a82bb52b9ac700f4.png
+mybatis-plus.config-location=classpath:mybatis/mybatis-config.xml
+mybatis-plus.mapper-locations=classpath*:mybatis/mapper/**/*.xml
diff --git a/zq-erp/src/main/resources/config/test/application.properties b/zq-erp/src/main/resources/config/test/application.properties
index 87fc89f..1e00a70 100644
--- a/zq-erp/src/main/resources/config/test/application.properties
+++ b/zq-erp/src/main/resources/config/test/application.properties
@@ -30,8 +30,9 @@
spring.datasource.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
spring.thymeleaf.prefix: classpath:/templates/views/
spring.thymeleaf.cache=false
-mybatis.config-location=classpath:mybatis/mybatis-config.xml
-mybatis.mapper-locations=classpath*:mybatis/mapper/*/*.xml
+mybatis-plus.config-location=classpath:mybatis/mybatis-config.xml
+mybatis-plus.mapper-locations=classpath*:mybatis/mapper/**/*.xml
+
#设置全局时间返回格式 第三行设置为true表示返回时间戳
#spring.jackson.date-format=yyyy-MM-dd
#spring.jackson.time-zone=GMT+8
diff --git a/zq-erp/src/main/resources/mybatis/mapper/score/ScoreOrderDao.xml b/zq-erp/src/main/resources/mybatis/mapper/score/ScoreOrderDao.xml
new file mode 100644
index 0000000..2175afa
--- /dev/null
+++ b/zq-erp/src/main/resources/mybatis/mapper/score/ScoreOrderDao.xml
@@ -0,0 +1,5 @@
+<?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.matrix.system.score.dao.ScoreOrderDao">
+
+</mapper>
\ No newline at end of file
--
Gitblit v1.9.1