institutionsfreezelogic.go 1.3 KB

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