app/controller/catering/seller.js   A
last analyzed

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 43
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
wmc 1
eloc 6
c 1
b 0
f 0
nc 1
mnd 0
bc 1
fnc 1
dl 0
loc 43
rs 10
bpm 1
cpm 1
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A module.exports.stores 0 5 1
1
const Response = require('../../util/response')
2
const ServiceSeller = require('../../services/catering/seller')
3
4
module.exports = {
5
    /**
6
     * @api {get} /api/catering/v1/sellers/:sellerId/stores 商家的店铺列表
7
     * @apiGroup seller
8
     * @apiPermission user
9
     * @apiVersion 1.0.0
10
     * @apiParam {String} param 参数
11
     * @apiSuccess {String} data 返回数据
12
     * @apiSuccessExample {json} Visual Preview:
13
     * {
14
            "success": true,
15
            "code": 200,
16
            "data": [
17
                {
18
                    "seller_id": 1,
19
                    "name": "吕松东🇧🇷🇫🇷",
20
                    "thumb": "https://wx.qlogo.cn/mmopen/vi_32/DYAIOgq83eo13vc2RhqKyJI8f5qaGCcj2ZeRfic696O0a2PDZvJ2JrGL8ia8EJHA6KjR37ia2neD11IBcNJ4HianZg/132",
21
                    "store_type_id": 0,
22
                    "theme": "",
23
                    "tel": "",
24
                    "wechat": "",
25
                    "license": "",
26
                    "address": "",
27
                    "approve_status": 0,
28
                    "status": 1,
29
                    "audit_id": 0,
30
                    "id": 1
31
                }
32
            ],
33
            "message": "请求成功"
34
        }
35
     */
36
    stores: async function (ctx) {
37
        let data = await ServiceSeller.storeList(ctx.uid)
38
39
        return Response.output(ctx, data)
40
    },
41
42
43
}
44