feat: 完成轮播图接口
This commit is contained in:
1 parent
0634862282
commit
4161fddb31
13 files changed
+305
-5
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import { CarousalVo } from '../vo/carousal.vo';
|
||||
import { Carousal } from '../entity/carousal.entity';
|
||||
import { UserMapper } from '../../core/mapper/user.mapper';
|
||||
import { DateUtil } from '../../core/util/date.util';
|
||||
|
||||
export class CarousalMapper {
|
||||
static toVo(entity: Carousal): CarousalVo {
|
||||
return {
|
||||
id: entity.id,
|
||||
imageUrl: entity.imageUrl,
|
||||
targetType: entity.targetType,
|
||||
targetId: entity.targetId,
|
||||
targetUrl: entity.targetUrl,
|
||||
status: entity.status,
|
||||
createBy: UserMapper.toVo(entity.createBy),
|
||||
updateBy: UserMapper.toVo(entity.updateBy),
|
||||
createdTime: DateUtil.format(entity.createdTime),
|
||||
updatedTime: DateUtil.format(entity.updatedTime),
|
||||
};
|
||||
}
|
||||
static toVos(entities: Carousal[]): CarousalVo[] {
|
||||
return entities.map((entity) => this.toVo(entity));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user