You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
657 B
26 lines
657 B
5 days ago
|
const {
|
||
|
getExpressDao,
|
||
|
addExpressDao,
|
||
|
updateExpressDao
|
||
|
} = require("../dao/expressDao")
|
||
|
const {
|
||
|
getRandomExpressId
|
||
|
} = require("../utils/tools")
|
||
|
module.exports.getExpressServices = async function () {
|
||
|
return await getExpressDao()
|
||
|
}
|
||
|
|
||
|
module.exports.addExpressServices = async function (expData) {
|
||
|
//获取的对象需要补充"expressId", "isSigned"
|
||
|
const data = {
|
||
|
expressId: getRandomExpressId(),
|
||
|
isSigned: 0,
|
||
|
...expData,
|
||
|
}
|
||
|
return await addExpressDao(data)
|
||
|
}
|
||
|
|
||
|
module.exports.updateExpressServices = async function (expData) {
|
||
|
//这里需要提供id
|
||
|
return await updateExpressDao(expData)
|
||
|
}
|