AccountEmployeeRepository
1.select * from account_employee ae where ae.ownerId = ? 判斷傳入的employee的request是不是存在,不存在創(chuàng)建新的employee,存在的話返回到當(dāng)前employee下
AdminRepository
1.select a from admin a where a.token=? and a.time(token expire_time)=? 判斷某個(gè)token是否過期時(shí)候用的查詢,如果admin不存在就創(chuàng)建一個(gè)新admin,如果存在就更新session key
2.select a from admin a where a.token=? and a.role =? 還沒用到
3.select a from admin a where a.openId=? 微信服務(wù) 通過通過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 查找區(qū)域信息
EmployeeRepository
1.select * from employee where openId=? 通過openId判斷是否存在該employee,如果不存在創(chuàng)建新的employee,如果存在更新該employee的sessin key
2.select * from employee where token =?and time=? 驗(yàn)證權(quán)限,通過token過期時(shí)間和token判斷employee是否存在
3.select * from employee where recommenderId=? limit 通過employee的id找到所有recommendId=該employee的id所有用戶,也就是該用戶所有發(fā)展的下線人員
JobFollowRelationRepository(MongoRepository)
1.db.jobFollowRelation.find({"employeeId":?}) 通過employeeId查找到該 employee 所有收藏的 job,再判斷與傳入的 jobid 是否相同,相同刪去,也就是取消關(guān)注收藏的job
JobComplainRepository(MongoRepository)
1.db.jobComplain.find({"status":?,"pageable":?}) // 未應(yīng)用
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=?