You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

618 lines
15 KiB

4 years ago
2 years ago
2 years ago
2 years ago
4 years ago
2 years ago
1 year ago
2 years ago
4 years ago
4 years ago
4 years ago
2 years ago
4 years ago
2 years ago
4 years ago
4 years ago
4 years ago
4 years ago
2 years ago
4 years ago
2 years ago
4 years ago
2 years ago
4 years ago
2 years ago
4 years ago
2 years ago
4 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
4 years ago
2 years ago
4 years ago
2 years ago
4 years ago
4 years ago
4 years ago
2 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
4 years ago
2 years ago
2 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
2 years ago
4 years ago
4 years ago
4 years ago
2 years ago
4 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
4 years ago
4 years ago
4 years ago
4 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
4 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
4 years ago
4 years ago
4 years ago
2 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
4 years ago
12 months ago
4 years ago
4 years ago
2 years ago
4 years ago
4 years ago
4 years ago
4 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
4 years ago
12 months ago
4 years ago
4 years ago
2 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
4 years ago
4 years ago
4 years ago
1 year ago
2 years ago
4 years ago
4 years ago
4 years ago
4 years ago
2 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
2 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
2 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
2 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. package main
  2. import (
  3. "fmt"
  4. "reflect"
  5. "time"
  6. "git.ouxuan.net/hasaki-service/hasaki-sdk/hskdb"
  7. "git.ouxuan.net/hasaki-service/hasaki-sdk/hskgin"
  8. "git.ouxuan.net/hasaki-service/hasaki-sdk/hsklogger/L"
  9. "git.ouxuan.net/hasaki-service/hasaki-sdk/hsktime"
  10. "git.ouxuan.net/hasaki-service/hasaki-sdk/hskutils"
  11. "github.com/spf13/cast"
  12. "github.com/tidwall/gjson"
  13. "xorm.io/builder"
  14. "xorm.io/xorm"
  15. )
  16. type Temp3A60 struct {
  17. Id int
  18. service string
  19. QueueStatus string
  20. }
  21. // ----------------------------temp------------------------------------
  22. // wherePrimaryKey 主键查询
  23. func (TempLowHead3A60 *Temp3A60) wherePrimaryKey() (q interface{}, args []interface{}) {
  24. //todo 根据需求修改
  25. return "`id`=?", []interface{}{
  26. TempLowHead3A60.Id,
  27. }
  28. }
  29. // wherePrimaryKeyWithCond 主键查询
  30. func (TempLowHead3A60 *Temp3A60) wherePrimaryKeyWithCond() builder.Cond {
  31. //todo 根据需求修改
  32. return nil
  33. }
  34. // whereDataWithCond 列表查询
  35. func (TempLowHead3A60 *Temp3A60) whereDataWithCond() builder.Cond {
  36. //todo 根据需求修改
  37. return nil
  38. }
  39. // whereData 列表查询筛选
  40. func (TempLowHead3A60 *Temp3A60) whereData() (q interface{}, args []interface{}) {
  41. //todo
  42. return "", nil
  43. }
  44. // orderData 列表查询排序
  45. func (TempLowHead3A60 *Temp3A60) orderData() string {
  46. //todo
  47. return "`id` desc"
  48. }
  49. // init 数据初始化,可附加更多数据
  50. func (TempLowHead3A60 *Temp3A60) init() {
  51. //todo
  52. }
  53. func (TempLowHead3A60 *Temp3A60) joinTable() (typesAndsqlxAndcondition [][]string) {
  54. //todo
  55. return [][]string{
  56. // {"LEFT", "(SELECT id as external_brand_id,name as brand_name FROM `ox_brand`) as tmp", "tmp.external_brand_id=brand_id"},
  57. }
  58. }
  59. // saveAllCols 保存时是否全量保存
  60. func (TempLowHead3A60 *Temp3A60) isSaveAllCols() bool {
  61. return false
  62. }
  63. // insertPretreatment 新增前预处理
  64. func (TempLowHead3A60 *Temp3A60) insertPretreatment() error {
  65. //todo
  66. return nil
  67. }
  68. // updatePretreatment 修改前预处理
  69. func (TempLowHead3A60 *Temp3A60) updatePretreatment() error {
  70. //todo
  71. return nil
  72. }
  73. // deletePretreatment 删除前预处理
  74. func (TempLowHead3A60 *Temp3A60) deletePretreatment() error {
  75. //todo
  76. return nil
  77. }
  78. func (TempLowHead3A60 *Temp3A60) getXorm() *xorm.Engine {
  79. //todo
  80. return hskdb.GetXormAuto()
  81. }
  82. // 队列状态
  83. const (
  84. TempLowHead3A60_AutoQueueWait = 2 * time.Second
  85. TempLowHead3A60_AutoQueueStatusNone = "None"
  86. TempLowHead3A60_AutoQueueStatusWait = "Wait"
  87. TempLowHead3A60_AutoQueueStatusIng = "Ing"
  88. TempLowHead3A60_AutoQueueStatusSuccess = "Success"
  89. TempLowHead3A60_AutoQueueStatusFail = "Fail"
  90. )
  91. // 不同service对应的不同队列状态
  92. var TempLowHead3A60_AutoQueueStatusFieldMap = map[string]string{
  93. "service": "queue_status",
  94. }
  95. // 队列事件
  96. func (TempLowHead3A60 *Temp3A60) queueEvent() error {
  97. //todo
  98. return nil
  99. }
  100. // ----------------------------temp------------------------------------
  101. // Save 保存或者新增,通过wherePrimaryKey查不到数据时,新增数据,否则修改数据,参数:isAllCols...
  102. func (TempLowHead3A60 *Temp3A60) Save(mustCols ...string) (err error) {
  103. if TempLowHead3A60.service == "" {
  104. TempLowHead3A60.service = "none"
  105. }
  106. tmp := Temp3A60{}
  107. whereQuery, whereArgs := TempLowHead3A60.wherePrimaryKey()
  108. whereCond := TempLowHead3A60.wherePrimaryKeyWithCond()
  109. session := TempLowHead3A60.getXorm().NewSession()
  110. defer session.Close()
  111. if whereQuery != "" {
  112. session = session.Where(whereQuery, whereArgs...)
  113. }
  114. if whereCond != nil {
  115. session = session.Where(whereCond)
  116. }
  117. _, err = session.Get(&tmp)
  118. if err != nil {
  119. return
  120. }
  121. if tmp.Id == 0 {
  122. err = TempLowHead3A60.insertPretreatment()
  123. if err != nil {
  124. return
  125. }
  126. _, err = TempLowHead3A60.getXorm().Insert(TempLowHead3A60)
  127. } else {
  128. err = TempLowHead3A60.updatePretreatment()
  129. if err != nil {
  130. return
  131. }
  132. if len(mustCols) > 0 {
  133. _, err = TempLowHead3A60.getXorm().MustCols(mustCols...).Where(whereQuery, whereArgs...).Update(TempLowHead3A60)
  134. } else {
  135. if TempLowHead3A60.isSaveAllCols() {
  136. _, err = TempLowHead3A60.getXorm().AllCols().Where(whereQuery, whereArgs...).Update(TempLowHead3A60)
  137. } else {
  138. _, err = TempLowHead3A60.getXorm().Where(whereQuery, whereArgs...).Update(TempLowHead3A60)
  139. }
  140. }
  141. }
  142. return err
  143. }
  144. func (TempLowHead3A60 *Temp3A60) Service(key string) *Temp3A60 {
  145. TempLowHead3A60.service = key
  146. return TempLowHead3A60
  147. }
  148. func (TempLowHead3A60 *Temp3A60) getFieldTypes() map[string]reflect.Kind {
  149. types := reflect.TypeOf(TempLowHead3A60)
  150. fieldType := map[string]reflect.Kind{}
  151. for i := 0; i < types.Elem().NumField(); i++ {
  152. if types.Elem().Field(i).Type.String() == "hsktime.Time" {
  153. fieldType[string(types.Elem().Field(i).Tag.Get("json"))] = reflect.Kind(100)
  154. continue
  155. }
  156. fieldType[string(types.Elem().Field(i).Tag.Get("json"))] = types.Elem().Field(i).Type.Kind()
  157. }
  158. return fieldType
  159. }
  160. func (TempLowHead3A60 *Temp3A60) fixSqlRowMap(fieldType map[string]reflect.Kind, raw map[string]interface{}) map[string]interface{} {
  161. for i := range raw {
  162. // log.Println(i, fieldType[i], cast.ToString(raw[i]))
  163. switch fieldType[i] {
  164. case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
  165. raw[i] = cast.ToInt64(cast.ToString(raw[i]))
  166. case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
  167. raw[i] = cast.ToUint64(cast.ToString(raw[i]))
  168. case reflect.Float32, reflect.Float64:
  169. raw[i] = cast.ToFloat64(cast.ToString(raw[i]))
  170. case reflect.String:
  171. raw[i] = cast.ToString(raw[i])
  172. case reflect.Slice, reflect.Array, reflect.Map, reflect.Struct, reflect.Ptr:
  173. raw[i] = gjson.Parse(cast.ToString(raw[i])).Value() //todo
  174. case 100:
  175. // 2023-09-04 09:53:19 +0000 UTC
  176. _time, _ := time.Parse(
  177. "2006-01-02 15:04:05 +0000 UTC",
  178. cast.ToString(raw[i]),
  179. )
  180. raw[i] = hsktime.Time(_time)
  181. default:
  182. raw[i] = cast.ToString(raw[i])
  183. }
  184. }
  185. return raw
  186. }
  187. // Load 为实例载入数据,数据来源取决于wherePrimaryKey查找实例中的数据
  188. func (TempLowHead3A60 *Temp3A60) Load() (err error) {
  189. if TempLowHead3A60.service == "" {
  190. TempLowHead3A60.service = "none"
  191. }
  192. whereQuery, whereArgs := TempLowHead3A60.wherePrimaryKey()
  193. whereCond := TempLowHead3A60.wherePrimaryKeyWithCond()
  194. session := TempLowHead3A60.getXorm().NewSession()
  195. defer session.Close()
  196. typesAndSqlxAndCndition := TempLowHead3A60.joinTable()
  197. isJoin := false
  198. for _, v := range typesAndSqlxAndCndition {
  199. isJoin = true
  200. session = session.Join(v[0], v[1], v[2])
  201. }
  202. if whereQuery != "" {
  203. session = session.Where(whereQuery, whereArgs...)
  204. }
  205. if whereCond != nil {
  206. session = session.Where(whereCond)
  207. }
  208. if !isJoin {
  209. _, err = session.Get(TempLowHead3A60)
  210. if err != nil {
  211. return
  212. }
  213. } else {
  214. fieldType := TempLowHead3A60.getFieldTypes()
  215. session = session.Table(TempLowHead3A60)
  216. raw := map[string]interface{}{}
  217. session.Get(&raw)
  218. raw = TempLowHead3A60.fixSqlRowMap(fieldType, raw)
  219. hskutils.Interface2Struct(raw, TempLowHead3A60)
  220. }
  221. TempLowHead3A60.init()
  222. return
  223. }
  224. // Data 不进行分页的数据列表
  225. func (TempLowHead3A60 *Temp3A60) Data() (data []Temp3A60) {
  226. if TempLowHead3A60.service == "" {
  227. TempLowHead3A60.service = "none"
  228. }
  229. q, args := TempLowHead3A60.whereData()
  230. _xorm := TempLowHead3A60.getXorm()
  231. session := _xorm.NewSession()
  232. defer func() {
  233. session.Close()
  234. }()
  235. typesAndSqlxAndCndition := TempLowHead3A60.joinTable()
  236. isJoin := false
  237. for _, v := range typesAndSqlxAndCndition {
  238. isJoin = true
  239. session = session.Join(v[0], v[1], v[2])
  240. }
  241. if q != "" {
  242. session = session.Where(q, args...)
  243. }
  244. whereCond := TempLowHead3A60.whereDataWithCond()
  245. if whereCond != nil {
  246. session = session.Where(whereCond)
  247. }
  248. order := TempLowHead3A60.orderData()
  249. if order != "" {
  250. session = session.OrderBy(order)
  251. }
  252. if !isJoin {
  253. session.Find(&data)
  254. } else {
  255. fieldType := TempLowHead3A60.getFieldTypes()
  256. session = session.Table(TempLowHead3A60)
  257. raw := []map[string]interface{}{}
  258. session.Find(&raw)
  259. for i := range raw {
  260. item := Temp3A60{}
  261. raw[i] = TempLowHead3A60.fixSqlRowMap(fieldType, raw[i])
  262. hskutils.Interface2Struct(raw[i], &item)
  263. data = append(data, item)
  264. }
  265. }
  266. for i := range data {
  267. data[i].service = TempLowHead3A60.service
  268. data[i].init()
  269. }
  270. return
  271. }
  272. // PageData 进行分页的数据列表,page从0开始
  273. func (TempLowHead3A60 *Temp3A60) PageData(page, pageSize int) (data []Temp3A60, count int64) {
  274. if TempLowHead3A60.service == "" {
  275. TempLowHead3A60.service = "none"
  276. }
  277. q, args := TempLowHead3A60.whereData()
  278. _xorm := TempLowHead3A60.getXorm()
  279. session := _xorm.NewSession()
  280. defer func() {
  281. session.Close()
  282. }()
  283. typesAndSqlxAndCndition := TempLowHead3A60.joinTable()
  284. isJoin := false
  285. for _, v := range typesAndSqlxAndCndition {
  286. isJoin = true
  287. session = session.Join(v[0], v[1], v[2])
  288. }
  289. if q != "" {
  290. session = session.Where(q, args...)
  291. }
  292. whereCond := TempLowHead3A60.whereDataWithCond()
  293. if whereCond != nil {
  294. session = session.Where(whereCond)
  295. }
  296. order := TempLowHead3A60.orderData()
  297. if order != "" {
  298. session = session.OrderBy(order)
  299. }
  300. session = session.Limit(pageSize, page*pageSize)
  301. if !isJoin {
  302. count, _ = session.FindAndCount(&data)
  303. } else {
  304. fieldType := TempLowHead3A60.getFieldTypes()
  305. session = session.Table(TempLowHead3A60)
  306. raw := []map[string]interface{}{}
  307. count, _ = session.FindAndCount(&raw)
  308. for i := range raw {
  309. item := Temp3A60{}
  310. raw[i] = TempLowHead3A60.fixSqlRowMap(fieldType, raw[i])
  311. hskutils.Interface2Struct(raw[i], &item)
  312. data = append(data, item)
  313. }
  314. }
  315. for i := range data {
  316. data[i].service = TempLowHead3A60.service
  317. data[i].init()
  318. }
  319. return
  320. }
  321. // Delete 删除数据
  322. func (TempLowHead3A60 *Temp3A60) Delete() (err error) {
  323. if TempLowHead3A60.service == "" {
  324. TempLowHead3A60.service = "none"
  325. }
  326. whereQuery, whereArgs := TempLowHead3A60.wherePrimaryKey()
  327. whereCond := TempLowHead3A60.wherePrimaryKeyWithCond()
  328. session := TempLowHead3A60.getXorm().NewSession()
  329. defer session.Close()
  330. if whereQuery != "" {
  331. session = session.Where(whereQuery, whereArgs...)
  332. }
  333. if whereCond != nil {
  334. session = session.Where(whereCond)
  335. }
  336. err = TempLowHead3A60.deletePretreatment()
  337. if err != nil {
  338. return
  339. }
  340. _, err = session.Delete(TempLowHead3A60)
  341. return
  342. }
  343. // ----------------------------temp------------------------------------
  344. func StartQueueTaskPrefixHigHead3A60Temp3A60() {
  345. serviceName := "Prefix3A60"
  346. f := TempLowHead3A60_AutoQueueStatusFieldMap[serviceName]
  347. go func() {
  348. defer func() {
  349. err := recover()
  350. if err != nil {
  351. L.Error("StartQueueTaskPrefixHigHead3A60Temp3A60 意外退出:", err)
  352. }
  353. time.Sleep(time.Second * 5)
  354. StartQueueTaskPrefixHigHead3A60Temp3A60()
  355. }()
  356. for {
  357. onec := &Temp3A60{}
  358. hskdb.GetXormAuto().Where(fmt.Sprintf("`%s`=?", f), TempLowHead3A60_AutoQueueStatusWait).OrderBy("rand()").Get(onec)
  359. session := onec.getXorm().NewSession()
  360. defer session.Close()
  361. session = session.Table(onec)
  362. whereQuery, whereArgs := onec.wherePrimaryKey()
  363. whereCond := onec.wherePrimaryKeyWithCond()
  364. if whereQuery != "" {
  365. session = session.Where(whereQuery, whereArgs...)
  366. }
  367. if whereCond != nil {
  368. session = session.Where(whereCond)
  369. }
  370. i, err := session.Where(fmt.Sprintf("`%s`=?", f), TempLowHead3A60_AutoQueueStatusWait).Update(map[string]interface{}{f: TempLowHead3A60_AutoQueueStatusIng})
  371. if err == nil && i == 1 {
  372. func() {
  373. {
  374. onec.service = serviceName
  375. err := onec.queueEvent()
  376. session := onec.getXorm().NewSession()
  377. defer session.Close()
  378. session = session.Table(onec)
  379. whereQuery, whereArgs := onec.wherePrimaryKey()
  380. whereCond := onec.wherePrimaryKeyWithCond()
  381. if whereQuery != "" {
  382. session = session.Where(whereQuery, whereArgs...)
  383. }
  384. if whereCond != nil {
  385. session = session.Where(whereCond)
  386. }
  387. if err != nil {
  388. session.Update(map[string]interface{}{f: TempLowHead3A60_AutoQueueStatusFail})
  389. } else {
  390. session.Update(map[string]interface{}{f: TempLowHead3A60_AutoQueueStatusSuccess})
  391. }
  392. }
  393. }()
  394. }
  395. time.Sleep(TempLowHead3A60_AutoQueueWait)
  396. }
  397. }()
  398. }
  399. func InitializationHttpCrudPrefixHigHead3A60Temp3A60(router *hskgin.GinHelper, authoritys ...func(ctx *hskgin.GinContextHelper, TempLowHead3A60 *Temp3A60)) {
  400. var authority = func(ctx *hskgin.GinContextHelper, TempLowHead3A60 *Temp3A60) {
  401. }
  402. if len(authoritys) > 0 {
  403. authority = authoritys[0]
  404. }
  405. router.Any("/Prefix3A60/TempLowHead3A60/tryToInitialize", func(ctx *hskgin.GinContextHelper) {
  406. req := &Temp3A60{}
  407. err := hskdb.XormSync2(&Temp3A60{})
  408. ctx.CheckErrDisplayByError(err)
  409. ctx.DisplayByData(req)
  410. })
  411. /*
  412. @yapi
  413. @group TempLowHead3A60
  414. @name 获取(Prefix3A60-TempLowHead3A60)单个数据
  415. @path /Prefix3A60/TempLowHead3A60/get
  416. @markdown
  417. ##
  418. ```
  419. 传入主键获取对应数据
  420. ```
  421. @end
  422. */
  423. router.Any("/Prefix3A60/TempLowHead3A60/get", func(ctx *hskgin.GinContextHelper) {
  424. req := &Temp3A60{}
  425. ctx.Bind(req)
  426. authority(ctx, req)
  427. req.service = "Prefix3A60"
  428. err := req.Load()
  429. ctx.CheckErrDisplayByError(err)
  430. ctx.DisplayByData(req)
  431. })
  432. /*
  433. @yapi
  434. @group TempLowHead3A60
  435. @name 保存(Prefix3A60-TempLowHead3A60)单个数据
  436. @path /Prefix3A60/TempLowHead3A60/save
  437. @markdown
  438. ##
  439. ```
  440. 传入整体数据插入或者保存(取决于主键是否存在)
  441. ```
  442. @end
  443. */
  444. router.Any("/Prefix3A60/TempLowHead3A60/save", func(ctx *hskgin.GinContextHelper) {
  445. req := &Temp3A60{}
  446. ctx.Bind(&req)
  447. authority(ctx, req)
  448. req.service = "Prefix3A60"
  449. err := req.Save()
  450. ctx.CheckErrDisplayByError(err)
  451. err = req.Load()
  452. ctx.CheckErrDisplayByError(err)
  453. ctx.DisplayByData(req)
  454. })
  455. /*
  456. @yapi
  457. @group TempLowHead3A60
  458. @name 获取(Prefix3A60-TempLowHead3A60)无分页数据
  459. @path /Prefix3A60/TempLowHead3A60/data
  460. @markdown
  461. ##
  462. ```
  463. 获取数据列表,无分页
  464. ```
  465. @end
  466. */
  467. router.Any("/Prefix3A60/TempLowHead3A60/data", func(ctx *hskgin.GinContextHelper) {
  468. req := &Temp3A60{}
  469. ctx.Bind(&req)
  470. authority(ctx, req)
  471. req.service = "Prefix3A60"
  472. data := req.Data()
  473. ctx.DisplayByData(data)
  474. })
  475. /*
  476. @yapi
  477. @group TempLowHead3A60
  478. @name 获取(Prefix3A60-TempLowHead3A60)分页数据
  479. @path /Prefix3A60/TempLowHead3A60/list
  480. @markdown
  481. ##
  482. ```
  483. 获取数据列表,分页,page参数
  484. ```
  485. @end
  486. */
  487. router.Any("/Prefix3A60/TempLowHead3A60/list", func(ctx *hskgin.GinContextHelper) {
  488. req := &Temp3A60{}
  489. ctx.Bind(&req)
  490. authority(ctx, req)
  491. page := ctx.ParamRequired2Page(true)
  492. req.service = "Prefix3A60"
  493. data, count := req.PageData(page, 10)
  494. ctx.DisplayByPage(data, count)
  495. })
  496. /*
  497. @yapi
  498. @group TempLowHead3A60
  499. @name 删除一条(Prefix3A60-TempLowHead3A60)数据
  500. @path /Prefix3A60/TempLowHead3A60/delete
  501. @markdown
  502. ##
  503. ```
  504. 传入主键参数,删除一条数据
  505. ```
  506. @end
  507. */
  508. router.Any("/Prefix3A60/TempLowHead3A60/delete", func(ctx *hskgin.GinContextHelper) {
  509. req := &Temp3A60{}
  510. ctx.Bind(&req)
  511. authority(ctx, req)
  512. req.service = "Prefix3A60"
  513. err := req.Delete()
  514. ctx.CheckErrDisplayByError(err)
  515. ctx.DisplayBySuccess("删除成功")
  516. })
  517. }