|
|
@@ -57,11 +57,8 @@ import com.goafanti.common.enums.NoticeStatus;
|
|
|
import com.goafanti.common.enums.UserType;
|
|
|
import com.goafanti.common.enums.collectType;
|
|
|
import com.goafanti.common.error.BusinessException;
|
|
|
-import com.goafanti.common.model.Achievement;
|
|
|
import com.goafanti.common.model.AchievementDemand;
|
|
|
import com.goafanti.common.model.AchievementDemandCount;
|
|
|
-import com.goafanti.common.model.AchievementKeyword;
|
|
|
-import com.goafanti.common.model.AchievementPublish;
|
|
|
import com.goafanti.common.model.Demand;
|
|
|
import com.goafanti.common.model.DemandKeyword;
|
|
|
import com.goafanti.common.model.DemandPublish;
|
|
|
@@ -1048,19 +1045,30 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
|
|
|
in.setInfoSources(1);
|
|
|
list.add(in);
|
|
|
//关键字处理
|
|
|
- String [] keywords=null;
|
|
|
if(in.getKeyword()!=null) {
|
|
|
+ String [] keywords=null;
|
|
|
+ boolean flag= false;
|
|
|
if (in.getKeyword().contains(",")) {
|
|
|
keywords=in.getKeyword().split(",");
|
|
|
+ flag=true;
|
|
|
}else if (in.getKeyword().contains(",")) {
|
|
|
keywords=in.getKeyword().split(",");
|
|
|
+ flag=true;
|
|
|
+ }else {
|
|
|
+ DemandKeyword ak = new DemandKeyword();
|
|
|
+ ak.setId(UUID.randomUUID().toString());
|
|
|
+ ak.setDemandId(in.getId());
|
|
|
+ ak.setKeyword(in.getKeyword());
|
|
|
+ keyword.add(ak);
|
|
|
}
|
|
|
- for (int j = 0; j < keywords.length; j++) {
|
|
|
- DemandKeyword ak = new DemandKeyword();
|
|
|
- ak.setId(UUID.randomUUID().toString());
|
|
|
- ak.setDemandId(in.getId());
|
|
|
- ak.setKeyword(keywords[j].trim());
|
|
|
- keyword.add(ak);
|
|
|
+ if (flag) {
|
|
|
+ for (String string : keywords) {
|
|
|
+ DemandKeyword ak = new DemandKeyword();
|
|
|
+ ak.setId(UUID.randomUUID().toString());
|
|
|
+ ak.setDemandId(in.getId());
|
|
|
+ ak.setKeyword(string);
|
|
|
+ keyword.add(ak);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|