示例#1
0
    def __handleInsertPenalty(self):
        insertType = self.Request.REQUEST.get('type', '')

        penalty_para = self.__getPenaltyDictionaryData()

        if (insertType == 'user'):
            userPanaltyVO = proxy.px_UserPenalty().createUserPenaltyObject(
                penalty_para)
            if not proxy.px_UserPenalty().insert_model_object(userPanaltyVO):
                raise exception.AppDbValidationError('db insert error')
        elif (insertType == 'admin'):
            adminPanaltyVO = proxy.px_AdminPenalty().createAdminPenaltyObject(
                penalty_para)
            if not proxy.px_AdminPenalty().insert_model_object(adminPanaltyVO):
                raise exception.AppDbValidationError('db insert error')
        else:
            raise exception.AppValidationError('null allow this type')
示例#2
0
def getUserPenaltyById(id):
    return proxy.px_UserPenalty().getUserPenaltyById(id)
示例#3
0
def getUserPenaltyList():
    return proxy.px_UserPenalty().getUserPenaltyList()
示例#4
0
def getUserPenaltyById(id):
    return proxy.px_UserPenalty().getUserPenaltyById(id)
示例#5
0
def getUserPenaltyList():
    return proxy.px_UserPenalty().getUserPenaltyList()