更新门店cid

This commit is contained in:
苏尹岚
2020-09-11 17:29:56 +08:00
parent 059b0c7557
commit 1d6ad5f06d
6 changed files with 70 additions and 2 deletions

View File

@@ -3534,3 +3534,22 @@ func GetJdDeliveryArea(ctx *jxcontext.Context, storeIDs []int) (err error) {
}
return err
}
func UpdateStorePushClient(ctx *jxcontext.Context, storeID int, cID string) (err error) {
var (
db = dao.GetDB()
)
storePushClients, err := dao.GetStorePushClient(db, storeID, cID)
if err != nil {
return err
}
if len(storePushClients) == 0 {
storePushClient := &model.StorePushClient{
StoreID: storeID,
ClientID: cID,
}
dao.WrapAddIDCULDEntity(storePushClient, ctx.GetUserName())
dao.CreateEntity(db, storePushClient)
}
return err
}