zs 1 year ago
parent
commit
6a76ac5258

+ 1 - 1
src/entity/Collection.entity.ts

@@ -4,7 +4,7 @@ import { BaseModel } from 'free-midway-component';
   schemaOptions: { collection: 'Collection' },
   schemaOptions: { collection: 'Collection' },
 })
 })
 export class Collection extends BaseModel {
 export class Collection extends BaseModel {
-  @prop({ required: true, index: false, zh: '街道/社区', ref: 'Office' })
+  @prop({ required: true, index: false, zh: '街道/社区' })
   office: string;
   office: string;
   @prop({ required: true, index: false, zh: '领导' })
   @prop({ required: true, index: false, zh: '领导' })
   leader: Array<any>;
   leader: Array<any>;

+ 6 - 3
src/entity/ShopSetting.entity.ts

@@ -4,17 +4,20 @@ import { BaseModel } from 'free-midway-component';
   schemaOptions: { collection: 'ShopSetting' },
   schemaOptions: { collection: 'ShopSetting' },
 })
 })
 export class ShopSetting extends BaseModel {
 export class ShopSetting extends BaseModel {
-  @prop({ required: false, index: true, zh: '街道/社区', ref: 'Office' })
-  office: string;
+  @prop({ required: false, index: true, zh: '街道' })
+  street: string;
+  @prop({ required: false, index: true, zh: '社区' })
+  community: string;
   @prop({ required: false, index: false, zh: '领导' })
   @prop({ required: false, index: false, zh: '领导' })
   leader: Array<any>;
   leader: Array<any>;
   @prop({ required: false, index: false, zh: '会计' })
   @prop({ required: false, index: false, zh: '会计' })
   accounting: Array<any>;
   accounting: Array<any>;
   @prop({
   @prop({
     required: false,
     required: false,
-    index: false,
+    index: true,
     zh: '是否使用',
     zh: '是否使用',
     remark: '字典表:is_use',
     remark: '字典表:is_use',
+    default: '0',
   })
   })
   is_use: string;
   is_use: string;
 }
 }

+ 16 - 7
src/interface/ShopSetting.interface.ts

@@ -14,8 +14,10 @@ export class FVO_ShopSetting {
   }
   }
   @ApiProperty({ description: '数据id' })
   @ApiProperty({ description: '数据id' })
   _id: string = undefined;
   _id: string = undefined;
-  @ApiProperty({ description: '街道/社区' })
-  'office': string = undefined;
+  @ApiProperty({ description: '街道' })
+  'street': string = undefined;
+  @ApiProperty({ description: '社区' })
+  'community': string = undefined;
   @ApiProperty({ description: '领导' })
   @ApiProperty({ description: '领导' })
   'leader': Array<any> = undefined;
   'leader': Array<any> = undefined;
   @ApiProperty({ description: '会计' })
   @ApiProperty({ description: '会计' })
@@ -27,12 +29,16 @@ export class FVO_ShopSetting {
 export class QDTO_ShopSetting extends SearchBase {
 export class QDTO_ShopSetting extends SearchBase {
   constructor() {
   constructor() {
     const like_prop = [];
     const like_prop = [];
-    const props = ['office'];
+    const props = ['street', 'community', 'is_use'];
     const mapping = [];
     const mapping = [];
     super({ like_prop, props, mapping });
     super({ like_prop, props, mapping });
   }
   }
-  @ApiProperty({ description: '街道/社区' })
-  'office': string = undefined;
+  @ApiProperty({ description: '街道' })
+  'street': string = undefined;
+  @ApiProperty({ description: '社区' })
+  'community': string = undefined;
+  @ApiProperty({ description: '是否使用' })
+  'is_use': string = undefined;
 }
 }
 
 
 export class QVO_ShopSetting extends FVO_ShopSetting {
 export class QVO_ShopSetting extends FVO_ShopSetting {
@@ -43,9 +49,12 @@ export class QVO_ShopSetting extends FVO_ShopSetting {
 }
 }
 
 
 export class CDTO_ShopSetting {
 export class CDTO_ShopSetting {
-  @ApiProperty({ description: '街道/社区' })
+  @ApiProperty({ description: '街道' })
+  @Rule(RuleType['string']().empty(''))
+  'street': string = undefined;
+  @ApiProperty({ description: '社区' })
   @Rule(RuleType['string']().empty(''))
   @Rule(RuleType['string']().empty(''))
-  'office': string = undefined;
+  'community': string = undefined;
   @ApiProperty({ description: '领导' })
   @ApiProperty({ description: '领导' })
   @Rule(RuleType['array']().empty(''))
   @Rule(RuleType['array']().empty(''))
   'leader': Array<any> = undefined;
   'leader': Array<any> = undefined;