商家余额记录接口
This commit is contained in:
parent
fc7ebf5922
commit
5f78e3e0c2
|
|
@ -12,6 +12,7 @@ import com.czg.resp.CzgResult;
|
|||
import com.czg.sa.StpKit;
|
||||
import com.czg.service.market.service.impl.AppWxServiceImpl;
|
||||
import com.czg.utils.AssertUtil;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
|
@ -81,8 +82,10 @@ public class DistributionController {
|
|||
* @param key 搜索
|
||||
*/
|
||||
@GetMapping("/flow")
|
||||
public CzgResult<Map<String, Object>> flow(@RequestParam(required = false) Long shopId, @RequestParam(required = false) String type, @RequestParam(required = false) String key) {
|
||||
return CzgResult.success(distributionAmountFlowService.pageInfo(StpKit.USER.isAdmin() ? shopId : StpKit.USER.getShopId(), type, key));
|
||||
public CzgResult<Map<String, Object>> flow(@RequestParam(required = false) Long shopId, @RequestParam(required = false) String type,
|
||||
@RequestParam(required = false) String key,@RequestParam(required = false) String startTime, @RequestParam(required = false) String endTime) {
|
||||
return CzgResult.success(distributionAmountFlowService.pageInfo(StpKit.USER.isAdmin() ? shopId : StpKit.USER.getShopId(), type, key,
|
||||
StrUtil.isBlank(startTime) ? null : DateUtil.parseLocalDateTime(startTime), StrUtil.isBlank(endTime) ? null : DateUtil.parseLocalDateTime(endTime)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -142,4 +145,5 @@ public class DistributionController {
|
|||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import java.util.Map;
|
|||
*/
|
||||
public interface MkDistributionAmountFlowService extends IService<MkDistributionAmountFlow> {
|
||||
|
||||
Map<String, Object> pageInfo(Long shopId, String type, String key);
|
||||
Map<String, Object> pageInfo(Long shopId, String type, String key, LocalDateTime startTime, LocalDateTime endTime);
|
||||
|
||||
Map<String, Object> openPageInfo(Long shopId, LocalDateTime startTime, LocalDateTime endTime, String key);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,12 +30,14 @@ import java.util.Map;
|
|||
public class MkDistributionAmountFlowServiceImpl extends ServiceImpl<MkDistributionAmountFlowMapper, MkDistributionAmountFlow> implements MkDistributionAmountFlowService{
|
||||
|
||||
@Override
|
||||
public Map<String, Object> pageInfo(Long shopId, String type, String key) {
|
||||
public Map<String, Object> pageInfo(Long shopId, String type, String key, LocalDateTime startTime, LocalDateTime endTime) {
|
||||
QueryWrapper queryWrapper = new MyQueryWrapper()
|
||||
.selectAll(MkDistributionAmountFlow.class)
|
||||
.leftJoin(OrderInfo.class).on(OrderInfo::getId, MkDistributionAmountFlow::getSourceId)
|
||||
.leftJoin(ShopUser.class).on(ShopUser::getId, OrderInfo::getUserId)
|
||||
.eq(MkDistributionAmountFlow::getShopId, shopId)
|
||||
.le(MkDistributionAmountFlow::getCreateTime, endTime)
|
||||
.ge(MkDistributionAmountFlow::getCreateTime, startTime)
|
||||
.select(OrderInfo::getOrderNo);
|
||||
if (StrUtil.isNotBlank(type)) {
|
||||
queryWrapper.eq(MkDistributionAmountFlow::getType, type);
|
||||
|
|
|
|||
Loading…
Reference in New Issue