导航,附件,拦截器
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package com.lovenav.service.serviceImpl;
|
||||
|
||||
import com.lovenav.dao.ConfigDao;
|
||||
import com.lovenav.entity.Config;
|
||||
import com.lovenav.service.ConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
@Service
|
||||
public class ConfigServiceImpl implements ConfigService {
|
||||
@Autowired
|
||||
ConfigDao configDao;
|
||||
@Override
|
||||
public HashMap<String, Object> getAllConfig() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateConfis(Config config) {
|
||||
return configDao.updateByName(config);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String addConfig(Config config) {
|
||||
if(configDao.selectByName(config.getName())!=null){
|
||||
return "该配置文件已经存在!";
|
||||
}else {
|
||||
int result=configDao.insertSelective(config);
|
||||
if (result==1){
|
||||
return "添加成功!";
|
||||
}else {
|
||||
return "添加失败!";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user