|
@@ -8,12 +8,12 @@ var Engine *xorm.Engine
|
|
|
//定义返回状态
|
|
|
const (
|
|
|
SuccessCode int64 = 1
|
|
|
- ErrorCode int64 = 0
|
|
|
+ ErrorCode int64 = 0
|
|
|
)
|
|
|
|
|
|
//流水类型1加-1减
|
|
|
const (
|
|
|
- AddCode int64 = 1
|
|
|
+ AddCode int64 = 1
|
|
|
ReduceCode int64 = -1
|
|
|
)
|
|
|
|
|
@@ -22,14 +22,14 @@ type Balance struct {
|
|
|
Id int64 `xorm:"pk autoincr id" form:"id" json:"id"`
|
|
|
UserId string `xorm:"userId" form:"userId" json:"userId"` //用户标识
|
|
|
CountPoints int64 `xorm:"countPoints" form:"countPoints" json:"countPoints"` //合计
|
|
|
- AppId int64 `xorm:"appId" form:"appId" json:"appId"` //剑鱼标识
|
|
|
+ AppId int64 `xorm:"appId" form:"appId" json:"appId"` //剑鱼标识
|
|
|
}
|
|
|
|
|
|
//积分余额
|
|
|
type BalanceUpdate struct {
|
|
|
UserId string `xorm:"userId" form:"userId" json:"userId"` //用户标识
|
|
|
CountPoints int64 `xorm:"countPoints" form:"countPoints" json:"countPoints"` //合计
|
|
|
- AppId int64 `xorm:"appId" form:"appId" json:"appId"` //剑鱼标识
|
|
|
+ AppId int64 `xorm:"appId" form:"appId" json:"appId"` //剑鱼标识
|
|
|
Change bool `xorm:"change" form:"change" json:"change"` //修改方式true新增 false消耗
|
|
|
}
|
|
|
|
|
@@ -37,28 +37,28 @@ type BalanceUpdate struct {
|
|
|
type Flow struct {
|
|
|
Id int64 `xorm:"pk autoincr id" form:"id" json:"id"`
|
|
|
UserId string `xorm:"userId" form:"userId" json:"userId"` //用户标识
|
|
|
- PointType int64 `xorm:"pointType" form:"pointType" json:"pointType"` //积分类型
|
|
|
- BusinessTypeId int64 `xorm:"businessTypeId" form:"businessTypeId" json:"businessTypeId"` //业务单据标识
|
|
|
+ PointType int64 `xorm:"pointType" form:"pointType" json:"pointType"` //积分类型
|
|
|
+ BusinessTypeId int64 `xorm:"businessTypeId" form:"businessTypeId" json:"businessTypeId"` //业务单据标识
|
|
|
BusinessType string `xorm:"businessType" form:"businessType" json:"businessType"` //业务类型
|
|
|
Point int64 `xorm:"point" form:"point" json:"point"` //积分
|
|
|
CreateTime string `xorm:"createTime" form:"createTime" json:"createTime"` //创建时间
|
|
|
EndDate string `xorm:"endDate" form:"endDate" json:"endDate"` //截止时间
|
|
|
- AppId int64 `xorm:"appId" form:"appId" json:"appId"` //剑鱼标识
|
|
|
- Sort int64 `xorm:"sort" form:"sort" json:"sort"` //操作类型1加-1减
|
|
|
+ AppId int64 `xorm:"appId" form:"appId" json:"appId"` //剑鱼标识
|
|
|
+ Sort int64 `xorm:"sort" form:"sort" json:"sort"` //操作类型1加-1减
|
|
|
}
|
|
|
|
|
|
//积分流水
|
|
|
type FlowReq struct {
|
|
|
Id int64 `xorm:"pk autoincr id" form:"id" json:"id"`
|
|
|
UserId string `xorm:"userId" form:"userId" json:"userId"` //用户标识
|
|
|
- PointType int64 `xorm:"pointType" form:"pointType" json:"pointType"` //积分类型
|
|
|
- BusinessTypeId int64 `xorm:"businessTypeId" form:"businessTypeId" json:"businessTypeId"` //业务单据标识
|
|
|
+ PointType int64 `xorm:"pointType" form:"pointType" json:"pointType"` //积分类型
|
|
|
+ BusinessTypeId int64 `xorm:"businessTypeId" form:"businessTypeId" json:"businessTypeId"` //业务单据标识
|
|
|
BusinessType string `xorm:"businessType" form:"businessType" json:"businessType"` //业务类型
|
|
|
Point int64 `xorm:"point" form:"point" json:"point"` //积分
|
|
|
CreateTime string `xorm:"createTime" form:"createTime" json:"createTime"` //创建时间
|
|
|
EndDate string `xorm:"endDate" form:"endDate" json:"endDate"` //截止时间
|
|
|
- AppId int64 `xorm:"appId" form:"appId" json:"appId"` //剑鱼标识
|
|
|
- Sort int64 `xorm:"sort" form:"sort" json:"sort"` //操作类型1加-1减
|
|
|
+ AppId int64 `xorm:"appId" form:"appId" json:"appId"` //剑鱼标识
|
|
|
+ Sort int64 `xorm:"sort" form:"sort" json:"sort"` //操作类型1加-1减
|
|
|
Name string `xorm:"name" form:"name" json:"name"` //积分类型名称
|
|
|
}
|
|
|
|
|
@@ -69,29 +69,29 @@ type Solde struct {
|
|
|
UserId string `xorm:"userId" form:"userId" json:"userId"` //用户标识
|
|
|
TimePoints int64 `xorm:"timePoints" form:"timePoints" json:"timePoints"` //时效积分
|
|
|
EndDate string `xorm:"endDate" form:"endDate" json:"endDate"` //有效期止
|
|
|
- AppId int64 `xorm:"appId" form:"appId" json:"appId"` //剑鱼标识
|
|
|
+ AppId int64 `xorm:"appId" form:"appId" json:"appId"` //剑鱼标识
|
|
|
}
|
|
|
|
|
|
//积分流水
|
|
|
type FlowJSON struct {
|
|
|
UserId string `xorm:"userId" form:"userId" json:"userId"` //用户标识
|
|
|
- PointType int64 `xorm:"pointType" form:"pointType" json:"pointType"` //积分类型
|
|
|
- BusinessTypeId int64 `xorm:"businessTypeId" form:"businessTypeId" json:"businessTypeId"` //业务单据标识
|
|
|
+ PointType int64 `xorm:"pointType" form:"pointType" json:"pointType"` //积分类型
|
|
|
+ BusinessTypeId int64 `xorm:"businessTypeId" form:"businessTypeId" json:"businessTypeId"` //业务单据标识
|
|
|
BusinessType string `xorm:"businessType" form:"businessType" json:"businessType"` //业务类型
|
|
|
Point int64 `xorm:"point" form:"point" json:"point"` //积分
|
|
|
EndDate string `xorm:"endDate" form:"endDate" json:"endDate"` //截止时间
|
|
|
- AppId int64 `xorm:"appId" form:"appId" json:"appId"` //剑鱼标识
|
|
|
+ AppId int64 `xorm:"appId" form:"appId" json:"appId"` //剑鱼标识
|
|
|
OperationType bool `xorm:"operationType" form:"operationType" json:"operationType"` //永久:true、时效:false
|
|
|
- Sort int64 `xorm:"sort" form:"sort" json:"sort"` //操作类型1加-1减
|
|
|
- Page int64 `xorm:"page" form:"page" json:"page"` //当前页数
|
|
|
- PageSize int64 `xorm:"pageSize" form:"pageSize" json:"pageSize"` //每页数量
|
|
|
+ Sort int64 `xorm:"sort" form:"sort" json:"sort"` //操作类型1加-1减
|
|
|
+ Page int64 `xorm:"page" form:"page" json:"page"` //当前页数
|
|
|
+ PageSize int64 `xorm:"pageSize" form:"pageSize" json:"pageSize"` //每页数量
|
|
|
}
|
|
|
|
|
|
//到期积分查询
|
|
|
type ExpireJSON struct {
|
|
|
- UserId string `xorm:"userId" form:"userId" json:"userId"` //用户标识
|
|
|
- EndDate string `xorm:"endDate" form:"endDate" json:"endDate"` //截止时间
|
|
|
- AppId int64 `xorm:"appId" form:"appId" json:"appId"` //剑鱼标识
|
|
|
+ UserId string `xorm:"userId" form:"userId" json:"userId"` //用户标识
|
|
|
+ EndDate string `xorm:"endDate" form:"endDate" json:"endDate"` //截止时间
|
|
|
+ AppId int64 `xorm:"appId" form:"appId" json:"appId"` //剑鱼标识
|
|
|
}
|
|
|
|
|
|
//积分结存修改
|
|
@@ -101,13 +101,13 @@ type SoldeUpdate struct {
|
|
|
UserId string `xorm:"userId" form:"userId" json:"userId"` //用户标识
|
|
|
Points int64 `xorm:"points" form:"points" json:"points"` //积分
|
|
|
EndDate string `xorm:"endDate" form:"endDate" json:"endDate"` //有效期止
|
|
|
- AppId int64 `xorm:"appId" form:"appId" json:"appId"` //剑鱼标识
|
|
|
+ AppId int64 `xorm:"appId" form:"appId" json:"appId"` //剑鱼标识
|
|
|
}
|
|
|
|
|
|
//积分守护
|
|
|
type GuardJSON struct {
|
|
|
UserId string `xorm:"userId" form:"userId" json:"userId"` //用户标识
|
|
|
- PointType int64 `xorm:"pointType" form:"pointType" json:"pointType"` //积分类型
|
|
|
+ PointType int64 `xorm:"pointType" form:"pointType" json:"pointType"` //积分类型
|
|
|
EndDate string `xorm:"endDate" form:"endDate" json:"endDate"` //截止时间
|
|
|
- AppId int64 `xorm:"appId" form:"appId" json:"appId"` //剑鱼标识
|
|
|
+ AppId int64 `xorm:"appId" form:"appId" json:"appId"` //剑鱼标识
|
|
|
}
|