增加平台配置的操作接口
This commit is contained in:
@@ -9,11 +9,11 @@ import java.util.List;
|
||||
public interface PlatformConfigMapperEx {
|
||||
|
||||
List<PlatformConfig> selectByConditionPlatformConfig(
|
||||
@Param("key") String key,
|
||||
@Param("platformKey") String platformKey,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
Long countsByPlatformConfig(
|
||||
@Param("key") String key);
|
||||
@Param("platformKey") String platformKey);
|
||||
|
||||
}
|
||||
@@ -31,35 +31,35 @@ public class PlatformConfigComponent implements ICommonQuery {
|
||||
|
||||
private List<?> getPlatformConfigList(Map<String, String> map)throws Exception {
|
||||
String search = map.get(Constants.SEARCH);
|
||||
String key = StringUtil.getInfo(search, "key");
|
||||
return platformConfigService.select(key, QueryUtils.offset(map), QueryUtils.rows(map));
|
||||
String platformKey = StringUtil.getInfo(search, "platformKey");
|
||||
return platformConfigService.select(platformKey, QueryUtils.offset(map), QueryUtils.rows(map));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long counts(Map<String, String> map)throws Exception {
|
||||
String search = map.get(Constants.SEARCH);
|
||||
String key = StringUtil.getInfo(search, "key");
|
||||
return platformConfigService.countPlatformConfig(key);
|
||||
String platformKey = StringUtil.getInfo(search, "platformKey");
|
||||
return platformConfigService.countPlatformConfig(platformKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(JSONObject obj, HttpServletRequest request)throws Exception {
|
||||
return platformConfigService.insertSystemConfig(obj, request);
|
||||
return platformConfigService.insertPlatformConfig(obj, request);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int update(JSONObject obj, HttpServletRequest request)throws Exception {
|
||||
return platformConfigService.updateSystemConfig(obj, request);
|
||||
return platformConfigService.updatePlatformConfig(obj, request);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delete(Long id, HttpServletRequest request)throws Exception {
|
||||
return platformConfigService.deleteSystemConfig(id, request);
|
||||
return platformConfigService.deletePlatformConfig(id, request);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBatch(String ids, HttpServletRequest request)throws Exception {
|
||||
return platformConfigService.batchDeleteSystemConfig(ids, request);
|
||||
return platformConfigService.batchDeletePlatformConfig(ids, request);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -48,20 +48,20 @@ public class PlatformConfigService {
|
||||
return list;
|
||||
}
|
||||
|
||||
public List<PlatformConfig> select(String key, int offset, int rows)throws Exception {
|
||||
public List<PlatformConfig> select(String platformKey, int offset, int rows)throws Exception {
|
||||
List<PlatformConfig> list=null;
|
||||
try{
|
||||
list=platformConfigMapperEx.selectByConditionPlatformConfig(key, offset, rows);
|
||||
list=platformConfigMapperEx.selectByConditionPlatformConfig(platformKey, offset, rows);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public Long countPlatformConfig(String key)throws Exception {
|
||||
public Long countPlatformConfig(String platformKey)throws Exception {
|
||||
Long result=null;
|
||||
try{
|
||||
result=platformConfigMapperEx.countsByPlatformConfig(key);
|
||||
result=platformConfigMapperEx.countsByPlatformConfig(platformKey);
|
||||
}catch(Exception e){
|
||||
JshException.readFail(logger, e);
|
||||
}
|
||||
@@ -69,7 +69,7 @@ public class PlatformConfigService {
|
||||
}
|
||||
|
||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||
public int insertSystemConfig(JSONObject obj, HttpServletRequest request) throws Exception{
|
||||
public int insertPlatformConfig(JSONObject obj, HttpServletRequest request) throws Exception{
|
||||
PlatformConfig platformConfig = JSONObject.parseObject(obj.toJSONString(), PlatformConfig.class);
|
||||
int result=0;
|
||||
try{
|
||||
@@ -81,7 +81,7 @@ public class PlatformConfigService {
|
||||
}
|
||||
|
||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||
public int updateSystemConfig(JSONObject obj, HttpServletRequest request) throws Exception{
|
||||
public int updatePlatformConfig(JSONObject obj, HttpServletRequest request) throws Exception{
|
||||
PlatformConfig platformConfig = JSONObject.parseObject(obj.toJSONString(), PlatformConfig.class);
|
||||
int result=0;
|
||||
try{
|
||||
@@ -93,7 +93,7 @@ public class PlatformConfigService {
|
||||
}
|
||||
|
||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||
public int deleteSystemConfig(Long id, HttpServletRequest request)throws Exception {
|
||||
public int deletePlatformConfig(Long id, HttpServletRequest request)throws Exception {
|
||||
int result=0;
|
||||
try{
|
||||
result=platformConfigMapper.deleteByPrimaryKey(id);
|
||||
@@ -104,7 +104,7 @@ public class PlatformConfigService {
|
||||
}
|
||||
|
||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||
public int batchDeleteSystemConfig(String ids, HttpServletRequest request)throws Exception {
|
||||
public int batchDeletePlatformConfig(String ids, HttpServletRequest request)throws Exception {
|
||||
List<Long> idList = StringUtil.strToLongList(ids);
|
||||
PlatformConfigExample example = new PlatformConfigExample();
|
||||
example.createCriteria().andIdIn(idList);
|
||||
|
||||
Reference in New Issue
Block a user