From 32b3913cb2a475ac2d6ff3fdca69059ae9f107c2 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期五, 20 十二月 2024 18:14:09 +0800 Subject: [PATCH] 合并代码 --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java | 10 +++++++++- ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Banner.java | 4 ++++ ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BannerController.java | 5 ++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Banner.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Banner.java index 9bab6e6..1a47a93 100644 --- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Banner.java +++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Banner.java @@ -37,6 +37,10 @@ @TableField("name") private String name; + @ApiModelProperty(value = "1图片2视频") + @TableField("content_type") + private Integer contentType; + @ApiModelProperty(value = "跳转类型(1=无跳转,2=外部链接,3=商品详情,4=秒杀商品详情,5=领券中心)") @TableField("jump_type") private Integer jumpType; diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BannerController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BannerController.java index 3493fae..d216f92 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BannerController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BannerController.java @@ -8,6 +8,7 @@ import com.ruoyi.other.service.BannerService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -29,7 +30,9 @@ private BannerService bannerService; @GetMapping("/list") @ApiOperation(value = "banner列表", tags = {"小程序-banner"}) - public R<List<Banner>> list(String name, Integer jumpType, Integer position){ + public R<List<Banner>> list(@ApiParam("名称") String name, + @ApiParam("跳转类型(1=无跳转,2=外部链接,3=商品详情,4=秒杀商品详情,5=领券中心)") Integer jumpType, + @ApiParam("位置(1=首页,2=商城首页)") Integer position){ List<Banner> list = bannerService.lambdaQuery().like(StringUtils.isNotEmpty(name), Banner::getName, name) .eq(jumpType!=null,Banner::getJumpType, jumpType) .eq(position!=null,Banner::getPosition, position) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java index d958544..24eda68 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java @@ -63,7 +63,6 @@ - @PostMapping @ApiOperation(value = "新增门店", tags = {"管理后台-门店管理"}) @Transactional(rollbackFor = Exception.class) @@ -96,6 +95,15 @@ if (R.isError(r)){ throw new RuntimeException("添加失败"); } + AppUser appUser = appUserClient.getAppUserById(loginUserApplet.getUserid()); + if (appUser == null){ + throw new RuntimeException("添加失败"); + } + appUser.setUserType(2); + R<Void> editAppUserR = appUserClient.editAppUserById(appUser); + if (R.isError(editAppUserR)){ + throw new RuntimeException("添加失败"); + } return R.ok(); } -- Gitblit v1.7.1