def pay(statsOldStatus, statsNewStatus, logStatus): user = session['user_id'] if user is None: result=rs.ResultStatus(rs.FAILURE.status,rs.FAILURE.msg) return json.dumps(result.__dict__,ensure_ascii=False) result = DiagnosePayStats.updatePaidStatsStatus(user,statsOldStatus, statsNewStatus) log = DiagnosePayStatsLog.insertNewItem(logStatus,user,result[0]) DiagnosePayStatsLogRel.insertNewItem(result[1],log) dict = {} dict['money'] = float(result[0]) resultJson=rs.ResultStatus(rs.SUCCESS.status,rs.SUCCESS.msg,dict) return json.dumps(resultJson.__dict__,ensure_ascii=False)
def pay(statsOldStatus, statsNewStatus, logStatus): user = session['user_id'] if user is None: result = rs.ResultStatus(rs.FAILURE.status, rs.FAILURE.msg) return json.dumps(result.__dict__, ensure_ascii=False) result = DiagnosePayStats.updatePaidStatsStatus(user, statsOldStatus, statsNewStatus) log = DiagnosePayStatsLog.insertNewItem(logStatus, user, result[0]) DiagnosePayStatsLogRel.insertNewItem(result[1], log) dict = {} dict['money'] = float(result[0]) resultJson = rs.ResultStatus(rs.SUCCESS.status, rs.SUCCESS.msg, dict) return json.dumps(resultJson.__dict__, ensure_ascii=False)
def getStatsLogList(): user = session['user_id'] return getList(user, DiagnosePayStatsLog.getLogList(user))