JtBusinessServiceImpl.java 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529
  1. package com.goafanti.business.service.impl;
  2. import java.util.ArrayList;
  3. import java.util.Date;
  4. import java.util.HashMap;
  5. import java.util.List;
  6. import java.util.Map;
  7. import java.util.UUID;
  8. import org.apache.poi.poifs.property.Child;
  9. import org.springframework.beans.factory.annotation.Autowired;
  10. import org.springframework.beans.factory.annotation.Value;
  11. import org.springframework.stereotype.Service;
  12. import com.goafanti.business.bo.JtBusinessCategoryBo;
  13. import com.goafanti.business.bo.JtBusinessCategoryTree;
  14. import com.goafanti.business.bo.JtBusinessProjectResult;
  15. import com.goafanti.business.bo.makeMoneyCategoryListBo;
  16. import com.goafanti.business.service.JtBusinessService;
  17. import com.goafanti.comment.bo.CommentDetailResult;
  18. import com.goafanti.common.bo.MyCollection;
  19. import com.goafanti.common.dao.JtBusinessCategoryMapper;
  20. import com.goafanti.common.dao.JtBusinessProjectMapper;
  21. import com.goafanti.common.dao.JtCollectSearchMapper;
  22. import com.goafanti.common.dao.JtCommodityCommentMapper;
  23. import com.goafanti.common.dao.JtTagMapper;
  24. import com.goafanti.common.enums.BusinessCategoryModule;
  25. import com.goafanti.common.enums.ProjectAuditStatus;
  26. import com.goafanti.common.enums.UserAuthentication;
  27. import com.goafanti.common.enums.collectType;
  28. import com.goafanti.common.model.JtBusinessCategory;
  29. import com.goafanti.common.model.JtBusinessProject;
  30. import com.goafanti.common.model.JtCollectSearch;
  31. import com.goafanti.common.model.JtTag;
  32. import com.goafanti.common.utils.StringUtils;
  33. import com.goafanti.core.mybatis.BaseMybatisDao;
  34. import com.goafanti.core.mybatis.page.Pagination;
  35. import com.goafanti.core.shiro.token.TokenManager;
  36. import com.goafanti.order.enums.AuditState;
  37. @Service
  38. public class JtBusinessServiceImpl extends BaseMybatisDao<JtBusinessProjectMapper> implements JtBusinessService{
  39. @Autowired
  40. JtBusinessCategoryMapper jtBusinessCategoryMapper;
  41. @Autowired
  42. JtBusinessProjectMapper jtBusinessProjectMapper;
  43. @Autowired
  44. private JtTagMapper jtTagMapper;
  45. @Autowired
  46. private JtCommodityCommentMapper jtCommodityCommentMapper;
  47. @Value(value="${collect_flag}")
  48. private Boolean collectFlag ;
  49. @Autowired
  50. private JtCollectSearchMapper jtCollectSearchMapper;
  51. @Override
  52. public JtBusinessCategory getBusinessCategoryByLayerAndName(Integer layer, String name) {
  53. // TODO Auto-generated method stub
  54. return jtBusinessCategoryMapper.getBusinessCategoryByLayerAndName(layer, name);
  55. }
  56. @Override
  57. public List<JtBusinessCategory> getBusinessCategoryBySuperId(String id,Integer size) {
  58. // TODO Auto-generated method stub
  59. return jtBusinessCategoryMapper.getBusinessCategoryBySuperId(id,size);
  60. }
  61. @Override
  62. public List<JtBusinessProject> getBusinessProjectByCategoryId(String id,Integer size,Integer isHot) {
  63. // TODO Auto-generated method stub
  64. return jtBusinessProjectMapper.getBusinessProjectByCategoryId(id,size,isHot);
  65. }
  66. @Override
  67. public JtBusinessProjectResult getBusinessProjectDetail(String id) {
  68. String uid=TokenManager.getUserId();
  69. JtBusinessProjectResult j=jtBusinessProjectMapper.selectByPrimaryKeyWithModule(id,uid);
  70. j.setCommentDetailResult(jtCommodityCommentMapper.selectByProjectId(id));
  71. j.setTags(jtTagMapper.selectProjectTag(id));
  72. if (StringUtils.isBlank(j.getAdvertisement()))j.setAdvertisement("暂无描述");
  73. return j;
  74. }
  75. @Override
  76. public JtBusinessCategoryTree getCategoryTree(String id) {
  77. // TODO Auto-generated method stub
  78. return jtBusinessCategoryMapper.getCategoryTree(id);
  79. }
  80. public List<JtBusinessCategoryBo>getCategoryBoList(Integer module){
  81. return jtBusinessCategoryMapper.getCategoryBoList(module);
  82. }
  83. /*
  84. * 登录用户0 项目列表页1 privateProject
  85. * ownerId优先级高于privateProject
  86. *
  87. * ordetType---0 发布时间 1价格 2成交量
  88. * orderSort ----0大->小 1小->大
  89. *
  90. *
  91. * */
  92. @SuppressWarnings("unchecked")
  93. @Override
  94. public Pagination<JtBusinessProjectResult> getProjects(String tag,String topId, String secondId, String name, Integer pageSize,
  95. Integer pageNo,Integer privateProject,Integer auditStatus,Integer module,Integer isHot,Integer orderType,Integer orderSort,String ownerId) {
  96. if(orderType==null)orderType=0;
  97. if(orderSort==null)orderSort=0;
  98. // TODO Auto-generated method stub
  99. if (pageNo == null || pageNo < 0) {
  100. pageNo = 1;
  101. }
  102. if (pageSize == null || pageSize < 0 ) {
  103. pageSize = 10;
  104. }
  105. Map<String, Object> params=disposeParams(topId, secondId, name);
  106. if(auditStatus!=null ) {
  107. params.put("auditStatus", auditStatus);
  108. }
  109. if(privateProject!=null && privateProject ==0)
  110. params.put("ownerId", TokenManager.getUserId());
  111. if(StringUtils.isNotBlank(ownerId)) {
  112. params.put("ownerId", ownerId);
  113. }
  114. if(module!=null)params.put("module", module);
  115. if(isHot!=null)params.put("isHot", isHot);
  116. if(orderType!=null)params.put("orderType", orderType);
  117. if(orderSort!=null)params.put("orderSort", orderSort);
  118. if(StringUtils.isNotBlank(tag))params.put("tag", tag);
  119. Pagination<JtBusinessProjectResult> pagination=(Pagination<JtBusinessProjectResult>)findPage("findJtBusinessProjectByPage","findJtBusinessCountByPage",params,pageNo,pageSize);
  120. List<JtBusinessProjectResult> list =(List<JtBusinessProjectResult>) pagination.getList();
  121. for (JtBusinessProjectResult j : list) {
  122. if (StringUtils.isBlank(j.getAdvertisement()))j.setAdvertisement("暂无描述");
  123. }
  124. return pagination;
  125. }
  126. private Map<String, Object> disposeParams(String topId, String secondId, String name) {
  127. Map<String, Object> params = new HashMap<>();
  128. if (StringUtils.isNotBlank(topId)) {
  129. params.put("topId", topId);
  130. }
  131. if (StringUtils.isNotBlank(secondId)) {
  132. params.put("secondId", secondId);
  133. }
  134. if (StringUtils.isNotBlank(name)) {
  135. params.put("name", name);
  136. }
  137. return params;
  138. }
  139. @Override
  140. public int insertCategory(JtBusinessCategory jtBusinessCategory) {
  141. // TODO Auto-generated method stub
  142. // jtBusinessCategoryMapper.autoIncreaseSort(jtBusinessCategory.getLayer(),jtBusinessCategory.getSort());
  143. if(jtBusinessCategory.getSuperId()!=null && jtBusinessCategory.getLayer().intValue()==1 && jtBusinessCategory.getSuperId().length()>0)return -2;
  144. //String number="BC";
  145. String number=BusinessCategoryModule.getStatus(jtBusinessCategory.getModule()).toString();
  146. if(jtBusinessCategory.getLayer().intValue()==2) {
  147. //2层,先加第一层
  148. //找到当前品类父级品类
  149. JtBusinessCategory sp=jtBusinessCategoryMapper.selectByPrimaryKey(jtBusinessCategory.getSuperId());
  150. if(sp==null || sp.getLayer()!=1) {
  151. //找到的父级品类层数不是1 或者未找到
  152. return -2;
  153. }
  154. //加前层
  155. //父级品类层数为1的情况下 第一层编号为父级sort序号
  156. int size1=sp.getSort();
  157. if(size1>99)return -1;
  158. if(size1<10)number+="0";
  159. number+=size1;
  160. }
  161. //加层
  162. int size2;
  163. //通过父级id获取当前层列表
  164. List<JtBusinessCategory>businessCategories =jtBusinessCategoryMapper.getBusinessCategoryBySuperId(jtBusinessCategory.getSuperId(), null);
  165. //列表为0,当前层编号size2设置为1,大于0 设置为当前最大sort+1
  166. if(businessCategories.size()>0)
  167. size2=businessCategories.get(businessCategories.size()-1).getSort()+1;
  168. else size2=1;
  169. //每层最多99个
  170. if(size2>99)return -1;
  171. //增加0
  172. if(size2<10)number+="0";
  173. //完成编号
  174. number+=size2;
  175. jtBusinessCategory.setNumber(number);
  176. //设置sort序号
  177. jtBusinessCategory.setSort(size2);
  178. jtBusinessCategory.setCreateTime(new Date());
  179. jtBusinessCategory.setId(UUID.randomUUID().toString());
  180. return jtBusinessCategoryMapper.insertSelective(jtBusinessCategory);
  181. }
  182. @Override
  183. public int deleteCategoryById(String id) {
  184. // TODO Auto-generated method stub
  185. //查找品类
  186. JtBusinessCategory sp=jtBusinessCategoryMapper.selectByPrimaryKey(id);
  187. //查找子品类 存在子品类不允许删除
  188. List<JtBusinessCategory> chidren=jtBusinessCategoryMapper.getBusinessCategoryBySuperId(sp.getId(), null);
  189. if(chidren.size()>0) {
  190. return -1;
  191. }
  192. List<JtBusinessProject> childrenProject=jtBusinessProjectMapper.getBusinessProjectByCategoryId(id, 100,null);
  193. if(childrenProject!= null && childrenProject.size()>0) {
  194. return -1;
  195. }
  196. return jtBusinessCategoryMapper.deleteByPrimaryKey(id);
  197. }
  198. @Override
  199. public JtBusinessCategory getCategoryById(String id) {
  200. // TODO Auto-generated method stub
  201. return jtBusinessCategoryMapper.selectByPrimaryKey(id);
  202. }
  203. @Override
  204. public int updateCategory(JtBusinessCategory jtBusinessCategory) {
  205. // 层级不会变
  206. // TODO Auto-generated method stub
  207. //修改不影响结构的数据
  208. JtBusinessCategory category = new JtBusinessCategory();
  209. category.setId(jtBusinessCategory.getId());
  210. category.setImgUrl(jtBusinessCategory.getImgUrl());
  211. category.setName(jtBusinessCategory.getName());
  212. category.setSummary(jtBusinessCategory.getSummary());
  213. category.setPcIndex(jtBusinessCategory.getPcIndex());
  214. category.setAppIndex(jtBusinessCategory.getAppIndex());
  215. category.setHomeIndex(jtBusinessCategory.getHomeIndex());
  216. jtBusinessCategoryMapper.updateByPrimaryKeySelective(category);
  217. //是否修改了模块类别
  218. boolean moduleChange = null != jtBusinessCategory.getModule() ? !jtBusinessCategory.getModule().equals(jtBusinessCategory.getNextModule()) : false;
  219. //是否有上级id,并且改变了上级id
  220. boolean existSuperId = StringUtils.isNotBlank(jtBusinessCategory.getSuperId()) ? !jtBusinessCategory.getSuperId().equals(jtBusinessCategory.getOldSuperId()) : false;
  221. //获得更改前的自己的number
  222. String oldNumber = jtBusinessCategoryMapper.selectByPrimaryKey(jtBusinessCategory.getId()).getNumber();
  223. String number = null;
  224. //一级更换模块
  225. if(moduleChange && !existSuperId){
  226. jtBusinessCategory.setLayer(1);
  227. //根据模块获得字母前缀
  228. String prefix = BusinessCategoryModule.getStatus(jtBusinessCategory.getNextModule()).toString();
  229. jtBusinessCategory.setNumber(prefix + "__");
  230. number = prefix;
  231. category.setModule(jtBusinessCategory.getNextModule());
  232. jtBusinessCategory.setModule(jtBusinessCategory.getNextModule());
  233. }
  234. //存在上级说明是二级修改到不同模块的某品类中
  235. if(existSuperId){
  236. JtBusinessCategory b = jtBusinessCategoryMapper.selectByPrimaryKey(jtBusinessCategory.getSuperId());
  237. category.setModule(b.getModule());
  238. jtBusinessCategory.setLayer(2);
  239. jtBusinessCategory.setModule(b.getModule());
  240. number = b.getNumber();
  241. //获得前缀
  242. String prefix = BusinessCategoryModule.getStatus(b.getModule()).toString();
  243. number = prefix + number.substring(prefix.length()) ;
  244. jtBusinessCategory.setNumber(number + "__");
  245. category.setSuperId(jtBusinessCategory.getSuperId());//上级id也要修改
  246. }
  247. if((!moduleChange && !existSuperId) && !existSuperId){
  248. return 1;
  249. }
  250. //获得当前更改后模块的最大值
  251. String newNumber = jtBusinessCategoryMapper.getCurrentMaxNumber(jtBusinessCategory);
  252. Integer n = null != newNumber ? Integer.valueOf(newNumber.substring(newNumber.length() - 2)) : 0;
  253. if(n < 99){
  254. //将最大值加一
  255. n += 1;
  256. newNumber = number + (n<10? "0"+ n : n);
  257. } else {
  258. newNumber = jtBusinessCategoryMapper.getCurrentMaxNumber(jtBusinessCategory);
  259. n = Integer.valueOf(newNumber.substring(newNumber.length() - 2));
  260. if(n == 1 || n == 01){
  261. return -1;
  262. }
  263. //将最小值减一
  264. n -= 1;
  265. newNumber = number + (n<10? "0"+ n : n);
  266. }
  267. //修改自己和自己下级的前缀
  268. jtBusinessCategory.setLayer(newNumber.length() + 1);//截取前缀的长度位置
  269. jtBusinessCategory.setNumber(oldNumber + "%");
  270. jtBusinessCategory.setName(newNumber );
  271. //将模块前面字母替换
  272. jtBusinessCategoryMapper.updateNumberPrefix(jtBusinessCategory);
  273. //得到sort
  274. category.setSort(n);
  275. //修改自己的number
  276. category.setNumber(newNumber);
  277. //修改自己的模块
  278. jtBusinessCategoryMapper.updateByPrimaryKeySelective(category);
  279. return 1;//jtBusinessCategoryMapper.updateByPrimaryKeySelective(jtBusinessCategory);
  280. }
  281. private Map<String, Object> disposeCategoryParams(String name,Integer layer ) {
  282. Map<String, Object> params = new HashMap<>();
  283. if (layer!=null) {
  284. params.put("layer", layer);
  285. }
  286. if (StringUtils.isNotBlank(name)) {
  287. params.put("name", name);
  288. }
  289. return params;
  290. }
  291. @Override
  292. public int insertProject(JtBusinessProject jtBusinessProject) {
  293. // TODO Auto-generated method stub
  294. jtBusinessProject.setCreateTime(new Date());
  295. jtBusinessProject.setId(UUID.randomUUID().toString());
  296. jtBusinessProject.setOwnerId(TokenManager.getUserId());
  297. jtBusinessProject.setAuditStatus(ProjectAuditStatus.CREATE.getCode());
  298. List<JtBusinessProject>projects=jtBusinessProjectMapper.findProjectOrderByNumber();
  299. int cSize = 1;
  300. if(projects!=null && projects.size()>0)
  301. {
  302. String number=projects.get(projects.size()-1).getNumber();
  303. if(number!=null && number.length()==6)
  304. {
  305. String nbString=number.substring(2);
  306. try {
  307. cSize=Integer.parseInt(nbString)+1;
  308. cSize=Math.max(cSize, projects.size()+1);
  309. }catch (Exception e) {
  310. // TODO: handle exception
  311. return -1;
  312. }
  313. }
  314. else cSize=1;
  315. }
  316. else cSize=1;
  317. String nbString="BP";
  318. String sizeString="000"+cSize;
  319. sizeString=sizeString.substring(sizeString.length()-4);
  320. nbString+=sizeString;
  321. jtBusinessProject.setNumber(nbString);
  322. jtBusinessProjectMapper.insertSelective(jtBusinessProject);
  323. return 1;
  324. }
  325. @Override
  326. public int deleteProjectById(String id) {
  327. if(collectFlag)jtCollectSearchMapper.deleteByrowId(id);
  328. return jtBusinessProjectMapper.deleteByPrimaryKey(id);
  329. }
  330. @Override
  331. public int updateProject(JtBusinessProject jtBusinessProject) {
  332. jtBusinessProjectMapper.updateByPrimaryKeySelective(jtBusinessProject);
  333. if(StringUtils.isNotBlank(jtBusinessProject.getTag())){
  334. String str=jtBusinessProject.getTag();
  335. String[] strs = str.split(",");
  336. jtTagMapper.deleteByProjectId(jtBusinessProject.getId());
  337. for (String s : strs) {
  338. jtTagMapper.insertProjectTag(UUID.randomUUID().toString(),s,jtBusinessProject.getId());
  339. }
  340. }
  341. return 1;
  342. }
  343. @Override
  344. public List<JtBusinessProject> getProjectsLimit(Integer size) {
  345. // TODO Auto-generated method stub
  346. return jtBusinessProjectMapper.findProjectOrderByNumber();
  347. }
  348. @Override
  349. public int deleteByIdAndUid(String id) {
  350. // TODO Auto-generated method stub
  351. if(TokenManager.getUserId()==null)return -1;
  352. return jtBusinessProjectMapper.deleteByIdAndUid(id,TokenManager.getUserId());
  353. }
  354. @SuppressWarnings("unchecked")
  355. @Override
  356. public Pagination<JtBusinessProject> listProjectIInterestedIn(Integer pageNo,Integer pageSize) {
  357. // TODO Auto-generated method stub
  358. if (pageNo == null || pageNo < 0) {
  359. pageNo = 1;
  360. }
  361. if (pageSize == null || pageSize < 0 || pageSize > 10) {
  362. pageSize = 10;
  363. }
  364. Map<String,Object> params=new HashMap<String,Object>();
  365. params.put("uid", TokenManager.getUserId());
  366. //params.put("uid", "1180fa62-7c42-44be-bc41-5583814d69f4");
  367. return (Pagination<JtBusinessProject>) findPage("findInterestedProjcet", "findInterestedProjcetCount", params, pageNo, pageSize);
  368. }
  369. @SuppressWarnings("unchecked")
  370. @Override
  371. public Pagination<MyCollection> myCollectionProject(Integer pageNo, Integer pageSize) {
  372. if (pageNo == null || pageNo < 0) pageNo = 1;
  373. if (pageSize == null || pageSize < 0 || pageSize > 10) pageSize = 10;
  374. Map<String,Object> params=new HashMap<String,Object>();
  375. params.put("uid", TokenManager.getUserId());
  376. // params.put("uid", "1180fa62-7c42-44be-bc41-5583814d69f4");
  377. return (Pagination<MyCollection>) findPage("myCollectionProjectList", "myCollectionProjectCount", params, pageNo, pageSize);
  378. }
  379. @Override
  380. public List<makeMoneyCategoryListBo> makeMoneyCategoryList() {
  381. List<makeMoneyCategoryListBo> l=new ArrayList<makeMoneyCategoryListBo>();
  382. //所属模块 0科技服务 1知识产权服务 2高新技术企业服务 3军民融合 4科技咨询 5科技项目
  383. l.add(new makeMoneyCategoryListBo(2,"高新技术企业服务"));
  384. l.add(new makeMoneyCategoryListBo(3,"军民融合"));
  385. l.add(new makeMoneyCategoryListBo(4,"科技咨询"));
  386. l.add(new makeMoneyCategoryListBo(5,"科技项目"));
  387. for (makeMoneyCategoryListBo m : l) {
  388. m.setList(getCategoryBoList(m.getModule()));
  389. }
  390. return l;
  391. }
  392. @SuppressWarnings("unchecked")
  393. @Override
  394. public Pagination<MyCollection> recommendedApplication(Integer type,Integer pageNo, Integer pageSize) {
  395. Map<String,Object> params=new HashMap<String,Object>();
  396. if (null!=type)params.put("type", type);
  397. return (Pagination<MyCollection>) findPage("recommendedApplicationList", "recommendedApplicationCount", params, pageNo, pageSize);
  398. }
  399. @Override
  400. public List<JtBusinessCategory> getCategoryByModule(Integer module) {
  401. return jtBusinessCategoryMapper.getCategoryByModule(module);
  402. }
  403. @Override
  404. public List<JtBusinessProject> getKJListByIds(Integer module,
  405. Integer isHost, Integer size) {
  406. return jtBusinessProjectMapper.getKJListByIds( module, isHost, size);
  407. }
  408. @Override
  409. public List<JtBusinessProject> getModuleByName(String name, Integer isHost,
  410. Integer size) {
  411. return jtBusinessProjectMapper.getModuleByName(name, isHost, size);
  412. }
  413. @Override
  414. public int updateProjectMoveUp(String id) {
  415. JtBusinessCategory j1=jtBusinessCategoryMapper.selectByPrimaryKey(id);
  416. JtBusinessCategory j2=jtBusinessCategoryMapper.selectFirstLevel(id,j1.getModule(),j1.getSuperId(),0);
  417. if(null==j2){
  418. return -1;
  419. }
  420. Integer i=j1.getSort();
  421. JtBusinessCategory jtBusinessCategory=new JtBusinessCategory();
  422. jtBusinessCategory.setId(j1.getId());
  423. jtBusinessCategory.setSort(j2.getSort());
  424. jtBusinessCategoryMapper.updateByPrimaryKeySelective(jtBusinessCategory);
  425. jtBusinessCategory.setId(j2.getId());
  426. jtBusinessCategory.setSort(i);
  427. jtBusinessCategoryMapper.updateByPrimaryKeySelective(jtBusinessCategory);
  428. return 1;
  429. }
  430. @Override
  431. public int updateProjectSetTop(String id) {
  432. JtBusinessCategory j1=jtBusinessCategoryMapper.selectByPrimaryKey(id);
  433. JtBusinessCategory j2=jtBusinessCategoryMapper.selectFirstLevel(id,j1.getModule(),j1.getSuperId(),1);
  434. if(null==j2){
  435. return -1;
  436. }
  437. Integer i=j1.getSort();
  438. JtBusinessCategory jtBusinessCategory=new JtBusinessCategory();
  439. jtBusinessCategory.setId(j1.getId());
  440. jtBusinessCategory.setSort(j2.getSort());
  441. jtBusinessCategoryMapper.updateByPrimaryKeySelective(jtBusinessCategory);
  442. jtBusinessCategory.setId(j2.getId());
  443. jtBusinessCategory.setSort(i);
  444. jtBusinessCategoryMapper.updateByPrimaryKeySelective(jtBusinessCategory);
  445. return 1;
  446. }
  447. @Override
  448. public void addJtCollectSearch(JtBusinessProject jtBusinessProject) {
  449. if(collectFlag){
  450. JtCollectSearch r=new JtCollectSearch();
  451. r.setFromTable(collectType.PROJECT.getDesc());
  452. r.setKeyword(jtBusinessProject.getKeyword());
  453. r.setTitle(jtBusinessProject.getName());
  454. r.setRowId(jtBusinessProject.getId());
  455. jtCollectSearchMapper.insertSelective(r);
  456. }
  457. }
  458. @Override
  459. public void updateJtCollectSearch(String id) {
  460. if(collectFlag)jtCollectSearchMapper.deleteByrowId(id);
  461. }
  462. @Override
  463. public List<JtBusinessCategoryBo> getHomeIndex(Integer module, Integer isHome) {
  464. return jtBusinessCategoryMapper.getHomeIndex(module,isHome);
  465. }
  466. }