Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public interface HeraAppService {

Long getAppCount();

Integer delRoleById(Integer id);
Integer delRoleById(Long id);

Integer addRole(HeraAppRoleModel roleModel);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class HeraAppRoleDao {
@Resource
private HeraAppRoleMapper heraAppRoleMapper;

public Integer delById(Integer id){
public Integer delById(Long id){
if(id == null){
log.error("HeraAppRoleDao.delById invalid param,id is null");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ public interface HeraAppRoleMapper extends BaseMapper<HeraAppRole> {

int deleteByExample(HeraAppRoleExample example);

int deleteByPrimaryKey(Integer id);
int deleteByPrimaryKey(Long id);

int insert(HeraAppRole record);

int insertSelective(HeraAppRole record);

List<HeraAppRole> selectByExample(HeraAppRoleExample example);

HeraAppRole selectByPrimaryKey(Integer id);
HeraAppRole selectByPrimaryKey(Long id);

int updateByExampleSelective(@Param("record") HeraAppRole record, @Param("example") HeraAppRoleExample example);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
@TableName("hera_app_role")
public class HeraAppRole {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Long id;

private String appId;

Expand All @@ -47,11 +47,11 @@ public class HeraAppRole {

private Date updateTime;

public Integer getId() {
public Long getId() {
return id;
}

public void setId(Integer id) {
public void setId(Long id) {
this.id = id;
}

Expand Down Expand Up @@ -112,7 +112,7 @@ public void setUpdateTime(Date updateTime) {
}

public enum Column {
id("id", "id", "INTEGER", false),
id("id", "id", "LONG", false),
appId("app_id", "appId", "VARCHAR", false),
appPlatform("app_platform", "appPlatform", "INTEGER", false),
user("user", "user", "VARCHAR", false),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,52 +153,52 @@ public Criteria andIdIsNotNull() {
return (Criteria) this;
}

public Criteria andIdEqualTo(Integer value) {
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}

public Criteria andIdNotEqualTo(Integer value) {
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}

public Criteria andIdGreaterThan(Integer value) {
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}

public Criteria andIdGreaterThanOrEqualTo(Integer value) {
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}

public Criteria andIdLessThan(Integer value) {
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}

public Criteria andIdLessThanOrEqualTo(Integer value) {
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}

public Criteria andIdIn(List<Integer> values) {
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}

public Criteria andIdNotIn(List<Integer> values) {
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}

public Criteria andIdBetween(Integer value1, Integer value2) {
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}

public Criteria andIdNotBetween(Integer value1, Integer value2) {
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class HeraAppRoleService {
@Autowired
HeraAppRoleDao dao;

public Integer delById(Integer id){
public Integer delById(Long id){
return dao.delById(id);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ public Long getAppCount() {
}

@Override
public Integer delRoleById(Integer id) {
public Integer delRoleById(Long id) {
return roleService.delById(id);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ public class RocketMqHeraAppConsumer {
@NacosValue(value = "${rocketmq.sk}", autoRefreshed = true)
private String sk;

//默认为空,根据需要配置
@NacosValue(value = "${stop.mq:false}", autoRefreshed = true)
private Boolean stopMq;

private DefaultMQPushConsumer heraAppMQPushConsumer;

@Autowired
Expand Down Expand Up @@ -208,6 +212,11 @@ private HeraAppBaseInfo matchExistHeraApp(HeraAppBaseInfo heraAppBaseInfo){

private void saveOrUpdateHeraAppRole(List<String> members, String appId, Integer platFormType) {

if(stopMq){
log.info("Mq consumer stop ...");
return;
}

log.info("RocketMqHeraAppConsumer#saveOrUpdateHeraAppRole appId:{},platFormType:{},members:{}", appId, platFormType, members);
if (CollectionUtils.isEmpty(members)) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.apache.ozhera.app.dao.mapper.HeraAppRoleMapper">
<resultMap id="BaseResultMap" type="org.apache.ozhera.app.model.HeraAppRole">
<id column="id" jdbcType="INTEGER" property="id" />
<id column="id" jdbcType="BIGINT" property="id" />
<result column="app_id" jdbcType="VARCHAR" property="appId" />
<result column="app_platform" jdbcType="INTEGER" property="appPlatform" />
<result column="user" jdbcType="VARCHAR" property="user" />
Expand Down Expand Up @@ -109,15 +109,15 @@
limit #{offset} , #{limit}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from hera_app_role
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from hera_app_role
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="org.apache.ozhera.app.model.HeraAppRoleExample">
delete from hera_app_role
Expand All @@ -126,7 +126,7 @@
</if>
</delete>
<insert id="insert" parameterType="org.apache.ozhera.app.model.HeraAppRole">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into hera_app_role (app_id, app_platform, user,
Expand All @@ -137,7 +137,7 @@
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="org.apache.ozhera.app.model.HeraAppRole">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into hera_app_role
Expand Down Expand Up @@ -198,7 +198,7 @@
update hera_app_role
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.appId != null">
app_id = #{record.appId,jdbcType=VARCHAR},
Expand Down Expand Up @@ -228,7 +228,7 @@
</update>
<update id="updateByExample" parameterType="map">
update hera_app_role
set id = #{record.id,jdbcType=INTEGER},
set id = #{record.id,jdbcType=BIGINT},
app_id = #{record.appId,jdbcType=VARCHAR},
app_platform = #{record.appPlatform,jdbcType=INTEGER},
user = #{record.user,jdbcType=VARCHAR},
Expand Down Expand Up @@ -265,7 +265,7 @@
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="org.apache.ozhera.app.model.HeraAppRole">
update hera_app_role
Expand All @@ -276,7 +276,7 @@
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
insert into hera_app_role
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public Result addHeraRole(HeraAppRoleModel role) {

@ResponseBody
@GetMapping("/mimonitor/delHeraRole")
public Result delHeraRole(Integer id) {
public Result delHeraRole(Long id) {

return heraBaseInfoService.delRole(id);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public interface HeraBaseInfoService {

Result addRole(HeraAppRoleModel model);

Result delRole(Integer id);
Result delRole(Long id);

Result queryRole(HeraAppRoleModel model, Integer pageNo, Integer pageCount);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public Result addRole(HeraAppRoleModel model) {
}

@Override
public Result delRole(Integer id) {
public Result delRole(Long id) {

Integer i = hearAppService.delRoleById(id);
if (i.intValue() > 0) {
Expand Down
Loading