发表于: 2017-06-23 23:42:43

7 1086


今天完成的事:

1、因为不知道萝卜多复盘的搜索怎么写,就去萝卜多官网去参考了,虽然看不到后台代码,但是用搜索框搜了几十次大概也就知道了:公司搜索框里,实际上只是在公司名称里边查,如果选填了其他条件,则是将他们做交集,职位搜索也是如此,搜索框里搜的也是职位名称的字段,有其他条件的话再把他们做交集。(之前一直以为搜索会跟百度一样,搜索结果会包含所有与关键字有关的内容)

然后去找资料SQL语句的交并差操作,试了多次发现MySQL只支持union并集,并没有交集的功能,那搜索语句我该怎么做呢,用and一直串起来么,?  目前没有想到更好的方法。

2、和择楠重新分配了下,我负责前台的找职位模块和后台的article模块,其余的择楠负责

弄了点下面的内容:

找职位

搜索公司--à进入搜索公司页

/a/company/search

Select id from company where name like %#{name}% order by updateAt desc

搜索职位--à进入职位搜索页

/a/job/search

Select id from job where name like %#{name}% order by updateAt desc

8个推荐职位

Select id from job where recommend=1 limit 0,8;

8个最新职位

Select id from job order by updateAt desc limit 0,8;

4个推荐公司(上下轮播)

Select id from company where isApprove=1 order by updateAt desc limit 0,4;

10个普通公司的图标

Select id from company where isApprove=0 order by updateAt desc limit 0,10;

1张最新公司所在行业的行业图

Select industry from company where idApprove=1 order by updateAt desc limit 0,1;

 

Select img from article where type=4 and link =’#{industry}’;

这里建议将公司的行业字段设置成String类型,那么在article表里就可以将link(跳转链接)字段同时存贮,行业图的行业字段。

公司详情

/a/company/details/{id}

公司在招职位

/a/company/joblist/{id}

Select id from job where cid=#{id}

职位介绍

/a/job/details/{id}

Select cid from job where id=id

搜索公司页

/a/company/search

Select id from company where name like ‘#{keyword}’

搜索职位页

/a/job/search

Select id from job where name like ‘keyword’

3、后台的article管理,对拖动排序,这个功能依然不知道具体怎么才能实现。

明天计划的事:尽量将所有的需求,都能想出办法来实现它,(有办法了,东西才好定下来,没思路的话,表结构都没法定,后面就没法做了)

遇到的问题:在上面

收获:一点点SQL语句

总结:早睡早起


返回列表 返回列表
评论

    分享到