This commit is contained in:
Tony 2024-06-11 15:25:01 +08:00
commit a4915dcf50
3 changed files with 37 additions and 41 deletions

View File

@ -1,5 +1,6 @@
package com.god.templateInfo.service.impl; package com.god.templateInfo.service.impl;
import com.god.common.utils.uuid.IdUtils;
import com.god.templateInfo.domain.GodTemplateInfo; import com.god.templateInfo.domain.GodTemplateInfo;
import com.god.templateInfo.mapper.GodTemplateInfoMapper; import com.god.templateInfo.mapper.GodTemplateInfoMapper;
import com.god.templateInfo.service.IGodTemplateInfoService; import com.god.templateInfo.service.IGodTemplateInfoService;
@ -15,8 +16,7 @@ import java.util.List;
* @date 2024-06-11 * @date 2024-06-11
*/ */
@Service @Service
public class GodTemplateInfoServiceImpl implements IGodTemplateInfoService public class GodTemplateInfoServiceImpl implements IGodTemplateInfoService {
{
@Autowired @Autowired
private GodTemplateInfoMapper godTemplateInfoMapper; private GodTemplateInfoMapper godTemplateInfoMapper;
@ -27,8 +27,7 @@ public class GodTemplateInfoServiceImpl implements IGodTemplateInfoService
* @return 模板管理 * @return 模板管理
*/ */
@Override @Override
public GodTemplateInfo selectGodTemplateInfoById(String id) public GodTemplateInfo selectGodTemplateInfoById(String id) {
{
return godTemplateInfoMapper.selectGodTemplateInfoById(id); return godTemplateInfoMapper.selectGodTemplateInfoById(id);
} }
@ -39,8 +38,7 @@ public class GodTemplateInfoServiceImpl implements IGodTemplateInfoService
* @return 模板管理 * @return 模板管理
*/ */
@Override @Override
public List<GodTemplateInfo> selectGodTemplateInfoList(GodTemplateInfo godTemplateInfo) public List<GodTemplateInfo> selectGodTemplateInfoList(GodTemplateInfo godTemplateInfo) {
{
return godTemplateInfoMapper.selectGodTemplateInfoList(godTemplateInfo); return godTemplateInfoMapper.selectGodTemplateInfoList(godTemplateInfo);
} }
@ -51,8 +49,8 @@ public class GodTemplateInfoServiceImpl implements IGodTemplateInfoService
* @return 结果 * @return 结果
*/ */
@Override @Override
public int insertGodTemplateInfo(GodTemplateInfo godTemplateInfo) public int insertGodTemplateInfo(GodTemplateInfo godTemplateInfo) {
{ godTemplateInfo.setId(IdUtils.fastUUID());
return godTemplateInfoMapper.insertGodTemplateInfo(godTemplateInfo); return godTemplateInfoMapper.insertGodTemplateInfo(godTemplateInfo);
} }
@ -63,8 +61,7 @@ public class GodTemplateInfoServiceImpl implements IGodTemplateInfoService
* @return 结果 * @return 结果
*/ */
@Override @Override
public int updateGodTemplateInfo(GodTemplateInfo godTemplateInfo) public int updateGodTemplateInfo(GodTemplateInfo godTemplateInfo) {
{
return godTemplateInfoMapper.updateGodTemplateInfo(godTemplateInfo); return godTemplateInfoMapper.updateGodTemplateInfo(godTemplateInfo);
} }
@ -75,8 +72,7 @@ public class GodTemplateInfoServiceImpl implements IGodTemplateInfoService
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteGodTemplateInfoByIds(String[] ids) public int deleteGodTemplateInfoByIds(String[] ids) {
{
return godTemplateInfoMapper.deleteGodTemplateInfoByIds(ids); return godTemplateInfoMapper.deleteGodTemplateInfoByIds(ids);
} }
@ -87,8 +83,7 @@ public class GodTemplateInfoServiceImpl implements IGodTemplateInfoService
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteGodTemplateInfoById(String id) public int deleteGodTemplateInfoById(String id) {
{
return godTemplateInfoMapper.deleteGodTemplateInfoById(id); return godTemplateInfoMapper.deleteGodTemplateInfoById(id);
} }
} }

View File

