|
@@ -2,9 +2,16 @@ package com.iotechn.unimall.admin.api.gubi.impl;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
+import com.iotechn.unimall.data.domain.gubi.GubiTypeInfo;
|
|
|
|
+import com.iotechn.unimall.data.domain.gubi.GubiTypeSecond;
|
|
|
|
+import com.iotechn.unimall.data.domain.gubi.GubiTypeThree;
|
|
|
|
+import com.iotechn.unimall.data.mapper.gubi.GubiTypeInfoMapper;
|
|
|
|
+import com.iotechn.unimall.data.mapper.gubi.GubiTypeSecondMapper;
|
|
|
|
+import com.iotechn.unimall.data.mapper.gubi.GubiTypeThreeMapper;
|
|
import org.apache.ibatis.session.RowBounds;
|
|
import org.apache.ibatis.session.RowBounds;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
import org.springframework.util.StringUtils;
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
|
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
|
@@ -30,7 +37,13 @@ import org.springframework.transaction.annotation.Transactional;
|
|
public class GubiTransactionServiceImpl implements IGubiTransactionService {
|
|
public class GubiTransactionServiceImpl implements IGubiTransactionService {
|
|
@Autowired
|
|
@Autowired
|
|
private GubiTransactionMapper gubiTransactionMapper;
|
|
private GubiTransactionMapper gubiTransactionMapper;
|
|
-
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private GubiTypeInfoMapper gubiTypeInfoMapper;
|
|
|
|
+ @Autowired
|
|
|
|
+ private GubiTypeSecondMapper gubiTypeSecondMapper;
|
|
|
|
+ @Autowired
|
|
|
|
+ private GubiTypeThreeMapper gubiTypeThreeMapper;
|
|
|
|
+ @Autowired
|
|
@Override
|
|
@Override
|
|
public Boolean add(GubiTransaction gubiTransaction, Long adminId) throws ServiceException {
|
|
public Boolean add(GubiTransaction gubiTransaction, Long adminId) throws ServiceException {
|
|
Date now = new Date();
|
|
Date now = new Date();
|
|
@@ -84,6 +97,18 @@ public class GubiTransactionServiceImpl implements IGubiTransactionService {
|
|
}
|
|
}
|
|
wrapper.eq("delete_flag", 0);
|
|
wrapper.eq("delete_flag", 0);
|
|
List<GubiTransaction> list = gubiTransactionMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
|
|
List<GubiTransaction> list = gubiTransactionMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
|
|
|
|
+ if(!CollectionUtils.isEmpty(list)){
|
|
|
|
+ for(int i=0;i<list.size();i++){
|
|
|
|
+ List<GubiTypeThree> gubiTypeThrees = gubiTypeThreeMapper.selectList(new EntityWrapper<GubiTypeThree>()
|
|
|
|
+ .eq("id",list.get(i).getOrderId()));
|
|
|
|
+ List<GubiTypeSecond> gubiTypeSeconds = gubiTypeSecondMapper.selectList(new EntityWrapper<GubiTypeSecond>()
|
|
|
|
+ .eq("id",gubiTypeThrees.get(0).getSecondId()));
|
|
|
|
+ List<GubiTypeInfo> gubiTypeInfos = gubiTypeInfoMapper.selectList(new EntityWrapper<GubiTypeInfo>()
|
|
|
|
+ .eq("id",gubiTypeSeconds.get(0).getTypeId()));
|
|
|
|
+ list.get(i).setStrFlag(gubiTypeInfos.get(0).getTypeName()+"/"+gubiTypeSeconds.get(0).getSecondName()+"/"+gubiTypeThrees.get(0).getProduct());
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
Integer count = gubiTransactionMapper.selectCount(wrapper);
|
|
Integer count = gubiTransactionMapper.selectCount(wrapper);
|
|
return new Page<GubiTransaction>(list, page, limit, count);
|
|
return new Page<GubiTransaction>(list, page, limit, count);
|
|
}
|
|
}
|