def register(): name = request.args.get('username') experience = request.form.get('experience') edate = request.args.get('edate') city = request.form.get('city') job_title = request.form.get('job_title') position = request.args.get('position') sex = request.args.get('sex') message = request.args.get('message') old_company = request.args.get('old_company') education = request.args.get('education') curr = request.args.get('current') pagesize = request.args.get('pagesize') sal = request.form.get('salary') session['job_title'] = job_title session['exp'] = experience if curr is None: curr = 1 if pagesize is None: pagesize = 10 if job_title is None: job_title = '' if experience is None or experience == '不限': experience = '' if city is None or city == '不限': city = '' if sal is None or sal == '不限': sal = '' if education is None or education == '不限': education = '' education = Utils.profession(education) position = Utils.toJob(position) totalpage = idao().queryAdviserJobNum(job_title, experience, city, sal, old_company, position, education) items = idao().queryAdviserJob(job_title, experience, city, sal, old_company, position, education, int(curr), int(pagesize)) if items is None or len(items) < 1: job_title = '大数据' city = '深圳' items = idao().queryAdviserJob(job_title, experience, city, sal, old_company, position, education, int(curr), int(pagesize)) return render_template('adviser.html', items=items, curr=curr, pagesize=pagesize, position=position, total=totalpage, job_title=job_title, edu=education, city=city, exp=experience, sal=sal)
def salaryTop(): job_title = request.args.get('job_title') results = idao().salaryTop(job_title) data1, data2 = [], [] for result in results: data1.append(result[1]) data2.append(result[0]) return render_template('salary_top.html', data1=data1, data2=data2)
def workCityHot(): job_title = request.args.get('job_title') results = idao().workCityHot(job_title) data1, data2 = [], [] for result in results: data1.append(result[1]) data2.append(result[0]) return render_template('work_city_top.html', data1=data1, data2=data2)
def pageview(): job_title = request.form.get('job_title') session['job_title'] = job_title experience = request.form.get('experience') city = request.form.get('city') curr = request.form.get('curr') salary = request.form.get('salary') pagesize = request.form.get('pagesize') education = request.form.get('education') if curr is None: curr = 1 if pagesize is None: pagesize = 10 if job_title is None: job_title = '大数据' if experience is None or experience == '不限': experience = '' if city is None or city == '不限': city = '' if salary is None or salary == '不限': salary = '' if education is None or education == '不限': education = '' education = Utils.profession(education) city = Utils.toCity(city) totalpage = idao().queryHotJobNum(job_title, experience, city, salary, education) items = idao().queryHotJob(job_title, experience, city, salary, education, int(curr), int(pagesize)) if len(items) < 1: job_title = '大数据' city = '深圳' items = idao().queryHotJob(job_title, experience, city, salary, education, int(curr), int(pagesize)) return render_template('hotjob.html', items=items, curr=curr, pagesize=pagesize, total=totalpage, job_title=job_title, edu=education, city=city, exp=experience, sal=salary)
def expSalaryTop(): exp = request.args.get('arg') results = idao().expSalaryTop(exp) return render_template('exp_salary_top.html', results=results)