浏览代码

format: 格式化代码、添加文档注释

liuyaqi 2 年之前
父节点
当前提交
3fa8b4b203

+ 14 - 14
opms_parent/app/handler/cust/customer.go

@@ -17,7 +17,7 @@ type CustomerHeader struct{}
 var isPublic, noPublic = "10", "20" // 公海,非公海
 var noCustomer = true               // 区分公海列表 和 客户列表 true  公海
 
-//Swagger:Customer 客户,测试tag 客户列表
+//Swagger:Customer 客户 客户列表
 func (c *CustomerHeader) GetList(ctx context.Context, req *model.CustCustomerSearchReq, rsp *comm_def.CommonMsg) error {
 	customerServer, err := server.NewCustomerService(ctx)
 	if err != nil {
@@ -32,7 +32,7 @@ func (c *CustomerHeader) GetList(ctx context.Context, req *model.CustCustomerSea
 
 }
 
-//Swagger:Customer 客户,测试tag 公海列表
+//Swagger:Customer 客户 公海列表
 func (c *CustomerHeader) PublicGetList(ctx context.Context, req *model.CustCustomerSearchReq, rsp *comm_def.CommonMsg) error {
 	customerServer, err := server.NewCustomerService(ctx)
 	if err != nil {
@@ -52,7 +52,7 @@ func (c *CustomerHeader) PublicGetList(ctx context.Context, req *model.CustCusto
 
 }
 
-//Swagger:Customer 客户,测试tag 创建客户
+//Swagger:Customer 客户 创建客户
 func (c *CustomerHeader) Create(ctx context.Context, req *model.CustomerAddSeq, rsp *comm_def.CommonMsg) error {
 	if err := gvalid.CheckStruct(ctx, req, nil); err != nil {
 		return err
@@ -73,7 +73,7 @@ func (c *CustomerHeader) Create(ctx context.Context, req *model.CustomerAddSeq,
 	return nil
 }
 
-//Swagger:Customer 客户,测试tag 修改客户
+//Swagger:Customer 客户 修改客户
 func (c *CustomerHeader) UpdateById(ctx context.Context, req *model.UpdateCustomer, rsp *comm_def.CommonMsg) error {
 	s, err := server.NewCustomerService(ctx)
 	if err != nil {
@@ -89,7 +89,7 @@ func (c *CustomerHeader) UpdateById(ctx context.Context, req *model.UpdateCustom
 	return nil
 }
 
-//Swagger:Customer 客户,测试tag 客户详情
+//Swagger:Customer 客户 客户详情
 func (c *CustomerHeader) GetEntityById(ctx context.Context, req *comm_def.IdsReq, rsp *comm_def.CommonMsg) error {
 	if len(req.Ids) == 0 {
 		return myerrors.ValidError("参数有误")
@@ -107,7 +107,7 @@ func (c *CustomerHeader) GetEntityById(ctx context.Context, req *comm_def.IdsReq
 	return nil
 }
 
-//Swagger:Customer 客户,测试tag 删除客户
+//Swagger:Customer 客户 删除客户
 func (c *CustomerHeader) DeleteById(ctx context.Context, req *model.DelCustomer, rsp *comm_def.CommonMsg) error {
 	if len(req.Ids) == 0 {
 		return myerrors.ValidError("参数有误")
@@ -125,7 +125,7 @@ func (c *CustomerHeader) DeleteById(ctx context.Context, req *model.DelCustomer,
 	return nil
 }
 
-//Swagger:Customer 客户,测试tag 判断客户名称是否存在
+//Swagger:Customer 客户 判断客户名称是否存在
 func (c *CustomerHeader) GetCustNameIsExist(ctx context.Context, req *model.IsExistsCustName, rsp *comm_def.CommonMsg) error {
 	if err := gvalid.CheckStruct(ctx, req, nil); err != nil {
 		return err
@@ -142,7 +142,7 @@ func (c *CustomerHeader) GetCustNameIsExist(ctx context.Context, req *model.IsEx
 	return nil
 }
 
-// 客户,测试tag  转移客户
+// Swagger:Customer 客户 转移客户
 func (c *CustomerHeader) TransCustomer(ctx context.Context, req *model.AssignCustomerReq, rsp *comm_def.CommonMsg) error {
 	if len(req.Ids) == 0 || req.SalesId == 0 {
 		return myerrors.ValidError("参数有误")
@@ -161,7 +161,7 @@ func (c *CustomerHeader) TransCustomer(ctx context.Context, req *model.AssignCus
 	return nil
 }
 
-// 客户,测试tag  分配 领取客户
+// Swagger:Customer 客户 分配、领取客户
 func (c *CustomerHeader) AssignCustomer(ctx context.Context, req *model.AssignCustomerReq, rsp *comm_def.CommonMsg) error {
 	if len(req.Ids) == 0 || req.SalesId == 0 {
 		return myerrors.ValidError("参数有误")
@@ -185,7 +185,7 @@ func (c *CustomerHeader) AssignCustomer(ctx context.Context, req *model.AssignCu
 
 }
 
-// 客户,测试tag  移入公海
+// Swagger:Customer 客户 移入公海
 func (c *CustomerHeader) MoveToPubic(ctx context.Context, req *model.MoveToPubicRep, rsp *comm_def.CommonMsg) error {
 	if len(req.Ids) == 0 {
 		return myerrors.ValidError("参数有误")
@@ -206,7 +206,7 @@ func (c *CustomerHeader) MoveToPubic(ctx context.Context, req *model.MoveToPubic
 	return nil
 }
 
-// 客户,测试tag  客户动态
+// Swagger:Customer 客户 客户动态
 func (c *CustomerHeader) GetDynamicsList(ctx context.Context, req *model.CustomerDynameicsReq, rsp *comm_def.CommonMsg) error {
 	customerServer, err := server.NewCustomerService(ctx)
 	if err != nil {
@@ -220,7 +220,7 @@ func (c *CustomerHeader) GetDynamicsList(ctx context.Context, req *model.Custome
 	return nil
 }
 
-// 客户,测试tag  合并客户
+// Swagger:Customer 客户 合并客户
 func (c *CustomerHeader) MergeCustomer(ctx context.Context, req *model.MergeCustomerRep, rsp *comm_def.CommonMsg) error {
 	if err := gvalid.CheckStruct(ctx, req, nil); err != nil {
 		return err
@@ -238,7 +238,7 @@ func (c *CustomerHeader) MergeCustomer(ctx context.Context, req *model.MergeCust
 	return nil
 }
 
-// 客户,测试tag  客户摘要
+// Swagger:Customer 客户 客户摘要
 func (c *CustomerHeader) GetCustAbstract(ctx context.Context, req *comm_def.IdReq, rsp *comm_def.CommonMsg) error {
 	if req.Id == 0 {
 		return myerrors.ValidError("参数有误")
@@ -255,7 +255,7 @@ func (c *CustomerHeader) GetCustAbstract(ctx context.Context, req *comm_def.IdRe
 	return nil
 }
 
-//Export 导出
+// Swagger:Customer 客户 导出
 func (c *CustomerHeader) Export(ctx context.Context, req *model.CustCustomerExport, rsp *comm_def.CommonMsg) error {
 	customerServer, err := server.NewCustomerService(ctx)
 	if err != nil {

+ 16 - 16
opms_parent/app/model/plat/plat_task.go

@@ -17,21 +17,21 @@ type PlatTask internal2.PlatTask
 
 type PlatTaskEx struct {
 	internal2.PlatTask
-	Step         int         `orm:"step"           json:"step"`         // 步骤号
+	Step int `orm:"step"           json:"step"` // 步骤号
 }
 
 // 查询
 type SearchPlatTaskReq struct {
-	TaskTitle  string `json:"taskTitle"`
-	TaskType   string `son:"taskType"`
-	TaskStatus string `json:"taskStatus"`
-	IsOverdue  string `json:"isOverdue"`
-	MainUserId string `json:"mainUserId"`
-	TargetId   string `json:"targetId"`
-	TargetType string `json:"targetType"`
-	MySelf     string `json:"mySelf"`
-	IsMain     string `json:"isMain"`
-	OperateType     string `json:"operateType"`
+	TaskTitle   string `json:"taskTitle"`
+	TaskType    string `son:"taskType"`
+	TaskStatus  string `json:"taskStatus"`
+	IsOverdue   string `json:"isOverdue"`
+	MainUserId  string `json:"mainUserId"`
+	TargetId    string `json:"targetId"`
+	TargetType  string `json:"targetType"`
+	MySelf      string `json:"mySelf"`
+	IsMain      string `json:"isMain"`
+	OperateType string `json:"operateType"`
 	request.PageReq
 }
 
@@ -83,9 +83,9 @@ type ExportContent struct {
 
 // 督办处理接口
 type HandleReq struct {
-	TaskId       int    				`json:"taskId"  v:"required|min:1#任务Id不能为空|任务Id不能为空"`
-	Step         int    				`json:"step"    v:"required|min:10#步骤不能为空|步骤不能为空"` // 步骤号(10接收  15暂存  20提交  30审批(督办人)  40评价(监办人))
-	HandleStatus string 				`json:"handleStatus" `   // 处理结果(10接收20提交30审批通过40审批退回)
-	HandleDesc   string  				`json:"handleDesc"`
-	ProgressList []*PlatTaskProgress    `json:"progressList"`
+	TaskId       int                 `json:"taskId"  v:"required|min:1#任务Id不能为空|任务Id不能为空"`
+	Step         int                 `json:"step"    v:"required|min:10#步骤不能为空|步骤不能为空"` // 步骤号(10接收  15暂存  20提交  30审批(督办人)  40评价(监办人))
+	HandleStatus string              `json:"handleStatus" `                             // 处理结果(10接收20提交30审批通过40审批退回)
+	HandleDesc   string              `json:"handleDesc"`
+	ProgressList []*PlatTaskProgress `json:"progressList"`
 }

+ 1 - 1
opms_parent/app/model/work/work_order.go

@@ -8,7 +8,7 @@ import (
 	"dashoo.cn/opms_libary/request"
 	"github.com/gogf/gf/os/gtime"
 
-	 "dashoo.cn/micro/app/model/work/internal"
+	"dashoo.cn/micro/app/model/work/internal"
 )
 
 // WorkOrder is the golang structure for table work_order.

+ 0 - 1
opms_parent/app/service/base.go

@@ -14,7 +14,6 @@ var (
 	UpdateFieldEx       = []interface{}{"id", "created_by", "created_name", "created_time"}
 )
 
-
 func Sequence(db gdb.DB, name string) (string, error) {
 	v, err := db.GetValue("select `nextval`( ? );", name)
 	if err != nil {