|
|
|
@ -1,8 +1,14 @@
|
|
|
|
|
const { handleArrayDaoData } = require("../utils/tools");
|
|
|
|
|
const addressModel = require("./model/addressModel");
|
|
|
|
|
|
|
|
|
|
module.exports.getAddressDao = async function () {
|
|
|
|
|
return handleArrayDaoData(await addressModel.findAll());
|
|
|
|
|
module.exports.getAddressDao = async function (senderId) {
|
|
|
|
|
// 如果有senderId参数,则添加查询条件
|
|
|
|
|
const whereCondition = senderId ? { senderId } : {};
|
|
|
|
|
return handleArrayDaoData(
|
|
|
|
|
await addressModel.findAll({
|
|
|
|
|
where: whereCondition,
|
|
|
|
|
})
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
module.exports.addAddressDao = async function (addressData) {
|
|
|
|
|