@ -90,7 +90,7 @@
<dict-tag :options="dict.type.template_type" :value="scope.row.templateType"/> <dict-tag :options="dict.type.template_type" :value="scope.row.templateType"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="价格" align="center" prop="price"/> <el-table-column label="价格(元)" align="center" prop="price"/>
<el-table-column label="视频" align="center" prop="video" show-overflow-tooltip/> <el-table-column label="视频" align="center" prop="video" show-overflow-tooltip/>
<el-table-column label="时间" align="center" prop="times"> <el-table-column label="时间" align="center" prop="times">
<template slot-scope="scope"> <template slot-scope="scope">
@ -135,9 +135,9 @@
<!-- 添加或修改模板管理对话框 --> <!-- 添加或修改模板管理对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<!-- <el-form-item label="主键" prop="id">--> <!-- <el-form-item label="主键" prop="id">-->
<!-- <el-input v-model="form.id" placeholder="请输入主键"/>--> <!-- <el-input v-model="form.id" placeholder="请输入主键"/>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="模板名称" prop="templateName"> <el-form-item label="模板名称" prop="templateName">
<el-input v-model="form.templateName" placeholder="请输入模板名称"/> <el-input v-model="form.templateName" placeholder="请输入模板名称"/>
</el-form-item> </el-form-item>
@ -151,8 +151,8 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="价格" prop="price"> <el-form-item label="价格(元)" prop="price">
<el-input v-model="form.price" placeholder="请输入价格"/> <el-input v-model="form.price" placeholder="请输入价格(元)"/>
</el-form-item> </el-form-item>
<el-form-item label="视频" prop="video"> <el-form-item label="视频" prop="video">
<el-input v-model="form.video" placeholder="请上传视频" disabled/> <el-input v-model="form.video" placeholder="请上传视频" disabled/>
@ -164,15 +164,15 @@
<div slot="tip" class="el-upload__tip">只能上传mp4文件且不超过100M</div> <div slot="tip" class="el-upload__tip">只能上传mp4文件且不超过100M</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<!-- <el-form-item label="文件上传">--> <!-- <el-form-item label="文件上传">-->
<!-- <el-upload class="upload-demo" ref="uploadFile" action="" :on-preview="handlePreview"--> <!-- <el-upload class="upload-demo" ref="uploadFile" action="" :on-preview="handlePreview"-->
<!-- :on-remove="handleRemoveFiles" :on-change="handleChangeFiles" :before-upload="beforeUploadFiles"--> <!-- :on-remove="handleRemoveFiles" :on-change="handleChangeFiles" :before-upload="beforeUploadFiles"-->
<!-- :file-list="fileList" :auto-upload="true" multiple--> <!-- :file-list="fileList" :auto-upload="true" multiple-->
<!-- >--> <!-- >-->
<!-- <el-button size="small" type="primary">上传视频</el-button>--> <!-- <el-button size="small" type="primary">上传视频</el-button>-->
<!-- <div slot="tip" class="el-upload__tip">只能上传mp4文件且不超过100M</div>--> <!-- <div slot="tip" class="el-upload__tip">只能上传mp4文件且不超过100M</div>-->
<!-- </el-upload>--> <!-- </el-upload>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="时间" prop="times"> <el-form-item label="时间" prop="times">
<el-date-picker clearable <el-date-picker clearable
v-model="form.times" v-model="form.times"
@ -248,7 +248,7 @@ export default {
video: null, video: null,
times: null, times: null,
sysType: null, sysType: null,
moduleType: null, moduleType: 'templateInfo',
reserveOne: null, reserveOne: null,
reserveTwo: null, reserveTwo: null,
reserveThree: null, reserveThree: null,
@ -269,7 +269,7 @@ export default {
// //
upload: { upload: {
// //
headers: { Authorization: 'Bearer ' + getToken() }, headers: {Authorization: 'Bearer ' + getToken()},
// TODO // TODO
url: '/species/video/upload/file', url: '/species/video/upload/file',
// //
@ -389,7 +389,7 @@ export default {
times: null, times: null,
remark: null, remark: null,
sysType: null, sysType: null,
moduleType: null, moduleType: 'templateInfo',
reserveOne: null, reserveOne: null,
reserveTwo: null, reserveTwo: null,
reserveThree: null, reserveThree: null,

View File

@ -243,7 +243,6 @@
type="text" type="text"
icon="el-icon-video-camera" icon="el-icon-video-camera"
@click="playVideo(scope.row)" @click="playVideo(scope.row)"
v-hasPermi="['species:video:remove']"
>查看视频 >查看视频
</el-button> </el-button>
</template> </template>
@ -356,7 +355,6 @@
:before-upload="beforeUploadFiles" :before-upload="beforeUploadFiles"
:file-list="fileList" :file-list="fileList"
:auto-upload="true" :auto-upload="true"
multiple
> >
<el-button <el-button
size="small" size="small"
@ -368,6 +366,9 @@
>只能上传mp4文件且不超过100M</div> >只能上传mp4文件且不超过100M</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注"/>
</el-form-item>
<!-- <el-form-item label="图片" prop="phoneInfo"> <!-- <el-form-item label="图片" prop="phoneInfo">
<image-upload v-model="form.phoneInfo"/> <image-upload v-model="form.phoneInfo"/>
</el-form-item>--> </el-form-item>-->