123456789101112131415161718192021222324252627282930313233343536373839 |
- package controllers
- import (
- "encoding/json"
- contractReq "hongze/hongze_mobile_admin/models/request/contract"
- contractService "hongze/hongze_mobile_admin/services/contract"
- )
- //合同模块
- type ContractCommon struct {
- BaseAuth
- }
- // @Title 上传签回附件
- // @Description 上传签回附件接口
- // @Param request body contract.UploadCheckBackFileReq true "type json string"
- // @Success Ret=200 驳回成功
- // @router /upload_check_back_file [get]
- func (this *ContractCommon) UploadCheckBackFile() {
- var req contractReq.UploadCheckBackFileReq
- err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
- if err != nil {
- this.FailWithMessage("参数解析异常!", "参数解析失败,Err:"+err.Error())
- return
- }
- //合同编号
- if req.ContractId <= 0 {
- this.FailWithMessage("请传入合同编号!", "请传入合同编号")
- return
- }
- if req.FileUrl == "" {
- this.FailWithMessage("请先上传附件!", "请先上传附件")
- return
- }
- err = contractService.UploadCheckBackFile(req.ContractId, req.FileUrl, this.AdminWx)
- this.OkWithMessage("上传成功")
- }
|