111
This commit is contained in:
1 parent
40277ae7fb
commit
8aa9265874
4 files changed
+7
-7
No files matched your search
+1
-1
@@ -24,7 +24,7 @@ public interface RemoteMchService {
|
||||
|
||||
@NoToken
|
||||
@GetMapping("/mch-manage/get-by-dept-id")
|
||||
R<MchManageVo> getByDeptId(@RequestParam Long deptId, @RequestParam(required = false) MerchantTypeEnum type);
|
||||
R<MchManageVo> getByDeptId(@RequestParam Long deptId, MerchantTypeEnum type);
|
||||
|
||||
@NoToken
|
||||
@GetMapping("/mch-manage/get-by-dept-ids")
|
||||
|
||||
+2
-2
@@ -61,8 +61,8 @@ public class MchManageController {
|
||||
|
||||
@Inner
|
||||
@GetMapping("/get-by-dept-id")
|
||||
public R<List<MchManageVo>> getByDeptId(@RequestParam Long deptId, @RequestParam(required = false) MerchantTypeEnum type) {
|
||||
List<MchManageVo> mchManage = mchManageService.getByDeptId(deptId, type);
|
||||
public R<MchManageVo> getByDeptId(@RequestParam Long deptId, MerchantTypeEnum type) {
|
||||
MchManageVo mchManage = mchManageService.getByDeptId(deptId, type);
|
||||
if (ObjectUtil.isEmpty(mchManage)) return R.failed("商户不存在");
|
||||
return R.ok(mchManage);
|
||||
}
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ public interface MchManageService extends IService<MchManageEntity> {
|
||||
|
||||
List<MchManageVo> list(MchManageDto dto);
|
||||
|
||||
List<MchManageVo> getByDeptId(Long deptId, MerchantTypeEnum type);
|
||||
MchManageVo getByDeptId(Long deptId, MerchantTypeEnum type);
|
||||
|
||||
MchManageVo getFirstMch(List<Long> deptIds);
|
||||
|
||||
|
||||
+3
-3
@@ -192,10 +192,10 @@ public class MchManageServiceImpl extends ServiceImpl<MchManageMapper, MchManage
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MchManageVo> getByDeptId(Long deptId, MerchantTypeEnum type) {
|
||||
List<MchManageEntity> mchManage = baseMapper.selectList(new LambdaQueryWrapper<MchManageEntity>()
|
||||
public MchManageVo getByDeptId(Long deptId, MerchantTypeEnum type) {
|
||||
MchManageEntity mchManage = baseMapper.selectOne(new LambdaQueryWrapper<MchManageEntity>()
|
||||
.eq(MchManageEntity::getDeptId, deptId)
|
||||
.eq(ObjectUtil.isNotEmpty(type), MchManageEntity::getTypes, type)
|
||||
.eq(MchManageEntity::getTypes, type)
|
||||
);
|
||||
return BeanUtils.toBean(mchManage, MchManageVo.class);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user