记得上下班打卡 | git大法好,push需谨慎

Commit badf009a authored by 张国柄's avatar 张国柄

Merge remote-tracking branch 'origin/dev_goblin' into pre

parents a62af783 dfbc10c5
...@@ -14,6 +14,7 @@ import com.liquidnet.service.goblin.entity.GoblinSelfGoodsCategory; ...@@ -14,6 +14,7 @@ import com.liquidnet.service.goblin.entity.GoblinSelfGoodsCategory;
import com.liquidnet.service.goblin.mapper.GoblinSelfGoodsCategoryMapper; import com.liquidnet.service.goblin.mapper.GoblinSelfGoodsCategoryMapper;
import com.mongodb.client.result.UpdateResult; import com.mongodb.client.result.UpdateResult;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria; import org.springframework.data.mongodb.core.query.Criteria;
...@@ -47,7 +48,17 @@ public class GoblinSelfGoodsCategoryServiceImpl extends ServiceImpl<GoblinSelfGo ...@@ -47,7 +48,17 @@ public class GoblinSelfGoodsCategoryServiceImpl extends ServiceImpl<GoblinSelfGo
@Override @Override
public List<GoblinSelfGoodsCategoryDto> listForForMultiGrade() { public List<GoblinSelfGoodsCategoryDto> listForForMultiGrade() {
goblinSelfGoodsCategoryMapper.statsForForMultiGrade(); goblinSelfGoodsCategoryMapper.statsForForMultiGrade();
return goblinSelfGoodsCategoryMapper.listForForMultiGrade(); List<GoblinSelfGoodsCategoryDto> dtos = goblinSelfGoodsCategoryMapper.listForForMultiGrade();
if (!CollectionUtils.isEmpty(dtos)) {
dtos.forEach(dto -> {
if (StringUtils.isNotEmpty(dto.getTcateId())) {
dto.setFcounts(dto.getTcounts());
} else if (StringUtils.isNotEmpty(dto.getScateId())) {
dto.setFcounts(dto.getScounts());
}
});
}
return dtos;
} }
@Transactional @Transactional
......
...@@ -11,17 +11,17 @@ public class GoblinSelfGoodsCategoryDto implements Serializable { ...@@ -11,17 +11,17 @@ public class GoblinSelfGoodsCategoryDto implements Serializable {
private String fname; private String fname;
private String ficon; private String ficon;
private String fneIsbn; private String fneIsbn;
private Integer fcounts; private int fcounts;
private String scateId; private String scateId;
private String sname; private String sname;
private String sicon; private String sicon;
private String sneIsbn; private String sneIsbn;
private Integer scounts; private int scounts;
private String tcateId; private String tcateId;
private String tname; private String tname;
private String ticon; private String ticon;
private String tneIsbn; private String tneIsbn;
private Integer tcounts; private int tcounts;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment