Forráskód Böngészése

修改店铺查看

zs 1 éve
szülő
commit
503dbb4488

+ 3 - 2
app/controller/system/config/.actTags.js

@@ -1,6 +1,6 @@
 module.exports = {
   create: {
-    requestBody: ['show_goods', 'file', 'show_index', 'label', 'value', 'sort', 'status'],
+    requestBody: ['shop', 'show_goods', 'file', 'show_index', 'label', 'value', 'sort', 'status'],
   },
   destroy: {
     params: ['!id'],
@@ -8,7 +8,7 @@ module.exports = {
   },
   update: {
     params: ['!id'],
-    requestBody: ['show_goods', 'file', 'show_index', 'label', 'value', 'sort', 'status'],
+    requestBody: ['shop', 'show_goods', 'file', 'show_index', 'label', 'value', 'sort', 'status'],
   },
   show: {
     parameters: {
@@ -21,6 +21,7 @@ module.exports = {
       query: {
         'meta.createdAt@start': 'meta.createdAt@start',
         'meta.createdAt@end': 'meta.createdAt@end',
+        shop: 'shop',
         status: 'status',
         show_index: 'show_index',
         value: 'value',

+ 3 - 2
app/controller/system/config/.platformAct.js

@@ -1,6 +1,6 @@
 module.exports = {
   create: {
-    requestBody: ['type', 'config', 'show_index', 'share', 'cover', 'act_time', 'content', 'is_use', 'sort'],
+    requestBody: ['shop', 'type', 'config', 'show_index', 'share', 'cover', 'act_time', 'content', 'is_use', 'sort'],
   },
   destroy: {
     params: ['!id'],
@@ -8,7 +8,7 @@ module.exports = {
   },
   update: {
     params: ['!id'],
-    requestBody: ['type', 'config', 'show_index', 'share', 'cover', 'act_time', 'content', 'is_use', 'sort'],
+    requestBody: ['shop', 'type', 'config', 'show_index', 'share', 'cover', 'act_time', 'content', 'is_use', 'sort'],
   },
   show: {
     parameters: {
@@ -21,6 +21,7 @@ module.exports = {
       query: {
         'meta.createdAt@start': 'meta.createdAt@start',
         'meta.createdAt@end': 'meta.createdAt@end',
+        shop: 'shop',
         is_use: 'is_use',
         show_index: 'show_index',
         title: '%act_time.title%',

+ 3 - 2
app/controller/user/config/.notice.js

@@ -1,6 +1,6 @@
 module.exports = {
   create: {
-    requestBody: ['!customer', 'source', 'source_id', 'time', 'content', 'status'],
+    requestBody: ['!customer', 'shop', 'source', 'source_id', 'time', 'content', 'status'],
   },
   destroy: {
     params: ['!id'],
@@ -8,7 +8,7 @@ module.exports = {
   },
   update: {
     params: ['!id'],
-    requestBody: ['customer', 'source', 'source_id', 'time', 'content', 'status'],
+    requestBody: ['customer', 'shop', 'source', 'source_id', 'time', 'content', 'status'],
   },
   show: {
     parameters: {
@@ -21,6 +21,7 @@ module.exports = {
       query: {
         'time@start': 'time@start',
         'time@end': 'timet@end',
+        shop: 'shop',
         customer: 'customer',
         source: 'source',
         source_id: 'source_id',

+ 3 - 2
app/controller/user/config/.user.js

@@ -1,6 +1,6 @@
 module.exports = {
   create: {
-    requestBody: ['is_leader', 'name', 'phone', 'password', 'icon', 'birth', 'gender', 'email', 'openid', 'status'],
+    requestBody: ['is_leader', 'shop', 'name', 'phone', 'password', 'icon', 'birth', 'gender', 'email', 'openid', 'status'],
   },
   destroy: {
     requestBody: ['!key', '!target'],
@@ -8,7 +8,7 @@ module.exports = {
   },
   update: {
     params: ['!id'],
-    requestBody: ['is_leader', 'name', 'phone', 'password', 'icon', 'birth', 'gender', 'email', 'openid', 'status'],
+    requestBody: ['is_leader', 'shop', 'name', 'phone', 'password', 'icon', 'birth', 'gender', 'email', 'openid', 'status'],
   },
   show: {
     parameters: {
@@ -22,6 +22,7 @@ module.exports = {
         'meta.createdAt@start': 'meta.createdAt@start',
         'meta.createdAt@end': 'meta.createdAt@end',
         name: '%name%',
+        shop: 'shop',
         phone: 'phone',
         gender: 'gender',
         email: 'email',

+ 2 - 0
app/model/system/actTags.js

@@ -4,6 +4,7 @@ const metaPlugin = require('naf-framework-mongoose-free/lib/model/meta-plugin');
 
 // 活动标签
 const actTags = {
+  shop: { type: String, required: false, zh: '店铺id' }, //
   label: { type: String, required: false, zh: '活动标签' }, //
   value: { type: String, required: false, zh: '编码' }, //
   sort: { type: Number, default: 0, required: false, zh: '排序' }, //
@@ -16,6 +17,7 @@ const schema = new Schema(actTags, { toJSON: { getters: true, virtuals: true } }
 schema.index({ id: 1 });
 schema.index({ 'meta.createdAt': 1 });
 schema.index({ sort: 1 });
+schema.index({ shop: 1 });
 schema.index({ status: 1 });
 schema.index({ show_index: 1 });
 schema.index({ show_goods: 1 });

+ 2 - 0
app/model/system/platformAct.js

@@ -32,6 +32,7 @@ const config = {
 // 平台活动
 const platformAct = {
   // title: { type: String, required: false, zh: '活动标题' }, // 转移到活动时间下
+  shop: { type: String, required: false, zh: '店铺id' }, //
   share: { type: Array, required: false, zh: '分享图片' }, //
   cover: { type: Array, required: false, zh: '封面图片' }, //
   act_time: { type: Object, required: false, zh: '活动时间' }, //  value:值;is_use:字典(is_use)是否启用
@@ -46,6 +47,7 @@ const schema = new Schema(platformAct, { toJSON: { getters: true, virtuals: true
 schema.index({ id: 1 });
 schema.index({ 'meta.createdAt': 1 });
 schema.index({ sort: 1 });
+schema.index({ shop: 1 });
 schema.index({ is_use: 1 });
 schema.index({ show_index: 1 });
 schema.index({ type: 1 });

+ 2 - 0
app/model/user/notice.js

@@ -7,6 +7,7 @@ const notice = {
   customer: { type: String, required: true, zh: '用户', ref: 'User.User' }, //
   source: { type: String, required: false, zh: '消息来源' }, // 字典:notice_source
   source_id: { type: String, required: false, zh: '来源id' }, //
+  shop: { type: String, required: false, zh: '店铺id' }, //
   time: { type: String, required: false, zh: '发送时间' }, //
   content: { type: String, required: false, zh: '内容' }, //
   status: { type: String, required: false, default: '0', zh: '状态' }, // 字典:notice_status
@@ -17,6 +18,7 @@ schema.index({ 'meta.createdAt': 1 });
 schema.index({ customer: 1 });
 schema.index({ source: 1 });
 schema.index({ source_id: 1 });
+schema.index({ shop: 1 });
 schema.index({ time: 1 });
 schema.index({ status: 1 });
 

+ 2 - 1
app/model/user/user.js

@@ -13,6 +13,7 @@ const user = {
   birth: { type: String, required: false, zh: '生日' }, //
   gender: { type: String, required: false, zh: '性别' }, // 字典:gender
   email: { type: String, required: false, zh: '电子邮箱' }, //
+  shop: { type: String, required: false, zh: '店铺id' }, //
   openid: { type: String, required: false, zh: '微信小程序' }, //
   status: { type: String, required: false, default: '0', zh: '状态' }, // 字典:statusr_status
   is_leader: { type: String, required: false, default: '1', zh: '是否是团长' }, // 字典:is_use
@@ -26,7 +27,7 @@ schema.index({ gender: 1 });
 schema.index({ openid: 1 });
 schema.index({ status: 1 });
 schema.index({ is_leader: 1 });
-
+schema.index({ shop: 1 });
 schema.plugin(metaPlugin);
 
 module.exports = app => {