Merge remote-tracking branch 'origin/develop' into develop
# Conflicts: # admin/src/views/channel/weapp.vue
@@ -71,6 +71,7 @@ public class ChannelOaMenuServiceImpl implements IChannelOaMenuService {
|
||||
Assert.notNull(item.get("url"), "一级菜单url数缺失");
|
||||
wxMenuButton.setType(item.get("visitType"));
|
||||
wxMenuButton.setUrl(item.get("url"));
|
||||
wxMenuButton.setAppId(item.getOrDefault("appId", ""));
|
||||
}
|
||||
menuButtons.add(wxMenuButton);
|
||||
}
|
||||
|
||||
@@ -37,11 +37,12 @@ public class SettingSmsServiceImpl implements ISettingSmsService {
|
||||
tencent.put("status", engine.equals("tencent") ? 1 : 0);
|
||||
list.add(tencent);
|
||||
|
||||
Map<String, Object> huawei = new LinkedHashMap<>();
|
||||
huawei.put("name", "华为云短信");
|
||||
huawei.put("alias", "huawei");
|
||||
huawei.put("status", engine.equals("huawei") ? 1 : 0);
|
||||
list.add(huawei);
|
||||
// todo 下个版本再实现
|
||||
// Map<String, Object> huawei = new LinkedHashMap<>();
|
||||
// huawei.put("name", "华为云短信");
|
||||
// huawei.put("alias", "huawei");
|
||||
// huawei.put("status", engine.equals("huawei") ? 1 : 0);
|
||||
// list.add(huawei);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,10 @@ import com.mdd.admin.config.AdminConfig;
|
||||
import com.mdd.admin.service.system.ISystemAuthPermService;
|
||||
import com.mdd.common.entity.system.SystemAuthMenu;
|
||||
import com.mdd.common.entity.system.SystemAuthPerm;
|
||||
import com.mdd.common.entity.system.SystemAuthRole;
|
||||
import com.mdd.common.mapper.system.SystemAuthMenuMapper;
|
||||
import com.mdd.common.mapper.system.SystemAuthPermMapper;
|
||||
import com.mdd.common.mapper.system.SystemAuthRoleMapper;
|
||||
import com.mdd.common.utils.ArrayUtil;
|
||||
import com.mdd.common.utils.RedisUtil;
|
||||
import com.mdd.common.utils.StringUtil;
|
||||
@@ -30,6 +32,9 @@ public class SystemAuthPermServiceImpl implements ISystemAuthPermService {
|
||||
@Resource
|
||||
SystemAuthMenuMapper systemAuthMenuMapper;
|
||||
|
||||
@Resource
|
||||
SystemAuthRoleMapper systemAuthRoleMapper;
|
||||
|
||||
/**
|
||||
* 根据角色ID获取菜单ID
|
||||
*
|
||||
@@ -39,11 +44,22 @@ public class SystemAuthPermServiceImpl implements ISystemAuthPermService {
|
||||
@Override
|
||||
public List<Integer> selectMenuIdsByRoleId(Integer roleId) {
|
||||
List<Integer> menus = new LinkedList<>();
|
||||
|
||||
SystemAuthRole systemAuthRole = systemAuthRoleMapper.selectOne(new QueryWrapper<SystemAuthRole>()
|
||||
.eq("id", roleId)
|
||||
.eq("is_disable", 0)
|
||||
.last("limit 1"));
|
||||
|
||||
if (StringUtil.isNull(systemAuthRole)) {
|
||||
return menus;
|
||||
}
|
||||
|
||||
List<SystemAuthPerm> systemAuthPerms = systemAuthPermMapper.selectList(
|
||||
new QueryWrapper<SystemAuthPerm>().eq("role_id", roleId));
|
||||
for (SystemAuthPerm systemAuthPerm : systemAuthPerms) {
|
||||
menus.add(systemAuthPerm.getMenuId());
|
||||
}
|
||||
|
||||
return menus;
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 839 B After Width: | Height: | Size: 831 B |
|
Before Width: | Height: | Size: 831 B After Width: | Height: | Size: 839 B |
@@ -181,9 +181,12 @@ public class UserServiceImpl implements IUserService {
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(user, "用户不存在");
|
||||
String oldPwd = ToolsUtil.makeMd5(oldPassword.trim()+user.getSalt());
|
||||
if (!oldPwd.equals(user.getPassword())) {
|
||||
throw new OperateException("原密码不正确!");
|
||||
|
||||
if (!user.getPassword().equals("")) {
|
||||
String oldPwd = ToolsUtil.makeMd5(oldPassword.trim() + user.getSalt());
|
||||
if (!oldPwd.equals(user.getPassword())) {
|
||||
throw new OperateException("原密码不正确!");
|
||||
}
|
||||
}
|
||||
|
||||
String salt = ToolsUtil.randomString(5);
|
||||
|
||||
|
Before Width: | Height: | Size: 839 B After Width: | Height: | Size: 831 B |
|
Before Width: | Height: | Size: 831 B After Width: | Height: | Size: 839 B |