增加一个根据部门id查询商户信息的接口
This commit is contained in:
parent
b38b66a217
commit
8af6287c39
@ -48,8 +48,7 @@ public class AppMerchantController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('winery:merchant:list')")
|
@PreAuthorize("@ss.hasPermi('winery:merchant:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(AppMerchant appMerchant)
|
public TableDataInfo list(AppMerchant appMerchant) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
LambdaQueryWrapper<AppMerchant> lqw = Wrappers.lambdaQuery(appMerchant);
|
LambdaQueryWrapper<AppMerchant> lqw = Wrappers.lambdaQuery(appMerchant);
|
||||||
if (StringUtils.isNotBlank(appMerchant.getMchName())) {
|
if (StringUtils.isNotBlank(appMerchant.getMchName())) {
|
||||||
@ -91,6 +90,17 @@ public class AppMerchantController extends BaseController {
|
|||||||
return AjaxResult.success(iAppMerchantService.getById(id));
|
return AjaxResult.success(iAppMerchantService.getById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取商户详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('winery:merchant:query')")
|
||||||
|
@GetMapping(value = "dept/{id}")
|
||||||
|
public AjaxResult getInfoByDeptId(@PathVariable("deptId") String deptId) {
|
||||||
|
|
||||||
|
return AjaxResult.success(iAppMerchantService.getOne(new LambdaQueryWrapper<AppMerchant>().eq(AppMerchant::getDeptId, deptId)));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增商户
|
* 新增商户
|
||||||
*/
|
*/
|
||||||
|
@ -36,6 +36,11 @@ private static final long serialVersionUID=1L;
|
|||||||
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门id
|
||||||
|
*/
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
/** 商户名称 */
|
/** 商户名称 */
|
||||||
@Excel(name = "商户名称")
|
@Excel(name = "商户名称")
|
||||||
private String mchName;
|
private String mchName;
|
||||||
|
@ -19,6 +19,12 @@ class MerchanApis {
|
|||||||
url: baseUrl + 'winery/merchant/' + id
|
url: baseUrl + 'winery/merchant/' + id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getMerchantInfoByDeptId(deptId) {
|
||||||
|
return request.get({
|
||||||
|
url: baseUrl + 'winery/merchant/dept/' + deptId
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default new MerchanApis()
|
export default new MerchanApis()
|
||||||
|
@ -116,11 +116,24 @@ wepy.page({
|
|||||||
merchanApis.getMerchantInfo(id).then(r => {
|
merchanApis.getMerchantInfo(id).then(r => {
|
||||||
this.wineryItem = r.data
|
this.wineryItem = r.data
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
async initByDept(deptId) {
|
||||||
|
merchanApis.getMerchantInfoByDeptId(deptId).then(r => {
|
||||||
|
this.wineryItem = r.data
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
|
||||||
|
if (options.id) {
|
||||||
this.init(options.id)
|
this.init(options.id)
|
||||||
|
} else if (options.deptId) {
|
||||||
|
this.initByDept(options.deptId)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user