付智勇

no message

... ... @@ -31,16 +31,17 @@ router.post('/upLoadDoc',uploaddemo, async (ctx, next) => {
const businessId = ctx.query.businessId;
const category = ctx.query.category;
let w = await fs.rename(applacation.uploade+ctx.req.file.filename,applacation.uploade+ctx.req.file.originalname)
let path = 'http://localhost:10000/'+ctx.req.file.originalname
attachmentData = {
id:uuid.db32(),
businessId:businessId,
category:category,
path:'http://localhost:10000/'+ctx.req.file.originalname
path:path
}
let oldAttachment = await attachmentModel.findOne({where:{businessId:businessId}})
if(oldAttachment){
let oldAttachment = await attachmentModel.update({path:'http://localhost:10000/'+ctx.req.file.originalname},{where:{businessId:businessId}})
let oldAttachment = await attachmentModel.update({path:path},{where:{businessId:businessId}})
}else{
let attachment = await attachmentModel.create(attachmentData)
}
... ...
... ... @@ -91,6 +91,14 @@ meetingService.prototype.getMeeting = async(queryData,page = 1,pageno =12) =>{
h5_Module AS h5Module,
(
SELECT
path
FROM
3m_attachment
WHERE
3m_attachment.business_id = 3m_meeting.id
) meetingPhoto,
(
SELECT
COUNT(*)
FROM
3m_student_meeting
... ...