|
|
@@ -66,7 +66,7 @@ public class JtBusinessServiceImpl extends BaseMybatisDao<JtBusinessProjectMapp
|
|
|
JtBusinessProjectResult j=jtBusinessProjectMapper.selectByPrimaryKeyWithModule(id,uid);
|
|
|
j.setCommentDetailResult(jtCommodityCommentMapper.selectByProjectId(id));
|
|
|
j.setTags(jtTagMapper.selectProjectTag(id));
|
|
|
- if (StringUtils.isBlank(j.getAdvertisement()))j.setAdvertisement("暂无描述");
|
|
|
+ if (j!=null&&j.getAdvertisement()!=null&&StringUtils.isBlank(j.getAdvertisement()))j.setAdvertisement("暂无描述");
|
|
|
return j;
|
|
|
}
|
|
|
|
|
|
@@ -75,7 +75,7 @@ public class JtBusinessServiceImpl extends BaseMybatisDao<JtBusinessProjectMapp
|
|
|
public JtBusinessCategoryTree getCategoryTree(String id) {
|
|
|
return jtBusinessCategoryMapper.getCategoryTree(id);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public List<JtBusinessCategoryBo>getCategoryBoList(Integer module){
|
|
|
return jtBusinessCategoryMapper.getCategoryBoList(module);
|
|
|
}
|
|
|
@@ -83,11 +83,11 @@ public class JtBusinessServiceImpl extends BaseMybatisDao<JtBusinessProjectMapp
|
|
|
/*
|
|
|
* 登录用户0 项目列表页1 privateProject
|
|
|
* ownerId优先级高于privateProject
|
|
|
- *
|
|
|
+ *
|
|
|
* ordetType---0 发布时间 1价格 2成交量
|
|
|
* orderSort ----0大->小 1小->大
|
|
|
- *
|
|
|
- *
|
|
|
+ *
|
|
|
+ *
|
|
|
* */
|
|
|
@SuppressWarnings("unchecked")
|
|
|
@Override
|
|
|
@@ -100,7 +100,7 @@ public class JtBusinessServiceImpl extends BaseMybatisDao<JtBusinessProjectMapp
|
|
|
}
|
|
|
if (pageSize == null || pageSize < 0 ) {
|
|
|
pageSize = 10;
|
|
|
- }
|
|
|
+ }
|
|
|
Map<String, Object> params=disposeParams(topId, secondId, name);
|
|
|
if(auditStatus!=null ) {
|
|
|
params.put("auditStatus", auditStatus);
|
|
|
@@ -122,7 +122,7 @@ public class JtBusinessServiceImpl extends BaseMybatisDao<JtBusinessProjectMapp
|
|
|
}
|
|
|
return pagination;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
private Map<String, Object> disposeParams(String topId, String secondId, String name) {
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
|
|
|
|
@@ -134,18 +134,18 @@ public class JtBusinessServiceImpl extends BaseMybatisDao<JtBusinessProjectMapp
|
|
|
params.put("secondId", secondId);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
if (StringUtils.isNotBlank(name)) {
|
|
|
params.put("name", name);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
return params;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public int insertCategory(JtBusinessCategory jtBusinessCategory) {
|
|
|
-// jtBusinessCategoryMapper.autoIncreaseSort(jtBusinessCategory.getLayer(),jtBusinessCategory.getSort());
|
|
|
+// jtBusinessCategoryMapper.autoIncreaseSort(jtBusinessCategory.getLayer(),jtBusinessCategory.getSort());
|
|
|
if(jtBusinessCategory.getSuperId()!=null && jtBusinessCategory.getLayer().intValue()==1 && jtBusinessCategory.getSuperId().length()>0)return -2;
|
|
|
//查看是否重名
|
|
|
int n = jtBusinessCategoryMapper.getCountBySome(jtBusinessCategory);
|
|
|
@@ -167,8 +167,8 @@ public class JtBusinessServiceImpl extends BaseMybatisDao<JtBusinessProjectMapp
|
|
|
if(size1<10)number+="0";
|
|
|
number+=size1;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
//加层
|
|
|
int size2;
|
|
|
//通过父级id获取当前层列表
|
|
|
@@ -248,7 +248,7 @@ public class JtBusinessServiceImpl extends BaseMybatisDao<JtBusinessProjectMapp
|
|
|
category.setModule(b.getModule());
|
|
|
jtBusinessCategory.setLayer(2);
|
|
|
jtBusinessCategory.setModule(b.getModule());
|
|
|
-
|
|
|
+
|
|
|
number = b.getNumber();
|
|
|
//获得前缀
|
|
|
String prefix = BusinessCategoryModule.getStatus(b.getModule()).toString();
|
|
|
@@ -276,7 +276,7 @@ public class JtBusinessServiceImpl extends BaseMybatisDao<JtBusinessProjectMapp
|
|
|
n -= 1;
|
|
|
newNumber = number + (n<10? "0"+ n : n);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//修改自己和自己下级的前缀
|
|
|
jtBusinessCategory.setLayer(newNumber.length() + 1);//截取前缀的长度位置
|
|
|
jtBusinessCategory.setNumber(oldNumber + "%");
|
|
|
@@ -292,9 +292,9 @@ public class JtBusinessServiceImpl extends BaseMybatisDao<JtBusinessProjectMapp
|
|
|
return 1;//jtBusinessCategoryMapper.updateByPrimaryKeySelective(jtBusinessCategory);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public int insertProject(JtBusinessProject jtBusinessProject) {
|
|
|
@@ -407,7 +407,7 @@ public class JtBusinessServiceImpl extends BaseMybatisDao<JtBusinessProjectMapp
|
|
|
@Override
|
|
|
public Pagination<MyCollection> recommendedApplication(Integer type,Integer pageNo, Integer pageSize) {
|
|
|
Map<String,Object> params=new HashMap<String,Object>();
|
|
|
- if (null!=type)params.put("type", type);
|
|
|
+ if (null!=type)params.put("type", type);
|
|
|
return (Pagination<MyCollection>) findPage("recommendedApplicationList", "recommendedApplicationCount", params, pageNo, pageSize);
|
|
|
}
|
|
|
|
|
|
@@ -415,7 +415,7 @@ public class JtBusinessServiceImpl extends BaseMybatisDao<JtBusinessProjectMapp
|
|
|
public List<JtBusinessCategory> getCategoryByModule(Integer module,Integer layer,Integer size) {
|
|
|
return jtBusinessCategoryMapper.getCategoryByModule(module, layer, size);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
@Override
|
|
|
public List<JtBusinessProject> getKJListByIds(Integer module,
|
|
|
Integer isHost, Integer size) {
|
|
|
@@ -443,7 +443,7 @@ public class JtBusinessServiceImpl extends BaseMybatisDao<JtBusinessProjectMapp
|
|
|
jtBusinessCategory.setId(j2.getId());
|
|
|
jtBusinessCategory.setSort(i);
|
|
|
jtBusinessCategoryMapper.updateByPrimaryKeySelective(jtBusinessCategory);
|
|
|
-
|
|
|
+
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
@@ -480,18 +480,18 @@ public class JtBusinessServiceImpl extends BaseMybatisDao<JtBusinessProjectMapp
|
|
|
r.setSummary(sum);
|
|
|
jtCollectSearchMapper.insertSelective(r);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void updateJtCollectSearch(String id) {
|
|
|
if(collectFlag)jtCollectSearchMapper.deleteByrowId(id);
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<JtBusinessCategoryBo> getHomeIndex(Integer module, Integer isHome) {
|
|
|
-
|
|
|
+
|
|
|
return jtBusinessCategoryMapper.getHomeIndex(module,isHome);
|
|
|
}
|
|
|
|
|
|
@@ -505,7 +505,7 @@ public class JtBusinessServiceImpl extends BaseMybatisDao<JtBusinessProjectMapp
|
|
|
return jtBusinessProjectMapper.updateByPrimaryKeySelective(jtBusinessProject);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}
|