From a9dfe5b1a45ead354e7040b6bc8d023e12aa4685 Mon Sep 17 00:00:00 2001 From: ck <851316342@qq.com> Date: Mon, 30 Nov 2020 13:27:46 +0800 Subject: [PATCH] up --- ...Maven__com_baomidou_mybatis_plus_3_3_2.xml | 13 ------ ...omidou_mybatis_plus_boot_starter_3_3_2.xml | 13 ------ ..._com_github_jsqlparser_jsqlparser_2_0.xml} | 8 ++-- ...m_github_pagehelper_pagehelper_5_1_10.xml} | 8 ++-- pom.xml | 24 +++------- sadia-game.iml | 6 +-- .../template/conf/MybatisPlusConfig.java | 44 +++++++++---------- .../controller/AwardRecordController.java | 7 ++- .../service/impl/AwardRecordServiceImpl.java | 7 ++- .../resources/mapper/AwardRecordMapper.xml | 29 ++++++++++++ 10 files changed, 74 insertions(+), 85 deletions(-) delete mode 100644 .idea/libraries/Maven__com_baomidou_mybatis_plus_3_3_2.xml delete mode 100644 .idea/libraries/Maven__com_baomidou_mybatis_plus_boot_starter_3_3_2.xml rename .idea/libraries/{Maven__com_github_jsqlparser_jsqlparser_1_0.xml => Maven__com_github_jsqlparser_jsqlparser_2_0.xml} (64%) rename .idea/libraries/{Maven__com_github_pagehelper_pagehelper_5_1_4.xml => Maven__com_github_pagehelper_pagehelper_5_1_10.xml} (62%) create mode 100644 src/main/resources/mapper/AwardRecordMapper.xml diff --git a/.idea/libraries/Maven__com_baomidou_mybatis_plus_3_3_2.xml b/.idea/libraries/Maven__com_baomidou_mybatis_plus_3_3_2.xml deleted file mode 100644 index a123c48..0000000 --- a/.idea/libraries/Maven__com_baomidou_mybatis_plus_3_3_2.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_baomidou_mybatis_plus_boot_starter_3_3_2.xml b/.idea/libraries/Maven__com_baomidou_mybatis_plus_boot_starter_3_3_2.xml deleted file mode 100644 index 2808070..0000000 --- a/.idea/libraries/Maven__com_baomidou_mybatis_plus_boot_starter_3_3_2.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_jsqlparser_jsqlparser_1_0.xml b/.idea/libraries/Maven__com_github_jsqlparser_jsqlparser_2_0.xml similarity index 64% rename from .idea/libraries/Maven__com_github_jsqlparser_jsqlparser_1_0.xml rename to .idea/libraries/Maven__com_github_jsqlparser_jsqlparser_2_0.xml index bb4254d..1a4961b 100644 --- a/.idea/libraries/Maven__com_github_jsqlparser_jsqlparser_1_0.xml +++ b/.idea/libraries/Maven__com_github_jsqlparser_jsqlparser_2_0.xml @@ -1,13 +1,13 @@ - + - + - + - + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_pagehelper_pagehelper_5_1_4.xml b/.idea/libraries/Maven__com_github_pagehelper_pagehelper_5_1_10.xml similarity index 62% rename from .idea/libraries/Maven__com_github_pagehelper_pagehelper_5_1_4.xml rename to .idea/libraries/Maven__com_github_pagehelper_pagehelper_5_1_10.xml index 1b9aa85..c3339fe 100644 --- a/.idea/libraries/Maven__com_github_pagehelper_pagehelper_5_1_4.xml +++ b/.idea/libraries/Maven__com_github_pagehelper_pagehelper_5_1_10.xml @@ -1,13 +1,13 @@ - + - + - + - + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 0258972..6f6ecc5 100644 --- a/pom.xml +++ b/pom.xml @@ -81,12 +81,12 @@ 1.3.5 - - - - - - + + + com.github.pagehelper + pagehelper + 5.1.10 + @@ -146,17 +146,7 @@ mysql mysql-connector-java - - com.baomidou - mybatis-plus-boot-starter - 3.3.2 - - - org.javassist - javassist - - - + com.baomidou mybatis-plus-generator diff --git a/sadia-game.iml b/sadia-game.iml index a472f7a..b3654f0 100644 --- a/sadia-game.iml +++ b/sadia-game.iml @@ -90,6 +90,8 @@ + + @@ -130,8 +132,6 @@ - - @@ -141,8 +141,6 @@ - - diff --git a/src/main/java/com/jingcheng/template/conf/MybatisPlusConfig.java b/src/main/java/com/jingcheng/template/conf/MybatisPlusConfig.java index a4afdde..8c380ce 100644 --- a/src/main/java/com/jingcheng/template/conf/MybatisPlusConfig.java +++ b/src/main/java/com/jingcheng/template/conf/MybatisPlusConfig.java @@ -1,22 +1,22 @@ -package com.jingcheng.template.conf; - -import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.transaction.annotation.EnableTransactionManagement; - - -@EnableTransactionManagement -@Configuration -public class MybatisPlusConfig { - - /** - * 分页插件 - */ - @Bean - public PaginationInterceptor paginationInterceptor() { - return new PaginationInterceptor(); - } - - -} \ No newline at end of file +//package com.jingcheng.template.conf; +// +//import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; +//import org.springframework.context.annotation.Bean; +//import org.springframework.context.annotation.Configuration; +//import org.springframework.transaction.annotation.EnableTransactionManagement; +// +// +//@EnableTransactionManagement +//@Configuration +//public class MybatisPlusConfig { +// +// /** +// * 分页插件 +// */ +// @Bean +// public PaginationInterceptor paginationInterceptor() { +// return new PaginationInterceptor(); +// } +// +// +//} \ No newline at end of file diff --git a/src/main/java/com/jingcheng/template/controller/AwardRecordController.java b/src/main/java/com/jingcheng/template/controller/AwardRecordController.java index ee466df..3beaf60 100644 --- a/src/main/java/com/jingcheng/template/controller/AwardRecordController.java +++ b/src/main/java/com/jingcheng/template/controller/AwardRecordController.java @@ -5,22 +5,21 @@ import com.jingcheng.template.model.AwardRecord; import com.jingcheng.template.service.AwardRecordService; import com.jingcheng.template.util.AjaxRequest; import com.jingcheng.template.util.AjaxResult; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; -import javax.servlet.http.HttpServletRequest; @RestController @RequestMapping("/award-record") @CrossOrigin public class AwardRecordController extends BaseController{ - @Resource + @Autowired private AwardRecordService awardRecordService; - @RequestMapping("get-award-record-num") public AjaxResult getUsers(@RequestBody AjaxRequest ajaxRequest){ AjaxResult ajaxResult = new AjaxResult(); @@ -96,7 +95,7 @@ public class AwardRecordController extends BaseController - implements AwardRecordService { +public class AwardRecordServiceImpl extends BaseServiceImpl implements AwardRecordService { @Resource private AwardRecordMapper awardRecordMapper; @Resource @@ -40,6 +38,7 @@ public class AwardRecordServiceImpl extends BaseServiceImpl page = new Page<>(pageNum, pageSize, true); - IPage iPage = awardRecordMapper.selectPage(page, queryWrapper); + IPage iPage = awardRecordMapper.selectPage(page,queryWrapper); List awardRecordList = iPage.getRecords(); Long total = iPage.getTotal(); List awardRecordVoList = new ArrayList<>(); diff --git a/src/main/resources/mapper/AwardRecordMapper.xml b/src/main/resources/mapper/AwardRecordMapper.xml new file mode 100644 index 0000000..a20f305 --- /dev/null +++ b/src/main/resources/mapper/AwardRecordMapper.xml @@ -0,0 +1,29 @@ + + + + + + + \ No newline at end of file