Commit dae5019e by jinfeng.wang

fix

parent 2a738f46
package com.mobvista.apptag.service.impl; package com.mobvista.apptag.service.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.mobvista.apptag.entity.Feat; import com.mobvista.apptag.entity.Feat;
import com.mobvista.apptag.mapper.FeatDao; import com.mobvista.apptag.mapper.FeatDao;
import com.mobvista.apptag.service.FeatService; import com.mobvista.apptag.service.FeatService;
import org.apache.commons.lang3.StringUtils;
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 java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* @author wangjf * @author wangjf
*/ */
...@@ -26,7 +26,11 @@ public class FeatServiceImpl implements FeatService { ...@@ -26,7 +26,11 @@ public class FeatServiceImpl implements FeatService {
Map<String, String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
List<Feat> feats = featDao.listAll(); List<Feat> feats = featDao.listAll();
for (Feat feat : feats) { for (Feat feat : feats) {
map.put(feat.getSecondId(), feat.getSecondTag()); if (StringUtils.isNotBlank(feat.getSecondTag())) {
map.put(feat.getSecondId(), feat.getSecondTag());
} else {
map.put(feat.getSecondId(), feat.getFirstTag());
}
} }
return map; return map;
} }
......
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