Forráskód Böngészése

feature(结算): 结算明细(已出账单)确认接口实现

likai 4 éve
szülő
commit
bc4dcec69f
1 módosított fájl, 24 hozzáadás és 2 törlés
  1. 24 2
      handler/settle_account_bill.go

+ 24 - 2
handler/settle_account_bill.go

@@ -37,7 +37,7 @@ func (a *SettleAccountBillController) SettleAccountBillList(ctx context.Context,
 	return nil
 }
 
-// 结算明细(出账单)结算
+// 结算明细(出账单)结算
 func (a *SettleAccountMainController) SettleAccountBill(ctx context.Context, req *accountModel.AccountBillSettleReq, rsp *comm_def.CommonMsg) error {
 	tenant, err := micro_srv.GetTenant(ctx)
 	if err != nil {
@@ -58,4 +58,26 @@ func (a *SettleAccountMainController) SettleAccountBill(ctx context.Context, req
 	rsp.Code = code
 	rsp.Msg = msg
 	return nil
-}
+}
+// 结算明细(已出账单)确认
+func (a *SettleAccountMainController) ConfirmAccountBill(ctx context.Context, req *accountModel.AccountBillConfirmReq, rsp *comm_def.CommonMsg) error {
+	tenant, err := micro_srv.GetTenant(ctx)
+	if err != nil {
+		return err
+	}
+	user, err := micro_srv.GetUserInfo(ctx)
+	if err != nil {
+		return err
+	}
+	g.Log().Info("Received SettleAccountBillController.ConfirmAccountBill request @ " + tenant)
+
+	var errors = service.NewService(tenant).Confirm(*req, user)
+	_, err, code, msg := myerrors.CheckError(errors)
+	if err != nil {
+		return err
+	}
+
+	rsp.Code = code
+	rsp.Msg = msg
+	return nil
+}