apkconfig
This commit is contained in:
@@ -55,6 +55,7 @@ public class ShiroConfig {
|
||||
filterMap.put("/common/user/registerOrLogin","anon");//发送邮箱验证码
|
||||
filterMap.put("/common/user/login","anon");//验证码注册或登录
|
||||
filterMap.put("/common/user/setPasswordByCode","anon");//忘记密码
|
||||
filterMap.put("/common/apkConfig/getApkUrl","anon");//获取apk下载地址
|
||||
|
||||
filterMap.put("/common/sysFeedback/addSysFeedback","anon");//问题反馈-密码问题
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.peanut.modules.common.controller;
|
||||
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.common.service.ApkConfigService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@RestController("commonApkConfigController")
|
||||
@RequestMapping("/common/apkConfig")
|
||||
public class ApkConfigController {
|
||||
@Autowired
|
||||
private ApkConfigService apkConfigService;
|
||||
|
||||
|
||||
@RequestMapping("/getApkUrl")
|
||||
public R getApkUrl(@RequestBody Map<String,Integer> map){
|
||||
String url = apkConfigService.getApkUrl(map.get("type"));
|
||||
return R.ok().put("result",url);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,4 +8,6 @@ import java.util.Map;
|
||||
public interface ApkConfigService extends IService<ApkConfigEntity> {
|
||||
|
||||
Map<String,Object> getConfig();
|
||||
|
||||
String getApkUrl(int type);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.peanut.modules.common.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.peanut.modules.common.dao.ApkConfigDao;
|
||||
import com.peanut.modules.common.entity.ApkConfigEntity;
|
||||
@@ -22,4 +23,10 @@ public class ApkConfigServiceImpl extends ServiceImpl<ApkConfigDao, ApkConfigEnt
|
||||
flag.put("configs",apkConfigEntities);
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getApkUrl(int type) {
|
||||
ApkConfigEntity apkConfigEntity = this.baseMapper.selectOne(new LambdaQueryWrapper<ApkConfigEntity>().eq(ApkConfigEntity::getType, type));
|
||||
return apkConfigEntity.getUrl();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ connection-timeout: 6000000ms
|
||||
spring:
|
||||
# 环境 dev/dev1|test|prod
|
||||
profiles:
|
||||
active: dev1
|
||||
active: test
|
||||
# jackson时间格式化
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
|
||||
Reference in New Issue
Block a user