institutionsfreezelogic.go 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. package logic
  2. import (
  3. "app.yhyue.com/moapp/jyInfo/rpc/model"
  4. mc "app.yhyue.com/moapp/jybase/common"
  5. "context"
  6. "log"
  7. "app.yhyue.com/moapp/jyInfo/rpc/manager/internal/svc"
  8. "app.yhyue.com/moapp/jyInfo/rpc/manager/type/manager"
  9. "github.com/zeromicro/go-zero/core/logx"
  10. )
  11. type InstitutionsFreezeLogic struct {
  12. ctx context.Context
  13. svcCtx *svc.ServiceContext
  14. logx.Logger
  15. }
  16. func NewInstitutionsFreezeLogic(ctx context.Context, svcCtx *svc.ServiceContext) *InstitutionsFreezeLogic {
  17. return &InstitutionsFreezeLogic{
  18. ctx: ctx,
  19. svcCtx: svcCtx,
  20. Logger: logx.WithContext(ctx),
  21. }
  22. }
  23. // 管理后台机构冻结
  24. func (l *InstitutionsFreezeLogic) InstitutionsFreeze(in *manager.InstitutionsFreezeReq) (*manager.InfoResp, error) {
  25. // todo: add your logic here and delete this line
  26. var resp manager.InfoResp
  27. log.Println("企业冻结管理审批修改接口参数:", in)
  28. model.Mysql.SelectBySql(`UPDATE information SET status = -1 ,review_desc = "机构已冻结" WHERE status IN (0,1,2) and published =1 and is_del = 1 and app_id = ` + in.AppId + ` and ent_id = ` + mc.InterfaceToStr(in.EntId))
  29. model.Mysql.SelectBySql(`UPDATE supply_info SET status = -1 ,review_desc = "机构已冻结" WHERE status IN (0,1,2) and published =1 and is_del = 1 and app_id = ` + in.AppId + ` and ent_id = ` + mc.InterfaceToStr(in.EntId))
  30. return &resp, nil
  31. }