This commit is contained in:
2023-11-23 22:29:13 +08:00
parent 715859c63f
commit 882419768f
39 changed files with 2190 additions and 199 deletions
@@ -0,0 +1,39 @@
'use strict';
const dbName = require('../../../../dao/config.js')
module.exports = {
/**
* 更新印章
* @url client/seal/kh/update 前端调用的url参数地址
* data 请求参数
* @param {String} params1 参数1
*/
main: async (event) => {
let { data = {}, userInfo, util, filterResponse, originalParam } = event;
let { customUtil, uniID, config, pubFun, vk, db, _ } = util;
let { uid, _id, imageUrl, remark, type, enable, isDefault } = data;
let res = { code: 0, msg: "" };
// 业务逻辑开始-----------------------------------------------------------
if(isDefault) {
await vk.baseDao.update({
dbName: dbName.seal,
dataJson: {
isDefault: false
}
})
}
await vk.baseDao.update({
dbName: dbName.seal,
whereJson: {
_id
},
dataJson: {
image,
remark,
type,
isDefault
}
})
// 业务逻辑结束-----------------------------------------------------------
return res;
}
}