查询整理

AccountEmployeeRepository

1.select * from account_employee ae where ae.ownerId = ? 判断传入的employee的request是不是存在,不存在创建新的employee,存在的话返回到当前employee下

AdminRepository

1.select a from admin a where a.token=? and a.time(token expire_time)=? 判断某个token是否过期时候用的查询,如果admin不存在就创建一个新admin,如果存在就更新session key

2.select a from admin a where a.token=? and a.role =? 还没用到

3.select a from admin a where a.openId=? 微信服务 通过通过openId获取admin的信息

4.select a from admin a where a.companyId=? 将公司名添加到admin中去

BillSourceWorkRepository

1.select bs.* from bill_source_work bs join account_employee ae on bs.id_account = ae.id where ae.id_owner= ?3 and bs.source_type in ?4 and bs.create_time >= ?1 and bs.create_time <= ?2 limit ?5,?6 还没用到

2.select * from bill_source_work bs where bs.accountId=? and sourceType=? and bs.create_time >= ?1 and bs.create_time <= ?2 limit ?5,?6还没用到

CityRepository

1.select * from city 查找区域信息

EmployeeRepository

1.select * from employee where openId=? 通过openId判断是否存在该employee,如果不存在创建新的employee,如果存在更新该employee的sessin key

2.select * from employee where token =?and time=? 验证权限,通过token过期时间和token判断employee是否存在

3.select * from employee where recommenderId=? limit 通过employee的id找到所有recommendId=该employee的id所有用户,也就是该用户所有发展的下线人员

JobFollowRelationRepository(MongoRepository)

1.db.jobFollowRelation.find({"employeeId":?}) 通过employeeId查找到该 employee 所有收藏的 job,再判断与传入的 jobid 是否相同,相同删去,也就是取消关注收藏的job

JobComplainRepository(MongoRepository)

1.db.jobComplain.find({"status":?,"pageable":?}) // 未应用

JobRepository

3.select * from Job j where j.status=? and j.admin=?

4.select j from Job j where j.status = ?1and j.adminId=2 or j.publisherId=?

5.select * from Job j where j.admin=?

6.select * from Job j where j.id=?

7.select j.* from job j inner join district d on d.id=j.id_district join city c on d.id_city=c.id where j.id_job_type in ?1 and c.id=?2 and job_status=?3 and test=0 order by salary_total desc,start_time limit ?4,?5

8.select j.* from job j inner join district d on d.id=j.id_district join city c on d.id_city=c.id where j.id_job_type in ?1 and c.id=?2 and job_status=?3 and test=0 order by start_time,salary_total desc limit ?4,?5

9.select j.* from job j inner join district d on d.id=j.id_district join city c on d.id_city=c.id where j.id_job_type in ?1 and c.id=?2 and job_status=?3 and test=0 order by j.commission_level1 desc limit ?4,?5

10.select * from Job j where j. districtIds=? and j. status=? and j.test=?

11.select * from Job j where j. districtIds=? and j. status=? and j.test=? and j. jobTypeIds=?

12.select j.* from job j inner join district d on d.id=j.id_district join city c on d.id_city=c.id where c.id=?1 and job_status=?2 and test=0 order by salary_total desc,start_time limit ?3,?4

13.select j.* from job j inner join district d on d.id=j.id_district join city c on d.id_city=c.id where c.id=?1 and job_status=?2 and test=0 order by start_time,salary_total desc limit ?3,?4

14.select j.* from job j inner join district d on d.id=j.id_district join city c on d.id_city=c.id where c.id=?1 and job_status=?2 and test=0 order by j.commission_level1 desc limit ?3,?4

JobTypeRepository

1.select * from Job

2.select * from Job j where j.id=?

RegionRepository

1.select * from Region where cityNum=?

2.select *from Region where id=?

SubscribePrincpleRepository(MongoRepository)

1.db.subscribePrincple.find({"jobSymbole":?,"salary":?,"switchOn":?})

2.db.subscribePrincple.find({"subscriberId":?})

WechatUnifiedOrderRepository

1.select * from WechatPay where id=?

WorksRepository

1.select * from Works w where w.id = ?1

2.select w from Works w where w.id = ?1

3.select * from Works w where w. employeeId = ? and w. jobId=?

4.select * from Works w where w. jobId=?

5.select * from Works w where w. jobId=? and w.status=?

6.select * from Works w where w. employeeId = ? and w. jobId=? and w.status=?

推荐阅读更多精彩内容

  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 7,070评论 0 23
  • 1. Java基础部分 基础部分的顺序:基本语法,类相关的语法,内部类的语法,继承相关的语法,异常的语法,线程的语...
    子非鱼_t_阅读 29,699评论 18 399
  • 本想着要做温柔的女子,却越来越暴躁,尤其在工作中遇到奇葩事时更为明显。独自待在一个地方,从陌生到渐渐熟悉,经历过窘...
    YMYM阅读 79评论 0 0
  • 记得以前看到过一个小段子,说是要了解一个女人,需要去她家看看厨房,要了解一个男人,需要去他家看看书房。如今看来,前...
    于洛阅读 255评论 0 1
  • 笔者在实习了几个月之后,不知道自己是老几了,虽然知道自己很菜,但是却迷失了学习的方向,看看大牛写的代码,顿时感觉自...
    全世界_gl阅读 300评论 1 1
  • 教你炒股票40:同级别分解的多重赋格 (2007-03-27 12:53:22) 转载▼ 分类:时政经济(缠中说禅...
    4ccb34d29844阅读 130评论 0 0
  • 写在前面 昨天看到简友@提灯忘月的文,《实名反对“输入输出”论》。说很多人现在把“读书”当输入,把“写作”当输出的...
    林对对阅读 336评论 1 4