添加uniapp消息推送

This commit is contained in:
邹宗楠
2023-03-20 16:18:47 +08:00
parent d6ec56791a
commit 76ac51bcd1
6 changed files with 316 additions and 76 deletions

View File

@@ -1229,6 +1229,21 @@ func UpdateUserLastInfo(ctx *jxcontext.Context, storeID, brandID int) (err error
return err
}
func SetUserCId(userId string, cid string) error {
var db = dao.GetDB()
userObj, err := dao.GetUserByID(db, "user_id", userId)
if err != nil {
return err
}
if userObj.CID == "" || userObj.CID != cid {
userObj.CID = cid
_, err := dao.UpdateEntity(db, userObj, "CID")
return err
}
return nil
}
func GetUserStoreAuth(ctx *jxcontext.Context, storeID int) (outStoreID int, err error) {
if permission.IsRoled(ctx) {
configs, _ := dao.QueryConfigs(dao.GetDB(), "checkversion", model.ConfigTypeSys, "")