From a4d637bddb71f148353ab78f7771edae3bd03c10 Mon Sep 17 00:00:00 2001
From: lisy <linlangsur163@163.com>
Date: 星期二, 04 七月 2023 17:17:27 +0800
Subject: [PATCH] account模块:开始上课-学员勋章的数据查询

---
 cloud-server-other/src/main/java/com/dsh/other/controller/ImgConfigController.java |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/cloud-server-other/src/main/java/com/dsh/other/controller/ImgConfigController.java b/cloud-server-other/src/main/java/com/dsh/other/controller/ImgConfigController.java
index 17019b6..e01dfd5 100644
--- a/cloud-server-other/src/main/java/com/dsh/other/controller/ImgConfigController.java
+++ b/cloud-server-other/src/main/java/com/dsh/other/controller/ImgConfigController.java
@@ -1,9 +1,12 @@
 package com.dsh.other.controller;
 
-import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.dsh.other.entity.TImgConfig;
 import com.dsh.other.service.TImgConfigService;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -32,8 +35,25 @@
      */
     @PostMapping("/imgConfig/getNoneStu")
     public List<TImgConfig> getDriver(){
-        return imgConfigService.selectList(new EntityWrapper<TImgConfig>()
+        return imgConfigService.list(new QueryWrapper<TImgConfig>()
                 .eq("position", 1));
     }
 
+
+    /**
+     * 获取系统图片
+     * @param position
+     * @return
+     */
+    @ResponseBody
+    @PostMapping("/base/systemImg/querySystemImg")
+    @ApiOperation(value = "获取各种系统图片", tags = {"APP-公共接口"})
+    @ApiImplicitParams({
+            @ApiImplicitParam(value = "位置(1=无学员,2=成为会员,3=我的券包,4=线上商城,5=本周福利,6=今日免费)", name = "position", dataType = "int", required = true),
+    })
+    public String querySystemImg(@RequestBody Integer position){
+        TImgConfig imgConfig = imgConfigService.getBaseMapper().selectOne(new QueryWrapper<TImgConfig>().eq("position", position));
+        return imgConfig.getContent();
+    }
+
 }

--
Gitblit v1.7.1