Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
@@ -3,16 +3,13 @@ package com.czg.controller.admin;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.czg.annotation.SaAdminCheckPermission;
|
||||
import com.czg.annotation.SaCheckMainShop;
|
||||
import com.czg.market.dto.MkDistributionConfigDTO;
|
||||
import com.czg.market.service.*;
|
||||
import com.czg.market.vo.*;
|
||||
import com.czg.market.vo.MkDistributionConfigVO;
|
||||
import com.czg.order.dto.MkDistributionPayDTO;
|
||||
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.*;
|
||||
@@ -38,8 +35,6 @@ public class DistributionController {
|
||||
private MkDistributionFlowService distributionFlowService;
|
||||
@Resource
|
||||
private MkDistributionWithdrawFlowService withdrawFlowService;
|
||||
@Resource
|
||||
private AppWxServiceImpl appWxService;
|
||||
|
||||
/**
|
||||
* 配置信息详情
|
||||
|
||||
@@ -13,7 +13,6 @@ import com.czg.market.vo.InviteUserVO;
|
||||
import com.czg.market.vo.MkDistributionConfigVO;
|
||||
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;
|
||||
@@ -35,8 +34,6 @@ public class UDistributionController {
|
||||
@Resource
|
||||
private MkDistributionUserService distributionUserService;
|
||||
@Resource
|
||||
private AppWxServiceImpl appWxService;
|
||||
@Resource
|
||||
private MkDistributionWithdrawFlowService withdrawFlowService;
|
||||
@Resource
|
||||
private MkDistributionFlowService distributionFlowService;
|
||||
|
||||
@@ -72,7 +72,7 @@ public class UPpPackageController {
|
||||
*/
|
||||
@GetMapping("/order")
|
||||
public CzgResult<Page<PpOrderListVO>> getMyOrderList(GbOrderQueryParam reqVo) {
|
||||
return CzgResult.success(ppPackageOrderService.queryOrderList(null, StpKit.USER.getLoginIdAsLong(), reqVo));
|
||||
return CzgResult.success(ppPackageOrderService.queryOrderList(reqVo.getShopId(), StpKit.USER.getLoginIdAsLong(), reqVo));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -43,7 +43,7 @@ public class ConsStockFlowController {
|
||||
*/
|
||||
@PostMapping("/ocr")
|
||||
public CzgResult<Integer> ocr(@RequestBody OcrDTO ocrDTO) throws Exception {
|
||||
URI uri = new URI("https://example.com/path");
|
||||
URI uri = new URI(ocrDTO.getUrl());
|
||||
URL url = uri.toURL();
|
||||
InputStream stream = URLUtil.getStream(url);
|
||||
return CzgResult.success(consStockFlowService.ocr(FileUtil.getName(ocrDTO.getUrl()), stream));
|
||||
|
||||
@@ -108,6 +108,7 @@ public class PpPackageOrderServiceImpl extends ServiceImpl<PpPackageOrderMapper,
|
||||
}
|
||||
|
||||
PpPackage aPackage = ppPackageService.getById(order.getPackageId());
|
||||
aPackage.setShopId(order.getShopId());
|
||||
orderDto.setPackageInfo(ppPackageService.convertPackageToVo(aPackage));
|
||||
|
||||
return orderDto;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.czg.service.market.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.czg.account.entity.ShopConfig;
|
||||
import com.czg.account.entity.ShopInfo;
|
||||
@@ -163,10 +164,16 @@ public class PpPackageServiceImpl extends ServiceImpl<PpPackageMapper, PpPackage
|
||||
Long mainShopId = shopInfoService.getMainIdByShopId(shopId);
|
||||
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
if (!isAdmin) {
|
||||
queryWrapper.eq(PpPackage::getOnlineStatus, SystemConstants.OneZero.ONE);
|
||||
}
|
||||
queryWrapper.eq(PpPackage::getIsDel, SystemConstants.OneZero.ZERO)
|
||||
.eq(PpPackage::getOnlineStatus, reqVo.getOnlineStatus())
|
||||
.like(PpPackage::getPackageName, reqVo.getPackageName())
|
||||
.orderBy(PpPackage::getCreateTime).desc();
|
||||
.eq(PpPackage::getOnlineStatus, reqVo.getOnlineStatus());
|
||||
|
||||
if (StrUtil.isNotBlank(reqVo.getPackageName())) {
|
||||
queryWrapper.like(PpPackage::getPackageName, reqVo.getPackageName());
|
||||
}
|
||||
queryWrapper.orderBy(PpPackage::getCreateTime).desc();
|
||||
|
||||
queryWrapper.and(q -> {
|
||||
q.eq(PpPackage::getShopId, shopId).or(q1 -> {
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
left join tb_user_info u on o.user_id = u.id
|
||||
where 1=1
|
||||
<if test="shopId != null">
|
||||
and o.shop_id = #{shopId} and o.status != 'ing'
|
||||
and o.shop_id = #{shopId}
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
and o.user_id = #{userId}
|
||||
and o.user_id = #{userId} and o.status != 'ing'
|
||||
</if>
|
||||
<if test="param.orderNo != null">
|
||||
and o.order_no = #{param.orderNo}
|
||||
|
||||
Reference in New Issue
Block a user