12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- package http
- import (
- grpcv1 "go-common/app/service/openplatform/anti-fraud/api/grpc/v1"
- "go-common/app/service/openplatform/anti-fraud/api/http/v1"
- "go-common/app/service/openplatform/anti-fraud/model"
- bm "go-common/library/net/http/blademaster"
- )
- //riskCheck 风险检查
- func riskCheck(c *bm.Context) {
- params := new(grpcv1.RiskCheckRequest)
- if err := c.Bind(params); err != nil {
- return
- }
- res, err := svc.RiskCheck(c, params)
- svc.Ticket2PayShield(c, params, res)
- if res.Rank == model.RankDoubt {
- res.Rank = model.RankNormal
- res.Method = model.MethodPass
- res.Desc = model.CheckPass
- }
- c.JSON(res, err)
- }
- //riskCheckV2 风险检查
- func riskCheckV2(c *bm.Context) {
- params := new(v1.RiskCheckV2Request)
- if err := c.Bind(params); err != nil {
- return
- }
- res, err := svc.RiskCheckV2(c, params)
- if err == nil {
- svc.PayShield(c, params, res)
- }
- c.JSON(res, err)
- }
- // ipList IP列表接口
- func ipList(c *bm.Context) {
- params := new(v1.IPListRequest)
- c.JSON(svc.IPList(c, params))
- }
- //ipDetail ip详情列表
- func ipDetail(c *bm.Context) {
- params := new(v1.IPDetailRequest)
- if err := c.Bind(params); err != nil {
- return
- }
- c.JSON(svc.IPDetail(c, params))
- }
- // uidList uid列表接口
- func uidList(c *bm.Context) {
- params := new(v1.UIDListRequest)
- c.JSON(svc.UIDList(c, params))
- }
- //uidDetail uid详情列表
- func uidDetail(c *bm.Context) {
- params := new(v1.UIDDetailRequest)
- if err := c.Bind(params); err != nil {
- return
- }
- c.JSON(svc.UIDDetail(c, params))
- }
- // ipBlack ip黑名单
- func ipBlack(c *bm.Context) {
- params := new(v1.IPBlackRequest)
- if err := c.Bind(params); err != nil {
- return
- }
- c.JSON(svc.IPBlack(c, params))
- }
- // uidBlack uid黑名单
- func uidBlack(c *bm.Context) {
- params := new(v1.UIDBlackRequest)
- if err := c.Bind(params); err != nil {
- return
- }
- c.JSON(svc.UIDBlack(c, params))
- }
|