Browse Source

添加接口文档

master
long 3 years ago
parent
commit
3025563b83
  1. 1
      conflux-admin/src/main/java/com/conflux/web/controller/nft/service/impl/ConfluxServiceImpl.java
  2. 9
      conflux-admin/src/main/java/com/conflux/web/controller/privateKey/controller/PrivateKeyController.java
  3. 2
      conflux-admin/src/main/java/com/conflux/web/controller/privateKey/domain/PrivateKey.java
  4. 2
      conflux-system/src/main/resources/mapper/system/CollectConfigMapper.xml
  5. 12
      conflux-system/src/main/resources/mapper/system/PrivateKeyMapper.xml

1
conflux-admin/src/main/java/com/conflux/web/controller/nft/service/impl/ConfluxServiceImpl.java

@ -221,6 +221,7 @@ public class ConfluxServiceImpl implements ConfluxService {
map.put("sign", AESUtil.encrypt(ConfluxArt.SIGN + time));
redisUtils.set(privateKey.getAppId(), token,360000l);//缓存一小时
redisUtils.set(md5Key, AESUtil.encrypt(ConfluxArt.SIGN + time),360000l);
map.put("expireTime",3600);//过期时间 单位秒
} catch (Exception e) {
e.printStackTrace();
}

9
conflux-admin/src/main/java/com/conflux/web/controller/privateKey/controller/PrivateKeyController.java

@ -101,4 +101,13 @@ public class PrivateKeyController extends BaseController
{
return toAjax(privateKeyService.deletePrivateKeyByIds(ids));
}
@PreAuthorize("@ss.hasPermi('system:key:edit')")
@Log(title = "私钥申请", businessType = BusinessType.UPDATE)
@PutMapping("/changeStatus")
public AjaxResult changeStatus(@RequestBody PrivateKey privateKey)
{
return toAjax(privateKeyService.updatePrivateKey(privateKey));
}
}

2
conflux-admin/src/main/java/com/conflux/web/controller/privateKey/domain/PrivateKey.java

@ -32,6 +32,6 @@ public class PrivateKey extends BaseEntity
/** 0正常1禁用 */
@Excel(name = "0正常1禁用")
private String stauts;
private String status;
}

2
conflux-system/src/main/resources/mapper/system/CollectConfigMapper.xml

@ -17,7 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectCollectConfigVo">
select id, node, limit_count, chain_id, epoch_number, on_pause, mint_pause, create_time, update_time from collect_config
select id, node, limit_count, chain_id, epoch_number, on_pause, mint_pause, create_time, update_time,status from collect_config
</sql>
<select id="selectCollectConfigList" parameterType="CollectConfig" resultMap="CollectConfigResult">

12
conflux-system/src/main/resources/mapper/system/PrivateKeyMapper.xml

@ -9,12 +9,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="unitName" column="unit_name" />
<result property="appId" column="app_id" />
<result property="privateKey" column="private_key" />
<result property="stauts" column="stauts" />
<result property="status" column="status" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectPrivateKeyVo">
select id, unit_name, app_id, private_key, stauts, create_time from private_key
select id, unit_name, app_id, private_key, status, create_time from private_key
</sql>
<select id="selectPrivateKeyList" parameterType="PrivateKey" resultMap="PrivateKeyResult">
@ -23,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="unitName != null and unitName != ''"> and unit_name like concat('%', #{unitName}, '%')</if>
<if test="appId != null and appId != ''"> and app_id = #{appId}</if>
<if test="privateKey != null and privateKey != ''"> and private_key = #{privateKey}</if>
<if test="stauts != null and stauts != ''"> and stauts = #{stauts}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
</where>
</select>
@ -42,14 +42,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="unitName != null">unit_name,</if>
<if test="appId != null">app_id,</if>
<if test="privateKey != null">private_key,</if>
<if test="stauts != null">stauts,</if>
<if test="status != null">status,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="unitName != null">#{unitName},</if>
<if test="appId != null">#{appId},</if>
<if test="privateKey != null">#{privateKey},</if>
<if test="stauts != null">#{stauts},</if>
<if test="status != null">#{status},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="unitName != null">unit_name = #{unitName},</if>
<if test="appId != null">app_id = #{appId},</if>
<if test="privateKey != null">private_key = #{privateKey},</if>
<if test="stauts != null">stauts = #{stauts},</if>
<if test="status != null">status = #{status},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}

Loading…
Cancel
Save