fonchain-approval-fork/pkg/serializer/department_approval_setting.go
gy ae137a6883 feat
DetailSetting UpdateSetting 已完成
Create Detail Remove List 待调试
Update 未开始
2022-07-28 17:18:01 +08:00

32 lines
746 B
Go

package serializer
import (
"github.com/fonchain_enterprise/fonchain-approval/api/approval"
"github.com/fonchain_enterprise/fonchain-approval/pkg/model"
)
//BuildSetting 处理单个detail返回
func BuildSetting(entity *model.DepartmentApprovalSetting) *approval.SettingRequest {
var copyUsers []*approval.CopyUser
for _, copyUser := range entity.CopyUsers {
temp := &approval.CopyUser{
ID: copyUser.ID,
Name: copyUser.Name,
}
copyUsers = append(copyUsers, temp)
}
response := &approval.SettingRequest{
ID: entity.ID,
Domain: entity.Domain,
DepartmentId: entity.DepartmentID,
CopyUsers: copyUsers,
ApproverId: entity.ApproverID,
ApproverName: entity.ApproverName,
}
return response
}