|
|
@ -24,10 +24,13 @@ import com.elink.esua.epdc.commons.tools.page.PageData; |
|
|
|
import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; |
|
|
|
import com.elink.esua.epdc.commons.tools.constant.FieldConstant; |
|
|
|
import com.elink.esua.epdc.dao.PointsIntegralAdjustmentCheckDao; |
|
|
|
import com.elink.esua.epdc.dto.EpdcAdjustUserPointsDTO; |
|
|
|
import com.elink.esua.epdc.dto.PointsIntegralAdjustmentCheckDTO; |
|
|
|
import com.elink.esua.epdc.entity.PointsIntegralAdjustmentCheckEntity; |
|
|
|
import com.elink.esua.epdc.phrases.ActPhraseDTO; |
|
|
|
import com.elink.esua.epdc.redis.PointsIntegralAdjustmentCheckRedis; |
|
|
|
import com.elink.esua.epdc.service.PointsIntegralAdjustmentCheckService; |
|
|
|
import com.elink.esua.epdc.service.PointsLogsService; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
@ -38,7 +41,7 @@ import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
/** |
|
|
|
* 积分调整审核表 |
|
|
|
* 积分调整审核表 |
|
|
|
* |
|
|
|
* @author elink elink@elink-cn.com |
|
|
|
* @since v1.0.0 2022-03-31 |
|
|
@ -48,6 +51,8 @@ public class PointsIntegralAdjustmentCheckServiceImpl extends BaseServiceImpl<Po |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private PointsIntegralAdjustmentCheckRedis pointsIntegralAdjustmentCheckRedis; |
|
|
|
@Autowired |
|
|
|
private PointsLogsService pointsLogsService; |
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<PointsIntegralAdjustmentCheckDTO> page(Map<String, Object> params) { |
|
|
@ -58,6 +63,18 @@ public class PointsIntegralAdjustmentCheckServiceImpl extends BaseServiceImpl<Po |
|
|
|
return getPageData(page, PointsIntegralAdjustmentCheckDTO.class); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 条件查询 |
|
|
|
* @param params |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public PageData<PointsIntegralAdjustmentCheckDTO> getPhrasePage(Map<String, Object> params) { |
|
|
|
IPage<PointsIntegralAdjustmentCheckDTO> page = getPage(params); |
|
|
|
List<PointsIntegralAdjustmentCheckDTO> list = baseDao.getPhrasePage(params); |
|
|
|
return new PageData<>(list, page.getTotal()); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<PointsIntegralAdjustmentCheckDTO> list(Map<String, Object> params) { |
|
|
|
List<PointsIntegralAdjustmentCheckEntity> entityList = baseDao.selectList(getWrapper(params)); |
|
|
@ -92,6 +109,27 @@ public class PointsIntegralAdjustmentCheckServiceImpl extends BaseServiceImpl<Po |
|
|
|
public void update(PointsIntegralAdjustmentCheckDTO dto) { |
|
|
|
PointsIntegralAdjustmentCheckEntity entity = ConvertUtils.sourceToTarget(dto, PointsIntegralAdjustmentCheckEntity.class); |
|
|
|
updateById(entity); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void updateCheck(PointsIntegralAdjustmentCheckDTO dto) { |
|
|
|
PointsIntegralAdjustmentCheckEntity entity = ConvertUtils.sourceToTarget(dto, PointsIntegralAdjustmentCheckEntity.class); |
|
|
|
updateById(entity); |
|
|
|
|
|
|
|
// 2:通过
|
|
|
|
if(dto.getState() == 2){ |
|
|
|
// 进行积分更改操作
|
|
|
|
PointsIntegralAdjustmentCheckEntity checkEntity = baseDao.selectById(dto.getId()); |
|
|
|
EpdcAdjustUserPointsDTO pointsDTO = ConvertUtils.sourceToTarget(checkEntity, EpdcAdjustUserPointsDTO.class); |
|
|
|
// 为配合所调用的接口,进行的特殊处理
|
|
|
|
pointsDTO.setId(checkEntity.getUserId()); |
|
|
|
pointsLogsService.confirmUserAdjustPoint(pointsDTO); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
@ -101,4 +139,4 @@ public class PointsIntegralAdjustmentCheckServiceImpl extends BaseServiceImpl<Po |
|
|
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|