更新门店cid
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user