Browse Source

项目更新20220220

VEAR 3 years ago
parent
commit
dfa7eed126
57 changed files with 1627 additions and 97 deletions
  1. 21 13
      doc/script/test/README.md
  2. 1 1
      doc/script/test/nginx.conf
  3. 77 0
      doc/script/test/run.sh
  4. 33 0
      src/main/java/org/springblade/common/constant/CacheBizConstant.java
  5. 1 2
      src/main/java/org/springblade/common/constant/CommonConstant.java
  6. 25 0
      src/main/java/org/springblade/common/enums/DictBizEnum.java
  7. 0 9
      src/main/java/org/springblade/modules/api/controller/Api01Controller.java
  8. 61 3
      src/main/java/org/springblade/modules/api/controller/Api02Controller.java
  9. 25 11
      src/main/java/org/springblade/modules/api/controller/Api03Controller.java
  10. 5 1
      src/main/java/org/springblade/modules/api/controller/Api04Controller.java
  11. 3 2
      src/main/java/org/springblade/modules/platform/controller/AdsController.java
  12. 10 5
      src/main/java/org/springblade/modules/platform/controller/PaymentsController.java
  13. 128 0
      src/main/java/org/springblade/modules/platform/controller/VersionUpgradeController.java
  14. 34 0
      src/main/java/org/springblade/modules/platform/dto/VersionUpgradeDTO.java
  15. 97 0
      src/main/java/org/springblade/modules/platform/entity/VersionUpgrade.java
  16. 42 0
      src/main/java/org/springblade/modules/platform/mapper/VersionUpgradeMapper.java
  17. 24 0
      src/main/java/org/springblade/modules/platform/mapper/VersionUpgradeMapper.xml
  18. 41 0
      src/main/java/org/springblade/modules/platform/service/IVersionUpgradeService.java
  19. 41 0
      src/main/java/org/springblade/modules/platform/service/impl/VersionUpgradeServiceImpl.java
  20. 14 0
      src/main/java/org/springblade/modules/platform/vo/AdsVO.java
  21. 15 0
      src/main/java/org/springblade/modules/platform/vo/PaymentsVO.java
  22. 43 0
      src/main/java/org/springblade/modules/platform/vo/VersionUpgradeVO.java
  23. 51 0
      src/main/java/org/springblade/modules/platform/wrapper/AdsWrapper.java
  24. 52 0
      src/main/java/org/springblade/modules/platform/wrapper/PaymentsWrapper.java
  25. 49 0
      src/main/java/org/springblade/modules/platform/wrapper/VersionUpgradeWrapper.java
  26. 4 0
      src/main/java/org/springblade/modules/resource/builder/oss/OssBuilder.java
  27. 35 5
      src/main/java/org/springblade/modules/shopping/controller/CategoryController.java
  28. 12 6
      src/main/java/org/springblade/modules/shopping/controller/ConsignConfigController.java
  29. 17 5
      src/main/java/org/springblade/modules/shopping/controller/ConsignController.java
  30. 5 4
      src/main/java/org/springblade/modules/shopping/controller/GoodsController.java
  31. 16 5
      src/main/java/org/springblade/modules/shopping/controller/GoodsSpecsController.java
  32. 14 4
      src/main/java/org/springblade/modules/shopping/controller/SpecCatsController.java
  33. 15 5
      src/main/java/org/springblade/modules/shopping/controller/SpecItemsController.java
  34. 1 1
      src/main/java/org/springblade/modules/shopping/entity/Category.java
  35. 20 3
      src/main/java/org/springblade/modules/shopping/entity/Consign.java
  36. 6 0
      src/main/java/org/springblade/modules/shopping/entity/SpecCats.java
  37. 20 0
      src/main/java/org/springblade/modules/shopping/mapper/CategoryMapper.java
  38. 43 1
      src/main/java/org/springblade/modules/shopping/mapper/CategoryMapper.xml
  39. 22 2
      src/main/java/org/springblade/modules/shopping/service/ICategoryService.java
  40. 21 0
      src/main/java/org/springblade/modules/shopping/service/impl/CategoryServiceImpl.java
  41. 49 3
      src/main/java/org/springblade/modules/shopping/vo/CategoryVO.java
  42. 11 0
      src/main/java/org/springblade/modules/shopping/vo/ConsignConfigVO.java
  43. 11 0
      src/main/java/org/springblade/modules/shopping/vo/ConsignVO.java
  44. 21 0
      src/main/java/org/springblade/modules/shopping/vo/GoodsSpecsVO.java
  45. 1 1
      src/main/java/org/springblade/modules/shopping/vo/GoodsVO.java
  46. 14 0
      src/main/java/org/springblade/modules/shopping/vo/SpecCatsVO.java
  47. 20 0
      src/main/java/org/springblade/modules/shopping/vo/SpecItemsVO.java
  48. 62 0
      src/main/java/org/springblade/modules/shopping/wrapper/CategoryWrapper.java
  49. 48 0
      src/main/java/org/springblade/modules/shopping/wrapper/ConsignConfigWrapper.java
  50. 47 0
      src/main/java/org/springblade/modules/shopping/wrapper/ConsignWrapper.java
  51. 60 0
      src/main/java/org/springblade/modules/shopping/wrapper/GoodsSpecsWrapper.java
  52. 3 0
      src/main/java/org/springblade/modules/shopping/wrapper/GoodsWrapper.java
  53. 49 0
      src/main/java/org/springblade/modules/shopping/wrapper/SpecCatsWrapper.java
  54. 72 0
      src/main/java/org/springblade/modules/shopping/wrapper/SpecItemsWrapper.java
  55. 10 0
      src/main/java/sql/versionupgrade.menu.mysql
  56. 4 4
      src/main/resources/application-test.yml
  57. 1 1
      src/main/resources/application.yml

+ 21 - 13
doc/script/test/README.md

@@ -1,29 +1,37 @@
 ### 安装环境
 
-* 安装docker运行环境,包含redis、mysql
+* 安装docker运行环境redis
     * centos8安装docker 教程:```https://www.cnblogs.com/lhd1998/p/13297229.html```
     * docker安装redis
         * 下载redis镜像 ```docker pull redis```
-        *
-      运行redis ```docker run -p 6379:6379 -v $PWD/data:/data -d redis redis-server --appendonly yes --requirepass "liquor123456"```
-        * 安装mysql
+        * 运行redis ```docker run -p 6379:6379 -v $PWD/data:/data -d redis redis-server --appendonly yes --requirepass "123456"```
+    * 安装mysql数据库
+      * 拉取镜像 ```docker pull mysql:5.6```
+      * ```docker run -p 3306:3306 --name mysql-test -v $PWD/conf:/etc/mysql/conf.d -v $PWD/logs:/logs -v $PWD/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.6```
 * 安装jdk1.8
     * 从百度网盘下载jdk1.8的压缩包上传到服务器上
-        * 解压路径 ```/usr/java/jdk1.8.0_221```
-
-```
-    #java
-    export JAVA_HOME=/usr/java/jdk1.8.0_221
-    export PATH=$JAVA_HOME/bin:$PATH
-    export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib
-```
-
+    * 解压路径 ```/usr/java/jdk1.8.0_221```
+    * 在路径```/etc/profile```添加一下配置
+    ```
+        #java
+        export JAVA_HOME=/usr/java/jdk1.8.0_221
+        export PATH=$JAVA_HOME/bin:$PATH
+        export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib
+    ```
+    * 执行命令 ```source /etc/profile```
+    * 查看是否安装成功 ```java -version```
 * 安装nginx ```https://www.cnblogs.com/jiehao-yu/p/14754780.html```
    * 安装路径```/usr/local/nginx```
+   * 进入/usr/local/nginx/sbin目录 ```cd /usr/local/nginx/sbin```
    * 停止nginx ```./nginx -s stop```
    * 重启nginx ```./nginx -s reload```
    * 启动nginx ```./nginx```
    * 前端文件路径 ```/usr/local/nginx/dist```
+   * 如果提示一下错误
+     * ```nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)```
+     * 1.修改nginx.conf中pid ```pid /usr/local/nginx/logs/nginx.pid```
+     * 2.创建logs文件夹
+     * 3.在sbin目录下执行 ```./nginx```
 * 防火墙 阿里云默认关闭,开放端口后需要配置安全组
   * 教程 https://www.cnblogs.com/superming/p/11315634.html
   * 查看防火墙 ```sudo systemctl status firewalld```

+ 1 - 1
doc/script/test/nginx.conf

@@ -6,7 +6,7 @@ worker_processes  1;
 #error_log  logs/error.log  notice;
 #error_log  logs/error.log  info;
 
-#pid        logs/nginx.pid;
+pid        /usr/local/nginx/logs/nginx.pid;
 
 
 events {

+ 77 - 0
doc/script/test/run.sh

@@ -0,0 +1,77 @@
+#!/bin/bash
+
+#设置jar文件名
+APP_NAME=blade-api.jar
+
+#使用说明,用来提示输入参数
+usage() {
+echo "Usage: sh 执行脚本.sh [start|stop|restart|status]"
+exit 1
+}
+
+#检查程序是否在运行
+is_exist(){
+pid=`ps -ef|grep $APP_NAME|grep -v grep|awk '{print $2}' `
+#如果不存在返回1,存在返回0
+if [ -z "${pid}" ]; then
+return 1
+else
+return 0
+fi
+}
+
+#启动方法
+start(){
+is_exist
+if [ $? -eq "0" ]; then
+echo "${APP_NAME} is already running. pid=${pid} ."
+else
+cp jar/$APP_NAME $APP_NAME
+nohup java -Xms1024m -Xmx1024m -jar $APP_NAME --spring.profiles.active=test > /dev/blade/null 2>&1 &
+fi
+}
+
+#停止方法
+stop(){
+is_exist
+if [ $? -eq "0" ]; then
+kill -9 $pid
+else
+echo "${APP_NAME} is not running"
+fi
+}
+
+#输出运行状态
+status(){
+is_exist
+if [ $? -eq "0" ]; then
+echo "${APP_NAME} is running. Pid is ${pid}"
+else
+echo "${APP_NAME} is NOT running."
+fi
+}
+
+#重启
+restart(){
+stop
+start
+}
+
+#根据输入参数,选择执行对应方法,不输入则执行使用说明
+case "$1" in
+"start")
+start
+;;
+"stop")
+stop
+;;
+"status")
+status
+;;
+"restart")
+restart
+;;
+*)
+usage
+;;
+esac

