Commit e5a6830d by wangnb

manager服务字典数据代码调整--think.wang

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@30406 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent ca93109b
package com.glsx.manager.service; package com.glsx.manager.service;
import java.util.List;
import com.glsx.common.utils.Page; import com.glsx.common.utils.Page;
import com.glsx.manager.pojo.dictionary.DictionaryData; import com.glsx.manager.pojo.dictionary.DictionaryData;
import java.util.List;
/** /**
* *
* @Title DictionaryDataService.java * @Title DictionaryDataService.java
* @Package com.glsx.manager.service * @Package com.glsx.manager.service
* @Description TODO 字典数据service * @Description 字典数据service
* @author zhanghj * @author zhanghj
* @date 2019年1月22日 下午5:47:20 * @date 2019年1月22日 下午5:47:20
* @version 1.0.0 * @version 1.0.0
...@@ -20,9 +20,8 @@ public interface DictionaryDataService { ...@@ -20,9 +20,8 @@ public interface DictionaryDataService {
* *
* @author zhanghj * @author zhanghj
* @Title: save * @Title: save
* @Description: TODO 保存字典类型 * @Description: 保存字典类型
* @param dictionaryData * @param dictionaryData
* @param a
* @return * @return
* int * int
* *
...@@ -33,7 +32,7 @@ public interface DictionaryDataService { ...@@ -33,7 +32,7 @@ public interface DictionaryDataService {
* *
* @author zhanghj * @author zhanghj
* @Title: update * @Title: update
* @Description: TODO 更新字典类型 * @Description: 更新字典类型
* @param dictionaryData * @param dictionaryData
* @return * @return
* int * int
...@@ -45,18 +44,18 @@ public interface DictionaryDataService { ...@@ -45,18 +44,18 @@ public interface DictionaryDataService {
* *
* @author zhanghj * @author zhanghj
* @Title: delete * @Title: delete
* @Description: TODO 通过id删除字典类型 * @Description: 通过id删除字典类型
* @param dictionaryDatas * @param dataList
* void * void
* *
*/ */
void delete(List<DictionaryData> dictionaryDatas); void delete(List<DictionaryData> dataList);
/** /**
* *
* @author zhanghj * @author zhanghj
* @Title: get 通过id获取字典类型 * @Title: get 通过id获取字典类型
* @Description: TODO * @Description:
* @param dictionaryData * @param dictionaryData
* @return * @return
* DictionaryData * DictionaryData
...@@ -68,7 +67,7 @@ public interface DictionaryDataService { ...@@ -68,7 +67,7 @@ public interface DictionaryDataService {
* *
* @author zhanghj * @author zhanghj
* @Title: list * @Title: list
* @Description: TODO 分页获取列表 * @Description: 分页获取列表
* @param dictionaryData * @param dictionaryData
* @param page * @param page
* @return * @return
...@@ -81,7 +80,7 @@ public interface DictionaryDataService { ...@@ -81,7 +80,7 @@ public interface DictionaryDataService {
* *
* @author zhanghj * @author zhanghj
* @Title: deleteByDictType * @Title: deleteByDictType
* @Description: TODO * @Description:
* @param dictionaryData * @param dictionaryData
* @return * @return
* int * int
......
package com.glsx.manager.service.impl; package com.glsx.manager.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.pagehelper.page.PageMethod; import com.github.pagehelper.page.PageMethod;
import com.glsx.common.utils.Page; import com.glsx.common.utils.Page;
import com.glsx.manager.mapper.DictionaryDataMapper; import com.glsx.manager.mapper.DictionaryDataMapper;
import com.glsx.manager.pojo.dictionary.DictionaryData; import com.glsx.manager.pojo.dictionary.DictionaryData;
import com.glsx.manager.service.DictionaryDataService; import com.glsx.manager.service.DictionaryDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* *
* @Title DictionaryDataServiceImpl.java * @Title DictionaryDataServiceImpl.java
* @Package com.glsx.manager.service.impl * @Package com.glsx.manager.service.impl
* @Description TODO * @Description 系统字典类service
* @author zhanghj * @author zhanghj
* @date 2019年1月3日 下午7:58:39 * @date 2019年1月3日 下午7:58:39
* @version 1.0.0 * @version 1.0.0
...@@ -23,47 +22,41 @@ import com.glsx.manager.service.DictionaryDataService; ...@@ -23,47 +22,41 @@ import com.glsx.manager.service.DictionaryDataService;
public class DictionaryDataServiceImpl implements DictionaryDataService { public class DictionaryDataServiceImpl implements DictionaryDataService {
@Autowired @Autowired
private DictionaryDataMapper dictionaryDataDao; private DictionaryDataMapper dataMapper;
@Override @Override
public int save(DictionaryData dictionaryData) { public int save(DictionaryData dictionaryData) {
// TODO Auto-generated method stub return dataMapper.save(dictionaryData);
return dictionaryDataDao.save(dictionaryData);
} }
@Override @Override
public int update(DictionaryData dictionaryData) { public int update(DictionaryData dictionaryData) {
// TODO Auto-generated method stub return dataMapper.update(dictionaryData);
return dictionaryDataDao.update(dictionaryData);
} }
@Override @Override
public void delete(List<DictionaryData> dictionaryDatas) { public void delete(List<DictionaryData> dataList) {
// TODO Auto-generated method stub for (DictionaryData dictionaryData : dataList) {
for (DictionaryData dictionaryData : dictionaryDatas) { dataMapper.delete(dictionaryData);
dictionaryDataDao.delete(dictionaryData);
} }
} }
@Override @Override
public DictionaryData get(DictionaryData dictionaryData) { public DictionaryData get(DictionaryData dictionaryData) {
// TODO Auto-generated method stub return dataMapper.get(dictionaryData);
return dictionaryDataDao.get(dictionaryData);
} }
@Override @Override
public List<DictionaryData> list(DictionaryData dictionaryData, Page page) { public List<DictionaryData> list(DictionaryData dictionaryData, Page page) {
// TODO Auto-generated method stub
if (page != null) { if (page != null) {
PageMethod.startPage(page.getPageIndex(), page.getPageSize(), true); PageMethod.startPage(page.getPageIndex(), page.getPageSize(), true);
} }
return dictionaryDataDao.list(dictionaryData); return dataMapper.list(dictionaryData);
} }
@Override @Override
public int deleteByDictType(DictionaryData dictionaryData) { public int deleteByDictType(DictionaryData dictionaryData) {
// TODO Auto-generated method stub return dataMapper.deleteByDictType(dictionaryData);
return dictionaryDataDao.deleteByDictType(dictionaryData);
} }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!