提交 | 用户 | 时间
|
c7f709
|
1 |
package com.iailab.module.data.channel.http.service.impl; |
L |
2 |
|
|
3 |
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
4 |
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
5 |
import com.iailab.framework.common.pojo.PageResult; |
|
6 |
import com.iailab.module.data.channel.http.dao.HttpTagDao; |
|
7 |
import com.iailab.module.data.channel.http.entity.HttpApiEntity; |
|
8 |
import com.iailab.module.data.channel.http.entity.HttpTagEntity; |
|
9 |
import com.iailab.module.data.channel.http.service.HttpApiService; |
|
10 |
import com.iailab.module.data.channel.http.service.HttpTagService; |
|
11 |
import com.iailab.module.data.channel.http.vo.HttpTagPageReqVO; |
|
12 |
import lombok.extern.slf4j.Slf4j; |
|
13 |
import org.springframework.stereotype.Service; |
|
14 |
|
|
15 |
import javax.annotation.Resource; |
|
16 |
import java.util.List; |
|
17 |
import java.util.Map; |
|
18 |
|
|
19 |
@Slf4j |
|
20 |
@Service |
|
21 |
public class HttpTagServiceImpl extends ServiceImpl<HttpTagDao, HttpTagEntity> implements HttpTagService { |
|
22 |
|
|
23 |
@Resource |
|
24 |
private HttpApiService httpApiService; |
|
25 |
|
|
26 |
@Resource |
|
27 |
private HttpTagDao httpTagDao; |
|
28 |
|
|
29 |
@Override |
|
30 |
public PageResult<HttpTagEntity> queryPage(HttpTagPageReqVO reqVO) { |
|
31 |
return httpTagDao.selectPage(reqVO); |
|
32 |
} |
|
33 |
|
|
34 |
@Override |
|
35 |
public HttpTagEntity info(String id) { |
|
36 |
return httpTagDao.selectById(id); |
|
37 |
} |
|
38 |
|
|
39 |
@Override |
|
40 |
public void add(HttpTagEntity httpTagEntity) { |
|
41 |
httpTagDao.insert(httpTagEntity); |
|
42 |
} |
|
43 |
|
|
44 |
@Override |
|
45 |
public void update(HttpTagEntity httpTagEntity) { |
|
46 |
httpTagDao.updateById(httpTagEntity); |
|
47 |
} |
|
48 |
|
|
49 |
@Override |
|
50 |
public void delete(String id) { |
|
51 |
httpTagDao.deleteById(id); |
|
52 |
} |
|
53 |
|
|
54 |
@Override |
|
55 |
public List<HttpTagEntity> list() { |
|
56 |
return httpTagDao.selectList(new QueryWrapper<>()); |
|
57 |
} |
|
58 |
|
|
59 |
|
|
60 |
@Override |
|
61 |
public List<HttpTagEntity> selectList(Map<String, Object> params) { |
|
62 |
String httpId = (String) params.get("httpId"); |
|
63 |
HttpApiEntity httpApiEntity = httpApiService.info(httpId); |
|
64 |
return httpTagDao.selectList(new QueryWrapper<HttpTagEntity>() |
|
65 |
.eq("http_api_code", httpApiEntity.getCode()) |
|
66 |
.orderByDesc("create_time")); |
|
67 |
} |
|
68 |
|
|
69 |
@Override |
86145e
|
70 |
public List<HttpTagEntity> getApiId(String apiId) { |
c7f709
|
71 |
return httpTagDao.selectList(new QueryWrapper<HttpTagEntity>() |
86145e
|
72 |
.eq("api_id", apiId) |
c7f709
|
73 |
.orderByDesc("create_time")); |
L |
74 |
} |
|
75 |
|
|
76 |
} |