diff --git a/src/main/java/io/linfeng/common/utils/Constant.java b/src/main/java/io/linfeng/common/utils/Constant.java index b1d5f97..57257f2 100644 --- a/src/main/java/io/linfeng/common/utils/Constant.java +++ b/src/main/java/io/linfeng/common/utils/Constant.java @@ -66,6 +66,8 @@ public class Constant { */ public static final String SMS_PREFIX = "code_"; + public static final String DEFAULT_TAG = "新人"; + /** * 注册账户默认分配头像 */ diff --git a/src/main/java/io/linfeng/modules/admin/service/SystemService.java b/src/main/java/io/linfeng/modules/admin/service/SystemService.java index 0519194..cf7bdb7 100644 --- a/src/main/java/io/linfeng/modules/admin/service/SystemService.java +++ b/src/main/java/io/linfeng/modules/admin/service/SystemService.java @@ -31,6 +31,6 @@ public interface SystemService extends IService { PageUtils queryPage(Map params); - + SystemEntity miniConfig(); } diff --git a/src/main/java/io/linfeng/modules/admin/service/impl/AppUserServiceImpl.java b/src/main/java/io/linfeng/modules/admin/service/impl/AppUserServiceImpl.java index c55cc57..849516e 100644 --- a/src/main/java/io/linfeng/modules/admin/service/impl/AppUserServiceImpl.java +++ b/src/main/java/io/linfeng/modules/admin/service/impl/AppUserServiceImpl.java @@ -177,7 +177,7 @@ public class AppUserServiceImpl extends ServiceImpl i appUser.setCreateTime(DateUtil.nowDateTime()); appUser.setUpdateTime(DateUtil.nowDateTime()); List list = new ArrayList<>(); - list.add("新人"); + list.add(Constant.DEFAULT_TAG); appUser.setTagStr(JSON.toJSONString(list)); baseMapper.insert(appUser); AppUserEntity user = this.lambdaQuery() @@ -341,7 +341,7 @@ public class AppUserServiceImpl extends ServiceImpl i appUser.setUpdateTime(DateUtil.nowDateTime()); appUser.setOpenid(openId); List list = new ArrayList<>(); - list.add("新人"); + list.add(Constant.DEFAULT_TAG); appUser.setTagStr(JSON.toJSONString(list)); baseMapper.insert(appUser); AppUserEntity users = this.lambdaQuery().eq(AppUserEntity::getOpenid, openId).one(); diff --git a/src/main/java/io/linfeng/modules/admin/service/impl/SystemServiceImpl.java b/src/main/java/io/linfeng/modules/admin/service/impl/SystemServiceImpl.java index 6260294..2419235 100644 --- a/src/main/java/io/linfeng/modules/admin/service/impl/SystemServiceImpl.java +++ b/src/main/java/io/linfeng/modules/admin/service/impl/SystemServiceImpl.java @@ -12,6 +12,7 @@ */ package io.linfeng.modules.admin.service.impl; +import io.linfeng.common.utils.ConfigConstant; import org.springframework.stereotype.Service; import java.util.Map; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -38,5 +39,12 @@ public class SystemServiceImpl extends ServiceImpl impl return new PageUtils(page); } + @Override + public SystemEntity miniConfig() { + return this.lambdaQuery() + .eq(SystemEntity::getConfig, ConfigConstant.MINIAPP) + .one(); + } + } \ No newline at end of file diff --git a/src/main/java/io/linfeng/modules/app/controller/AppSystemConfigController.java b/src/main/java/io/linfeng/modules/app/controller/AppSystemConfigController.java index 54b58da..d4e99c8 100644 --- a/src/main/java/io/linfeng/modules/app/controller/AppSystemConfigController.java +++ b/src/main/java/io/linfeng/modules/app/controller/AppSystemConfigController.java @@ -11,7 +11,6 @@ */ package io.linfeng.modules.app.controller; -import io.linfeng.common.utils.ConfigConstant; import io.linfeng.common.utils.R; import io.linfeng.modules.admin.entity.SystemEntity; import io.linfeng.modules.admin.service.SystemService; @@ -34,12 +33,11 @@ public class AppSystemConfigController { @Autowired private SystemService systemService; + @ApiOperation("logo配置") @GetMapping("/miniConfig") public R miniConfig(){ - SystemEntity system = systemService.lambdaQuery() - .eq(SystemEntity::getConfig, ConfigConstant.MINIAPP) - .one(); + SystemEntity system = systemService.miniConfig(); return R.ok().put("logo",system.getIntro()); }