package org.springblade.system.service.impl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import org.springblade.core.cache.utils.CacheUtil;
|
import org.springblade.core.tool.utils.Func;
|
import org.springblade.system.entity.UserPwdstrategy;
|
import org.springblade.system.mapper.UserPwdstrategyMapper;
|
import org.springblade.system.service.IUserPwdstrategyService;
|
import org.springframework.stereotype.Service;
|
|
import javax.annotation.Resource;
|
|
import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
|
|
/**
|
* 用户密码策略管理表(UserPwdstrategy)表服务实现类
|
*
|
* @author makejava
|
* @since 2023-03-22 15:24:55
|
*/
|
@Service
|
public class UserPwdstrategyServiceImpl extends ServiceImpl<UserPwdstrategyMapper,UserPwdstrategy> implements IUserPwdstrategyService {
|
|
@Resource
|
private UserPwdstrategyMapper userPwdstrategyMapper;
|
|
/**
|
* 新增数据
|
*
|
* @param userPwdstrategy 实例对象
|
* @return 实例对象
|
*/
|
@Override
|
public boolean submit(UserPwdstrategy userPwdstrategy) {
|
if(Func.isEmpty(userPwdstrategy.getId())){
|
return this.saveOrUpdate(userPwdstrategy);
|
}else {
|
CacheUtil.clear(SYS_CACHE,Boolean.FALSE);
|
return this.saveOrUpdate(userPwdstrategy);
|
}
|
}
|
|
}
|