提交 | 用户 | 时间
|
449017
|
1 |
package com.iailab.module.model.mpk.service.impl; |
D |
2 |
|
|
3 |
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
4 |
import com.iailab.framework.common.service.impl.BaseServiceImpl; |
|
5 |
import com.iailab.module.model.mpk.dao.ModelMethodDao; |
|
6 |
import com.iailab.module.model.mpk.entity.ModelMethodEntity; |
|
7 |
import com.iailab.module.model.mpk.service.ModelMethodService; |
|
8 |
import lombok.extern.slf4j.Slf4j; |
|
9 |
import org.apache.commons.lang3.StringUtils; |
|
10 |
import org.springframework.stereotype.Service; |
|
11 |
|
|
12 |
import java.util.Map; |
|
13 |
|
|
14 |
/** |
|
15 |
* @description: |
|
16 |
* @author: dzd |
|
17 |
* @date: 2024/9/9 10:51 |
|
18 |
**/ |
|
19 |
@Slf4j |
|
20 |
@Service |
|
21 |
public class ModelMethodServiceImpl extends BaseServiceImpl<ModelMethodDao, ModelMethodEntity> implements ModelMethodService { |
|
22 |
|
|
23 |
|
|
24 |
@Override |
|
25 |
public void deleteByMap(Map<String, Object> map) { |
|
26 |
baseDao.delete(getWrapper(map)); |
|
27 |
} |
|
28 |
|
|
29 |
private QueryWrapper<ModelMethodEntity> getWrapper(Map<String, Object> params) { |
|
30 |
String mpkFileId = (String) params.get("mpkFileId"); |
|
31 |
|
|
32 |
QueryWrapper<ModelMethodEntity> wrapper = new QueryWrapper<>(); |
|
33 |
wrapper.eq(StringUtils.isNotBlank(mpkFileId), "mpk_file_id", mpkFileId); |
|
34 |
|
|
35 |
return wrapper; |
|
36 |
} |
|
37 |
} |