+ 33 - 0
src/main/java/org/springblade/common/constant/CacheBizConstant.java

@@ -0,0 +1,33 @@
+package org.springblade.common.constant;
+
+/**
+ * 缓存常量
+ */
+public interface CacheBizConstant {
+
+	/**
+	 * 场次配置
+	 */
+	String CACHE_CONSIGN_CONFIG = "cache:consign:config";
+
+	/**
+	 * 支付配置
+	 */
+	String CACHE_DEFAULT_PAYMENTS = "cache:default:payments";
+
+	/**
+	 * 商品品牌
+	 */
+	String CACHE_GOODS_BRAND = "cache:goods:brand";
+
+	/**
+	 * 通知公告
+	 */
+	String CACHE_SHOPPING_NOTICE_ = "cache:shopping:notice";
+
+	/**
+	 * 缓存失效时间
+	 */
+	Long CACHE_TIME = 120L;
+
+}

+ 1 - 2
src/main/java/org/springblade/common/constant/CommonConstant.java

@@ -28,8 +28,7 @@ public interface CommonConstant {
 	/**
 	 * app name
 	 */
-	//String APPLICATION_NAME = AppConstant.APPLICATION_NAME_PREFIX + "api";
-	String APPLICATION_NAME = "x-t1";
+	String APPLICATION_NAME = AppConstant.APPLICATION_NAME_PREFIX + "api";
 
 	/**
 	 * sword 系统名

+ 25 - 0
src/main/java/org/springblade/common/enums/DictBizEnum.java

@@ -62,6 +62,31 @@ public enum DictBizEnum {
 	 * 配送方式
 	 */
 	DISTRIBUTE_MODE("distribute_mode"),
+	/**
+	 * 广告类型
+	 */
+	ADS_TYPE("ads_type"),
+
+	/**
+	 * 支付标识
+	 */
+	PAY_FOR("pay_for"),
+
+	/**
+	 * 审核状态
+	 */
+	EXAM_STATUE("exam_status"),
+
+	/**
+	 * 寄售状态
+	 */
+	CONSIGN_STATE("consign_state"),
+
+	/**
+	 * 升级类型
+	 */
+	UPGRADE_TYPE("upgrade_type"),
+
 	;
 
 	final String name;

+ 0 - 9
src/main/java/org/springblade/modules/api/controller/Api01Controller.java

@@ -60,16 +60,7 @@ import static org.springblade.core.cache.constant.CacheConstant.USER_CACHE;
 @Api(value = "登录注册", tags = "登录注册")
 public class Api01Controller extends BladeController {
 
-	private final IUserAddressService userAddressService;
-
-	private final IAdsService adsService;
-
-	private final IPaymentsService paymentsService;
-
-	private final IUserFeedbacksService userFeedbacksService;
-
 	private final IUserService userService;
-
 	private final IUserRecomService userRecomService;
 
 	@ApiLog("用户注册")

+ 61 - 3
src/main/java/org/springblade/modules/api/controller/Api02Controller.java

@@ -19,14 +19,15 @@ package org.springblade.modules.api.controller;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.*;
 import lombok.AllArgsConstructor;
+import org.springblade.common.constant.CacheBizConstant;
 import org.springblade.common.constant.CommonConstant;
 import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.cache.constant.CacheConstant;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
+import org.springblade.core.redis.cache.BladeRedis;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
 import org.springblade.core.tool.utils.DateUtil;
@@ -34,6 +35,10 @@ import org.springblade.core.tool.utils.StringUtil;
 import org.springblade.modules.api.request.AddressSaveRequest;
 import org.springblade.modules.api.request.AddressUpdateRequest;
 import org.springblade.modules.api.request.UserFeedbacksSaveRequest;
+import org.springblade.modules.desk.entity.Notice;
+import org.springblade.modules.desk.service.INoticeService;
+import org.springblade.modules.desk.vo.NoticeVO;
+import org.springblade.modules.desk.wrapper.NoticeWrapper;
 import org.springblade.modules.platform.entity.*;
 import org.springblade.modules.platform.service.*;
 import org.springblade.modules.shopping.entity.*;
@@ -44,9 +49,11 @@ import org.springblade.modules.shopping.vo.SpecItemsVO;
 import org.springblade.modules.shopping.wrapper.GoodsAttributesWrapper;
 import org.springblade.modules.shopping.wrapper.GoodsWrapper;
 import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
 
 import javax.validation.Valid;
 import java.util.List;
+import java.util.Map;
 import java.util.Objects;
 
 /**
@@ -67,6 +74,10 @@ public class Api02Controller extends BladeController {
 	private final ISpecItemsService specItemsService;
 	private final IGoodsSpecsService goodsSpecsService;
 	private final IGoodsAttributesService goodsAttributesService;
+	private final IConsignConfigService consignConfigService;
+	private final IBrandsService brandsService;
+	private final INoticeService noticeService;
+	private final BladeRedis bladeRedis;
 
 	/**
 	 * 商品分页查询
@@ -187,4 +198,51 @@ public class Api02Controller extends BladeController {
 		return R.data(GoodsAttributesWrapper.build().listVO(list));
 	}
 
+	/**
+	 * 抢购场次
+	 */
+	@GetMapping("/consignConfig-list")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "抢购场次", notes = "获取缓存数据,失效时间2分钟")
+	public R<List<ConsignConfig>> consignConfigList() {
+		List<ConsignConfig> list = bladeRedis.get(CacheBizConstant.CACHE_CONSIGN_CONFIG);
+		if (list == null || list.size() == 0){
+			list = consignConfigService.list(Wrappers.<ConsignConfig>lambdaQuery().eq(ConsignConfig::getIsEnabled, 2));
+			bladeRedis.setEx(CacheBizConstant.CACHE_CONSIGN_CONFIG, list, CacheBizConstant.CACHE_TIME);
+		}
+		return R.data(list);
+	}
+
+	/**
+	 * 商品品牌
+	 */
+	@GetMapping("/brands-list")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "商品品牌", notes = "商品品牌")
+	public R<List<Brands>> brandsList() {
+		List<Brands> list = bladeRedis.get(CacheBizConstant.CACHE_GOODS_BRAND);
+		if (list == null || list.size() == 0){
+			list = brandsService.list(Wrappers.<Brands>lambdaQuery());
+			bladeRedis.setEx(CacheBizConstant.CACHE_GOODS_BRAND, list, CacheBizConstant.CACHE_TIME);
+		}
+		return R.data(list);
+	}
+
+	/**
+	 * 通知公告
+	 */
+	@GetMapping("/notice-page")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "category", value = "公告类型", paramType = "query", dataType = "integer"),
+		@ApiImplicitParam(name = "title", value = "公告标题", paramType = "query", dataType = "string")
+	})
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "通知公告列表", notes = "通知公告")
+	public R<IPage<NoticeVO>> brandsPage(@ApiIgnore @RequestParam Map<String, Object> notice, Query query) {
+		NoticeWrapper.build().noticeQuery(notice);
+		IPage<Notice> pages = noticeService.page(Condition.getPage(query), Condition.getQueryWrapper(notice, Notice.class));
+		return R.data(NoticeWrapper.build().pageVO(pages));
+	}
+
+
 }

+ 25 - 11
src/main/java/org/springblade/modules/api/controller/Api03Controller.java

@@ -16,7 +16,6 @@
  */
 package org.springblade.modules.api.controller;
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
@@ -24,12 +23,8 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import lombok.AllArgsConstructor;
-import org.springblade.common.cache.DictBizCache;
-import org.springblade.common.cache.DictCache;
-import org.springblade.common.cache.SysCache;
+import org.springblade.common.constant.CacheBizConstant;
 import org.springblade.common.constant.CommonConstant;
-import org.springblade.common.enums.DictBizEnum;
-import org.springblade.common.enums.DictEnum;
 import org.springblade.core.boot.ctrl.BladeController;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
