controllers

package
v0.0.0-...-dcf2840 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2015 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

*需求:根据金数据表单的提交数据建立一份名单(每行一个人名,可以手动建立) *然后编写一个程序用于抽奖。 *功能: *1.基于WEB,便于演示; *2.有启停按钮,点击启动按钮则开始极速循环遍历名单(人名或序号) *3.需要实时列有中奖名单 *4.选出10人(可配置)后启停按钮不可用,抽奖结束 *5.程序需纯go开发,放在github里 *@author xialingsc *@data 2015-06-04

Index

Constants

View Source
const (
	LUCK_PERSON_NUMBER = 10
)

Variables

This section is empty.

Functions

func DisplayList

func DisplayList(list []Person)

func DisplayLuckPersonList

func DisplayLuckPersonList()

测试展现列表

Types

type MainController

type MainController struct {
	beego.Controller
}

func (*MainController) Get

func (c *MainController) Get()

func (*MainController) Push

func (this *MainController) Push()

type Person

type Person struct {
	SerialNumber int    `json:"serial,omitempty"` //序号
	Name         string `json:"name,omitempty"`   //姓名
}

func GetQueuePersonList

func GetQueuePersonList() []Person

获取参与抽奖的列表,排除已抽中人员

func ReadFile

func ReadFile() []Person

读取文件 格式为:人名 func ReadFile(path string) []Person {

type ScrollTempResult

type ScrollTempResult struct {
	TQueuePersonList []Person //放参与抽奖人数列表
	LPersonList      []Person //放中奖人数列表

}

用于通过json返回web页面

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL