Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop
This commit is contained in:
commit
17705188e0
@ -278,6 +278,12 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
||||
|
||||
@Override
|
||||
public Boolean updateGoodsMarketAble(List<String> goodsIds, GoodsStatusEnum goodsStatusEnum, String underReason) {
|
||||
|
||||
//如果商品为空,直接返回
|
||||
if (goodsIds == null || goodsIds.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
LambdaUpdateWrapper<Goods> updateWrapper = Wrappers.lambdaUpdate();
|
||||
updateWrapper.set(Goods::getMarketEnable, goodsStatusEnum.name());
|
||||
updateWrapper.set(Goods::getUnderMessage, underReason);
|
||||
|
@ -13,13 +13,13 @@ import lombok.Data;
|
||||
public class StoreCollectionVO {
|
||||
|
||||
@ApiModelProperty(value = "店铺id")
|
||||
private String storeId;
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "店铺名称")
|
||||
private String storeName;
|
||||
|
||||
@ApiModelProperty(value = "店铺Logo")
|
||||
private String logo;
|
||||
private String storeLogo;
|
||||
|
||||
@ApiModelProperty(value = "是否自营")
|
||||
private Boolean selfOperated;
|
||||
|
@ -68,7 +68,7 @@ public class WechatAccessTokenUtil {
|
||||
}
|
||||
//获取token
|
||||
String content = HttpUtil.get("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential" +
|
||||
"&appid=wx6cfbe6e0ace12ce8&secret=6dfbe0c72380dce5d49d65b3c91059b1");
|
||||
"&appid=" + item.getAppId() + "&secret=" + item.getAppSecret());
|
||||
|
||||
JSONObject object = new JSONObject(content);
|
||||
log.info("token获取【" + clientTypeEnum.name() + "】返回" + object.toString());
|
||||
|
@ -1,11 +1,11 @@
|
||||
package cn.lili.modules.page.serviceimpl;
|
||||
|
||||
import cn.lili.common.enums.ClientTypeEnum;
|
||||
import cn.lili.common.enums.ResultCode;
|
||||
import cn.lili.common.enums.SwitchEnum;
|
||||
import cn.lili.common.exception.ServiceException;
|
||||
import cn.lili.mybatis.util.PageUtil;
|
||||
import cn.lili.common.properties.SystemSettingProperties;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.common.enums.ClientTypeEnum;
|
||||
import cn.lili.modules.page.entity.dos.PageData;
|
||||
import cn.lili.modules.page.entity.dto.PageDataDTO;
|
||||
import cn.lili.modules.page.entity.enums.PageEnum;
|
||||
@ -13,11 +13,13 @@ import cn.lili.modules.page.entity.vos.PageDataListVO;
|
||||
import cn.lili.modules.page.entity.vos.PageDataVO;
|
||||
import cn.lili.modules.page.mapper.PageDataMapper;
|
||||
import cn.lili.modules.page.service.PageDataService;
|
||||
import cn.lili.mybatis.util.PageUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
@ -29,6 +31,10 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class PageDataServiceImpl extends ServiceImpl<PageDataMapper, PageData> implements PageDataService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private SystemSettingProperties systemSettingProperties;
|
||||
|
||||
@Override
|
||||
public void addStorePageData(String storeId) {
|
||||
//设置店铺的PC页面
|
||||
@ -51,12 +57,15 @@ public class PageDataServiceImpl extends ServiceImpl<PageDataMapper, PageData> i
|
||||
@Override
|
||||
public PageData addPageData(PageData pageData) {
|
||||
//如果页面为发布,则关闭其他页面,开启此页面
|
||||
if (pageData.getPageShow().equals(SwitchEnum.OPEN.name())) {
|
||||
//演示站点不可以开启楼层
|
||||
if (!systemSettingProperties.getIsDemoSite() && pageData.getPageShow().equals(SwitchEnum.OPEN.name())) {
|
||||
LambdaUpdateWrapper<PageData> lambdaUpdateWrapper = Wrappers.lambdaUpdate();
|
||||
lambdaUpdateWrapper.eq(PageData::getPageType, pageData.getPageType());
|
||||
lambdaUpdateWrapper.eq(PageData::getPageClientType, pageData.getPageClientType());
|
||||
lambdaUpdateWrapper.set(PageData::getPageShow, SwitchEnum.CLOSE.name());
|
||||
this.update(lambdaUpdateWrapper);
|
||||
} else {
|
||||
pageData.setPageShow(SwitchEnum.CLOSE.name());
|
||||
}
|
||||
this.save(pageData);
|
||||
return pageData;
|
||||
|
@ -157,15 +157,20 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
|
||||
@Override
|
||||
@SystemLogPoint(description = "修改管理员", customerLog = "'修改管理员:'+#adminUser.username")
|
||||
public boolean updateAdminUser(AdminUser adminUser, List<String> roles) {
|
||||
|
||||
if (roles != null && roles.size() > 0) {
|
||||
|
||||
if (roles.size() > rolesMaxSize) {
|
||||
throw new ServiceException(ResultCode.PERMISSION_BEYOND_TEN);
|
||||
}
|
||||
if (roles != null && roles.size() > 0) {
|
||||
adminUser.setRoleIds(StringUtils.join(",", roles));
|
||||
|
||||
} else {
|
||||
adminUser.setRoleIds("");
|
||||
}
|
||||
|
||||
this.updateById(adminUser);
|
||||
updateRole(adminUser.getId(), roles);
|
||||
this.updateById(adminUser);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ public class ManagerTokenGenerate extends AbstractTokenGenerate {
|
||||
//循环权限菜单
|
||||
userMenuVOList.forEach(menu -> {
|
||||
//循环菜单,赋予用户权限
|
||||
if (menu.getPermission() != null) {
|
||||
if (!menu.getPermission().isEmpty()) {
|
||||
//获取路径集合
|
||||
String[] permissionUrl = menu.getPermission().split(",");
|
||||
//for循环路径集合
|
||||
|
@ -84,7 +84,9 @@ public class ManagerAuthenticationFilter extends BasicAuthenticationFilter {
|
||||
|
||||
//如果不是超级管理员, 则鉴权
|
||||
if (!authUser.getIsSuper()) {
|
||||
//获取缓存中的权限
|
||||
Map<String, List<String>> permission = (Map<String, List<String>>) cache.get(CachePrefix.PERMISSION_LIST.getPrefix(UserEnums.MANAGER) + authUser.getId());
|
||||
|
||||
//获取数据(GET 请求)权限
|
||||
if (request.getMethod().equals(RequestMethod.GET.name())) {
|
||||
//如果用户的超级权限和查阅权限都不包含当前请求的api
|
||||
|
Loading…
x
Reference in New Issue
Block a user