@@ -91,6 +86,8 @@ public class Api03Controller extends BladeController {
 
 	private final IUserTicketService userTicketService;
 
+	private final IVersionUpgradeService versionUpgradeService;
+
 	private final BladeRedis bladeRedis;
 
 	/**
@@ -234,7 +231,7 @@ public class Api03Controller extends BladeController {
 	 */
 	@GetMapping("/ads-list")
 	@ApiOperationSupport(order = 9)
-	@ApiOperation(value = "获取广告列表数据", notes = "传入类型和条数")
+	@ApiOperation(value = "获取广告列表数据", notes = "传入类型和条数,类型为字典项ads_type")
 	public R<List<Ads>> adsList(@ApiParam(value = "类型", required = true)  @RequestParam Integer type,
 								@ApiParam(value = "条数", required = true)  @RequestParam Integer limit) {
 		return R.data(adsService.selectAdsList(type, limit));
@@ -247,10 +244,15 @@ public class Api03Controller extends BladeController {
 	@ApiOperationSupport(order = 10)
 	@ApiOperation(value = "获取支付方式数据", notes = "无参")
 	public R<List<Payments>> paymentsList() {
-		Payments payments = new Payments();
-		payments.setIsEnabled(2);
-		payments.setPayFor(4);//APP端
-		return R.data(paymentsService.list(Condition.getQueryWrapper(payments).lambda().orderByAsc(Payments::getSort)));
+		List<Payments> list =  bladeRedis.get(CacheBizConstant.CACHE_DEFAULT_PAYMENTS);
+		if (list == null || list.size() == 0){
+			Payments payments = new Payments();
+			payments.setIsEnabled(2);
+			payments.setPayFor(4);//APP端
+			list = paymentsService.list(Condition.getQueryWrapper(payments).lambda().orderByAsc(Payments::getSort));
+			bladeRedis.setEx(CacheBizConstant.CACHE_DEFAULT_PAYMENTS,list,CacheBizConstant.CACHE_TIME);
+		}
+		return R.data(list);
 	}
 
 	/**
@@ -416,5 +418,17 @@ public class Api03Controller extends BladeController {
 		return R.status(userService.tickerTransfer(request.getUserId(),request.getTransferId(),request.getTicket()));
 	}
 
+	/**
+	 * 获取最新版本
+	 */
+	@GetMapping("/versionUpgrade")
+	@ApiOperationSupport(order = 22)
+	@ApiOperation(value = "获取最新版本", notes = "获取最新版本")
+	public R<VersionUpgrade> versionUpgrade() {
+		VersionUpgrade versionUpgrade = versionUpgradeService.getOne(Wrappers.<VersionUpgrade>lambdaQuery()
+			.eq(VersionUpgrade::getStatus ,2).orderByDesc(VersionUpgrade::getSort),false);
+		return R.data(versionUpgrade);
+	}
+
 
 }

+ 5 - 1
src/main/java/org/springblade/modules/api/controller/Api04Controller.java

@@ -23,8 +23,11 @@ import lombok.SneakyThrows;
 import org.springblade.common.constant.CommonConstant;
 import org.springblade.core.boot.ctrl.BladeController;
 import org.springblade.core.oss.model.BladeFile;
+import org.springblade.core.tenant.annotation.NonDS;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.FileUtil;
+import org.springblade.core.tool.utils.WebUtil;
+import org.springblade.modules.auth.utils.TokenUtil;
 import org.springblade.modules.resource.builder.oss.OssBuilder;
 import org.springblade.modules.resource.entity.Attach;
 import org.springblade.modules.resource.service.IAttachService;
@@ -40,6 +43,7 @@ import org.springframework.web.multipart.MultipartFile;
  * @author xuwei
  * @since 2021-12-23
  */
+@NonDS
 @RestController
 @AllArgsConstructor
 @RequestMapping(CommonConstant.API_URL + "/file")
@@ -61,7 +65,7 @@ public class Api04Controller extends BladeController {
 	@ApiOperation(value = "上传文件", notes = "上传文件")
 	public R<BladeFile> putFileAttach(@RequestParam MultipartFile file) {
 		String fileName = file.getOriginalFilename();
-		BladeFile bladeFile = ossBuilder.template("000000","").putFile(fileName, file.getInputStream());
+		BladeFile bladeFile = ossBuilder.template("000000", "alioss").putFile(fileName, file.getInputStream());
 		Long attachId = buildAttach(fileName, file.getSize(), bladeFile);
 		bladeFile.setAttachId(attachId);
 		return R.data(bladeFile);

+ 3 - 2
src/main/java/org/springblade/modules/platform/controller/AdsController.java

@@ -27,6 +27,7 @@ import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.platform.wrapper.AdsWrapper;
 import org.springframework.web.bind.annotation.*;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.platform.entity.Ads;
@@ -65,9 +66,9 @@ public class AdsController extends BladeController {
 	@GetMapping("/list")
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "分页", notes = "传入ads")
-	public R<IPage<Ads>> list(Ads ads, Query query) {
+	public R<IPage<AdsVO>> list(Ads ads, Query query) {
 		IPage<Ads> pages = adsService.page(Condition.getPage(query), Condition.getQueryWrapper(ads));
-		return R.data(pages);
+		return R.data(AdsWrapper.build().pageVO(pages));
 	}
 
 	/**

+ 10 - 5
src/main/java/org/springblade/modules/platform/controller/PaymentsController.java

@@ -23,10 +23,13 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import lombok.AllArgsConstructor;
 import javax.validation.Valid;
 
+import org.springblade.common.constant.CacheBizConstant;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
+import org.springblade.core.redis.cache.BladeRedis;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.platform.wrapper.PaymentsWrapper;
 import org.springframework.web.bind.annotation.*;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.platform.entity.Payments;
@@ -47,6 +50,7 @@ import org.springblade.core.boot.ctrl.BladeController;
 public class PaymentsController extends BladeController {
 
 	private final IPaymentsService paymentsService;
+	private final BladeRedis bladeRedis;
 
 	/**
 	 * 详情
@@ -65,9 +69,9 @@ public class PaymentsController extends BladeController {
 	@GetMapping("/list")
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "分页", notes = "传入payments")
-	public R<IPage<Payments>> list(Payments payments, Query query) {
-		IPage<Payments> pages = paymentsService.page(Condition.getPage(query), Condition.getQueryWrapper(payments));
-		return R.data(pages);
+	public R<IPage<PaymentsVO>> list(Payments payments, Query query) {
+		IPage<Payments> pages = paymentsService.page(Condition.getPage(query), Condition.getQueryWrapper(payments).lambda().orderByAsc(Payments::getSort));
+		return R.data(PaymentsWrapper.build().pageVO(pages));
 	}
 
 	/**
@@ -108,10 +112,11 @@ public class PaymentsController extends BladeController {
 	@ApiOperationSupport(order = 6)
 	@ApiOperation(value = "新增或修改", notes = "传入payments")
 	public R submit(@Valid @RequestBody Payments payments) {
+		bladeRedis.del(CacheBizConstant.CACHE_DEFAULT_PAYMENTS);
 		return R.status(paymentsService.saveOrUpdate(payments));
 	}
 
-	
+
 	/**
 	 * 删除 支付方式表
 	 */
@@ -122,5 +127,5 @@ public class PaymentsController extends BladeController {
 		return R.status(paymentsService.removeByIds(Func.toLongList(ids)));
 	}
 
-	
+
 }

+ 128 - 0
src/main/java/org/springblade/modules/platform/controller/VersionUpgradeController.java

@@ -0,0 +1,128 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.platform.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.platform.wrapper.VersionUpgradeWrapper;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.platform.entity.VersionUpgrade;
+import org.springblade.modules.platform.vo.VersionUpgradeVO;
+import org.springblade.modules.platform.service.IVersionUpgradeService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 版本升级表 控制器
+ *
+ * @author BladeX
+ * @since 2022-03-02
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("platform/versionupgrade")
+@Api(value = "版本升级表", tags = "版本升级表接口")
+public class VersionUpgradeController extends BladeController {
+
+	private final IVersionUpgradeService versionUpgradeService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入versionUpgrade")
+	public R<VersionUpgrade> detail(VersionUpgrade versionUpgrade) {
+		VersionUpgrade detail = versionUpgradeService.getOne(Condition.getQueryWrapper(versionUpgrade));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 版本升级表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入versionUpgrade")
+	public R<IPage<VersionUpgradeVO>> list(VersionUpgrade versionUpgrade, Query query) {
+		IPage<VersionUpgrade> pages = versionUpgradeService.page(Condition.getPage(query),
+			Condition.getQueryWrapper(versionUpgrade).lambda().orderByAsc(VersionUpgrade::getSort));
+		return R.data(VersionUpgradeWrapper.build().pageVO(pages));
+	}
+
+	/**
+	 * 自定义分页 版本升级表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入versionUpgrade")
+	public R<IPage<VersionUpgradeVO>> page(VersionUpgradeVO versionUpgrade, Query query) {
+		IPage<VersionUpgradeVO> pages = versionUpgradeService.selectVersionUpgradePage(Condition.getPage(query), versionUpgrade);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 版本升级表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入versionUpgrade")
+	public R save(@Valid @RequestBody VersionUpgrade versionUpgrade) {
+		return R.status(versionUpgradeService.save(versionUpgrade));
+	}
+
+	/**
+	 * 修改 版本升级表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入versionUpgrade")
+	public R update(@Valid @RequestBody VersionUpgrade versionUpgrade) {
+		return R.status(versionUpgradeService.updateById(versionUpgrade));
+	}
+
+	/**
+	 * 新增或修改 版本升级表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入versionUpgrade")
+	public R submit(@Valid @RequestBody VersionUpgrade versionUpgrade) {
+		return R.status(versionUpgradeService.saveOrUpdate(versionUpgrade));
+	}
+
+
+	/**
+	 * 删除 版本升级表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(versionUpgradeService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 34 - 0
src/main/java/org/springblade/modules/platform/dto/VersionUpgradeDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.platform.dto;
+
+import org.springblade.modules.platform.entity.VersionUpgrade;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 版本升级表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-03-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class VersionUpgradeDTO extends VersionUpgrade {
+	private static final long serialVersionUID = 1L;
+
+}

+ 97 - 0
src/main/java/org/springblade/modules/platform/entity/VersionUpgrade.java

@@ -0,0 +1,97 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.platform.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.Date;
+
+/**
+ * 版本升级表实体类
+ *
+ * @author BladeX
+ * @since 2022-03-02
+ */
+@Data
+@TableName("t_version_upgrade")
+@ApiModel(value = "VersionUpgrade对象", description = "版本升级表")
+public class VersionUpgrade implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	@JsonSerialize(using = ToStringSerializer.class)
+	@TableId(value = "id", type = IdType.AUTO)
+	@ApiModelProperty(value = "主键ID")
+	private Long id;
+	/**
+	 * 小版本号
+	 */
+	@ApiModelProperty(value = "小版本号")
+	private String versionMini;
+	/**
+	 * 是否升级 1升级,0不升级,2强制升级
+	 */
+	@ApiModelProperty(value = "是否升级 1升级,0不升级,2强制升级")
+	private Integer type;
+	/**
+	 * 更新内容
+	 */
+	@ApiModelProperty(value = "更新内容")
+	private String content;
+	/**
+	 * apk路径
+	 */
+	@ApiModelProperty(value = "apk路径")
+	private String apkUrl;
+	/**
+	 * 版本编号
+	 */
+	@ApiModelProperty(value = "版本编号")
+	private String versionCode;
+	/**
+	 * APP大小
+	 */
+	@ApiModelProperty(value = "APP大小")
+	private String apkSize;
+	/**
+	 * 是否启用
+	 */
+	@ApiModelProperty(value = "是否启用")
+	private Integer status;
+
+	@ApiModelProperty(value = "排序")
+	private Integer sort;
+
+	@ApiModelProperty(value = "创建时间")
+	private Date createTime;
+	/**
+	 * 更新时间
+	 */
+	@ApiModelProperty(value = "更新时间")
+	private Date updateTime;
+
+
+}

+ 42 - 0
src/main/java/org/springblade/modules/platform/mapper/VersionUpgradeMapper.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.platform.mapper;
+
+import org.springblade.modules.platform.entity.VersionUpgrade;
+import org.springblade.modules.platform.vo.VersionUpgradeVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 版本升级表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-03-02
+ */
+public interface VersionUpgradeMapper extends BaseMapper<VersionUpgrade> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param versionUpgrade
+	 * @return
+	 */
+	List<VersionUpgradeVO> selectVersionUpgradePage(IPage page, VersionUpgradeVO versionUpgrade);
+
+}

+ 24 - 0
src/main/java/org/springblade/modules/platform/mapper/VersionUpgradeMapper.xml

@@ -0,0 +1,24 @@
+<?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="org.springblade.modules.platform.mapper.VersionUpgradeMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="versionUpgradeResultMap" type="org.springblade.modules.platform.entity.VersionUpgrade">
+        <id column="id" property="id"/>
+        <result column="version_mini" property="versionMini"/>
+        <result column="type" property="type"/>
+        <result column="content" property="content"/>
+        <result column="apk_url" property="apkUrl"/>
+        <result column="version_code" property="versionCode"/>
+        <result column="apk_size" property="apkSize"/>
+        <result column="status" property="status"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_time" property="updateTime"/>
+    </resultMap>
+
+
+    <select id="selectVersionUpgradePage" resultMap="versionUpgradeResultMap">
+        select * from t_version_upgrade where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
src/main/java/org/springblade/modules/platform/service/IVersionUpgradeService.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.platform.service;
+
+import org.springblade.modules.platform.entity.VersionUpgrade;
+import org.springblade.modules.platform.vo.VersionUpgradeVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 版本升级表 服务类
+ *
+ * @author BladeX
+ * @since 2022-03-02
+ */
+public interface IVersionUpgradeService extends IService<VersionUpgrade> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param versionUpgrade
+	 * @return
+	 */
+	IPage<VersionUpgradeVO> selectVersionUpgradePage(IPage<VersionUpgradeVO> page, VersionUpgradeVO versionUpgrade);
+
+}

+ 41 - 0
src/main/java/org/springblade/modules/platform/service/impl/VersionUpgradeServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.platform.service.impl;
+
+import org.springblade.modules.platform.entity.VersionUpgrade;
+import org.springblade.modules.platform.vo.VersionUpgradeVO;
+import org.springblade.modules.platform.mapper.VersionUpgradeMapper;
+import org.springblade.modules.platform.service.IVersionUpgradeService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 版本升级表 服务实现类
+ *
+ * @author BladeX
+ * @since 2022-03-02
+ */
+@Service
+public class VersionUpgradeServiceImpl extends ServiceImpl<VersionUpgradeMapper, VersionUpgrade> implements IVersionUpgradeService {
+
+	@Override
+	public IPage<VersionUpgradeVO> selectVersionUpgradePage(IPage<VersionUpgradeVO> page, VersionUpgradeVO versionUpgrade) {
+		return page.setRecords(baseMapper.selectVersionUpgradePage(page, versionUpgrade));
+	}
+
+}

+ 14 - 0
src/main/java/org/springblade/modules/platform/vo/AdsVO.java

@@ -16,6 +16,7 @@
  */
 package org.springblade.modules.platform.vo;
 
+import io.swagger.annotations.ApiModelProperty;
 import org.springblade.modules.platform.entity.Ads;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -31,6 +32,19 @@ import io.swagger.annotations.ApiModel;
 @EqualsAndHashCode(callSuper = true)
 @ApiModel(value = "AdsVO对象", description = "广告表")
 public class AdsVO extends Ads {
+
 	private static final long serialVersionUID = 1L;
 
+	/**
+	 * 类型
+	 */
+	@ApiModelProperty(value = "类型")
+	private String typeDisplayName;
+
+	/**
+	 * 是否启用
+	 */
+	@ApiModelProperty(value = "是否启用")
+	private String isEnabledDisplayName;
+
 }

+ 15 - 0
src/main/java/org/springblade/modules/platform/vo/PaymentsVO.java

@@ -16,6 +16,7 @@
  */
 package org.springblade.modules.platform.vo;
 
+import io.swagger.annotations.ApiModelProperty;
 import org.springblade.modules.platform.entity.Payments;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -31,6 +32,20 @@ import io.swagger.annotations.ApiModel;
 @EqualsAndHashCode(callSuper = true)
 @ApiModel(value = "PaymentsVO对象", description = "支付方式表")
 public class PaymentsVO extends Payments {
+
 	private static final long serialVersionUID = 1L;
 
+	@ApiModelProperty(value = "是否启用")
+	private String isEnabledDisplayName;
+	/**
+	 * 是否在线支付
+	 */
+	@ApiModelProperty(value = "是否在线支付")
+	private String isOnlineDisplayName;
+	/**
+	 * 支付端标识,1:PC端 2:手机端 3:微信端 4:APP端
+	 */
+	@ApiModelProperty(value = "支付端标识")
+	private String payForDisplayName;
+
 }

+ 43 - 0
src/main/java/org/springblade/modules/platform/vo/VersionUpgradeVO.java

@@ -0,0 +1,43 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.platform.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import org.springblade.modules.platform.entity.VersionUpgrade;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 版本升级表视图实体类
+ *
+ * @author BladeX
+ * @since 2022-03-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "VersionUpgradeVO对象", description = "版本升级表")
+public class VersionUpgradeVO extends VersionUpgrade {
+	private static final long serialVersionUID = 1L;
+
+	@ApiModelProperty(value = "是否升级 1升级,0不升级,2强制升级")
+	private String typeDisplayName;
+
+	@ApiModelProperty(value = "是否启用")
+	private String statusDisplayName;
+
+}

+ 51 - 0
src/main/java/org/springblade/modules/platform/wrapper/AdsWrapper.java

@@ -0,0 +1,51 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.platform.wrapper;
+
+import org.springblade.common.cache.DictBizCache;
+import org.springblade.common.cache.DictCache;
+import org.springblade.common.enums.DictBizEnum;
+import org.springblade.common.enums.DictEnum;
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.platform.entity.Ads;
+import org.springblade.modules.platform.entity.UserTicket;
+import org.springblade.modules.platform.vo.AdsVO;
+import org.springblade.modules.platform.vo.UserTicketVO;
+
+import java.util.Objects;
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author Chill
+ */
+public class AdsWrapper extends BaseEntityWrapper<Ads, AdsVO> {
+
+	public static AdsWrapper build() {
+		return new AdsWrapper();
+	}
+
+	@Override
+	public AdsVO entityVO(Ads entity) {
+		AdsVO vo = Objects.requireNonNull(BeanUtil.copy(entity, AdsVO.class));
+		vo.setTypeDisplayName(DictBizCache.getValue(DictBizEnum.ADS_TYPE,vo.getType()));
+		vo.setIsEnabledDisplayName(DictCache.getValue(DictEnum.YES_NO, entity.getIsEnabled()));
+		return vo;
+	}
+
+}

+ 52 - 0
src/main/java/org/springblade/modules/platform/wrapper/PaymentsWrapper.java

@@ -0,0 +1,52 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.platform.wrapper;
+
+import org.springblade.common.cache.DictBizCache;
+import org.springblade.common.cache.DictCache;
+import org.springblade.common.enums.DictBizEnum;
+import org.springblade.common.enums.DictEnum;
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.platform.entity.Ads;
+import org.springblade.modules.platform.entity.Payments;
+import org.springblade.modules.platform.vo.AdsVO;
+import org.springblade.modules.platform.vo.PaymentsVO;
+
+import java.util.Objects;
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author Chill
+ */
+public class PaymentsWrapper extends BaseEntityWrapper<Payments, PaymentsVO> {
+
+	public static PaymentsWrapper build() {
+		return new PaymentsWrapper();
+	}
+
+	@Override
+	public PaymentsVO entityVO(Payments entity) {
+		PaymentsVO vo = Objects.requireNonNull(BeanUtil.copy(entity, PaymentsVO.class));
+		vo.setIsOnlineDisplayName(DictCache.getValue(DictEnum.YES_NO,vo.getIsOnline()));
+		vo.setIsEnabledDisplayName(DictCache.getValue(DictEnum.YES_NO, entity.getIsEnabled()));
+		vo.setPayForDisplayName(DictBizCache.getValue(DictBizEnum.PAY_FOR, entity.getPayFor()));
+		return vo;
+	}
+
+}

+ 49 - 0
src/main/java/org/springblade/modules/platform/wrapper/VersionUpgradeWrapper.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.platform.wrapper;
+
+import org.springblade.common.cache.DictBizCache;
+import org.springblade.common.cache.DictCache;
+import org.springblade.common.enums.DictBizEnum;
+import org.springblade.common.enums.DictEnum;
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.platform.entity.VersionUpgrade;
+import org.springblade.modules.platform.vo.VersionUpgradeVO;
+
+import java.util.Objects;
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author Chill
+ */
+public class VersionUpgradeWrapper extends BaseEntityWrapper<VersionUpgrade, VersionUpgradeVO> {
+
+	public static VersionUpgradeWrapper build() {
+		return new VersionUpgradeWrapper();
+	}
+
+	@Override
+	public VersionUpgradeVO entityVO(VersionUpgrade entity) {
+		VersionUpgradeVO vo = Objects.requireNonNull(BeanUtil.copy(entity, VersionUpgradeVO.class));
+		vo.setTypeDisplayName(DictBizCache.getValue(DictBizEnum.UPGRADE_TYPE,vo.getType()));
+		vo.setStatusDisplayName(DictCache.getValue(DictEnum.YES_NO,vo.getType()));
+		return vo;
+	}
+
+}

+ 4 - 0
src/main/java/org/springblade/modules/resource/builder/oss/OssBuilder.java

@@ -27,6 +27,7 @@ import org.springblade.core.oss.props.OssProperties;
 import org.springblade.core.oss.rule.BladeOssRule;
 import org.springblade.core.oss.rule.OssRule;
 import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.constant.BladeConstant;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.core.tool.utils.StringPool;
 import org.springblade.core.tool.utils.StringUtil;
@@ -84,6 +85,9 @@ public class OssBuilder {
 	 */
 	public OssTemplate template(String code) {
 		String tenantId = AuthUtil.getTenantId();
+		if(tenantId == null){
+			tenantId = BladeConstant.ADMIN_TENANT_ID;
+		}
 		Oss oss = getOss(tenantId, code);
 		Oss ossCached = ossPool.get(tenantId);
 		OssTemplate template = templatePool.get(tenantId);

+ 35 - 5
src/main/java/org/springblade/modules/shopping/controller/CategoryController.java

@@ -16,23 +16,31 @@
  */
 package org.springblade.modules.shopping.controller;
 
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.*;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import lombok.AllArgsConstructor;
 import javax.validation.Valid;
 
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.annotation.PreAuth;
 import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.constant.RoleConstant;
+import org.springblade.core.tool.node.TreeNode;
 import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.shopping.wrapper.CategoryWrapper;
+import org.springblade.modules.system.vo.MenuVO;
+import org.springblade.modules.system.wrapper.MenuWrapper;
 import org.springframework.web.bind.annotation.*;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.shopping.entity.Category;
 import org.springblade.modules.shopping.vo.CategoryVO;
 import org.springblade.modules.shopping.service.ICategoryService;
 import org.springblade.core.boot.ctrl.BladeController;
+import springfox.documentation.annotations.ApiIgnore;
+
+import java.util.List;
+import java.util.Map;
 
 /**
  * 分类表 控制器
@@ -59,6 +67,28 @@ public class CategoryController extends BladeController {
 		return R.data(detail);
 	}
 
+	/**
+	 * 懒加载列表
+	 */
+	@GetMapping("/lazy-list")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "懒加载列表", notes = "传入Category")
+	public R<List<CategoryVO>> lazyList(Long parentId, @ApiIgnore @RequestParam Map<String, Object> menu) {
+		List<CategoryVO> list = categoryService.lazyList(parentId, menu);
+		return R.data(CategoryWrapper.build().listNodeLazyVO(list));
+	}
+
+	/**
+	 * 获取树形结构
+	 */
+	@GetMapping("/tree")
+	@ApiOperationSupport(order = 11)
+	@ApiOperation(value = "树形结构", notes = "树形结构")
+	public R<List<TreeNode>> tree() {
+		List<TreeNode> tree = categoryService.tree();
+		return R.data(tree);
+	}
+
 	/**
 	 * 分页 分类表
 	 */
@@ -111,7 +141,7 @@ public class CategoryController extends BladeController {
 		return R.status(categoryService.saveOrUpdate(category));
 	}
 
-	
+
 	/**
 	 * 删除 分类表
 	 */
@@ -122,5 +152,5 @@ public class CategoryController extends BladeController {
 		return R.status(categoryService.removeByIds(Func.toLongList(ids)));
 	}
 
-	
+
 }

+ 12 - 6
src/main/java/org/springblade/modules/shopping/controller/ConsignConfigController.java

@@ -23,10 +23,13 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import lombok.AllArgsConstructor;
 import javax.validation.Valid;
 
+import org.springblade.common.constant.CacheBizConstant;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
+import org.springblade.core.redis.cache.BladeRedis;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.shopping.wrapper.ConsignConfigWrapper;
 import org.springframework.web.bind.annotation.*;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.shopping.entity.ConsignConfig;
@@ -47,6 +50,7 @@ import org.springblade.core.boot.ctrl.BladeController;
 public class ConsignConfigController extends BladeController {
 
 	private final IConsignConfigService consignConfigService;
+	private final BladeRedis bladeRedis;
 
 	/**
 	 * 详情
@@ -54,9 +58,9 @@ public class ConsignConfigController extends BladeController {
 	@GetMapping("/detail")
 	@ApiOperationSupport(order = 1)
 	@ApiOperation(value = "详情", notes = "传入consignConfig")
-	public R<ConsignConfig> detail(ConsignConfig consignConfig) {
+	public R<ConsignConfigVO> detail(ConsignConfig consignConfig) {
 		ConsignConfig detail = consignConfigService.getOne(Condition.getQueryWrapper(consignConfig));
-		return R.data(detail);
+		return R.data(ConsignConfigWrapper.build().entityVO(detail));
 	}
 
 	/**
@@ -65,9 +69,9 @@ public class ConsignConfigController extends BladeController {
 	@GetMapping("/list")
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "分页", notes = "传入consignConfig")
-	public R<IPage<ConsignConfig>> list(ConsignConfig consignConfig, Query query) {
+	public R<IPage<ConsignConfigVO>> list(ConsignConfig consignConfig, Query query) {
 		IPage<ConsignConfig> pages = consignConfigService.page(Condition.getPage(query), Condition.getQueryWrapper(consignConfig));
-		return R.data(pages);
+		return R.data(ConsignConfigWrapper.build().pageVO(pages));
 	}
 
 	/**
@@ -108,10 +112,12 @@ public class ConsignConfigController extends BladeController {
 	@ApiOperationSupport(order = 6)
 	@ApiOperation(value = "新增或修改", notes = "传入consignConfig")
 	public R submit(@Valid @RequestBody ConsignConfig consignConfig) {
+		//清空缓存
+		bladeRedis.del(CacheBizConstant.CACHE_CONSIGN_CONFIG);
 		return R.status(consignConfigService.saveOrUpdate(consignConfig));
 	}
 
-	
+
 	/**
 	 * 删除 寄售配置表
 	 */
@@ -122,5 +128,5 @@ public class ConsignConfigController extends BladeController {
 		return R.status(consignConfigService.removeByIds(Func.toLongList(ids)));
 	}
 
-	
+
 }

+ 17 - 5
src/main/java/org/springblade/modules/shopping/controller/ConsignController.java

@@ -16,6 +16,7 @@
  */
 package org.springblade.modules.shopping.controller;
 
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
@@ -27,6 +28,9 @@ import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.shopping.entity.Goods;
+import org.springblade.modules.shopping.service.IGoodsService;
+import org.springblade.modules.shopping.wrapper.ConsignWrapper;
 import org.springframework.web.bind.annotation.*;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.shopping.entity.Consign;
@@ -47,6 +51,7 @@ import org.springblade.core.boot.ctrl.BladeController;
 public class ConsignController extends BladeController {
 
 	private final IConsignService consignService;
+	private final IGoodsService goodsService;
 
 	/**
 	 * 详情
@@ -65,9 +70,9 @@ public class ConsignController extends BladeController {
 	@GetMapping("/list")
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "分页", notes = "传入consign")
-	public R<IPage<Consign>> list(Consign consign, Query query) {
+	public R<IPage<ConsignVO>> list(Consign consign, Query query) {
 		IPage<Consign> pages = consignService.page(Condition.getPage(query), Condition.getQueryWrapper(consign));
-		return R.data(pages);
+		return R.data(ConsignWrapper.build().pageVO(pages));
 	}
 
 	/**
@@ -107,11 +112,18 @@ public class ConsignController extends BladeController {
 	@PostMapping("/submit")
 	@ApiOperationSupport(order = 6)
 	@ApiOperation(value = "新增或修改", notes = "传入consign")
-	public R submit(@Valid @RequestBody Consign consign) {
+	public R submit(@Valid @RequestBody ConsignVO consign) {
+		if (consign.getProductNo() != null){
+			Goods goods = goodsService.getOne(Wrappers.<Goods>lambdaQuery().eq(Goods::getProductNo, consign.getProductNo()));
+			if (goods != null) {
+				consign.setGoodsId(goods.getId());
+				consign.setGoodsName(goods.getGoodsName());
+			}
+		}
 		return R.status(consignService.saveOrUpdate(consign));
 	}
 
-	
+
 	/**
 	 * 删除 商品寄售表
 	 */
@@ -122,5 +134,5 @@ public class ConsignController extends BladeController {
 		return R.status(consignService.removeByIds(Func.toLongList(ids)));
 	}
 
-	
+
 }

+ 5 - 4
src/main/java/org/springblade/modules/shopping/controller/GoodsController.java

@@ -27,6 +27,7 @@ import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.shopping.wrapper.GoodsWrapper;
 import org.springframework.web.bind.annotation.*;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.shopping.entity.Goods;
@@ -65,9 +66,9 @@ public class GoodsController extends BladeController {
 	@GetMapping("/list")
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "分页", notes = "传入goods")
-	public R<IPage<Goods>> list(Goods goods, Query query) {
+	public R<IPage<GoodsVO>> list(Goods goods, Query query) {
 		IPage<Goods> pages = goodsService.page(Condition.getPage(query), Condition.getQueryWrapper(goods));
-		return R.data(pages);
+		return R.data(GoodsWrapper.build().pageVO(pages));
 	}
 
 	/**
@@ -111,7 +112,7 @@ public class GoodsController extends BladeController {
 		return R.status(goodsService.saveOrUpdate(goods));
 	}
 
-	
+
 	/**
 	 * 删除 商品表
 	 */
@@ -122,5 +123,5 @@ public class GoodsController extends BladeController {
 		return R.status(goodsService.removeByIds(Func.toLongList(ids)));
 	}
 
-	
+
 }

+ 16 - 5
src/main/java/org/springblade/modules/shopping/controller/GoodsSpecsController.java

@@ -16,6 +16,7 @@
  */
 package org.springblade.modules.shopping.controller;
 
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
@@ -27,6 +28,9 @@ import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.shopping.entity.Goods;
+import org.springblade.modules.shopping.service.IGoodsService;
+import org.springblade.modules.shopping.wrapper.GoodsSpecsWrapper;
 import org.springframework.web.bind.annotation.*;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.shopping.entity.GoodsSpecs;
@@ -47,6 +51,7 @@ import org.springblade.core.boot.ctrl.BladeController;
 public class GoodsSpecsController extends BladeController {
 
 	private final IGoodsSpecsService goodsSpecsService;
+	private final IGoodsService goodsService;
 
 	/**
 	 * 详情
@@ -65,9 +70,9 @@ public class GoodsSpecsController extends BladeController {
 	@GetMapping("/list")
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "分页", notes = "传入goodsSpecs")
-	public R<IPage<GoodsSpecs>> list(GoodsSpecs goodsSpecs, Query query) {
+	public R<IPage<GoodsSpecsVO>> list(GoodsSpecs goodsSpecs, Query query) {
 		IPage<GoodsSpecs> pages = goodsSpecsService.page(Condition.getPage(query), Condition.getQueryWrapper(goodsSpecs));
-		return R.data(pages);
+		return R.data(GoodsSpecsWrapper.build().pageVO(pages));
 	}
 
 	/**
@@ -107,11 +112,17 @@ public class GoodsSpecsController extends BladeController {
 	@PostMapping("/submit")
 	@ApiOperationSupport(order = 6)
 	@ApiOperation(value = "新增或修改", notes = "传入goodsSpecs")
-	public R submit(@Valid @RequestBody GoodsSpecs goodsSpecs) {
+	public R submit(@Valid @RequestBody GoodsSpecsVO goodsSpecs) {
+		if (goodsSpecs.getProductNo() != null){
+			Goods goods = goodsService.getOne(Wrappers.<Goods>lambdaQuery().eq(Goods::getProductNo, goodsSpecs.getProductNo()));
+			if (goods != null) {
+				goodsSpecs.setGoodsId(goods.getId());
+			}
+		}
 		return R.status(goodsSpecsService.saveOrUpdate(goodsSpecs));
 	}
 
-	
+
 	/**
 	 * 删除 商品规格表
 	 */
@@ -122,5 +133,5 @@ public class GoodsSpecsController extends BladeController {
 		return R.status(goodsSpecsService.removeByIds(Func.toLongList(ids)));
 	}
 
-	
+
 }

+ 14 - 4
src/main/java/org/springblade/modules/shopping/controller/SpecCatsController.java

@@ -27,6 +27,9 @@ import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.shopping.entity.Category;
+import org.springblade.modules.shopping.service.ICategoryService;
+import org.springblade.modules.shopping.wrapper.SpecCatsWrapper;
 import org.springframework.web.bind.annotation.*;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.shopping.entity.SpecCats;
@@ -47,6 +50,7 @@ import org.springblade.core.boot.ctrl.BladeController;
 public class SpecCatsController extends BladeController {
 
 	private final ISpecCatsService specCatsService;
+	private final ICategoryService categoryService;
 
 	/**
 	 * 详情
@@ -65,9 +69,9 @@ public class SpecCatsController extends BladeController {
 	@GetMapping("/list")
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "分页", notes = "传入specCats")
-	public R<IPage<SpecCats>> list(SpecCats specCats, Query query) {
+	public R<IPage<SpecCatsVO>> list(SpecCats specCats, Query query) {
 		IPage<SpecCats> pages = specCatsService.page(Condition.getPage(query), Condition.getQueryWrapper(specCats));
-		return R.data(pages);
+		return R.data(SpecCatsWrapper.build().pageVO(pages));
 	}
 
 	/**
@@ -108,10 +112,16 @@ public class SpecCatsController extends BladeController {
 	@ApiOperationSupport(order = 6)
 	@ApiOperation(value = "新增或修改", notes = "传入specCats")
 	public R submit(@Valid @RequestBody SpecCats specCats) {
+		if(specCats.getCatId() != null){
+			Category category = categoryService.getById(specCats.getCatId());
+			if (category != null){
+				specCats.setCatName(category.getName());
+			}
+		}
 		return R.status(specCatsService.saveOrUpdate(specCats));
 	}
 
-	
+
 	/**
 	 * 删除 规格分类表
 	 */
@@ -122,5 +132,5 @@ public class SpecCatsController extends BladeController {
 		return R.status(specCatsService.removeByIds(Func.toLongList(ids)));
 	}
 
-	
+
 }

+ 15 - 5
src/main/java/org/springblade/modules/shopping/controller/SpecItemsController.java

@@ -16,6 +16,7 @@
  */
 package org.springblade.modules.shopping.controller;
 
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
@@ -27,6 +28,9 @@ import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.shopping.entity.Goods;
+import org.springblade.modules.shopping.service.IGoodsService;
+import org.springblade.modules.shopping.wrapper.SpecItemsWrapper;
 import org.springframework.web.bind.annotation.*;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.shopping.entity.SpecItems;
@@ -47,6 +51,7 @@ import org.springblade.core.boot.ctrl.BladeController;
 public class SpecItemsController extends BladeController {
 
 	private final ISpecItemsService specItemsService;
+	private final IGoodsService goodsService;
 
 	/**
 	 * 详情
@@ -65,9 +70,9 @@ public class SpecItemsController extends BladeController {
 	@GetMapping("/list")
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "分页", notes = "传入specItems")
-	public R<IPage<SpecItems>> list(SpecItems specItems, Query query) {
+	public R<IPage<SpecItemsVO>> list(SpecItems specItems, Query query) {
 		IPage<SpecItems> pages = specItemsService.page(Condition.getPage(query), Condition.getQueryWrapper(specItems));
-		return R.data(pages);
+		return R.data(SpecItemsWrapper.build().pageVO(pages));
 	}
 
 	/**
@@ -107,11 +112,16 @@ public class SpecItemsController extends BladeController {
 	@PostMapping("/submit")
 	@ApiOperationSupport(order = 6)
 	@ApiOperation(value = "新增或修改", notes = "传入specItems")
-	public R submit(@Valid @RequestBody SpecItems specItems) {
+	public R submit(@Valid @RequestBody SpecItemsVO specItems) {
+		if (specItems.getProductNo() != null){
+			Goods goods = goodsService.getOne(Wrappers.<Goods>lambdaQuery().eq(Goods::getProductNo, specItems.getProductNo()));
+			specItems.setGoodsId(goods.getId());
+			specItems.setProductNo(goods.getProductNo());
+		}
 		return R.status(specItemsService.saveOrUpdate(specItems));
 	}
 
-	
+
 	/**
 	 * 删除 商品规格值表
 	 */
@@ -122,5 +132,5 @@ public class SpecItemsController extends BladeController {
 		return R.status(specItemsService.removeByIds(Func.toLongList(ids)));
 	}
 
-	
+
 }

+ 1 - 1
src/main/java/org/springblade/modules/shopping/entity/Category.java

@@ -52,7 +52,7 @@ public class Category implements Serializable {
 	 * 分类父ID
 	 */
 	@ApiModelProperty(value = "分类父ID")
-	private Long pid;
+	private Long parentId;
 	/**
 	 * 分类值
 	 */

+ 20 - 3
src/main/java/org/springblade/modules/shopping/entity/Consign.java

@@ -54,6 +54,7 @@ public class Consign implements Serializable {
 	/**
 	 * 订单ID
 	 */
+	@ApiModelProperty(value = "订单ID")
 	private Long orderId;
 	/**
 	 * 商品ID
@@ -81,10 +82,20 @@ public class Consign implements Serializable {
 	@ApiModelProperty(value = "数量")
 	private Integer totalNum;
 	/**
-	 * 用户ID
+	 * 寄售用户ID
 	 */
-	@ApiModelProperty(value = "用户ID")
-	private Long userId;
+	@ApiModelProperty(value = "寄售用户ID")
+	private Long consignUserId;
+	/**
+	 * 支付用户ID
+	 */
+	@ApiModelProperty(value = "支付用户ID")
+	private Long payUserId;
+	/**
+	 * 寄售状态
+	 */
+	@ApiModelProperty(value = "寄售状态")
+	private Integer consignState;
 	/**
 	 * 寄售价格
 	 */
@@ -106,5 +117,11 @@ public class Consign implements Serializable {
 	@ApiModelProperty(value = "确认时间")
 	private Date confirmTime;
 
+	/**
+	 * 寄售来源
+	 */
+	@ApiModelProperty(value = "寄售来源")
+	private Integer consignFor;
+
 
 }

+ 6 - 0
src/main/java/org/springblade/modules/shopping/entity/SpecCats.java

@@ -64,6 +64,12 @@ public class SpecCats implements Serializable {
 	@ApiModelProperty(value = "规格名称")
 	private String specName;
 
+	/**
+	 * 是否允许上传图片
+	 */
+	@ApiModelProperty(value = "是否允许上传图片")
+	private Integer isAllowImg;
+
 	/**
 	 * 是否显示
 	 */

+ 20 - 0
src/main/java/org/springblade/modules/shopping/mapper/CategoryMapper.java

@@ -16,11 +16,15 @@
  */
 package org.springblade.modules.shopping.mapper;
 
+import org.springblade.core.tool.node.TreeNode;
 import org.springblade.modules.shopping.entity.Category;
 import org.springblade.modules.shopping.vo.CategoryVO;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.system.vo.MenuVO;
+
 import java.util.List;
+import java.util.Map;
 
 /**
  * 分类表 Mapper 接口
@@ -39,4 +43,20 @@ public interface CategoryMapper extends BaseMapper<Category> {
 	 */
 	List<CategoryVO> selectCategoryPage(IPage page, CategoryVO category);
 
+	/**
+	 * 懒加载列表
+	 *
+	 * @param parentId
+	 * @param param
+	 * @return
+	 */
+	List<CategoryVO> lazyList(Long parentId, Map<String, Object> param);
+
+	/**
+	 * 树形结构
+	 *
+	 * @return
+	 */
+	List<TreeNode> tree();
+
 }

+ 43 - 1
src/main/java/org/springblade/modules/shopping/mapper/CategoryMapper.xml

@@ -5,7 +5,7 @@
     <!-- 通用查询映射结果 -->
     <resultMap id="categoryResultMap" type="org.springblade.modules.shopping.entity.Category">
         <id column="id" property="id"/>
-        <result column="pid" property="pid"/>
+        <result column="parent_id" property="parentId"/>
         <result column="value" property="value"/>
         <result column="name" property="name"/>
         <result column="seo_title" property="seoTitle"/>
@@ -15,9 +15,51 @@
         <result column="is_deleted" property="isDeleted"/>
     </resultMap>
 
+    <resultMap id="categoryVOResultMap" type="org.springblade.modules.shopping.vo.CategoryVO">
+        <id column="id" property="id"/>
+        <result column="parent_id" property="parentId"/>
+        <result column="value" property="value"/>
+        <result column="name" property="name"/>
+        <result column="sort" property="sort"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="has_children" property="hasChildren"/>
+    </resultMap>
+
+    <resultMap id="treeNodeResultMap" type="org.springblade.core.tool.node.TreeNode">
+        <id column="id" property="id"/>
+        <result column="parent_id" property="parentId"/>
+        <result column="title" property="title"/>
+        <result column="value" property="value"/>
+        <result column="key" property="key"/>
+    </resultMap>
+
 
     <select id="selectCategoryPage" resultMap="categoryResultMap">
         select * from t_category where is_deleted = 0
     </select>
 
+    <select id="lazyList" resultMap="categoryVOResultMap">
+        SELECT
+        c.*,
+        (
+        SELECT
+        CASE WHEN count( 1 ) > 0 THEN 1 ELSE 0 END
+        FROM
+        t_category
+        WHERE
+        parent_id = c.id AND is_deleted = 0
+        ) AS "has_children"
+        FROM
+        t_category c
+        WHERE c.is_deleted = 0
+        <if test="param1!=null">
+            and c.parent_id = #{param1}
+        </if>
+        ORDER BY c.sort
+    </select>
+
+    <select id="tree" resultMap="treeNodeResultMap">
+        select id, parent_id, name as title, id as "value", id as "key" from t_category where is_deleted = 0
+    </select>
+
 </mapper>

+ 22 - 2
src/main/java/org/springblade/modules/shopping/service/ICategoryService.java

@@ -16,10 +16,14 @@
  */
 package org.springblade.modules.shopping.service;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.core.tool.node.TreeNode;
 import org.springblade.modules.shopping.entity.Category;
 import org.springblade.modules.shopping.vo.CategoryVO;
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+import java.util.Map;
 
 /**
  * 分类表 服务类
@@ -38,4 +42,20 @@ public interface ICategoryService extends IService<Category> {
 	 */
 	IPage<CategoryVO> selectCategoryPage(IPage<CategoryVO> page, CategoryVO category);
 
+	/**
+	 * 懒加载列表
+	 *
+	 * @param parentId
+	 * @param param
+	 * @return
+	 */
+	List<CategoryVO> lazyList(Long parentId, Map<String, Object> param);
+
+	/**
+	 * 树形结构
+	 *
+	 * @return
+	 */
+	List<TreeNode> tree();
+
 }

+ 21 - 0
src/main/java/org/springblade/modules/shopping/service/impl/CategoryServiceImpl.java

@@ -16,6 +16,9 @@
  */
 package org.springblade.modules.shopping.service.impl;
 
+import org.springblade.core.tool.node.ForestNodeMerger;
+import org.springblade.core.tool.node.TreeNode;
+import org.springblade.core.tool.utils.Func;
 import org.springblade.modules.shopping.entity.Category;
 import org.springblade.modules.shopping.vo.CategoryVO;
 import org.springblade.modules.shopping.mapper.CategoryMapper;
@@ -24,6 +27,9 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * 分类表 服务实现类
  *
@@ -33,9 +39,24 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 @Service
 public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> implements ICategoryService {
 
+	private final static String PARENT_ID = "parentId";
+
 	@Override
 	public IPage<CategoryVO> selectCategoryPage(IPage<CategoryVO> page, CategoryVO category) {
 		return page.setRecords(baseMapper.selectCategoryPage(page, category));
 	}
 
+	@Override
+	public List<CategoryVO> lazyList(Long parentId, Map<String, Object> param) {
+		if (Func.isEmpty(Func.toStr(param.get(PARENT_ID)))) {
+			parentId = null;
+		}
+		return baseMapper.lazyList(parentId, param);
+	}
+
+	@Override
+	public List<TreeNode> tree() {
+		return ForestNodeMerger.merge(baseMapper.tree());
+	}
+
 }

+ 49 - 3
src/main/java/org/springblade/modules/shopping/vo/CategoryVO.java

@@ -16,10 +16,18 @@
  */
 package org.springblade.modules.shopping.vo;
 
-import org.springblade.modules.shopping.entity.Category;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModel;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
-import io.swagger.annotations.ApiModel;
+import org.springblade.core.tool.node.INode;
+import org.springblade.modules.shopping.entity.Category;
+import org.springblade.modules.system.vo.MenuVO;
+
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * 分类表视图实体类
@@ -30,7 +38,45 @@ import io.swagger.annotations.ApiModel;
 @Data
 @EqualsAndHashCode(callSuper = true)
 @ApiModel(value = "CategoryVO对象", description = "分类表")
-public class CategoryVO extends Category {
+public class CategoryVO extends Category implements INode<CategoryVO> {
+
 	private static final long serialVersionUID = 1L;
 
+	/**
+	 * 主键ID
+	 */
+	@JsonSerialize(using = ToStringSerializer.class)
+	private Long id;
+
+	/**
+	 * 父节点ID
+	 */
+	@JsonSerialize(using = ToStringSerializer.class)
+	private Long parentId;
+
+	/**
+	 * 子孙节点
+	 */
+	@JsonInclude(JsonInclude.Include.NON_EMPTY)
+	private List<CategoryVO> children;
+
+	/**
+	 * 是否有子孙节点
+	 */
+	@JsonInclude(JsonInclude.Include.NON_EMPTY)
+	private Boolean hasChildren;
+
+	@Override
+	public List<CategoryVO> getChildren() {
+		if (this.children == null) {
+			this.children = new ArrayList<>();
+		}
+		return this.children;
+	}
+
+	/**
+	 * 上级
+	 */
+	private String parentName;
+
 }

+ 11 - 0
src/main/java/org/springblade/modules/shopping/vo/ConsignConfigVO.java

@@ -16,11 +16,15 @@
  */
 package org.springblade.modules.shopping.vo;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import io.swagger.annotations.ApiModelProperty;
 import org.springblade.modules.shopping.entity.ConsignConfig;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import io.swagger.annotations.ApiModel;
 
+import java.util.Date;
+
 /**
  * 寄售配置表视图实体类
  *
@@ -31,6 +35,13 @@ import io.swagger.annotations.ApiModel;
 @EqualsAndHashCode(callSuper = true)
 @ApiModel(value = "ConsignConfigVO对象", description = "寄售配置表")
 public class ConsignConfigVO extends ConsignConfig {
+
 	private static final long serialVersionUID = 1L;
 
+	/**
+	 * 是否启用
+	 */
+	@ApiModelProperty(value = "是否启用")
+	private String isEnabledDisplayName;
+
 }

+ 11 - 0
src/main/java/org/springblade/modules/shopping/vo/ConsignVO.java

@@ -16,6 +16,7 @@
  */
 package org.springblade.modules.shopping.vo;
 
+import io.swagger.annotations.ApiModelProperty;
 import org.springblade.modules.shopping.entity.Consign;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -31,6 +32,16 @@ import io.swagger.annotations.ApiModel;
 @EqualsAndHashCode(callSuper = true)
 @ApiModel(value = "ConsignVO对象", description = "商品寄售表")
 public class ConsignVO extends Consign {
+
 	private static final long serialVersionUID = 1L;
 
+	@ApiModelProperty(value = "寄售状态")
+	private String consignStateDisplayName;
+
+	@ApiModelProperty(value = "寄售来源")
+	private String consignForDisplayName;
+
+	@ApiModelProperty(value = "商品编号")
+	private String productNo;
+
 }

+ 21 - 0
src/main/java/org/springblade/modules/shopping/vo/GoodsSpecsVO.java

@@ -16,6 +16,7 @@
  */
 package org.springblade.modules.shopping.vo;
 
+import io.swagger.annotations.ApiModelProperty;
 import org.springblade.modules.shopping.entity.GoodsSpecs;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -31,6 +32,26 @@ import io.swagger.annotations.ApiModel;
 @EqualsAndHashCode(callSuper = true)
 @ApiModel(value = "GoodsSpecsVO对象", description = "商品规格表")
 public class GoodsSpecsVO extends GoodsSpecs {
+
 	private static final long serialVersionUID = 1L;
 
+	/**
+	 * 是否默认规格
+	 */
+	@ApiModelProperty(value = "是否默认规格")
+	private String isDefaultDisplayName;
+
+
+	/**
+	 * 商品名称
+	 */
+	@ApiModelProperty(value = "商品名称")
+	private String goodsName;
+
+	/**
+	 * 商品编号
+	 */
+	@ApiModelProperty(value = "商品编号")
+	private String productNo;
+
 }

+ 1 - 1
src/main/java/org/springblade/modules/shopping/vo/GoodsVO.java

@@ -86,7 +86,7 @@ public class GoodsVO extends Goods {
 	 * 商品状态,-1:违规 0:未审核 1:已审核
 	 */
 	@JsonIgnore
-	@ApiModelProperty(value = "商品状态,-1:违规 0:未审核 1:已审核")
+	@ApiModelProperty(value = "商品状态")
 	private String goodsStatusDisplayName;
 
 	/**

+ 14 - 0
src/main/java/org/springblade/modules/shopping/vo/SpecCatsVO.java

@@ -16,6 +16,7 @@
  */
 package org.springblade.modules.shopping.vo;
 
+import io.swagger.annotations.ApiModelProperty;
 import org.springblade.modules.shopping.entity.SpecCats;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -31,6 +32,19 @@ import io.swagger.annotations.ApiModel;
 @EqualsAndHashCode(callSuper = true)
 @ApiModel(value = "SpecCatsVO对象", description = "规格分类表")
 public class SpecCatsVO extends SpecCats {
+
 	private static final long serialVersionUID = 1L;
 
+	/**
+	 * 是否允许上传图片
+	 */
+	@ApiModelProperty(value = "是否允许上传图片")
+	private String isAllowImgDisplayName;
+
+	/**
+	 * 是否显示
+	 */
+	@ApiModelProperty(value = "是否显示")
+	private String isShowDisplayName;
+
 }

+ 20 - 0
src/main/java/org/springblade/modules/shopping/vo/SpecItemsVO.java

@@ -16,6 +16,7 @@
  */
 package org.springblade.modules.shopping.vo;
 
+import io.swagger.annotations.ApiModelProperty;
 import org.springblade.modules.shopping.entity.SpecItems;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -31,6 +32,25 @@ import io.swagger.annotations.ApiModel;
 @EqualsAndHashCode(callSuper = true)
 @ApiModel(value = "SpecItemsVO对象", description = "商品规格值表")
 public class SpecItemsVO extends SpecItems {
+
 	private static final long serialVersionUID = 1L;
 
+	/**
+	 * 商品名称
+	 */
+	@ApiModelProperty(value = "商品名称")
+	private String goodsName;
+
+	/**
+	 * 商品编号
+	 */
+	@ApiModelProperty(value = "商品编号")
+	private String productNo;
+
+	/**
+	 * 规格名称
+	 */
+	@ApiModelProperty(value = "规格名称")
+	private String specName;
+
 }

+ 62 - 0
src/main/java/org/springblade/modules/shopping/wrapper/CategoryWrapper.java

@@ -0,0 +1,62 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.shopping.wrapper;
+
+import org.springblade.common.cache.DictCache;
+import org.springblade.common.cache.SysCache;
+import org.springblade.common.enums.DictEnum;
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.core.tool.node.ForestNodeMerger;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.shopping.entity.Category;
+import org.springblade.modules.shopping.vo.CategoryVO;
+import org.springblade.modules.system.entity.Menu;
+import org.springblade.modules.system.vo.MenuVO;
+
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author Chill
+ */
+public class CategoryWrapper extends BaseEntityWrapper<Category, CategoryVO> {
+
+	public static CategoryWrapper build() {
+		return new CategoryWrapper();
+	}
+
+	@Override
+	public CategoryVO entityVO(Category entity) {
+		CategoryVO vo = Objects.requireNonNull(BeanUtil.copy(entity, CategoryVO.class));
+		return vo;
+	}
+
+	public List<CategoryVO> listNodeVO(List<Category> list) {
+		List<CategoryVO> collect = list.stream().map(entity -> BeanUtil.copy(entity, CategoryVO.class)).collect(Collectors.toList());
+		return ForestNodeMerger.merge(collect);
+	}
+
+	public List<CategoryVO> listNodeLazyVO(List<CategoryVO> list) {
+		return ForestNodeMerger.merge(list);
+	}
+
+}

+ 48 - 0
src/main/java/org/springblade/modules/shopping/wrapper/ConsignConfigWrapper.java

@@ -0,0 +1,48 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.shopping.wrapper;
+
+import org.springblade.common.cache.DictCache;
+import org.springblade.common.enums.DictEnum;
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.shopping.entity.ConsignConfig;
+import org.springblade.modules.shopping.entity.Goods;
+import org.springblade.modules.shopping.vo.ConsignConfigVO;
+import org.springblade.modules.shopping.vo.GoodsVO;
+
+import java.util.Objects;
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author Chill
+ */
+public class ConsignConfigWrapper extends BaseEntityWrapper<ConsignConfig, ConsignConfigVO> {
+
+	public static ConsignConfigWrapper build() {
+		return new ConsignConfigWrapper();
+	}
+
+	@Override
+	public ConsignConfigVO entityVO(ConsignConfig entity) {
+		ConsignConfigVO vo = Objects.requireNonNull(BeanUtil.copy(entity, ConsignConfigVO.class));
+		vo.setIsEnabledDisplayName(DictCache.getValue(DictEnum.YES_NO, entity.getIsEnabled()));
+		return vo;
+	}
+
+}

+ 47 - 0
src/main/java/org/springblade/modules/shopping/wrapper/ConsignWrapper.java

@@ -0,0 +1,47 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.shopping.wrapper;
+
+import org.springblade.common.cache.DictCache;
+import org.springblade.common.enums.DictEnum;
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.shopping.entity.Consign;
+import org.springblade.modules.shopping.entity.ConsignConfig;
+import org.springblade.modules.shopping.vo.ConsignConfigVO;
+import org.springblade.modules.shopping.vo.ConsignVO;
+
+import java.util.Objects;
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author Chill
+ */
+public class ConsignWrapper extends BaseEntityWrapper<Consign, ConsignVO> {
+
+	public static ConsignWrapper build() {
+		return new ConsignWrapper();
+	}
+
+	@Override
+	public ConsignVO entityVO(Consign entity) {
+		ConsignVO vo = Objects.requireNonNull(BeanUtil.copy(entity, ConsignVO.class));
+		return vo;
+	}
+
+}

+ 60 - 0
src/main/java/org/springblade/modules/shopping/wrapper/GoodsSpecsWrapper.java

@@ -0,0 +1,60 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.shopping.wrapper;
+
+import org.springblade.common.cache.DictCache;
+import org.springblade.common.enums.DictEnum;
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.core.tool.utils.SpringUtil;
+import org.springblade.modules.shopping.entity.Goods;
+import org.springblade.modules.shopping.entity.GoodsSpecs;
+import org.springblade.modules.shopping.service.IGoodsService;
+import org.springblade.modules.shopping.vo.GoodsSpecsVO;
+
+import java.util.Objects;
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author Chill
+ */
+public class GoodsSpecsWrapper extends BaseEntityWrapper<GoodsSpecs, GoodsSpecsVO> {
+
+	public static GoodsSpecsWrapper build() {
+		return new GoodsSpecsWrapper();
+	}
+
+	public static IGoodsService goodsService;
+
+	static {
+		goodsService = SpringUtil.getBean(IGoodsService.class);
+	}
+
+	@Override
+	public GoodsSpecsVO entityVO(GoodsSpecs entity) {
+		GoodsSpecsVO vo = Objects.requireNonNull(BeanUtil.copy(entity, GoodsSpecsVO.class));
+		vo.setIsDefaultDisplayName(DictCache.getValue(DictEnum.YES_NO, entity.getIsDefault()));
+		Goods goods = goodsService.getById(entity.getGoodsId());
+		if (goods != null){
+			vo.setGoodsName(goods.getGoodsName());
+			vo.setProductNo(goods.getProductNo());
+		}
+		return vo;
+	}
+
+}

+ 3 - 0
src/main/java/org/springblade/modules/shopping/wrapper/GoodsWrapper.java

@@ -16,8 +16,10 @@
  */
 package org.springblade.modules.shopping.wrapper;
 
+import org.springblade.common.cache.DictBizCache;
 import org.springblade.common.cache.DictCache;
 import org.springblade.common.cache.SysCache;
+import org.springblade.common.enums.DictBizEnum;
 import org.springblade.common.enums.DictEnum;
 import org.springblade.core.mp.support.BaseEntityWrapper;
 import org.springblade.core.tool.utils.BeanUtil;
@@ -52,6 +54,7 @@ public class GoodsWrapper extends BaseEntityWrapper<Goods, GoodsVO> {
 		vo.setIsFreeShippingDisplayName(DictCache.getValue(DictEnum.YES_NO, entity.getIsFreeShipping()));
 		vo.setIsSpecDisplayName(DictCache.getValue(DictEnum.YES_NO, entity.getIsSpec()));
 		vo.setIsTicketDisplayName(DictCache.getValue(DictEnum.YES_NO, entity.getIsTicket()));
+		vo.setGoodsStatusDisplayName(DictBizCache.getValue(DictBizEnum.EXAM_STATUE, entity.getGoodsStatus()));
 		//商品类型-待定
 		return vo;
 	}

+ 49 - 0
src/main/java/org/springblade/modules/shopping/wrapper/SpecCatsWrapper.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.shopping.wrapper;
+
+import org.springblade.common.cache.DictCache;
+import org.springblade.common.enums.DictEnum;
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.shopping.entity.ConsignConfig;
+import org.springblade.modules.shopping.entity.SpecCats;
+import org.springblade.modules.shopping.vo.ConsignConfigVO;
+import org.springblade.modules.shopping.vo.SpecCatsVO;
+
+import java.util.Objects;
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author Chill
+ */
+public class SpecCatsWrapper extends BaseEntityWrapper<SpecCats, SpecCatsVO> {
+
+	public static SpecCatsWrapper build() {
+		return new SpecCatsWrapper();
+	}
+
+	@Override
+	public SpecCatsVO entityVO(SpecCats entity) {
+		SpecCatsVO vo = Objects.requireNonNull(BeanUtil.copy(entity, SpecCatsVO.class));
+		vo.setIsAllowImgDisplayName(DictCache.getValue(DictEnum.YES_NO, entity.getIsAllowImg()));
+		vo.setIsShowDisplayName(DictCache.getValue(DictEnum.YES_NO, entity.getIsShow()));
+		return vo;
+	}
+
+}

+ 72 - 0
src/main/java/org/springblade/modules/shopping/wrapper/SpecItemsWrapper.java

@@ -0,0 +1,72 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.shopping.wrapper;
+
+import org.springblade.common.cache.DictCache;
+import org.springblade.common.enums.DictEnum;
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.core.tool.utils.SpringUtil;
+import org.springblade.modules.shopping.entity.Category;
+import org.springblade.modules.shopping.entity.Goods;
+import org.springblade.modules.shopping.entity.SpecCats;
+import org.springblade.modules.shopping.entity.SpecItems;
+import org.springblade.modules.shopping.service.ICategoryService;
+import org.springblade.modules.shopping.service.IGoodsService;
+import org.springblade.modules.shopping.service.ISpecCatsService;
+import org.springblade.modules.shopping.vo.SpecCatsVO;
+import org.springblade.modules.shopping.vo.SpecItemsVO;
+
+import java.util.Objects;
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author Chill
+ */
+public class SpecItemsWrapper extends BaseEntityWrapper<SpecItems, SpecItemsVO> {
+
+	public static SpecItemsWrapper build() {
+		return new SpecItemsWrapper();
+	}
+
+	public static IGoodsService goodsService;
+
+	public static ISpecCatsService specCatsService;
+
+	static {
+		goodsService = SpringUtil.getBean(IGoodsService.class);
+
+		specCatsService = SpringUtil.getBean(ISpecCatsService.class);
+	}
+
+	@Override
+	public SpecItemsVO entityVO(SpecItems entity) {
+		SpecItemsVO vo = Objects.requireNonNull(BeanUtil.copy(entity, SpecItemsVO.class));
+		Goods goods = goodsService.getById(entity.getGoodsId());
+		if (goods != null){
+			vo.setGoodsName(goods.getGoodsName());
+			vo.setProductNo(goods.getProductNo());
+		}
+		SpecCats specCats = specCatsService.getById(entity.getSpecCatId());
+		if (specCats != null){
+			vo.setSpecName(specCats.getSpecName());
+		}
+		return vo;
+	}
+
+}

+ 10 - 0
src/main/java/sql/versionupgrade.menu.mysql

@@ -0,0 +1,10 @@
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1499048667163394050', 1123598815738675201, 'versionupgrade', '版本升级表', 'menu', '/platform/versionupgrade', NULL, 1, 1, 0, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1499048667163394051', '1499048667163394050', 'versionupgrade_add', '新增', 'add', '/platform/versionupgrade/add', 'plus', 1, 2, 1, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1499048667163394052', '1499048667163394050', 'versionupgrade_edit', '修改', 'edit', '/platform/versionupgrade/edit', 'form', 2, 2, 2, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1499048667163394053', '1499048667163394050', 'versionupgrade_delete', '删除', 'delete', '/api/platform/versionupgrade/remove', 'delete', 3, 2, 3, 1, NULL, 0);
+INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
+VALUES ('1499048667163394054', '1499048667163394050', 'versionupgrade_view', '查看', 'view', '/platform/versionupgrade/view', 'file-text', 4, 2, 2, 1, NULL, 0);

+ 4 - 4
src/main/resources/application-test.yml

@@ -6,7 +6,7 @@ spring:
     ##生产环境推荐使用阿里云高可用redis服务并设置密码
     host: 127.0.0.1
     port: 6379
-    password: liquor123456
+    password: 123456
     database: 0
     ssl: false
     ##redis 集群环境配置
@@ -16,12 +16,12 @@ spring:
   datasource:
     url: jdbc:mysql://172.26.218.204:3306/t-test?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
     username: root
-    password: liquor123456
+    password: 123456
 
 #第三方登陆
 social:
   enabled: true
-  domain: http://127.0.0.1:1888
+  domain: https://wine.gzzzyd.com
 
 #blade配置
 blade:
@@ -32,7 +32,7 @@ blade:
     ##将docker脚本部署的redis服务映射为宿主机ip
     ##生产环境推荐使用阿里云高可用redis服务并设置密码
     address: redis://127.0.0.1:6379
-    password: liquor123456
+    password: 123456
   #本地文件上传
   file:
     remote-mode: true

+ 1 - 1
src/main/resources/application.yml

@@ -115,7 +115,7 @@ oss:
   endpoint: https://oss-cn-chengdu.aliyuncs.com
   access-key: LTAI4GCNRML2EpFZxBWakWSc
   secret-key: 8u1spjDrT1hD2OaN9DS8NasSHipDfO
-  bucket-name: 888888-bucket-20200916
+  bucket-name: 000000-tbladex
 
 #第三方登陆配置
 social: