优化接口代码
This commit is contained in:
parent
1721c84604
commit
1e831853d6
@ -66,6 +66,8 @@ public class Constant {
|
||||
*/
|
||||
public static final String SMS_PREFIX = "code_";
|
||||
|
||||
public static final String DEFAULT_TAG = "新人";
|
||||
|
||||
/**
|
||||
* 注册账户默认分配头像
|
||||
*/
|
||||
|
@ -31,6 +31,6 @@ public interface SystemService extends IService<SystemEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
|
||||
SystemEntity miniConfig();
|
||||
}
|
||||
|
||||
|
@ -177,7 +177,7 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserDao, AppUserEntity> i
|
||||
appUser.setCreateTime(DateUtil.nowDateTime());
|
||||
appUser.setUpdateTime(DateUtil.nowDateTime());
|
||||
List<String> 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<AppUserDao, AppUserEntity> i
|
||||
appUser.setUpdateTime(DateUtil.nowDateTime());
|
||||
appUser.setOpenid(openId);
|
||||
List<String> 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();
|
||||
|
@ -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<SystemDao, SystemEntity> impl
|
||||
return new PageUtils(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SystemEntity miniConfig() {
|
||||
return this.lambdaQuery()
|
||||
.eq(SystemEntity::getConfig, ConfigConstant.MINIAPP)
|
||||
.one();
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user