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> --> zq-erp/src/main/java/com/matrix/config/MybatisPlusConfig.java
New file @@ -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(); } } zq-erp/src/main/java/com/matrix/system/score/action/ScoreOrderAction.java
New file @@ -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"); } } zq-erp/src/main/java/com/matrix/system/score/dao/ScoreOrderDao.java
New file @@ -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> { } zq-erp/src/main/java/com/matrix/system/score/dto/ScoreOrderDto.java
New file @@ -0,0 +1,8 @@ package com.matrix.system.score.dto; /** * @author wzy * @date 2021-02-22 **/ public class ScoreOrderDto { } zq-erp/src/main/java/com/matrix/system/score/entity/BaseEntity.java
New file @@ -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; } } zq-erp/src/main/java/com/matrix/system/score/entity/ScoreOrderEntity.java
New file @@ -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; } } zq-erp/src/main/java/com/matrix/system/score/mapper/ScoreOrderMapper.java
New file @@ -0,0 +1,8 @@ package com.matrix.system.score.mapper; /** * @author wzy * @date 2021-02-22 **/ public class ScoreOrderMapper { } zq-erp/src/main/java/com/matrix/system/score/service/ScoreOrderService.java
New file @@ -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); } } zq-erp/src/main/java/com/matrix/system/score/vo/ScoreOrderVo.java
New file @@ -0,0 +1,8 @@ package com.matrix.system.score.vo; /** * @author wzy * @date 2021-02-22 **/ public class ScoreOrderVo { } 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 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 zq-erp/src/main/resources/mybatis/mapper/score/ScoreOrderDao.xml
New file @@ -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>