修复了一些bug
This commit is contained in:
parent
cf5e83b661
commit
0d642c17b3
|
|
@ -398,6 +398,20 @@ public class BlockChainService {
|
|||
if(CommitCreateVoList!=null && CommitCreateVoList.size()>0) {
|
||||
for(CommitResultVo commit : CommitCreateVoList) {
|
||||
commitDataTnBlock(commit);
|
||||
|
||||
//判断代码合并的时候issue
|
||||
String issue_id = commitCreateVo.getIssue_id();
|
||||
if(StringUtils.isNotEmpty(issue_id)) {
|
||||
//根据issue_id获取,判断是否要进行token转让
|
||||
UserProjectTransferRecords records = projectResourceLibraryMapper.selectIssueEndInfo(issue_id);
|
||||
if (Objects.nonNull(records)) {
|
||||
records.setType("issuePr");//pr合并关闭issue
|
||||
records.setTxHash("txHash");
|
||||
records.setCreateTime(DateUtils.getNowDate());
|
||||
records.setCreateBy(SecurityUtils.getUsername());
|
||||
userProjectTransferRecordsMapper.insertUserProjectTransferRecords(records);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return AjaxResult.success();
|
||||
|
|
@ -592,4 +606,6 @@ public class BlockChainService {
|
|||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,4 +9,6 @@ public class CommitCreateVo {
|
|||
private String project_id;
|
||||
|
||||
private String commit_diff;
|
||||
|
||||
private String issue_id;
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ package com.microservices.dms.resourceLibrary.mapper;
|
|||
|
||||
import com.microservices.common.datasource.annotation.Slave;
|
||||
import com.microservices.dms.achievementLibrary.domain.TokenListVo;
|
||||
import com.microservices.dms.achievementLibrary.domain.blockchain.UserProjectTransferRecords;
|
||||
import com.microservices.dms.common.vo.PrCreateQueryVo;
|
||||
import com.microservices.dms.resourceLibrary.domain.ProjectResourceLibrary;
|
||||
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
|
||||
|
|
@ -70,4 +71,6 @@ public interface ProjectResourceLibraryMapper {
|
|||
Long getUsedApplyToken(@Param("tokenName")String tokenName,@Param("userName") String userName);
|
||||
|
||||
String getUserIdBYLogin(@Param("userId")String userId);
|
||||
|
||||
UserProjectTransferRecords selectIssueEndInfo(@Param("issueId") String issueId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
package com.microservices.dms.utils;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TestCase {
|
||||
private String id;
|
||||
private String identifier;
|
||||
private String name;
|
||||
private String description;
|
||||
private String type;
|
||||
|
||||
public TestCase(String id, String identifier, String name, String description, String type) {
|
||||
this.id = id;
|
||||
this.identifier = identifier;
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
|
|
@ -461,4 +461,12 @@
|
|||
<select id="getUserIdBYLogin" resultType="String">
|
||||
select id from users where login=#{userId}
|
||||
</select>
|
||||
|
||||
<select id="selectIssueEndInfo" resultType="com.microservices.dms.achievementLibrary.domain.blockchain.UserProjectTransferRecords">
|
||||
select i.project_id as "projectId",i.blockchain_token_num as "token", ia.assigner_id as "payeeId",p.user_id as "payerId"
|
||||
from issues i
|
||||
inner join issue_assigners ia on i.id= ia.issue_id
|
||||
inner join projects p on i.project_id = p.id
|
||||
where issue_id = #{issueId} and status_id in ('1','2') and i.blockchain_token_num >0
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue