|
@@ -256,18 +256,23 @@ func (this *ContractCommon) List() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
+
|
|
|
|
|
|
-
|
|
+
|
|
func (this *ContractCommon) Invalid() {
|
|
func (this *ContractCommon) Invalid() {
|
|
- contractId, _ := this.GetInt("ContractId")
|
|
+ var req contractReq.InvalidReq
|
|
|
|
+ err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
|
|
|
|
+ if err != nil {
|
|
|
|
+ this.FailWithMessage("参数解析异常!", "参数解析失败,Err:"+err.Error())
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
|
|
- if contractId <= 0 {
|
|
+ if req.ContractId <= 0 {
|
|
this.FailWithMessage("合同id必传!", "合同id必传!")
|
|
this.FailWithMessage("合同id必传!", "合同id必传!")
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
- err := contractService.InvalidContract(contractId, this.AdminWx)
|
|
+ err = contractService.InvalidContract(req.ContractId, this.AdminWx)
|
|
if err != nil {
|
|
if err != nil {
|
|
this.FailWithMessage("作废合同失败!", "作废合同失败,Err:"+err.Error())
|
|
this.FailWithMessage("作废合同失败!", "作废合同失败,Err:"+err.Error())
|
|
return
|
|
return
|