|
@@ -4,11 +4,13 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.management.platform.entity.Clue;
|
|
|
import com.management.platform.entity.ClueLog;
|
|
|
+import com.management.platform.entity.User;
|
|
|
import com.management.platform.mapper.ClueLogMapper;
|
|
|
import com.management.platform.mapper.ClueMapper;
|
|
|
import com.management.platform.service.ClueService;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.management.platform.service.SysFunctionService;
|
|
|
+import com.management.platform.service.UserService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -20,7 +22,7 @@ import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
|
- * 服务实现类
|
|
|
+ * 服务实现类
|
|
|
* </p>
|
|
|
*
|
|
|
* @author Seyason
|
|
@@ -35,6 +37,8 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
|
|
|
private ClueMapper clueMapper;
|
|
|
@Autowired
|
|
|
private ClueLogMapper clueLogMapper;
|
|
|
+ @Autowired
|
|
|
+ private UserService userService;
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@@ -65,22 +69,22 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
|
|
|
}
|
|
|
|
|
|
private Clue setNull(Clue clue) {
|
|
|
- if (clue.getPlate1() == ""){
|
|
|
+ if (clue.getPlate1() == "") {
|
|
|
clue.setPlate1(null);
|
|
|
}
|
|
|
- if (clue.getPlate2() == ""){
|
|
|
+ if (clue.getPlate2() == "") {
|
|
|
clue.setPlate2(null);
|
|
|
}
|
|
|
- if (clue.getPlate3() == ""){
|
|
|
+ if (clue.getPlate3() == "") {
|
|
|
clue.setPlate3(null);
|
|
|
}
|
|
|
- if (clue.getPlate4() == ""){
|
|
|
+ if (clue.getPlate4() == "") {
|
|
|
clue.setPlate4(null);
|
|
|
}
|
|
|
- if (clue.getPlate5() == ""){
|
|
|
+ if (clue.getPlate5() == "") {
|
|
|
clue.setPlate5(null);
|
|
|
}
|
|
|
- return clue;
|
|
|
+ return clue;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -98,6 +102,16 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
|
|
|
return clueMapper.list(clue);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<Clue> getList1(Clue clue, User user) {
|
|
|
+ return clueMapper.list1(clue, user.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<Clue> getList2(Clue clue, User user) {
|
|
|
+ return clueMapper.list2(clue, user.getId());
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public List<Clue> getDeleterList(Clue clue) {
|
|
|
return clueMapper.Deleterlist(clue);
|
|
@@ -107,6 +121,7 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
|
|
|
public Integer getTotal(Clue clue) {
|
|
|
return clueMapper.getTotal(clue);
|
|
|
}
|
|
|
+
|
|
|
@Override
|
|
|
public Integer getDeleterTotal(Clue clue) {
|
|
|
return clueMapper.getDeleterTotal(clue);
|
|
@@ -116,7 +131,7 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
|
|
|
public Clue getInfo(Clue clue) {
|
|
|
Clue clue1 = clueMapper.selectById(clue.getId());
|
|
|
QueryWrapper<ClueLog> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("clue_id",clue.getId());
|
|
|
+ queryWrapper.eq("clue_id", clue.getId());
|
|
|
List<ClueLog> logs = clueLogMapper.selectList(queryWrapper);
|
|
|
clue1.setClueLogList(logs);
|
|
|
return clue1;
|
|
@@ -138,5 +153,13 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
|
|
|
clueMapper.deleteBatchIds(ids);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void getAndTransfer(Clue clue) {
|
|
|
+ UpdateWrapper<Clue> updateWrapper = new UpdateWrapper<>();
|
|
|
+
|
|
|
+
|
|
|
+ clueMapper.update(clue, updateWrapper);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|