|
|
@ -38,7 +38,7 @@ import java.util.List; |
|
|
import java.util.Map; |
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 积分商品表 |
|
|
* 积分商品表 |
|
|
* |
|
|
* |
|
|
* @author elink elink@elink-cn.com |
|
|
* @author elink elink@elink-cn.com |
|
|
* @since v1.0.0 2021-09-23 |
|
|
* @since v1.0.0 2021-09-23 |
|
|
@ -58,6 +58,18 @@ public class AcitveProductInfoServiceImpl extends BaseServiceImpl<AcitveProductI |
|
|
return getPageData(page, AcitveProductInfoDTO.class); |
|
|
return getPageData(page, AcitveProductInfoDTO.class); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 条件查询 |
|
|
|
|
|
* @param params |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
@Override |
|
|
|
|
|
public PageData<AcitveProductInfoDTO> getPhrasePage(Map<String, Object> params) { |
|
|
|
|
|
IPage<AcitveProductInfoDTO> page = getPage(params); |
|
|
|
|
|
List<AcitveProductInfoDTO> list = baseDao.getPhrasePage(params); |
|
|
|
|
|
return new PageData<>(list, page.getTotal()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public List<AcitveProductInfoDTO> list(Map<String, Object> params) { |
|
|
public List<AcitveProductInfoDTO> list(Map<String, Object> params) { |
|
|
List<AcitveProductInfoEntity> entityList = baseDao.selectList(getWrapper(params)); |
|
|
List<AcitveProductInfoEntity> entityList = baseDao.selectList(getWrapper(params)); |
|
|
@ -77,7 +89,11 @@ public class AcitveProductInfoServiceImpl extends BaseServiceImpl<AcitveProductI |
|
|
@Override |
|
|
@Override |
|
|
public AcitveProductInfoDTO get(String id) { |
|
|
public AcitveProductInfoDTO get(String id) { |
|
|
AcitveProductInfoEntity entity = baseDao.selectById(id); |
|
|
AcitveProductInfoEntity entity = baseDao.selectById(id); |
|
|
return ConvertUtils.sourceToTarget(entity, AcitveProductInfoDTO.class); |
|
|
AcitveProductInfoDTO resultDto = ConvertUtils.sourceToTarget(entity, AcitveProductInfoDTO.class); |
|
|
|
|
|
String allDeptIds = resultDto.getAllDeptIds(); |
|
|
|
|
|
allDeptIds = allDeptIds.replace("0,",""); |
|
|
|
|
|
resultDto.setDeptIdsArr(allDeptIds.split(",")); |
|
|
|
|
|
return resultDto; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
@ -85,6 +101,11 @@ public class AcitveProductInfoServiceImpl extends BaseServiceImpl<AcitveProductI |
|
|
public void save(AcitveProductInfoDTO dto) { |
|
|
public void save(AcitveProductInfoDTO dto) { |
|
|
AcitveProductInfoEntity entity = ConvertUtils.sourceToTarget(dto, AcitveProductInfoEntity.class); |
|
|
AcitveProductInfoEntity entity = ConvertUtils.sourceToTarget(dto, AcitveProductInfoEntity.class); |
|
|
insert(entity); |
|
|
insert(entity); |
|
|
|
|
|
// 添加权限表数据
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
@ -92,6 +113,11 @@ public class AcitveProductInfoServiceImpl extends BaseServiceImpl<AcitveProductI |
|
|
public void update(AcitveProductInfoDTO dto) { |
|
|
public void update(AcitveProductInfoDTO dto) { |
|
|
AcitveProductInfoEntity entity = ConvertUtils.sourceToTarget(dto, AcitveProductInfoEntity.class); |
|
|
AcitveProductInfoEntity entity = ConvertUtils.sourceToTarget(dto, AcitveProductInfoEntity.class); |
|
|
updateById(entity); |
|
|
updateById(entity); |
|
|
|
|
|
// 添加权限表数据
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
@ -101,4 +127,4 @@ public class AcitveProductInfoServiceImpl extends BaseServiceImpl<AcitveProductI |
|
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|