feat(可回溯): 多租户
增加租户查询列表服务
This commit is contained in:
@@ -22,6 +22,8 @@ public class RecallOrderDTO extends PageDTO implements Serializable {
|
|||||||
/** 主键 */
|
/** 主键 */
|
||||||
@ApiModelProperty(value = "主键")
|
@ApiModelProperty(value = "主键")
|
||||||
private String id;
|
private String id;
|
||||||
|
@ApiModelProperty(value = "租户ID")
|
||||||
|
private String tenantId;
|
||||||
/** 产品编码 */
|
/** 产品编码 */
|
||||||
@ApiModelProperty(value = "产品编码")
|
@ApiModelProperty(value = "产品编码")
|
||||||
private String productCode;
|
private String productCode;
|
||||||
|
|||||||
@@ -41,6 +41,9 @@
|
|||||||
<if test="recallOrderDTO.id != null and recallOrderDTO.id != '' ">
|
<if test="recallOrderDTO.id != null and recallOrderDTO.id != '' ">
|
||||||
and t.id = #{recallOrderDTO.id}
|
and t.id = #{recallOrderDTO.id}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="recallOrderDTO.tenantId != null and recallOrderDTO.tenantId != '' ">
|
||||||
|
and t.tenant_id = #{recallOrderDTO.tenantId}
|
||||||
|
</if>
|
||||||
<if test="recallOrderDTO.productCode != null and recallOrderDTO.productCode != '' ">
|
<if test="recallOrderDTO.productCode != null and recallOrderDTO.productCode != '' ">
|
||||||
and t.product_code = #{recallOrderDTO.productCode}
|
and t.product_code = #{recallOrderDTO.productCode}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
+11
@@ -1,6 +1,7 @@
|
|||||||
package com.wabestway.recall.trace.controller;
|
package com.wabestway.recall.trace.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.wabestway.recall.util.HeaderDataUtil;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@@ -31,9 +32,19 @@ public class RecallOrderController {
|
|||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@ApiOperation(value = "分页列表查询", notes = "条件分页查询列表", httpMethod = "POST")
|
@ApiOperation(value = "分页列表查询", notes = "条件分页查询列表", httpMethod = "POST")
|
||||||
public ResObj<Paging<RecallOrderVO>> list(@RequestBody RecallOrderDTO paramRequest) {
|
public ResObj<Paging<RecallOrderVO>> list(@RequestBody RecallOrderDTO paramRequest) {
|
||||||
|
paramRequest.setTenantId(null);
|
||||||
return recallOrderApiService.list(paramRequest);
|
return recallOrderApiService.list(paramRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/tenant/list")
|
||||||
|
@ApiOperation(value = "租户分页列表查询", notes = "条件分页查询列表", httpMethod = "POST")
|
||||||
|
public ResObj<Paging<RecallOrderVO>> tenantList(@RequestBody RecallOrderDTO paramRequest) {
|
||||||
|
paramRequest.setTenantId(HeaderDataUtil.getTenantId());
|
||||||
|
return recallOrderApiService.list(paramRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 信息
|
* 信息
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user