|
|
@@ -528,15 +528,13 @@ public class ProductLaunchController extends BladeController {
|
|
|
@ApiOperationSupport(order = 12)
|
|
|
@ApiOperation(value = "小程序配件批发产品上架", notes = "传入productLaunch")
|
|
|
public R<IPage<PjProductLaunch>> appList(PjProductLaunch productLaunch, Query query) {
|
|
|
- PjCorpsDesc corpsDesc = null;
|
|
|
//根据当前登录人获得客户
|
|
|
PjCorpsAttn corpsAttn = corpsAttnService.getAttn(AuthUtil.getUserId());
|
|
|
- if (ObjectUtil.isNotEmpty(corpsAttn)) {
|
|
|
- corpsDesc = corpsDescService.getCorpsDesc(corpsAttn.getPid());
|
|
|
- if (ObjectUtil.isEmpty(corpsDesc)) {
|
|
|
- throw new RuntimeException("未查到用户信息");
|
|
|
- }
|
|
|
- } else {
|
|
|
+ if (ObjectUtil.isEmpty(corpsAttn)) {
|
|
|
+ throw new RuntimeException("未查到用户信息");
|
|
|
+ }
|
|
|
+ PjCorpsDesc corpsDesc = corpsDescService.getCorpsDesc(corpsAttn.getPid());
|
|
|
+ if (ObjectUtil.isEmpty(corpsDesc)) {
|
|
|
throw new RuntimeException("未查到用户信息");
|
|
|
}
|
|
|
LambdaQueryWrapper<PjProductLaunch> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
@@ -628,6 +626,7 @@ public class ProductLaunchController extends BladeController {
|
|
|
if (ObjectUtils.isNull(status) || "0".equals(status)) {
|
|
|
lambdaQueryWrapper.gt(PjProductLaunch::getInventory, 0);
|
|
|
}
|
|
|
+ lambdaQueryWrapper.orderByAsc(PjProductLaunch::getBillType);
|
|
|
lambdaQueryWrapper.orderByAsc(PjProductLaunch::getCnameInt);
|
|
|
lambdaQueryWrapper.orderByDesc(PjProductLaunch::getInventory);
|
|
|
IPage<PjProductLaunch> pages = productLaunchService.page(Condition.getPage(query), lambdaQueryWrapper);
|