|
|
@@ -23,6 +23,8 @@ import com.goafanti.common.dao.AchievementKeywordMapper;
|
|
|
import com.goafanti.common.dao.DemandKeywordMapper;
|
|
|
import com.goafanti.common.dao.DemandMapper;
|
|
|
import com.goafanti.common.dao.NoticeMapper;
|
|
|
+import com.goafanti.common.dao.OrganizationIdentityMapper;
|
|
|
+import com.goafanti.common.dao.UserIdentityMapper;
|
|
|
import com.goafanti.common.dao.UserMapper;
|
|
|
import com.goafanti.common.dao.UserRoleMapper;
|
|
|
import com.goafanti.common.enums.DeleteStatus;
|
|
|
@@ -39,7 +41,9 @@ import com.goafanti.common.model.AchievementDemandCount;
|
|
|
import com.goafanti.common.model.Demand;
|
|
|
import com.goafanti.common.model.DemandKeyword;
|
|
|
import com.goafanti.common.model.Notice;
|
|
|
+import com.goafanti.common.model.OrganizationIdentity;
|
|
|
import com.goafanti.common.model.User;
|
|
|
+import com.goafanti.common.model.UserIdentity;
|
|
|
import com.goafanti.common.utils.DateUtils;
|
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
|
import com.goafanti.core.mybatis.page.Pagination;
|
|
|
@@ -73,6 +77,10 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
|
|
|
private AchievementKeywordMapper achievementKeywordMapper;
|
|
|
@Autowired
|
|
|
private AchievementDemandCountMapper achievementDemandCountMapper;
|
|
|
+ @Autowired
|
|
|
+ private UserIdentityMapper userIdentityMapper;
|
|
|
+ @Autowired
|
|
|
+ private OrganizationIdentityMapper organizationIdentityMapper;
|
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
@Override
|
|
|
@@ -210,7 +218,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
|
|
|
AchievementDemandCount adc = achievementDemandCountMapper.selectByUid(d.getEmployerId());
|
|
|
if (null != adc) {
|
|
|
adc.setDemandCount(adc.getDemandCount() - 1);
|
|
|
- if (adc.getDemandCount() < 0){
|
|
|
+ if (adc.getDemandCount() < 0) {
|
|
|
adc.setDemandCount(0);
|
|
|
}
|
|
|
achievementDemandCountMapper.updateByPrimaryKeySelective(adc);
|
|
|
@@ -263,7 +271,7 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
|
|
|
AchievementDemandCount adc = achievementDemandCountMapper.selectByUid(d.getEmployerId());
|
|
|
if (null != adc) {
|
|
|
adc.setDemandCount(adc.getDemandCount() - 1);
|
|
|
- if (adc.getDemandCount() < 0){
|
|
|
+ if (adc.getDemandCount() < 0) {
|
|
|
adc.setDemandCount(0);
|
|
|
}
|
|
|
achievementDemandCountMapper.updateByPrimaryKeySelective(adc);
|
|
|
@@ -284,6 +292,17 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
|
|
|
d.setTechBrokerId(techBroderId);
|
|
|
String employerId = d.getEmployerId();
|
|
|
if (StringUtils.isNotBlank(employerId)) {
|
|
|
+ if (UserType.PERSONAL.getCode().equals(d.getDataCategory())) {
|
|
|
+ UserIdentity ui = userIdentityMapper.selectUserIdentityByUserId(employerId);
|
|
|
+ if (null != ui) {
|
|
|
+ d.setEmployerName(ui.getUsername());
|
|
|
+ }
|
|
|
+ } else if (UserType.ORGANIZATION.getCode().equals(d.getDataCategory())) {
|
|
|
+ OrganizationIdentity oi = organizationIdentityMapper.selectOrgIdentityByUserId(employerId);
|
|
|
+ if (null != oi) {
|
|
|
+ d.setEmployerName(oi.getUnitName());
|
|
|
+ }
|
|
|
+ }
|
|
|
AchievementDemandCount adc = achievementDemandCountMapper.selectByUid(employerId);
|
|
|
if (null == adc) {
|
|
|
AchievementDemandCount achievementDemandCount = new AchievementDemandCount();
|
|
|
@@ -390,11 +409,11 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
|
|
|
params.put("keyword", keyword);
|
|
|
}
|
|
|
|
|
|
- if (null != industryCategoryA ) {
|
|
|
+ if (null != industryCategoryA) {
|
|
|
params.put("industryCategoryA", industryCategoryA);
|
|
|
}
|
|
|
|
|
|
- if (null != industryCategoryB ) {
|
|
|
+ if (null != industryCategoryB) {
|
|
|
params.put("industryCategoryB", industryCategoryB);
|
|
|
}
|
|
|
|