parent
769baae2b7
commit
fb91037ad2
|
|
@ -14,25 +14,25 @@ import javax.annotation.Resource;
|
|||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("api/setting/login")
|
||||
@RequestMapping("/adminapi/setting/user.user")
|
||||
@Api(tags = "配置用户登录")
|
||||
public class SettingLoginController {
|
||||
|
||||
@Resource
|
||||
ISettingLoginService iSettingLoginService;
|
||||
|
||||
@GetMapping("/detail")
|
||||
@GetMapping("/getRegisterConfig")
|
||||
@ApiOperation(value="登录设置详情")
|
||||
public AjaxResult<SettingLoginVo> detail() {
|
||||
SettingLoginVo vo = iSettingLoginService.detail();
|
||||
public AjaxResult<SettingLoginVo> getRegisterConfig() {
|
||||
SettingLoginVo vo = iSettingLoginService.getRegisterConfig();
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
@Log(title = "登录设置编辑")
|
||||
@PostMapping("/save")
|
||||
@PostMapping("/setRegisterConfig")
|
||||
@ApiOperation(value="登录设置编辑")
|
||||
public AjaxResult<Object> save(@Validated @RequestBody SettingLoginValidate loginValidate) {
|
||||
iSettingLoginService.save(loginValidate);
|
||||
public AjaxResult<Object> setRegisterConfig(@Validated @RequestBody SettingLoginValidate loginValidate) {
|
||||
iSettingLoginService.setRegisterConfig(loginValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,49 @@
|
|||
package com.mdd.admin.controller.setting;
|
||||
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.mdd.admin.service.ISettingPaymentService;
|
||||
import com.mdd.admin.validate.setting.SettingPayConfigValidate;
|
||||
import com.mdd.admin.vo.setting.SettingPaymentMethodVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.entity.setting.DevPayConfig;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/adminapi/setting/pay.pay_config")
|
||||
@Api(tags = "配置支付参数")
|
||||
public class SettingPayConfigController {
|
||||
|
||||
@Resource
|
||||
ISettingPaymentService iSettingPaymentService;
|
||||
|
||||
@GetMapping("/lists")
|
||||
@ApiOperation(value="支付配置列表")
|
||||
public AjaxResult<JSONObject> list() {
|
||||
JSONObject result = iSettingPaymentService.list();
|
||||
return AjaxResult.success(result);
|
||||
}
|
||||
|
||||
@GetMapping("/getConfig")
|
||||
@ApiOperation(value="支付配置详情")
|
||||
public AjaxResult<Object> getConfig(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
DevPayConfig vo = iSettingPaymentService.getConfig(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
@PostMapping("/setConfig")
|
||||
@ApiOperation(value="支付配置编辑")
|
||||
public AjaxResult<Object> setConfig(@Validated @RequestBody SettingPayConfigValidate configValidate) {
|
||||
iSettingPaymentService.setConfig(configValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.mdd.admin.controller.setting;
|
||||
|
||||
|
||||
import com.mdd.admin.service.ISettingPaymentService;
|
||||
import com.mdd.admin.validate.setting.SettingPayConfigValidate;
|
||||
import com.mdd.admin.vo.setting.SettingPaymentMethodVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.entity.setting.DevPayConfig;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/adminapi/setting/pay.pay_way")
|
||||
@Api(tags = "配置支付参数")
|
||||
public class SettingPayWayController {
|
||||
|
||||
@Resource
|
||||
ISettingPaymentService iSettingPaymentService;
|
||||
|
||||
@GetMapping("/getPayWay")
|
||||
@ApiOperation(value="支付方式列表")
|
||||
public AjaxResult<List<List<SettingPaymentMethodVo>>> method() {
|
||||
List<List<SettingPaymentMethodVo>> list = iSettingPaymentService.getPayWay();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@PostMapping("/setPayWay")
|
||||
@ApiOperation(value="支付方式编辑")
|
||||
public AjaxResult<Object> setPayWay(@Validated @RequestBody List<List<SettingPaymentMethodVo>> data) {
|
||||
iSettingPaymentService.setPayWay(data);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
package com.mdd.admin.controller.setting;
|
||||
|
||||
|
||||
import com.mdd.admin.service.ISettingPaymentService;
|
||||
import com.mdd.admin.validate.setting.SettingPayConfigValidate;
|
||||
import com.mdd.admin.validate.setting.SettingPayMethodValidate;
|
||||
import com.mdd.admin.vo.setting.SettingPaymentMethodVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.entity.setting.DevPayConfig;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("api/setting/payment")
|
||||
@Api(tags = "配置支付参数")
|
||||
public class SettingPaymentController {
|
||||
|
||||
@Resource
|
||||
ISettingPaymentService iSettingPaymentService;
|
||||
|
||||
@GetMapping("/method")
|
||||
@ApiOperation(value="支付方式列表")
|
||||
public AjaxResult<List<List<SettingPaymentMethodVo>>> method() {
|
||||
List<List<SettingPaymentMethodVo>> list = iSettingPaymentService.method();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value="支付配置列表")
|
||||
public AjaxResult<List<DevPayConfig>> list() {
|
||||
List<DevPayConfig> list = iSettingPaymentService.list();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="支付配置详情")
|
||||
public AjaxResult<Object> detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
DevPayConfig vo = iSettingPaymentService.detail(id);
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
@PostMapping("/editConfig")
|
||||
@ApiOperation(value="支付配置编辑")
|
||||
public AjaxResult<Object> editConfig(@Validated @RequestBody SettingPayConfigValidate configValidate) {
|
||||
iSettingPaymentService.editConfig(configValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@PostMapping("/editMethod")
|
||||
@ApiOperation(value="支付方式编辑")
|
||||
public AjaxResult<Object> editMethod(@Validated @RequestBody SettingPayMethodValidate methodValidate) {
|
||||
iSettingPaymentService.editMethod(methodValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -14,25 +14,25 @@ import javax.annotation.Resource;
|
|||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("api/setting/search")
|
||||
@RequestMapping("/adminapi/setting/hot_search")
|
||||
@Api(tags = "配置热门搜索")
|
||||
public class SettingSearchController {
|
||||
|
||||
@Resource
|
||||
ISettingSearchService iSettingSearchService;
|
||||
|
||||
@GetMapping("/detail")
|
||||
@GetMapping("/getConfig")
|
||||
@ApiOperation(value="热门搜索详情")
|
||||
public AjaxResult<SettingSearchDetailVo> detail() {
|
||||
SettingSearchDetailVo vo = iSettingSearchService.detail();
|
||||
public AjaxResult<SettingSearchDetailVo> getConfig() {
|
||||
SettingSearchDetailVo vo = iSettingSearchService.getConfig();
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
@Log(title = "热门搜索编辑")
|
||||
@PostMapping("/save")
|
||||
@PostMapping("/setConfig")
|
||||
@ApiOperation(value="热门搜索编辑")
|
||||
public AjaxResult<Object> save(@Validated @RequestBody SettingSearchValidate searchValidate) {
|
||||
iSettingSearchService.save(searchValidate);
|
||||
public AjaxResult<Object> setConfig(@Validated @RequestBody SettingSearchValidate searchValidate) {
|
||||
iSettingSearchService.setConfig(searchValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,14 +13,14 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("api/setting/storage")
|
||||
@RequestMapping("/adminapi/setting/storage")
|
||||
@Api(tags = "配置存储方式")
|
||||
public class SettingStorageController {
|
||||
|
||||
@Resource
|
||||
ISettingStorageService iSettingStorageService;
|
||||
|
||||
@GetMapping("/list")
|
||||
@GetMapping("/lists")
|
||||
@ApiOperation(value="存储列表")
|
||||
public AjaxResult<List<Map<String, Object>>> list() {
|
||||
List<Map<String, Object>> list = iSettingStorageService.list();
|
||||
|
|
@ -29,16 +29,16 @@ public class SettingStorageController {
|
|||
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="存储详情")
|
||||
public AjaxResult<Map<String, Object>> detail(String alias) {
|
||||
Map<String, Object> map = iSettingStorageService.detail(alias);
|
||||
public AjaxResult<Map<String, Object>> detail(String engine) {
|
||||
Map<String, Object> map = iSettingStorageService.detail(engine);
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
|
||||
@Log(title = "存储编辑")
|
||||
@PostMapping("/edit")
|
||||
@PostMapping("/setup")
|
||||
@ApiOperation(value="存储编辑")
|
||||
public AjaxResult<Object> edit(@RequestBody Map<String, String> params) {
|
||||
iSettingStorageService.edit(params);
|
||||
public AjaxResult<Object> setup(@RequestBody Map<String, String> params) {
|
||||
iSettingStorageService.setup(params);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,25 +13,25 @@ import org.springframework.web.bind.annotation.*;
|
|||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("api/setting/user")
|
||||
@RequestMapping("/adminapi/setting/user.user")
|
||||
@Api(tags = "配置用户参数")
|
||||
public class SettingUserController {
|
||||
|
||||
@Resource
|
||||
ISettingUserService iSettingUserService;
|
||||
|
||||
@GetMapping("/detail")
|
||||
@GetMapping("/getConfig")
|
||||
@ApiOperation(value="用户设置详情")
|
||||
public AjaxResult<SettingUserVo> detail() {
|
||||
SettingUserVo vo = iSettingUserService.detail();
|
||||
SettingUserVo vo = iSettingUserService.getConfig();
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
@Log(title = "用户设置编辑")
|
||||
@PostMapping("/save")
|
||||
@PostMapping("/setConfig")
|
||||
@ApiOperation(value="用户设置编辑")
|
||||
public AjaxResult<Object> save(@Validated @RequestBody SettingUserValidate userValidate) {
|
||||
iSettingUserService.save(userValidate);
|
||||
public AjaxResult<Object> setConfig(@Validated @RequestBody SettingUserValidate userValidate) {
|
||||
iSettingUserService.setConfig(userValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.mdd.admin.controller.system;
|
||||
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.mdd.admin.LikeAdminThreadLocal;
|
||||
import com.mdd.admin.aop.Log;
|
||||
import com.mdd.common.aop.NotPower;
|
||||
|
|
@ -20,7 +21,7 @@ import javax.annotation.Resource;
|
|||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("api/system/menu")
|
||||
@RequestMapping("/adminapi/auth/menu")
|
||||
@Api(tags = "系统菜单管理")
|
||||
public class SystemAuthMenuController {
|
||||
|
||||
|
|
@ -37,11 +38,11 @@ public class SystemAuthMenuController {
|
|||
}
|
||||
|
||||
@NotPower
|
||||
@GetMapping("/list")
|
||||
@GetMapping("/lists")
|
||||
@ApiOperation(value="获取菜单列表")
|
||||
public AjaxResult<JSONArray> list() {
|
||||
JSONArray lists = iSystemAuthMenuService.list();
|
||||
return AjaxResult.success(lists);
|
||||
public AjaxResult<JSONObject> list() {
|
||||
JSONObject result = iSystemAuthMenuService.list();
|
||||
return AjaxResult.success(result);
|
||||
}
|
||||
|
||||
@GetMapping("/detail")
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import javax.annotation.Resource;
|
|||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("api/system/role")
|
||||
@RequestMapping("/adminapi/auth/role")
|
||||
@Api(tags = "系统角色管理")
|
||||
public class SystemAuthRoleController {
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ public class SystemAuthRoleController {
|
|||
}
|
||||
|
||||
@Log(title = "角色列表")
|
||||
@GetMapping("/list")
|
||||
@GetMapping("/lists")
|
||||
@ApiOperation(value="角色列表")
|
||||
public AjaxResult<PageResult<SystemAuthRoleVo>> list(@Validated PageValidate pageValidate) {
|
||||
PageResult<SystemAuthRoleVo> list = iSystemAuthRoleService.list(pageValidate);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.*;
|
|||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("api/system/cache")
|
||||
@RequestMapping("/adminapi/setting/system.cache")
|
||||
@Api(tags = "系统缓存管理")
|
||||
public class SystemCacheController {
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("api/system/log")
|
||||
@RequestMapping("/adminapi/setting/system.log")
|
||||
@Api(tags = "系统日志管理")
|
||||
public class SystemLogsController {
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public interface ISettingLoginService {
|
|||
* @author fzr
|
||||
* @return SettingLoginVo
|
||||
*/
|
||||
SettingLoginVo detail();
|
||||
SettingLoginVo getRegisterConfig();
|
||||
|
||||
/**
|
||||
* 登录设置保存
|
||||
|
|
@ -24,6 +24,6 @@ public interface ISettingLoginService {
|
|||
* @author fzr
|
||||
* @param loginValidate 参数
|
||||
*/
|
||||
void save(SettingLoginValidate loginValidate);
|
||||
void setRegisterConfig(SettingLoginValidate loginValidate);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.mdd.admin.service;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.mdd.admin.validate.setting.SettingPayConfigValidate;
|
||||
import com.mdd.admin.validate.setting.SettingPayMethodValidate;
|
||||
import com.mdd.admin.vo.setting.SettingPaymentMethodVo;
|
||||
|
|
@ -18,7 +19,7 @@ public interface ISettingPaymentService {
|
|||
* @author fzr
|
||||
* @return List<List<SettingPaymentMethodVo>>
|
||||
*/
|
||||
List<List<SettingPaymentMethodVo>> method();
|
||||
List<List<SettingPaymentMethodVo>> getPayWay();
|
||||
|
||||
/**
|
||||
* 配置列表
|
||||
|
|
@ -26,7 +27,7 @@ public interface ISettingPaymentService {
|
|||
* @author fzr
|
||||
* @return List<DevPayConfig>
|
||||
*/
|
||||
List<DevPayConfig> list();
|
||||
JSONObject list();
|
||||
|
||||
/**
|
||||
* 配置详情
|
||||
|
|
@ -35,7 +36,7 @@ public interface ISettingPaymentService {
|
|||
* @param id 主键
|
||||
* @return SettingPaymentMethodVo
|
||||
*/
|
||||
DevPayConfig detail(Integer id);
|
||||
DevPayConfig getConfig(Integer id);
|
||||
|
||||
/**
|
||||
* 编辑支付配置
|
||||
|
|
@ -43,14 +44,14 @@ public interface ISettingPaymentService {
|
|||
* @author fzr
|
||||
* @param configValidate 参数
|
||||
*/
|
||||
void editConfig(SettingPayConfigValidate configValidate);
|
||||
void setConfig(SettingPayConfigValidate configValidate);
|
||||
|
||||
/**
|
||||
* 编辑支付方式
|
||||
*
|
||||
* @author fzr
|
||||
* @param methodValidate 参数
|
||||
* @param data 参数
|
||||
*/
|
||||
void editMethod(SettingPayMethodValidate methodValidate);
|
||||
void setPayWay(List<List<SettingPaymentMethodVo>> data);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public interface ISettingSearchService {
|
|||
* @author fzr
|
||||
* @return SettingSearchDetailVo
|
||||
*/
|
||||
SettingSearchDetailVo detail();
|
||||
SettingSearchDetailVo getConfig();
|
||||
|
||||
/**
|
||||
* 热门搜索新增
|
||||
|
|
@ -24,7 +24,7 @@ public interface ISettingSearchService {
|
|||
* @author fzr
|
||||
* @param searchValidate 参数
|
||||
*/
|
||||
void save(SettingSearchValidate searchValidate);
|
||||
void setConfig(SettingSearchValidate searchValidate);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public interface ISettingStorageService {
|
|||
* @param alias 引擎别名
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
Map<String, Object> detail(String alias);
|
||||
Map<String, Object> detail(String engine);
|
||||
|
||||
/**
|
||||
* 存储编辑
|
||||
|
|
@ -31,7 +31,7 @@ public interface ISettingStorageService {
|
|||
* @author fzr
|
||||
* @param params 参数
|
||||
*/
|
||||
void edit(Map<String, String> params);
|
||||
void setup(Map<String, String> params);
|
||||
|
||||
/**
|
||||
* 存储切换
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public interface ISettingUserService {
|
|||
* @author fzr
|
||||
* @return SettingUserVo
|
||||
*/
|
||||
SettingUserVo detail();
|
||||
SettingUserVo getConfig();
|
||||
|
||||
/**
|
||||
* 用户设置保存
|
||||
|
|
@ -24,6 +24,6 @@ public interface ISettingUserService {
|
|||
* @author fzr
|
||||
* @param userValidate 参数
|
||||
*/
|
||||
void save(SettingUserValidate userValidate);
|
||||
void setConfig(SettingUserValidate userValidate);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.mdd.admin.service.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.mdd.admin.service.ISettingLoginService;
|
||||
import com.mdd.admin.validate.setting.SettingLoginValidate;
|
||||
import com.mdd.admin.vo.setting.SettingLoginVo;
|
||||
|
|
@ -22,15 +23,16 @@ public class SettingLoginServiceImpl implements ISettingLoginService {
|
|||
* @return SettingLoginVo
|
||||
*/
|
||||
@Override
|
||||
public SettingLoginVo detail() {
|
||||
public SettingLoginVo getRegisterConfig() {
|
||||
Map<String, String> config = ConfigUtils.get("login");
|
||||
|
||||
SettingLoginVo vo = new SettingLoginVo();
|
||||
vo.setLoginWay(ListUtils.stringToListAsInt(config.getOrDefault("loginWay", ""), ","));
|
||||
vo.setForceBindMobile(Integer.parseInt(config.getOrDefault("forceBindMobile", "0")));
|
||||
vo.setOpenAgreement(Integer.parseInt(config.getOrDefault("openAgreement", "0")));
|
||||
vo.setOpenOtherAuth(Integer.parseInt(config.getOrDefault("openOtherAuth", "0")));
|
||||
vo.setAutoLoginAuth(ListUtils.stringToListAsInt(config.getOrDefault("autoLoginAuth", ""), ","));
|
||||
vo.setLoginWay(JSONArray.parse(config.getOrDefault("login_way", "")));
|
||||
vo.setCoerceMobile(Integer.parseInt(config.getOrDefault("coerce_mobile", "0")));
|
||||
vo.setLoginAgreement(Integer.parseInt(config.getOrDefault("login_agreement", "0")));
|
||||
vo.setThirdAuth(Integer.parseInt(config.getOrDefault("third_auth", "0")));
|
||||
vo.setWechatAuth(Integer.parseInt(config.getOrDefault("wechat_auth", "0")));
|
||||
vo.setQqAuth(Integer.parseInt(config.getOrDefault("qq_auth", "0")));
|
||||
return vo;
|
||||
}
|
||||
|
||||
|
|
@ -41,12 +43,13 @@ public class SettingLoginServiceImpl implements ISettingLoginService {
|
|||
* @param loginValidate 参数
|
||||
*/
|
||||
@Override
|
||||
public void save(SettingLoginValidate loginValidate) {
|
||||
ConfigUtils.set("login", "loginWay", loginValidate.getLoginWay());
|
||||
ConfigUtils.set("login", "forceBindMobile", String.valueOf(loginValidate.getForceBindMobile()));
|
||||
ConfigUtils.set("login", "openAgreement", String.valueOf(loginValidate.getOpenAgreement()));
|
||||
ConfigUtils.set("login", "openOtherAuth", String.valueOf(loginValidate.getOpenOtherAuth()));
|
||||
ConfigUtils.set("login", "autoLoginAuth", String.valueOf(loginValidate.getAutoLoginAuth()));
|
||||
public void setRegisterConfig(SettingLoginValidate loginValidate) {
|
||||
ConfigUtils.set("login", "login_way", loginValidate.getLoginWay().toJSONString());
|
||||
ConfigUtils.set("login", "coerce_mobile", String.valueOf(loginValidate.getCoerceMobile()));
|
||||
ConfigUtils.set("login", "login_agreement", String.valueOf(loginValidate.getLoginAgreement()));
|
||||
ConfigUtils.set("login", "third_auth", String.valueOf(loginValidate.getThirdAuth()));
|
||||
ConfigUtils.set("login", "wechat_auth", String.valueOf(loginValidate.getWechatAuth()));
|
||||
ConfigUtils.set("login", "qq_auth", String.valueOf(loginValidate.getQqAuth()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.mdd.admin.service.impl;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.mdd.admin.service.ISettingPaymentService;
|
||||
import com.mdd.admin.validate.setting.SettingPayConfigValidate;
|
||||
|
|
@ -41,7 +42,7 @@ public class SettingPaymentServiceImpl implements ISettingPaymentService {
|
|||
* @author fzr
|
||||
* @return List<List<SettingPaymentMethodVo>>
|
||||
*/
|
||||
public List<List<SettingPaymentMethodVo>> method() {
|
||||
public List<List<SettingPaymentMethodVo>> getPayWay() {
|
||||
List<DevPayWay> lists = devPayWayMapper.selectList(null);
|
||||
|
||||
List<List<SettingPaymentMethodVo>> result = new LinkedList<>();
|
||||
|
|
@ -57,8 +58,7 @@ public class SettingPaymentServiceImpl implements ISettingPaymentService {
|
|||
|
||||
SettingPaymentMethodVo vo = new SettingPaymentMethodVo();
|
||||
BeanUtils.copyProperties(devPayWay, vo);
|
||||
vo.setName(PaymentEnum.getPayWayMsg(devPayConfig.getPayWay()));
|
||||
vo.setShowName(devPayConfig.getName());
|
||||
vo.setPayWayName(PaymentEnum.getPayWayMsg(devPayConfig.getPayWay()));
|
||||
vo.setIcon(UrlUtils.toAbsoluteUrl(devPayConfig.getIcon()));
|
||||
|
||||
switch (devPayWay.getScene()) {
|
||||
|
|
@ -87,19 +87,22 @@ public class SettingPaymentServiceImpl implements ISettingPaymentService {
|
|||
* @return List<DevPayConfig>
|
||||
*/
|
||||
@Override
|
||||
public List<DevPayConfig> list() {
|
||||
public JSONObject list() {
|
||||
List<DevPayConfig> devPayConfigs = devPayConfigMapper.selectList(
|
||||
new QueryWrapper<DevPayConfig>()
|
||||
.orderByDesc(Arrays.asList("sort", "id")));
|
||||
|
||||
for (DevPayConfig dev : devPayConfigs) {
|
||||
dev.setShowName(dev.getName());
|
||||
dev.setPayWayName(dev.getName());
|
||||
dev.setName(PaymentEnum.getPayWayMsg(dev.getPayWay()));
|
||||
dev.setConfig(MapUtils.jsonToMap("{}"));
|
||||
dev.setConfig(JSONObject.parse("{}"));
|
||||
dev.setIcon(UrlUtils.toAbsoluteUrl(dev.getIcon()));
|
||||
}
|
||||
|
||||
return devPayConfigs;
|
||||
JSONObject result = new JSONObject() {{
|
||||
put("lists", devPayConfigs);
|
||||
}};
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -110,15 +113,15 @@ public class SettingPaymentServiceImpl implements ISettingPaymentService {
|
|||
* @return DevPayConfig
|
||||
*/
|
||||
@Override
|
||||
public DevPayConfig detail(Integer id) {
|
||||
public DevPayConfig getConfig(Integer id) {
|
||||
DevPayConfig devPayConfig = devPayConfigMapper.selectOne(
|
||||
new QueryWrapper<DevPayConfig>()
|
||||
.eq("id", id)
|
||||
.last("limit 1"));
|
||||
|
||||
devPayConfig.setName(PaymentEnum.getPayWayMsg(devPayConfig.getPayWay()));
|
||||
devPayConfig.setShowName(devPayConfig.getName());
|
||||
devPayConfig.setConfig(MapUtils.jsonToMap(devPayConfig.getConfig().toString()));
|
||||
devPayConfig.setPayWayName(devPayConfig.getName());
|
||||
devPayConfig.setConfig(JSONObject.parse(devPayConfig.getConfig().toString()));
|
||||
devPayConfig.setIcon(UrlUtils.toAbsoluteUrl(devPayConfig.getIcon()));
|
||||
return devPayConfig;
|
||||
}
|
||||
|
|
@ -130,7 +133,7 @@ public class SettingPaymentServiceImpl implements ISettingPaymentService {
|
|||
* @param configValidate 参数
|
||||
*/
|
||||
@Override
|
||||
public void editConfig(SettingPayConfigValidate configValidate) {
|
||||
public void setConfig(SettingPayConfigValidate configValidate) {
|
||||
DevPayConfig devPayConfig = devPayConfigMapper.selectOne(
|
||||
new QueryWrapper<DevPayConfig>()
|
||||
.eq("id", configValidate.getId())
|
||||
|
|
@ -145,7 +148,7 @@ public class SettingPaymentServiceImpl implements ISettingPaymentService {
|
|||
if (devPayConfig.getPayWay().equals(1)) {
|
||||
devPayConfig.setConfig("{}");
|
||||
} else {
|
||||
devPayConfig.setConfig(JSON.toJSONString(configValidate.getParams()));
|
||||
devPayConfig.setConfig(configValidate.getConfig().toJSONString());
|
||||
}
|
||||
devPayConfigMapper.updateById(devPayConfig);
|
||||
}
|
||||
|
|
@ -154,12 +157,11 @@ public class SettingPaymentServiceImpl implements ISettingPaymentService {
|
|||
* 支付方式编辑
|
||||
*
|
||||
* @author fzr
|
||||
* @param methodValidate 参数
|
||||
* @param data 参数
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void editMethod(SettingPayMethodValidate methodValidate) {
|
||||
List<List<SettingPaymentMethodVo>> data = methodValidate.getData();
|
||||
public void setPayWay(List<List<SettingPaymentMethodVo>> data) {
|
||||
|
||||
for (List<SettingPaymentMethodVo> list : data) {
|
||||
for (SettingPaymentMethodVo vo : list) {
|
||||
|
|
|
|||
|
|
@ -29,13 +29,13 @@ public class SettingSearchServiceImpl implements ISettingSearchService {
|
|||
* @return SettingSearchDetailVo
|
||||
*/
|
||||
@Override
|
||||
public SettingSearchDetailVo detail() {
|
||||
Integer isHotSearch = Integer.parseInt(ConfigUtils.get("search", "isHotSearch", "0"));
|
||||
public SettingSearchDetailVo getConfig() {
|
||||
Integer status = Integer.parseInt(ConfigUtils.get("hot_search", "status", "0"));
|
||||
List<HotSearch> list = hotSearchMapper.selectList(new QueryWrapper<HotSearch>().orderByDesc("sort"));
|
||||
|
||||
SettingSearchDetailVo vo = new SettingSearchDetailVo();
|
||||
vo.setIsHotSearch(isHotSearch);
|
||||
vo.setList(list);
|
||||
vo.setStatus(status);
|
||||
vo.setData(list);
|
||||
return vo;
|
||||
}
|
||||
|
||||
|
|
@ -46,12 +46,12 @@ public class SettingSearchServiceImpl implements ISettingSearchService {
|
|||
* @param searchValidate 参数
|
||||
*/
|
||||
@Override
|
||||
public void save(SettingSearchValidate searchValidate) {
|
||||
String isHotSearch = String.valueOf(searchValidate.getIsHotSearch());
|
||||
ConfigUtils.set("search", "isHotSearch", isHotSearch);
|
||||
public void setConfig(SettingSearchValidate searchValidate) {
|
||||
String isHotSearch = String.valueOf(searchValidate.getStatus());
|
||||
ConfigUtils.set("hot_search", "status", isHotSearch);
|
||||
|
||||
hotSearchMapper.delete(new QueryWrapper<HotSearch>().ge("id", 0));
|
||||
for (SettingSearchObjectVo vo : searchValidate.getList()) {
|
||||
for (SettingSearchObjectVo vo : searchValidate.getData()) {
|
||||
HotSearch hotSearch = new HotSearch();
|
||||
hotSearch.setName(vo.getName());
|
||||
hotSearch.setSort(vo.getSort());
|
||||
|
|
|
|||
|
|
@ -29,29 +29,29 @@ public class SettingStorageServiceImpl implements ISettingStorageService {
|
|||
|
||||
Map<String, Object> local = new LinkedHashMap<>();
|
||||
local.put("name", "本地存储");
|
||||
local.put("alias", "local");
|
||||
local.put("describe", "存储在本地服务器");
|
||||
local.put("engine", "local");
|
||||
local.put("path", "存储在本地服务器");
|
||||
local.put("status", engine.equals("local") ? 1 : 0);
|
||||
list.add(local);
|
||||
|
||||
Map<String, Object> qiniu = new LinkedHashMap<>();
|
||||
qiniu.put("name", "七牛云存储");
|
||||
qiniu.put("alias", "qiniu");
|
||||
qiniu.put("describe", "存储在七牛云,请前往七牛云开通存储服务");
|
||||
qiniu.put("engine", "qiniu");
|
||||
qiniu.put("path", "存储在七牛云,请前往七牛云开通存储服务");
|
||||
qiniu.put("status", engine.equals("qiniu") ? 1 : 0);
|
||||
list.add(qiniu);
|
||||
|
||||
Map<String, Object> aliyun = new LinkedHashMap<>();
|
||||
aliyun.put("name", "阿里云OSS");
|
||||
aliyun.put("alias", "aliyun");
|
||||
aliyun.put("describe", "存储在阿里云,请前往阿里云开通存储服务");
|
||||
aliyun.put("engine", "aliyun");
|
||||
aliyun.put("path", "存储在阿里云,请前往阿里云开通存储服务");
|
||||
aliyun.put("status", engine.equals("aliyun") ? 1 : 0);
|
||||
list.add(aliyun);
|
||||
|
||||
Map<String, Object> qcloud = new LinkedHashMap<>();
|
||||
qcloud.put("name", "腾讯云COS");
|
||||
qcloud.put("alias", "qcloud");
|
||||
qcloud.put("describe", "存储在腾讯云,请前往腾讯云开通存储服务");
|
||||
qcloud.put("engine", "qcloud");
|
||||
qcloud.put("path", "存储在腾讯云,请前往腾讯云开通存储服务");
|
||||
qcloud.put("status", engine.equals("qcloud") ? 1 : 0);
|
||||
list.add(qcloud);
|
||||
|
||||
|
|
@ -62,28 +62,28 @@ public class SettingStorageServiceImpl implements ISettingStorageService {
|
|||
* 存储详情
|
||||
*
|
||||
* @author fzr
|
||||
* @param alias 存储别名
|
||||
* @param engine 存储别名
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> detail(String alias) {
|
||||
public Map<String, Object> detail(String engine) {
|
||||
String env = YmlUtils.get("like.production");
|
||||
boolean envStatus = StringUtils.isNotNull(env) && env.equals("true");
|
||||
|
||||
String engine = ConfigUtils.get("storage", "default", "local");
|
||||
Map<String, String> config = ConfigUtils.getMap("storage", alias);
|
||||
String defaultEngine = ConfigUtils.get("storage", "default", "local");
|
||||
Map<String, String> config = ConfigUtils.getMap("storage", engine);
|
||||
config = StringUtils.isNotNull(config) ? config : Collections.emptyMap();
|
||||
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("name", config.getOrDefault("name", ""));
|
||||
map.put("alias", alias);
|
||||
map.put("status", engine.equals(alias) ? 1 : 0);
|
||||
if (!alias.equals("local")) {
|
||||
map.put("engine", engine);
|
||||
map.put("status", defaultEngine.equals(engine) ? 1 : 0);
|
||||
if (!engine.equals("local")) {
|
||||
map.put("bucket", config.getOrDefault("bucket", ""));
|
||||
map.put("secretKey", envStatus ? "******" : config.getOrDefault("secretKey", ""));
|
||||
map.put("accessKey", envStatus ? "******" : config.getOrDefault("accessKey", ""));
|
||||
map.put("secret_key", envStatus ? "******" : config.getOrDefault("secret_key", ""));
|
||||
map.put("access_key", envStatus ? "******" : config.getOrDefault("access_key", ""));
|
||||
map.put("domain", config.getOrDefault("domain", ""));
|
||||
if (alias.equals("qcloud")) {
|
||||
if (engine.equals("qcloud")) {
|
||||
map.put("region", config.getOrDefault("region", ""));
|
||||
}
|
||||
}
|
||||
|
|
@ -98,18 +98,18 @@ public class SettingStorageServiceImpl implements ISettingStorageService {
|
|||
* @param params 参数
|
||||
*/
|
||||
@Override
|
||||
public void edit(Map<String, String> params) {
|
||||
Assert.notNull(params.get("alias"), "alias参数缺失");
|
||||
public void setup(Map<String, String> params) {
|
||||
Assert.notNull(params.get("engine"), "engine参数缺失");
|
||||
Assert.notNull(params.get("status"), "status参数缺失");
|
||||
Map<String, String> map = new LinkedHashMap<>();
|
||||
|
||||
map.put("name", "本地存储");
|
||||
if (!params.get("alias").equals("local")) {
|
||||
if (!params.get("engine").equals("local")) {
|
||||
map.put("bucket", params.getOrDefault("bucket", ""));
|
||||
map.put("secretKey", params.getOrDefault("secretKey", ""));
|
||||
map.put("accessKey", params.getOrDefault("accessKey", ""));
|
||||
map.put("secret_key", params.getOrDefault("secret_key", ""));
|
||||
map.put("access_key", params.getOrDefault("access_key", ""));
|
||||
map.put("domain", params.getOrDefault("domain", ""));
|
||||
switch (params.get("alias")) {
|
||||
switch (params.get("engine")) {
|
||||
case "qcloud":
|
||||
map.put("name", "腾讯云存储");
|
||||
map.put("region", params.getOrDefault("region", ""));
|
||||
|
|
@ -123,12 +123,12 @@ public class SettingStorageServiceImpl implements ISettingStorageService {
|
|||
}
|
||||
}
|
||||
|
||||
ConfigUtils.set("storage", params.get("alias"), JSON.toJSONString(map));
|
||||
ConfigUtils.set("storage", params.get("engine"), JSON.toJSONString(map));
|
||||
|
||||
String engine = ConfigUtils.get("storage", "default", "local");
|
||||
if (Integer.parseInt(params.get("status")) == 1) {
|
||||
ConfigUtils.set("storage", "default", params.get("alias"));
|
||||
} else if (engine.equals(params.get("alias")) && Integer.parseInt(params.get("status")) == 0) {
|
||||
ConfigUtils.set("storage", "default", params.get("engine"));
|
||||
} else if (engine.equals(params.get("engine")) && Integer.parseInt(params.get("status")) == 0) {
|
||||
ConfigUtils.set("storage", "default", "");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,9 +20,8 @@ public class SettingUserServiceImpl implements ISettingUserService {
|
|||
* @return SettingUserVo
|
||||
*/
|
||||
@Override
|
||||
public SettingUserVo detail() {
|
||||
String defaultAvatar = ConfigUtils.get("user", "defaultAvatar", "");
|
||||
|
||||
public SettingUserVo getConfig() {
|
||||
String defaultAvatar = ConfigUtils.get("default_image", "user_avatar", "");
|
||||
SettingUserVo vo = new SettingUserVo();
|
||||
vo.setDefaultAvatar(UrlUtils.toAbsoluteUrl(defaultAvatar));
|
||||
return vo;
|
||||
|
|
@ -35,8 +34,8 @@ public class SettingUserServiceImpl implements ISettingUserService {
|
|||
* @param userValidate 参数
|
||||
*/
|
||||
@Override
|
||||
public void save(SettingUserValidate userValidate) {
|
||||
ConfigUtils.set("user", "defaultAvatar", UrlUtils.toRelativeUrl(userValidate.getDefaultAvatar()));
|
||||
public void setConfig(SettingUserValidate userValidate) {
|
||||
ConfigUtils.set("default_image", "user_avatar", UrlUtils.toRelativeUrl(userValidate.getDefaultAvatar()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.mdd.admin.service.impl.system;
|
||||
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Assert;
|
||||
import com.mdd.admin.LikeAdminThreadLocal;
|
||||
|
|
@ -63,7 +64,6 @@ public class SystemMenuServiceImpl implements ISystemMenuService {
|
|||
for (SystemMenu systemAuthMenu : systemAuthMenus) {
|
||||
SystemAuthMenuVo vo = new SystemAuthMenuVo();
|
||||
BeanUtils.copyProperties(systemAuthMenu, vo);
|
||||
|
||||
vo.setUpdateTime(TimeUtils.timestampToDate(systemAuthMenu.getUpdateTime()));
|
||||
vo.setCreateTime(TimeUtils.timestampToDate(systemAuthMenu.getCreateTime()));
|
||||
lists.add(vo);
|
||||
|
|
@ -80,9 +80,9 @@ public class SystemMenuServiceImpl implements ISystemMenuService {
|
|||
* @return JSONArray
|
||||
*/
|
||||
@Override
|
||||
public JSONArray list() {
|
||||
public JSONObject list() {
|
||||
QueryWrapper<SystemMenu> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.orderByDesc("menu_sort");
|
||||
queryWrapper.orderByDesc("sort");
|
||||
queryWrapper.orderByAsc("id");
|
||||
|
||||
List<SystemMenu> systemAuthMenus = systemAuthMenuMapper.selectList(queryWrapper);
|
||||
|
|
@ -98,7 +98,11 @@ public class SystemMenuServiceImpl implements ISystemMenuService {
|
|||
}
|
||||
|
||||
JSONArray jsonArray = JSONArray.parseArray(JSONArray.toJSONString(lists));
|
||||
return ListUtils.listToTree(jsonArray, "id", "pid", "children");
|
||||
|
||||
|
||||
return new JSONObject() {{
|
||||
put("lists", ListUtils.listToTree(jsonArray, "id", "pid", "children"));
|
||||
}};
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -66,9 +66,9 @@ public class SystemRoleServiceImpl implements ISystemRoleService {
|
|||
vo.setSort(systemAuthRole.getSort());
|
||||
vo.setCreateTime(TimeUtils.timestampToDate(systemAuthRole.getCreateTime()));
|
||||
vo.setUpdateTime(TimeUtils.timestampToDate(systemAuthRole.getUpdateTime()));
|
||||
vo.setMember(0);
|
||||
vo.setRemark("");
|
||||
vo.setMenus(Collections.EMPTY_LIST);
|
||||
vo.setNum(0);
|
||||
vo.setDesc("");
|
||||
vo.setMenusId(Collections.EMPTY_LIST);
|
||||
list.add(vo);
|
||||
}
|
||||
|
||||
|
|
@ -96,8 +96,8 @@ public class SystemRoleServiceImpl implements ISystemRoleService {
|
|||
for (SystemRole systemAuthRole : iPage.getRecords()) {
|
||||
SystemAuthRoleVo vo = new SystemAuthRoleVo();
|
||||
BeanUtils.copyProperties(systemAuthRole, vo);
|
||||
|
||||
vo.setMenus(new ArrayList<>());
|
||||
vo.setMenusId(new ArrayList<>());
|
||||
vo.setNum(adminMapper.getCountByRoleId(systemAuthRole.getId()));
|
||||
vo.setCreateTime(TimeUtils.timestampToDate(systemAuthRole.getCreateTime()));
|
||||
vo.setUpdateTime(TimeUtils.timestampToDate(systemAuthRole.getUpdateTime()));
|
||||
list.add(vo);
|
||||
|
|
@ -126,8 +126,8 @@ public class SystemRoleServiceImpl implements ISystemRoleService {
|
|||
|
||||
SystemAuthRoleVo vo = new SystemAuthRoleVo();
|
||||
BeanUtils.copyProperties(systemAuthRole, vo);
|
||||
vo.setMember(0);
|
||||
vo.setMenus(iSystemAuthPermService.selectMenuIdsByRoleId(roleIds));
|
||||
vo.setNum(0);
|
||||
vo.setMenusId(iSystemAuthPermService.selectMenuIdsByRoleId(roleIds));
|
||||
vo.setCreateTime(TimeUtils.timestampToDate(systemAuthRole.getCreateTime()));
|
||||
vo.setUpdateTime(TimeUtils.timestampToDate(systemAuthRole.getUpdateTime()));
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ public class SystemRoleServiceImpl implements ISystemRoleService {
|
|||
model.setCreateTime(System.currentTimeMillis() / 1000);
|
||||
model.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
systemRoleMapper.insert(model);
|
||||
iSystemAuthPermService.batchSaveByMenuIds(model.getId(), createValidate.getMenuIds());
|
||||
// iSystemAuthPermService.batchSaveByMenuIds(model.getId(), createValidate.getMenuIds());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -186,8 +186,8 @@ public class SystemRoleServiceImpl implements ISystemRoleService {
|
|||
model.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
systemRoleMapper.updateById(model);
|
||||
|
||||
iSystemAuthPermService.batchDeleteByRoleId(updateValidate.getId());
|
||||
iSystemAuthPermService.batchSaveByMenuIds(updateValidate.getId(), updateValidate.getMenuIds());
|
||||
// iSystemAuthPermService.batchDeleteByRoleId(updateValidate.getId());
|
||||
// iSystemAuthPermService.batchSaveByMenuIds(updateValidate.getId(), updateValidate.getMenuIds());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.mdd.admin.service.system;
|
||||
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.mdd.admin.validate.system.SystemMenuCreateValidate;
|
||||
import com.mdd.admin.validate.system.SystemMenuUpdateValidate;
|
||||
import com.mdd.admin.vo.system.SystemAuthMenuVo;
|
||||
|
|
@ -26,7 +27,7 @@ public interface ISystemMenuService {
|
|||
* @author fzr
|
||||
* @return JSONArray
|
||||
*/
|
||||
JSONArray list();
|
||||
JSONObject list();
|
||||
|
||||
/**
|
||||
* 菜单详情
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.mdd.admin.validate.setting;
|
||||
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
|
@ -13,18 +14,21 @@ public class SettingLoginValidate implements Serializable {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "登录方式")
|
||||
private String loginWay = "";
|
||||
private JSONArray loginWay;
|
||||
|
||||
@ApiModelProperty(value = "强制绑定手机")
|
||||
private Integer forceBindMobile = 0;
|
||||
private Integer coerceMobile = 0;
|
||||
|
||||
@ApiModelProperty(value = "政策协议")
|
||||
private Integer openAgreement = 0;
|
||||
private Integer loginAgreement = 0;
|
||||
|
||||
@ApiModelProperty(value = "第三方登录")
|
||||
private Integer openOtherAuth = 0;
|
||||
private Integer thirdAuth = 0;
|
||||
|
||||
@ApiModelProperty(value = "微信开放平台")
|
||||
private String autoLoginAuth = "";
|
||||
@ApiModelProperty(value = "微信登录")
|
||||
private Integer wechatAuth;
|
||||
|
||||
@ApiModelProperty(value = "qq登录")
|
||||
private Integer qqAuth;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.mdd.admin.validate.setting;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -29,7 +30,10 @@ public class SettingPayConfigValidate {
|
|||
@ApiModelProperty(value = "备注信息")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value = "domain")
|
||||
private String domian;
|
||||
|
||||
@ApiModelProperty(value = "配置参数")
|
||||
private Map<String, String> params;
|
||||
private JSONObject config;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ public class SettingSearchValidate implements Serializable {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "是否开启热门搜索")
|
||||
private Integer isHotSearch;
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "关键词列表")
|
||||
private List<SettingSearchObjectVo> list;
|
||||
private List<SettingSearchObjectVo> data;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import org.hibernate.validator.constraints.Length;
|
|||
import javax.validation.constraints.DecimalMin;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel("系统角色创建参数")
|
||||
|
|
@ -29,12 +30,7 @@ public class SystemRoleCreateValidate implements Serializable {
|
|||
@ApiModelProperty(value = "排序", required = true)
|
||||
private Integer sort = 0;
|
||||
|
||||
@NotNull(message = "请选择状态")
|
||||
@IntegerContains(values = {0, 1})
|
||||
@ApiModelProperty(value = "是否禁用", required = true)
|
||||
private Integer isDisable;
|
||||
|
||||
@ApiModelProperty(value = "菜单权限")
|
||||
private String menuIds = "";
|
||||
private List<Integer> menuId;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,15 @@
|
|||
package com.mdd.admin.validate.system;
|
||||
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import com.mdd.common.validator.annotation.IntegerContains;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.DecimalMin;
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel("系统角色更新参数")
|
||||
|
|
@ -35,12 +34,8 @@ public class SystemRoleUpdateValidate implements Serializable {
|
|||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort = 0;
|
||||
|
||||
@NotNull(message = "请选择状态")
|
||||
@IntegerContains(values = {0, 1})
|
||||
@ApiModelProperty(value = "是否禁用", required = true)
|
||||
private Integer isDisable;
|
||||
|
||||
@ApiModelProperty(value = "菜单权限")
|
||||
private String menuIds = "";
|
||||
private List<Integer> menuId;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.mdd.admin.vo.setting;
|
||||
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
|
@ -14,18 +15,21 @@ public class SettingLoginVo implements Serializable {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "登录方式")
|
||||
private List<Integer> loginWay;
|
||||
private JSONArray loginWay;
|
||||
|
||||
@ApiModelProperty(value = "强制绑定手机")
|
||||
private Integer forceBindMobile;
|
||||
private Integer coerceMobile;
|
||||
|
||||
@ApiModelProperty(value = "是否开启协议")
|
||||
private Integer openAgreement;
|
||||
private Integer loginAgreement;
|
||||
|
||||
@ApiModelProperty(value = "第三方的登录")
|
||||
private Integer openOtherAuth;
|
||||
private Integer thirdAuth;
|
||||
|
||||
@ApiModelProperty(value = "自动登录授权")
|
||||
private List<Integer> autoLoginAuth;
|
||||
@ApiModelProperty(value = "微信登录")
|
||||
private Integer wechatAuth;
|
||||
|
||||
@ApiModelProperty(value = "qq登录")
|
||||
private Integer qqAuth;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,14 +11,16 @@ public class SettingPaymentMethodVo implements Serializable {
|
|||
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
private String payWayName;
|
||||
|
||||
private String showName;
|
||||
private Integer payConfigId;
|
||||
|
||||
private String icon;
|
||||
|
||||
private Integer isDefault;
|
||||
private Integer scene;
|
||||
|
||||
private Integer status;
|
||||
|
||||
private Integer isDefault;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ public class SettingSearchDetailVo implements Serializable {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "是否开起热门搜索")
|
||||
private Integer isHotSearch;
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "热门搜索关键词")
|
||||
private List<HotSearch> list;
|
||||
private List<HotSearch> data;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,13 +19,13 @@ public class SystemAuthRoleVo implements Serializable {
|
|||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "角色备注")
|
||||
private String remark;
|
||||
private String desc;
|
||||
|
||||
@ApiModelProperty(value = "关联菜单")
|
||||
private Object menus;
|
||||
private Object menusId;
|
||||
|
||||
@ApiModelProperty(value = "成员数量")
|
||||
private Integer member;
|
||||
private Integer num;
|
||||
|
||||
@ApiModelProperty(value = "角色排序")
|
||||
private Integer sort;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public class DevPayConfig implements Serializable {
|
|||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty("显示名称")
|
||||
private String showName;
|
||||
private String payWayName;
|
||||
|
||||
@ApiModelProperty("渠道图标")
|
||||
private String icon;
|
||||
|
|
|
|||
|
|
@ -22,4 +22,8 @@ public interface AdminMapper extends IBaseMapper<Admin> {
|
|||
List<Admin> getByJobs(@Param("jobId") Integer jobId);
|
||||
|
||||
|
||||
@Select("SELECT count(*) FROM la_admin admin INNER JOIN la_admin_role lad ON admin.id = lad.admin_id WHERE lad.role_id = #{roleId} AND admin.delete_time IS NULL")
|
||||
Integer getCountByRoleId(@Param("roleId") Integer roleId);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue