update 推送高德权限修改为只有管理员才可以进行推送

This commit is contained in:
Lemon
2025-03-18 15:26:37 +08:00
parent 8d769352ae
commit 1cad083624
5 changed files with 72 additions and 1 deletions

View File

@@ -0,0 +1,66 @@
package com.jsowell.pile.domain;
import com.jsowell.common.annotation.Excel;
/**
* 会员与收藏的站点关系对象 member_station_relation
*
* @author jsowell
* @date 2025-03-18
*/
public class MemberStationRelation extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Integer id;
/** 会员id */
@Excel(name = "会员id")
private Long memberId;
/** 站点id */
@Excel(name = "站点id")
private Long stationId;
public void setId(Integer id)
{
this.id = id;
}
public Integer getId()
{
return id;
}
public void setMemberId(Long memberId)
{
this.memberId = memberId;
}
public Long getMemberId()
{
return memberId;
}
public void setStationId(Long stationId)
{
this.stationId = stationId;
}
public Long getStationId()
{
return stationId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.JSON_STYLE)
.append("id", getId())
.append("memberId", getMemberId())
.append("stationId", getStationId())
.append("createTime", getCreateTime())
.append("createBy", getCreateBy())
.append("updateTime", getUpdateTime())
.append("updateBy", getUpdateBy())
.toString();
}
}

View File

@@ -195,13 +195,14 @@
</el-switch>
</template>
</el-table-column>
<el-table-column label="是否对接高德" align="center" prop="amapFlag">
<el-table-column label="是否对接高德" align="center" prop="amapFlag" >
<template slot-scope="scope">
<el-switch
v-model="scope.row.amapFlag"
active-value="1"
inactive-value="0"
@change="changeAmapFlag(scope.row)"
:disabled="!hasRole(['admin', 'common'])"
>
</el-switch>
</template>
@@ -421,6 +422,10 @@ export default {
this.getList();
});
},
hasRole(roles) {
const currentRoles = this.$store.getters.roles;
return currentRoles.some(role => roles.includes(role));
},
changeAmapFlag(info) {
console.log("info", info)
const params = {