分销订单退款

This commit is contained in:
张松 2025-10-30 14:51:24 +08:00
parent d2eb98e8b7
commit e345589956
3 changed files with 11 additions and 5 deletions

View File

@ -17,6 +17,6 @@ import java.util.List;
*/
public interface MkDistributionFlowMapper extends BaseMapper<MkDistributionFlow> {
List<MkDistributionFlowVO> pageInfo(Long shopId, LocalDateTime startTime, LocalDateTime endTime, String status, String key, Long id, String type);
BigDecimal totalAmount(Long shopId, LocalDateTime startTime, LocalDateTime endTime, String status, String key, Long id, String type);
List<MkDistributionFlowVO> pageInfo(Long shopId, LocalDateTime startTime, LocalDateTime endTime, String status, String key, Long id, String type, Long userId);
BigDecimal totalAmount(Long shopId, LocalDateTime startTime, LocalDateTime endTime, String status, String key, Long id, String type, Long userId);
}

View File

@ -45,7 +45,7 @@ public class MkDistributionFlowServiceImpl extends ServiceImpl<MkDistributionFlo
@Override
public Map<String, Object> pageInfo(Long shopId, LocalDateTime startTime, LocalDateTime endTime, String key, String status, Long id) {
PageHelper.startPage(PageUtil.buildPageHelp());
List<MkDistributionFlowVO> list = mapper.pageInfo(shopId, startTime, endTime, status, key, id, null);
List<MkDistributionFlowVO> list = mapper.pageInfo(shopId, startTime, endTime, status, key, id, null, null);
Page<MkDistributionFlowVO> page = PageUtil.convert(new PageInfo<>(list));
Map<String, Object> map = BeanUtil.beanToMap(page);
map.put("successAmount", getOneAs(new QueryWrapper().eq(MkDistributionFlow::getShopId, shopId)
@ -66,11 +66,11 @@ public class MkDistributionFlowServiceImpl extends ServiceImpl<MkDistributionFlo
}
PageHelper.startPage(PageUtil.buildPageHelp());
List<MkDistributionFlowVO> list = mapper.pageInfo(shopId, StrUtil.isBlank(startTime) ? null : DateUtil.parseLocalDateTime(startTime),
StrUtil.isBlank(endTime) ? null : DateUtil.parseLocalDateTime(endTime), status,null, shopUserInfo == null ? null : shopUserInfo.getId(), null);
StrUtil.isBlank(endTime) ? null : DateUtil.parseLocalDateTime(endTime), status,null, shopUserInfo == null ? null : shopUserInfo.getId(), null, userId);
Page<MkDistributionFlowVO> page = PageUtil.convert(new PageInfo<>(list));
Map<String, Object> map = BeanUtil.beanToMap(page);
map.put("totalAmount", mapper.totalAmount(shopId, StrUtil.isBlank(startTime) ? null : DateUtil.parseLocalDateTime(startTime),
StrUtil.isBlank(endTime) ? null : DateUtil.parseLocalDateTime(endTime), status,null, shopUserInfo == null ? null : shopUserInfo.getId(), null));
StrUtil.isBlank(endTime) ? null : DateUtil.parseLocalDateTime(endTime), status,null, shopUserInfo == null ? null : shopUserInfo.getId(), null, userId));
return map;
}
}

View File

@ -35,6 +35,9 @@
<if test="id != null">
and d.id=#{id}
</if>
<if test="userId != null">
and d.user_id=#{userId}
</if>
<if test="type != null and type != ''">
and a.type=#{type}
</if>
@ -70,5 +73,8 @@
<if test="type != null and type != ''">
and a.type=#{type}
</if>
<if test="userId != null">
and d.user_id=#{userId}
</if>
</select>
</mapper>