示例#1
0
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)
示例#2
0
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)
示例#3
0
def getStatsLogList():
    user = session['user_id']
    return getList(user, DiagnosePayStatsLog.getLogList(user))
示例#4
0
def getStatsLogList():
    user = session['user_id']
    return getList(user, DiagnosePayStatsLog.getLogList(user))