| | |
| | | package com.qianwen.smartman.modules.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import java.lang.invoke.SerializedLambda; |
| | | import com.qianwen.smartman.common.utils.MessageUtils; |
| | | import com.qianwen.core.log.exception.ServiceException; |
| | | import com.qianwen.core.mp.base.BaseServiceImpl; |
| | | import com.qianwen.smartman.common.utils.MessageUtils; |
| | | import com.qianwen.smartman.modules.system.entity.Param; |
| | | import com.qianwen.smartman.modules.system.entity.Theme; |
| | | import com.qianwen.smartman.modules.system.mapper.ThemeMapper; |
| | | import com.qianwen.smartman.modules.system.service.IParamService; |
| | | import com.qianwen.smartman.modules.system.service.IThemeService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service |
| | | /* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/system/service/impl/ThemeServiceImpl.class */ |
| | | public class ThemeServiceImpl extends BaseServiceImpl<ThemeMapper, Theme> implements IThemeService { |
| | | private final IParamService paramService; |
| | | private final String PARAM_KEY = "system.theme"; |
| | | |
| | | private static /* synthetic */ Object $deserializeLambda$(SerializedLambda lambda) { |
| | | String implMethodName = lambda.getImplMethodName(); |
| | | boolean z = true; |
| | | switch (implMethodName.hashCode()) { |
| | | case -1045666808: |
| | | if (implMethodName.equals("getParamKey")) { |
| | | z = false; |
| | | break; |
| | | } |
| | | break; |
| | | } |
| | | switch (z) { |
| | | case false: |
| | | if (lambda.getImplMethodKind() == 5 && lambda.getFunctionalInterfaceClass().equals("com/baomidou/mybatisplus/core/toolkit/support/SFunction") && lambda.getFunctionalInterfaceMethodName().equals("apply") && lambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") && lambda.getImplClass().equals("org/springblade/modules/system/entity/Param") && lambda.getImplMethodSignature().equals("()Ljava/lang/String;")) { |
| | | return (v0) -> { |
| | | return v0.getParamKey(); |
| | | }; |
| | | } |
| | | break; |
| | | } |
| | | throw new IllegalArgumentException("Invalid lambda deserialization"); |
| | | } |
| | | |
| | | public ThemeServiceImpl(final IParamService paramService) { |
| | | this.paramService = paramService; |
| | |
| | | |
| | | @Override // org.springblade.modules.system.service.IThemeService |
| | | public Param changeTheme(String theme) { |
| | | Param param = this.paramService.getOne(Wrappers.<Param>query().lambda().eq(Param::getParamKey, "system.theme")); |
| | | /* |
| | | Param param = (Param) this.paramService.getOne((Wrapper) Wrappers.query().lambda().eq((v0) -> { |
| | | return v0.getParamKey(); |
| | | }, "system.theme")); |
| | | }, "system.theme"));*/ |
| | | param.setParamValue(theme); |
| | | boolean update = this.paramService.updateById(param); |
| | | if (!update) { |