diff --git a/framework/src/main/java/cn/lili/common/token/base/generate/ManagerTokenGenerate.java b/framework/src/main/java/cn/lili/common/token/base/generate/ManagerTokenGenerate.java index a58d1aa6..5b4d6e70 100644 --- a/framework/src/main/java/cn/lili/common/token/base/generate/ManagerTokenGenerate.java +++ b/framework/src/main/java/cn/lili/common/token/base/generate/ManagerTokenGenerate.java @@ -84,7 +84,7 @@ public class ManagerTokenGenerate extends AbstractTokenGenerate { //for循环路径集合 for (String path : paths) { //如果是超级权限 则计入超级权限 - if (menu.getIsSupper()) { + if (menu.getIsSupper() != null && menu.getIsSupper()) { //如果已有超级权限,则这里就不做权限的累加 if (!superPermissions.contains(path)) { superPermissions.add(path); diff --git a/framework/src/main/java/cn/lili/modules/broadcast/serviceimpl/StudioServiceImpl.java b/framework/src/main/java/cn/lili/modules/broadcast/serviceimpl/StudioServiceImpl.java index 4ef48de1..f3750381 100644 --- a/framework/src/main/java/cn/lili/modules/broadcast/serviceimpl/StudioServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/broadcast/serviceimpl/StudioServiceImpl.java @@ -200,7 +200,7 @@ public class StudioServiceImpl extends ServiceImpl impleme .eq(recommend != null, "recommend", true) .eq(status != null, "status", status) .orderByDesc("create_time"); - if (UserContext.getCurrentUser().getRole().equals(UserEnums.STORE)) { + if (UserContext.getCurrentUser() != null && UserContext.getCurrentUser().getRole().equals(UserEnums.STORE)) { queryWrapper.eq("store_id", UserContext.getCurrentUser().getStoreId()); } return this.page(PageUtil.initPage(pageVO), queryWrapper); diff --git a/framework/src/main/java/cn/lili/modules/permission/serviceimpl/AdminUserServiceImpl.java b/framework/src/main/java/cn/lili/modules/permission/serviceimpl/AdminUserServiceImpl.java index d28b664e..831aec4b 100644 --- a/framework/src/main/java/cn/lili/modules/permission/serviceimpl/AdminUserServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/permission/serviceimpl/AdminUserServiceImpl.java @@ -199,13 +199,12 @@ public class AdminUserServiceImpl extends ServiceImpl 10) { throw new ServiceException(ResultCode.PERMISSION_BEYOND_TEN); } - if (roles != null && roles.size() > 0) { + if (roles.size() > 0) { dbUser.setRoleIds(StringUtils.join(",", roles)); } - - this.save(dbUser); - updateRole(adminUser.getId(), roles); + dbUser = this.findByUsername(dbUser.getUsername()); + updateRole(dbUser.getId(), roles); } diff --git a/update-sql/version4.0to4.1.sql b/update-sql/version4.0to4.1.sql index a9a48e72..e27642ee 100644 --- a/update-sql/version4.0to4.1.sql +++ b/update-sql/version4.0to4.1.sql @@ -10,6 +10,7 @@ ALTER TABLE li_goods DROP COLUMN freight_payer; /**添加商品类型**/ ALTER TABLE li_goods ADD goods_type VARCHAR ( 32 ); ALTER TABLE li_goods_sku ADD goods_type VARCHAR ( 32 ); +ALTER TABLE li_specification ADD spec_value text; UPDATE li_goods SET goods_type = "PHYSICAL_GOODS"; UPDATE li_goods_sku SET goods_type = "PHYSICAL_GOODS"; /**增加优惠券有效期类型**/ @@ -118,4 +119,6 @@ CREATE TABLE `li_coupon_activity_item` ( /** 修改商品模板详情字段类型**/ ALTER TABLE `li_draft_goods` MODIFY COLUMN `intro` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL; /** 添加秒杀设置**/ -INSERT INTO `li_setting` ( `id`, `create_by`, `create_time`, `delete_flag`, `update_by`, `update_time`, `setting_value` ) VALUES ( 'SECKILL_SETTING', NULL, NULL, NULL, 'admin', '2021-06-04 09:58:39.384000', '{\"seckillRule\":\"秒杀规则\",\"hours\":\"9,10,11,12,13,14,15,21,22,23\"}' ); \ No newline at end of file +INSERT INTO `li_setting` ( `id`, `create_by`, `create_time`, `delete_flag`, `update_by`, `update_time`, `setting_value` ) VALUES ( 'SECKILL_SETTING', NULL, NULL, NULL, 'admin', '2021-06-04 09:58:39.384000', '{\"seckillRule\":\"秒杀规则\",\"hours\":\"9,10,11,12,13,14,15,21,22,23\"}' ); +/** 添加直播间商品默认数量**/ +alter table li_studio alter column room_goods_num set default 0; \ No newline at end of file