店铺菜单添加

This commit is contained in:
liyj 2025-06-13 16:59:18 +08:00
parent 961563e8e8
commit 1ea6453469
10 changed files with 46 additions and 15 deletions

View File

@ -12,7 +12,7 @@ logging:
charset:
console: UTF-8
remoteIp: https://mall.gpxscs.cn/api
#remoteIp: http://192.168.0.104:8089
#remoteIp: https://mall.gpxscs.cn/api
remoteIp: http://192.168.0.104:8089
versionName: client-v1

View File

@ -155,7 +155,8 @@ public class AccountBaseConfigController {
@ApiOperation(value = "清理系统缓存", notes = "安全清理缓存接口,避免清理部分可能需要持久化的数据")
@RequestMapping(value = "/cleanCache", method = RequestMethod.POST)
public CommonResult cleanCache(@Auth(isPlatform = true) UserDto user) {
//public CommonResult cleanCache(@Auth(isPlatform = true) UserDto user) {
public CommonResult cleanCache() {
Set<String> c_keys = redisService.keys(ConstantRedis.Cache_NameSpace + "*");
Set<String> b_keys = redisService.keys("base:*");
Set<String> s_keys = redisService.keys("store:*");

View File

@ -5,6 +5,7 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.ResourceBundleMessageSource;
import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.i18n.CookieLocaleResolver;
@ -81,4 +82,14 @@ public class I18nConfig implements WebMvcConfigurer {
resourceBundleMessageSource.setBasenames("i18n/messages");
return resourceBundleMessageSource;
}
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**") // 对所有路径应用CORS配置
.allowedOrigins("*") // 允许的源
.allowedMethods("GET", "POST", "PUT", "DELETE") // 允许的方法
.allowedHeaders("*") // 允许的头部
.allowCredentials(true) // 是否发送cookies等信息
.maxAge(3600); // 预检请求的有效期
}
}

View File

@ -222,7 +222,7 @@ public class AdminBaseMenuServiceImpl extends BaseServiceImpl<AdminBaseMenuMappe
if (adminBaseProtocol.getRights_id().equals("")) {
} else {
List<Integer> tmpList = Convert.toList(Integer.class, adminBaseProtocol.getRights_id().split(","));
List<Integer> tmpList = Convert.toList(Integer.class, adminBaseProtocol.getRights_id().split(","));//tod Rights_id就是
boolean flag = true;
for (Integer rid : tmpList) {

View File

@ -34,7 +34,7 @@ import java.util.Map;
/**
* 认证服务远程调用
*/
@FeignClient("mall-shop")
@FeignClient(name = "mall-shop",url = "http://localhost:8089")
public interface ShopService {
@PostMapping(value = "/admin/shop/shopController/deletePlantformUserByUid")

View File

@ -39,7 +39,10 @@ public class BaseControllerImpl extends BaseController implements IBaseControlle
*/
@Override
public UserDto getCurrentUser() {
return userInfoService.getUser();
UserDto userDto = new UserDto();
userDto.setStore_id("1");
return userDto;
// return userInfoService.getUser();
}
/**

View File

@ -1,6 +1,7 @@
package com.suisung.mall.common.utils;
import com.suisung.mall.common.api.ResultCode;
import com.suisung.mall.common.constant.AuthConstant;
import com.suisung.mall.common.domain.UserDto;
import com.suisung.mall.common.exception.ApiException;
import lombok.extern.slf4j.Slf4j;
@ -41,12 +42,14 @@ public class ContextUtil {
try {
UserDto loginUser = staticUserInfoService.getUser();
log.info("##### 当前登录用户:{}###", JsonUtil.object2json(loginUser));
return loginUser;//todo 测试去除
// UserDto user= new UserDto();
//user.setStore_id("1");
//user.setRole_id(9);
//user.setUser_account("18260885688");
//return user;
// return loginUser;//todo 测试去除
UserDto user= new UserDto();
user.setId(10002);
user.setStore_id("1");
user.setRole_id(2);
user.setClient_id(AuthConstant.ADMIN_CLIENT_ID);
user.setUser_account("daoniejia");
return user;
} catch (Exception e) {
System.out.println(e.getMessage());
}

View File

@ -16,4 +16,15 @@ public class WebConfig implements WebMvcConfigurer {
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
}
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**") // 对所有路径应用CORS配置
.allowedOrigins("*") // 允许的源
.allowedMethods("GET", "POST", "PUT", "DELETE") // 允许的方法
.allowedHeaders("*") // 允许的头部
.allowCredentials(true) // 是否发送cookies等信息
.maxAge(3600); // 预检请求的有效期
}
}

View File

@ -319,8 +319,8 @@
<mysql.host>42.194.196.179</mysql.host>
<mysql.port>3306</mysql.port>
<mysql.db>mall_dev</mysql.db>
<mysql.user>root</mysql.user>
<mysql.pwd>B1x1GuKZr55PPmox</mysql.pwd>
<mysql.user>webdev</mysql.user>
<mysql.pwd>jbFr9YewcA9Mihx6fnw51Kzq</mysql.pwd>
<mysql.driver>com.mysql.cj.jdbc.Driver</mysql.driver>
<!-- <mysql.host>127.0.0.1</mysql.host>-->
<!-- <mysql.port>3306</mysql.port>-->

View File

@ -1,4 +1,6 @@
update admin_base_menu set menu_url_path='/admin/shop/shop-base-product-spec/list' where menu_name ='规格管理' and menu_role ='2';
update admin_base_menu set menu_parent_id ='8021' where menu_name in('分类管理','类型管理','品牌管理','规格管理') and menu_role ='2';
update admin_base_protocol set rights_id=CONCAT_WS(',',rights_id,'311218') where `path` ='/admin/shop/shop-base-product-category/list'; -- 分类管理
update admin_base_protocol set rights_id=CONCAT_WS(',',rights_id,'311220') where `path` ='/admin/shop/shop-base-product-brand/list'; -- 品牌管理
update admin_base_protocol set rights_id=CONCAT_WS(',',rights_id,'311219') where `path` ='/admin/shop/shop-base-product-type/list'; -- 类型管理
update admin_base_protocol set rights_id=CONCAT_WS(',',rights_id,'311221') where `path` ='/admin/shop/shop-base-product-spec/list'; -- 规格管理 I
update admin_base_protocol set rights_id=CONCAT_WS(',',rights_id,'311221') where `path` ='/admin/shop/shop-base-product-spec/list'; -- 规格管理