/shop/addShop
在用管理后台
#
| 控制器 | com.jxxx.dscp.api.controller.shop.ShopController#addShop |
|---|---|
| 所属模块 | 店铺 shop |
| 暴露渠道 | 管理后台 (@Route 注解;决定 URL 前缀与可访问端) |
| 请求方法 | POST |
shopsystem_deptsystem_usersystem_user_relationsystem_user_deptsystem_user_roleShopController#addShopShop ⇒ 表 shopShopService#addShop (ShopServiceImpl)Shop ⇒ 表 shopShopService#add (ShopServiceImpl)ShopMapper#insert ⇒ 表 shopShopService#createInitDept (ShopServiceImpl)DeptService#add (DeptServiceImpl)DeptMapper#insert ⇒ 表 system_deptShopService#createInitUser (ShopServiceImpl)UserService#add (UserServiceImpl)UserMapper#insert ⇒ 表 system_userUserRelationService#add (UserRelationServiceImpl)UserRelationMapper#insert ⇒ 表 system_user_relationUserDeptService#add (UserDeptServiceImpl)UserDeptMapper#insert ⇒ 表 system_user_deptUserRoleService#add (UserRoleServiceImpl)UserRoleMapper#insert ⇒ 表 system_user_role其它依赖(权限 / 会话 / 缓存 / 校验等,不直接读写业务表)· 6
链路按 Controller → Service(Impl) → Mapper → 表 逐层追踪;字段对应的「表.列」见下方请求/响应表新增列,按字段同名映射到涉及的实体表列;— 表示该字段为查询条件 / 计算 / 转换 / 包装字段,未直接对应单一列。
| 环境 | 完整 URL(主机 + 渠道前缀 + 路径) | 备注 |
|---|---|---|
| dev | https://dscp-dev.hn12301.net/manage-api/shop/addShop | |
| uat | https://dscp-uat.hn12301.net/manage-api/shop/addShop | |
| pro | https://dscp-uat.hn12301.net/manage-api/shop/addShop | (仓库 .env.pro 指向 uat;生产域名未确认,此处沿用 uat 主机示意) |
无(该接口无 Query/Path/Header 显式参数;入参见 Body)
ShopAddRequest| 字段 | 类型 | 必填 | 取值/校验 | 表 / 列 | 说明 |
|---|---|---|---|---|---|
| merchantId | Long | 是 | 必填 | shop.merchant_id | 所属商户id,关联merchant表id |
| name | String | 是 | 必填 | shop.name | 商铺名称 |
| logo | String | shop.logo | 商铺LOGO图片url地址 | ||
| typeId | Long | shop.type_id | 商铺大类 | ||
| subTypeId | Long | shop.sub_type_id | 商铺小类ID | ||
| status | ShopStatus | 1正常运营2审核中3暂停运营4已关店 | shop.status | 商铺状态 | |
| provinceId | String | shop.province_id | 省id | ||
| cityId | String | shop.city_id | 市id | ||
| districtId | String | shop.district_id | 区县id | ||
| address | String | shop.address | 商铺地址 | ||
| mobile | String | shop.mobile | 客服电话 | ||
| linkman | String | shop.linkman | 商户联系人 | ||
| linkphone | String | shop.linkphone | 商户联系人手机 | ||
| manager | String | shop.manager | 专属客户经理 | ||
| level | String | shop.level | 等级 | ||
| lng | String | shop.lng | 经度 | ||
| lat | String | shop.lat | 纬度 | ||
| introduction | String | shop.introduction | 简介 | ||
| businessTime | String | shop.business_time | 营业时间 | ||
| tags | String | shop.tags | 商铺标签 | ||
| mainPic | String | shop.main_pic | 景区主图url地址 | ||
| propagatePic | String | shop.propagate_pic | 宣传图片url地址 | ||
| video | String | shop.video | 景区视频url地址 | ||
| poster | String | shop.poster | 分享海报url地址 | ||
| propagateContent | String | shop.propagate_content | 宣传语 | ||
| description | String | shop.description | 图文详情 | ||
| ticketInfo | String | shop.ticket_info | 门票信息 | ||
| trafficInfo | String | shop.traffic_info | 交通信息 | ||
| tips | String | shop.tips | 温馨提示 | ||
| thirdId | String | shop.third_id | |||
| thirdName | String | shop.third_name | |||
| relationList | List<ShopRelationAddRequest> | — | |||
| relationList[].thirdName | String | shop.third_name | 名称 | ||
| relationList[].thirdId | String | shop.third_id | |||
| relationList[].channelType | ChannelType | 1北京卡管理系统2三省卡系统3数字平台4质惠游5支付宝6兴业银行7湘工惠8湘约码+8 | — | ||
| relationList[].remark | String | system_user.remark | xuchao: 第三方备注 |
| errcode | int | 业务码,0=成功 |
| errmsg | string | 提示信息 |
| data | T | 下方“data 结构” |
void —— 无返回数据
示例
POST /shop/addShop{
"body": {
"merchantId": 1,
"name": "",
"logo": "",
"typeId": 1,
"subTypeId": 1,
"status": "1",
"provinceId": "",
"cityId": "",
"districtId": "",
"address": "",
"mobile": "13800000000",
"linkman": "",
"linkphone": "13800000000",
"manager": "",
"level": "",
"lng": "",
"lat": "",
"introduction": "",
"businessTime": "2026-01-01 12:00:00",
"tags": "",
"mainPic": "https://example.com/x.png",
"propagatePic": "https://example.com/x.png",
"video": "",
"poster": "",
"propagateContent": "",
"description": "",
"ticketInfo": "",
"trafficInfo": "",
"tips": "",
"thirdId": "",
"thirdName": "",
"relationList": [
{
"thirdName": "",
"thirdId": "",
"channelType": "1",
"remark": ""
}
]
}
}(void,无响应体)
处理逻辑
- 新增商户
- 创建商铺顶级部门
- 创建商户默认用户
- 新增关联
- 回滚事务
- 处理异常