diff --git a/src/main/java/com/dl/officialsite/common/enums/CodeEnums.java b/src/main/java/com/dl/officialsite/common/enums/CodeEnums.java index 3c410dd8..a873770f 100644 --- a/src/main/java/com/dl/officialsite/common/enums/CodeEnums.java +++ b/src/main/java/com/dl/officialsite/common/enums/CodeEnums.java @@ -22,7 +22,8 @@ public enum CodeEnums { MEMBER_ALREADY_REQUEST_TEAM("1007", "member already request team"), NOT_FOUND_JD("1008", "not found jd"), - NOT_FOUND_MEMBER("1008", "not found user"), + NOT_FOUND_MEMBER("1009", "not found user"), + NOT_THE_ADMIN("1010", "user not the admin"), //Sharing SHARING_NOT_FOUND("5001", "Sharing not found"), SHARING_NOT_OWNER("5002", "You are no sharing user"), diff --git a/src/main/java/com/dl/officialsite/common/utils/AuthorizationUtils.java b/src/main/java/com/dl/officialsite/common/utils/AuthorizationUtils.java index b18a0e9b..ee219795 100644 --- a/src/main/java/com/dl/officialsite/common/utils/AuthorizationUtils.java +++ b/src/main/java/com/dl/officialsite/common/utils/AuthorizationUtils.java @@ -2,11 +2,10 @@ import com.dl.officialsite.login.enums.UserRoleEnum; import com.dl.officialsite.login.model.UserPrincipleData; -import com.dl.officialsite.team.TeamMember; +import com.dl.officialsite.team.teammember.TeamMember; import lombok.extern.slf4j.Slf4j; import org.springframework.util.CollectionUtils; -import java.util.Collections; import java.util.List; @Slf4j diff --git a/src/main/java/com/dl/officialsite/config/IPFSConfig.java b/src/main/java/com/dl/officialsite/config/IPFSConfig.java index b92ac763..212fbe1d 100644 --- a/src/main/java/com/dl/officialsite/config/IPFSConfig.java +++ b/src/main/java/com/dl/officialsite/config/IPFSConfig.java @@ -6,12 +6,14 @@ import lombok.Data; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.stereotype.Component; //@Component @Data +@ConditionalOnProperty(value = "ipfs.url") @ConfigurationProperties(prefix = "ipfs") public class IPFSConfig { diff --git a/src/main/java/com/dl/officialsite/hiring/HireController.java b/src/main/java/com/dl/officialsite/hiring/HireController.java index 4e94c7c5..cc5264bd 100644 --- a/src/main/java/com/dl/officialsite/hiring/HireController.java +++ b/src/main/java/com/dl/officialsite/hiring/HireController.java @@ -3,8 +3,9 @@ import com.dl.officialsite.common.base.BaseResponse; import com.dl.officialsite.hiring.vo.ApplyVo; import com.dl.officialsite.hiring.vo.HiringVO; -import java.util.ArrayList; + import java.util.List; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; @@ -92,21 +93,6 @@ public BaseResponse allByAddress(@RequestParam String address, return BaseResponse.successWithData(hiringVOList); } - /** - * - */ - @GetMapping("/sponsors") - public BaseResponse sponsor() { - List sponsorVos = new ArrayList<>(); - SponsorVo sponsorVo = new SponsorVo(); - sponsorVo.setCompany("Optimism"); - sponsorVo.setLink("https://www.optimism.io/"); - sponsorVo.setIcon("https://assets-global.website-files.com/611dbb3c82ba72fbc285d4e2/611fd32ef63b79b5f8568d58_OPTIMISM-logo.svg"); - for (int i = 0; i < 4; i++) { - sponsorVos.add(sponsorVo); - } - return BaseResponse.successWithData(sponsorVos); - } /** * 投递职位 diff --git a/src/main/java/com/dl/officialsite/hiring/HireService.java b/src/main/java/com/dl/officialsite/hiring/HireService.java index 787f8189..2561311e 100644 --- a/src/main/java/com/dl/officialsite/hiring/HireService.java +++ b/src/main/java/com/dl/officialsite/hiring/HireService.java @@ -49,6 +49,8 @@ public HiringVO add(HiringVO hiringVO) { Hiring hiring = new Hiring(); BeanUtils.copyProperties(hiringVO, hiring); hireRepository.save(hiring); + + // optimise hiringVO.getMainSkills().forEach(mainSkill -> { HiringSkill hiringSkill = new HiringSkill(); BeanUtils.copyProperties(mainSkill, hiringSkill); @@ -57,6 +59,7 @@ public HiringVO add(HiringVO hiringVO) { hiringSkillRepository.save(hiringSkill); }); + // delete todo hiringVO.getOtherSkills().forEach(otherSkill -> { HiringSkill hiringSkill = new HiringSkill(); BeanUtils.copyProperties(otherSkill, hiringSkill); diff --git a/src/main/java/com/dl/officialsite/hiring/SponsorVo.java b/src/main/java/com/dl/officialsite/hiring/SponsorVo.java deleted file mode 100644 index b4251b86..00000000 --- a/src/main/java/com/dl/officialsite/hiring/SponsorVo.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.dl.officialsite.hiring; - -import lombok.Data; - -/** - * @ClassName SponsorVo - * @Author jackchen - * @Date 2023/12/11 21:16 - * @Description 广告 - **/ -@Data -public class SponsorVo { - - private String company; - - private String link; - - private String icon; - -} diff --git a/src/main/java/com/dl/officialsite/hiring/vo/HiringVO.java b/src/main/java/com/dl/officialsite/hiring/vo/HiringVO.java index cf60236c..6f13178d 100644 --- a/src/main/java/com/dl/officialsite/hiring/vo/HiringVO.java +++ b/src/main/java/com/dl/officialsite/hiring/vo/HiringVO.java @@ -33,6 +33,8 @@ public class HiringVO { @NotNull(message = "工作类型不能为空") private List mainSkills; + + //ignore private List otherSkills; @NotBlank(message = "公司不能为空") diff --git a/src/main/java/com/dl/officialsite/ipfs/IPFSService.java b/src/main/java/com/dl/officialsite/ipfs/IPFSService.java index 2148665b..8422e94f 100644 --- a/src/main/java/com/dl/officialsite/ipfs/IPFSService.java +++ b/src/main/java/com/dl/officialsite/ipfs/IPFSService.java @@ -6,6 +6,10 @@ import io.ipfs.multihash.Multihash; import java.io.InputStream; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.context.annotation.Configuration; import org.springframework.stereotype.Component; import java.io.File; @@ -13,7 +17,8 @@ import java.io.IOException; -//@Component +@Configuration +@ConditionalOnBean(IPFS.class) public class IPFSService { diff --git a/src/main/java/com/dl/officialsite/login/enums/UserRoleEnum.java b/src/main/java/com/dl/officialsite/login/enums/UserRoleEnum.java index 8bf50b62..d0e428ba 100644 --- a/src/main/java/com/dl/officialsite/login/enums/UserRoleEnum.java +++ b/src/main/java/com/dl/officialsite/login/enums/UserRoleEnum.java @@ -5,7 +5,7 @@ @Getter public enum UserRoleEnum { - ADMIN(Integer.MAX_VALUE), + ADMIN(1), NORMAL(0); diff --git a/src/main/java/com/dl/officialsite/login/filter/LoginFilter.java b/src/main/java/com/dl/officialsite/login/filter/LoginFilter.java index c804b9b4..267288f0 100644 --- a/src/main/java/com/dl/officialsite/login/filter/LoginFilter.java +++ b/src/main/java/com/dl/officialsite/login/filter/LoginFilter.java @@ -8,17 +8,15 @@ import com.dl.officialsite.login.model.UserPrincipleData; import com.dl.officialsite.member.Member; import com.dl.officialsite.member.MemberRepository; -import com.dl.officialsite.team.TeamMember; -import com.dl.officialsite.team.TeamMemberRepository; +import com.dl.officialsite.team.teammember.TeamMember; +import com.dl.officialsite.team.teammember.TeamMemberRepository; import com.fasterxml.jackson.databind.ObjectMapper; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Configuration; import org.springframework.core.annotation.Order; import org.springframework.session.web.http.SessionRepositoryFilter; -import org.springframework.stereotype.Component; import org.springframework.web.filter.OncePerRequestFilter; import javax.servlet.FilterChain; diff --git a/src/main/java/com/dl/officialsite/login/model/UserPrincipleData.java b/src/main/java/com/dl/officialsite/login/model/UserPrincipleData.java index c33f27ec..c871348a 100644 --- a/src/main/java/com/dl/officialsite/login/model/UserPrincipleData.java +++ b/src/main/java/com/dl/officialsite/login/model/UserPrincipleData.java @@ -1,7 +1,6 @@ package com.dl.officialsite.login.model; -import com.dl.officialsite.login.enums.UserRoleEnum; -import com.dl.officialsite.team.TeamMember; +import com.dl.officialsite.team.teammember.TeamMember; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/src/main/java/com/dl/officialsite/member/MemberController.java b/src/main/java/com/dl/officialsite/member/MemberController.java index 0760c365..074f004b 100644 --- a/src/main/java/com/dl/officialsite/member/MemberController.java +++ b/src/main/java/com/dl/officialsite/member/MemberController.java @@ -36,21 +36,19 @@ public class MemberController { @Autowired private MemberRepository memberRepository; -// @Autowired -// private IPFSService ipfsService; -@Autowired - AaveService aaveService; + @Autowired + private MemberService memberService; public static final Logger logger = LoggerFactory.getLogger(MemberController.class); @RequestMapping(value = "/query", method = RequestMethod.GET) - BaseResponse getMemberByAddress(@RequestParam String address) throws Exception { + BaseResponse getMemberByAddress(@RequestParam String address) { - Optional member = memberRepository.findByAddress(address); - if (!member.isPresent()) { + Member member = memberService.getMemberWithTeamInfoByAddress(address); + if (member == null) { return BaseResponse.failWithReason("1001", "no user found"); } - return BaseResponse.successWithData(member.get()); + return BaseResponse.successWithData(member); } @@ -201,8 +199,6 @@ public BaseResponse updateMemberByAddress(@RequestParam String address, @Request private Long getMemberId(HttpSession session) { Long memberId = (Long) session .getAttribute("memberId"); - - return memberId; } diff --git a/src/main/java/com/dl/officialsite/member/MemberService.java b/src/main/java/com/dl/officialsite/member/MemberService.java index 30528acc..1af9e9df 100644 --- a/src/main/java/com/dl/officialsite/member/MemberService.java +++ b/src/main/java/com/dl/officialsite/member/MemberService.java @@ -1,16 +1,56 @@ package com.dl.officialsite.member; +import com.dl.officialsite.team.Team; +import com.dl.officialsite.team.TeamRepository; +import com.dl.officialsite.team.teammember.TeamMember; +import com.dl.officialsite.team.teammember.TeamMemberRepository; +import com.dl.officialsite.team.vo.TeamVO; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; + @Service public class MemberService { @Autowired private MemberRepository memberRepository; + @Autowired + private TeamMemberRepository teamMemberRepository; + @Autowired + private TeamRepository teamRepository; + + public Member getMemberByAddress(String address) { + Optional member = memberRepository.findByAddress(address); + if(member.isPresent()) { + return member.get(); + } + return null; + } + + + public MemberWithTeam getMemberWithTeamInfoByAddress(String address) { + Optional member = memberRepository.findByAddress(address); + + if(member.isPresent()) { + MemberWithTeam memberWithTeam = new MemberWithTeam(); + BeanUtils.copyProperties(member, memberWithTeam); + ArrayList teams = memberWithTeam.getTeams(); + List teamMembers = teamMemberRepository.findByMemberId(member.get().getId()); - // public Member getMemberByAddress(String address) { -// return memberRepository.findByAddress(address); -// } + teamMembers.stream().forEach(teamMember -> { + Team team = teamRepository.findById(teamMember.getTeamId()).get(); + if(team.getTeamName().equals("Dapp-Learning DAO co-founders")){ + memberWithTeam.setAdmin(true); + } + teams.add(team); + }); + return memberWithTeam; + } + return null; + } } diff --git a/src/main/java/com/dl/officialsite/member/MemberWithTeam.java b/src/main/java/com/dl/officialsite/member/MemberWithTeam.java new file mode 100644 index 00000000..c60c3eb8 --- /dev/null +++ b/src/main/java/com/dl/officialsite/member/MemberWithTeam.java @@ -0,0 +1,25 @@ +package com.dl.officialsite.member; + + +import com.dl.officialsite.team.vo.TeamVO; +import lombok.*; +import org.hibernate.annotations.DynamicUpdate; +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +import javax.persistence.*; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.ArrayList; + +@Data +public class MemberWithTeam extends Member +{ + + private ArrayList teams; + + private boolean isAdmin; + + +} diff --git a/src/main/java/com/dl/officialsite/redpacket/RedPacketService.java b/src/main/java/com/dl/officialsite/redpacket/RedPacketService.java index 40f41cdf..1fcf994d 100644 --- a/src/main/java/com/dl/officialsite/redpacket/RedPacketService.java +++ b/src/main/java/com/dl/officialsite/redpacket/RedPacketService.java @@ -37,7 +37,6 @@ public class RedPacketService { @Scheduled(cron = "0 0/2 * * * ? ") public void updateRedpacketStatus() throws IOException { log.info("schedule task begin --------------------- "); - System.out.println("验证是否是新代码--------------"); HttpPost request = new HttpPost("http://api.studio.thegraph.com/proxy/55957/dapp-learning-redpacket/version/latest"); request.setHeader("Content-Type", "application/json"); // Define your GraphQL query @@ -67,7 +66,7 @@ public void updateRedpacketStatus() throws IOException { JsonObject data = jsonObject.getAsJsonObject("data"); JsonArray redpacketsArray = data.getAsJsonArray("redpackets"); - log.info("redpacket array : " + redpacketsArray); + // log.info("redpacket array : " + redpacketsArray); List redPacketList = redPacketRepository.findByStatus(0); for (int i = 0; i < redpacketsArray.size(); i++) { diff --git a/src/main/java/com/dl/officialsite/sponsor/Sponsor.java b/src/main/java/com/dl/officialsite/sponsor/Sponsor.java new file mode 100644 index 00000000..b3e91679 --- /dev/null +++ b/src/main/java/com/dl/officialsite/sponsor/Sponsor.java @@ -0,0 +1,30 @@ +package com.dl.officialsite.sponsor; + +import lombok.Data; +import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +import javax.persistence.*; + +/** + * @ClassName SponsorVo + * @Author jackchen + * @Date 2023/12/11 21:16 + * @Description 广告 + **/ +@Data +@EntityListeners(AuditingEntityListener.class) +@Entity +@Table(name = "sponsor") +public class Sponsor { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String company; + + private String link; + + private String icon; + +} diff --git a/src/main/java/com/dl/officialsite/sponsor/SponsorController.java b/src/main/java/com/dl/officialsite/sponsor/SponsorController.java new file mode 100644 index 00000000..81a101b9 --- /dev/null +++ b/src/main/java/com/dl/officialsite/sponsor/SponsorController.java @@ -0,0 +1,34 @@ +package com.dl.officialsite.sponsor; + +import com.dl.officialsite.common.base.BaseResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @ClassName HireController + * @Author jackchen + * @Date 2023/11/7 10:45 + * @Description HireController + **/ +@RestController +@RequestMapping("/sponsors") +public class SponsorController { + + @Autowired + private SponsorService sponsorService; + @Autowired + private SponsorRepository sponsorRepository; + + @PostMapping + public BaseResponse create(@RequestParam String address, @RequestBody Sponsor sponsor) { + return BaseResponse.successWithData( sponsorService.add(address , sponsor)); + + } + @GetMapping("/all") + public BaseResponse all(@RequestParam String address) { + List sponsors = sponsorRepository.findAll(); + return BaseResponse.successWithData(sponsors); + } +} diff --git a/src/main/java/com/dl/officialsite/sponsor/SponsorRepository.java b/src/main/java/com/dl/officialsite/sponsor/SponsorRepository.java new file mode 100644 index 00000000..f0a18144 --- /dev/null +++ b/src/main/java/com/dl/officialsite/sponsor/SponsorRepository.java @@ -0,0 +1,8 @@ +package com.dl.officialsite.sponsor; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; + +public interface SponsorRepository extends JpaRepository, JpaSpecificationExecutor { + //Optional findByAddress(@Param("address") String address); +} diff --git a/src/main/java/com/dl/officialsite/sponsor/SponsorService.java b/src/main/java/com/dl/officialsite/sponsor/SponsorService.java new file mode 100644 index 00000000..7c0ff2ee --- /dev/null +++ b/src/main/java/com/dl/officialsite/sponsor/SponsorService.java @@ -0,0 +1,35 @@ +package com.dl.officialsite.sponsor; + + +import com.dl.officialsite.common.base.BaseResponse; +import com.dl.officialsite.common.enums.CodeEnums; +import com.dl.officialsite.common.exception.BizException; +import com.dl.officialsite.team.TeamService; +import com.dl.officialsite.team.vo.TeamVO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class SponsorService { + + @Autowired + private SponsorRepository sponsorRepository; + + @Autowired + private TeamService teamService; + + + public Sponsor add(String address , Sponsor sponsor) { + Sponsor sponsorNew = null; + if(teamService.checkMemberIsAdmin(address)) { + sponsorNew = sponsorRepository.save(sponsor); + + } else { + throw new BizException(CodeEnums.NOT_THE_ADMIN.getCode(), + CodeEnums.NOT_THE_ADMIN.getMsg()); + } + return sponsorNew; + } + + +} diff --git a/src/main/java/com/dl/officialsite/team/TeamController.java b/src/main/java/com/dl/officialsite/team/TeamController.java index 2f421a66..62b1d7fa 100644 --- a/src/main/java/com/dl/officialsite/team/TeamController.java +++ b/src/main/java/com/dl/officialsite/team/TeamController.java @@ -24,15 +24,6 @@ @RestController @RequestMapping("/team") public class TeamController { - - //1 add create team ( or sql init) 完成 - //2 query all team and members 完成 - //3 query by name like 完成 - //4 member apply to join team and exit team 完成 - //4.1 join need wechat or telegram info. and send an email to team admin; 完成 - //4.2 exit team , send an email to team admin; 完成 - // 5 team admin approve 完成 - @Autowired private TeamService teamService; @@ -44,15 +35,15 @@ BaseResponse list(@RequestParam String address) { } /** - * 新增团队 + * 新增团队 todo */ @PutMapping BaseResponse create(@RequestBody TeamVO team, @RequestParam String address) { if (!address.equals("0x4DDE628ef50dE13E6E369353128A0d7899B54B6b")) { throw new BizException(CodeEnums.TEAM_NOT_EXIST.getCode(), CodeEnums.TEAM_NOT_EXIST.getMsg()); } - teamService.add(team); - return BaseResponse.successWithData(team); + Team TeamNew = teamService.add(team); + return BaseResponse.successWithData(TeamNew); } /** diff --git a/src/main/java/com/dl/officialsite/team/TeamService.java b/src/main/java/com/dl/officialsite/team/TeamService.java index 7c74beb4..96338785 100644 --- a/src/main/java/com/dl/officialsite/team/TeamService.java +++ b/src/main/java/com/dl/officialsite/team/TeamService.java @@ -7,6 +7,9 @@ import com.dl.officialsite.mail.EmailService; import com.dl.officialsite.member.Member; import com.dl.officialsite.member.MemberRepository; +import com.dl.officialsite.member.MemberService; +import com.dl.officialsite.team.teammember.TeamMember; +import com.dl.officialsite.team.teammember.TeamMemberRepository; import com.dl.officialsite.team.vo.TeamMemberApproveVO; import com.dl.officialsite.team.vo.TeamMemberBatchJoinVO; import com.dl.officialsite.team.vo.TeamMemberJoinVO; @@ -50,11 +53,14 @@ public class TeamService { @Autowired private EmailService emailService; + @Autowired + private MemberService memberService; + @Transactional - public void add(TeamVO teamVO) { + public Team add(TeamVO teamVO) { Team team = new Team(); BeanUtils.copyProperties(teamVO, team); - teamRepository.save(team); + return teamRepository.save(team); } public List getTeamAndMembers(TeamQueryVo teamQueryVo) { @@ -229,6 +235,22 @@ public List getMemberRole(Long memberId) { } } + + public boolean checkMemberIsAdmin(String address) { + + Member member = memberService.getMemberByAddress(address); + if(member == null) { + return false; + } + // id 0 + List adminMembers = teamMemberRepository.findByTeamId(0L); + if(adminMembers.contains(member)) { + return true; + } + return false; + } + + public TeamsMembersVo getTeamById(Long teamId) { Optional optional = teamRepository.findById(teamId); if (optional.isPresent()) { diff --git a/src/main/java/com/dl/officialsite/team/TeamMember.java b/src/main/java/com/dl/officialsite/team/teammember/TeamMember.java similarity index 94% rename from src/main/java/com/dl/officialsite/team/TeamMember.java rename to src/main/java/com/dl/officialsite/team/teammember/TeamMember.java index e595aaff..43622ab8 100644 --- a/src/main/java/com/dl/officialsite/team/TeamMember.java +++ b/src/main/java/com/dl/officialsite/team/teammember/TeamMember.java @@ -1,4 +1,4 @@ -package com.dl.officialsite.team; +package com.dl.officialsite.team.teammember; import javax.persistence.Entity; import javax.persistence.GeneratedValue; diff --git a/src/main/java/com/dl/officialsite/team/TeamMemberRepository.java b/src/main/java/com/dl/officialsite/team/teammember/TeamMemberRepository.java similarity index 96% rename from src/main/java/com/dl/officialsite/team/TeamMemberRepository.java rename to src/main/java/com/dl/officialsite/team/teammember/TeamMemberRepository.java index 09c8f851..51b9ffe6 100644 --- a/src/main/java/com/dl/officialsite/team/TeamMemberRepository.java +++ b/src/main/java/com/dl/officialsite/team/teammember/TeamMemberRepository.java @@ -1,7 +1,8 @@ -package com.dl.officialsite.team; +package com.dl.officialsite.team.teammember; import java.util.List; import java.util.Optional; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; diff --git a/src/main/java/com/dl/officialsite/team/vo/TeamVO.java b/src/main/java/com/dl/officialsite/team/vo/TeamVO.java index 96bf851a..5b956a79 100644 --- a/src/main/java/com/dl/officialsite/team/vo/TeamVO.java +++ b/src/main/java/com/dl/officialsite/team/vo/TeamVO.java @@ -22,7 +22,7 @@ public class TeamVO { private String nickName; // dao admin , core contributor, builder - private String authority; + private int authority; private int status; diff --git a/src/main/resources/DB/data-mysql.SQL b/src/main/resources/DB/data-mysql.SQL index 7d6cf09c..07cae2e8 100644 --- a/src/main/resources/DB/data-mysql.SQL +++ b/src/main/resources/DB/data-mysql.SQL @@ -1,7 +1,16 @@ INSERT INTO team ( team_name, team_profile, administrator, authority) -VALUES ("Dapp-Learning DAO co-founders", "Initial founding members and those who contributed significantly, Taking charge of community vault.", "0x1F7b953113f4dFcBF56a1688529CC812865840e1", 10), -("Dapp-Learning DAO builders", "Those who are willing to participate in the community and make outstanding contributions to community building", "0x1F7b953113f4dFcBF56a1688529CC812865840e1", 9), -("Dapp-Learning DAO PR reviewers", "Responsible for review PR of our repository", "0x1F7b953113f4dFcBF56a1688529CC812865840e1", 8), -("Dapp-Learning DAO sharing group", "sharing in Dapp-Learning and earn reward", "0x1F7b953113f4dFcBF56a1688529CC812865840e1", 7), -("Dapp-Learning DAO translation group", "Translate blockchain-related documents ", "0x1F7b953113f4dFcBF56a1688529CC812865840e1", 6); +VALUES +("Dapp-Learning DAO co-founders", "Initial founding members and those who contributed significantly, Taking charge of community vault.", "0x1F7b953113f4dFcBF56a1688529CC812865840e1", 0), +("Dapp-Learning DAO builders", "Those who are willing to participate in the community and make outstanding contributions to community building", "0x1F7b953113f4dFcBF56a1688529CC812865840e1", 1), +("Dapp-Learning DAO PR reviewers", "Responsible for review PR of our repository", "0x1F7b953113f4dFcBF56a1688529CC812865840e1", 2), +("Dapp-Learning DAO sharing group", "sharing in Dapp-Learning and earn reward", "0x1F7b953113f4dFcBF56a1688529CC812865840e1", 3), +("Dapp-Learning DAO translation group", "Translate blockchain-related documents ", "0x1F7b953113f4dFcBF56a1688529CC812865840e1", 4); + + +INSERT INTO sponsor(company, link, icon) +VALUES +("ETHEREUM FOUNDATION", "https://jobs.lever.co/ethereumfoundation","https://lever-client-logos.s3.us-west-2.amazonaws.com/b4cfe414-b949-4989-b62f-e34bb1817ee3-1644535907857.png"), +("ARBITRUM"," https://jobs.arbitrum.io/jobs", "https://cdn-customers.getro.com/arbitrum/images/cropped-Arbitrum_Horizontal-Logo-Full-color-White-background-scaled-1.jpg"), +("OPTIMISM", " https://jobs.optimism.io/jobs","https://assets-global.website-files.com/611dbb3c82ba72fbc285d4e2/611fd32ef63b79b5f8568d58_OPTIMISM-logo.svg"), +("SCROLL :", "https://jobs.lever.co/ScrollFoundation","https://lever-client-logos.s3.us-west-2.amazonaws.com/454cd96a-a8ab-4017-98d0-08f0356a498a-1692892834431.png"); \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index f86de2bf..7cb5bd75 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -50,7 +50,8 @@ logging: org.springframework.security: debug ipfs: - url: /ip4/127.0.0.1/tcp/5001 + #url: "/ip4/127.0.0.1/tcp/5001" + url: "" web3j: client-address: "https://polygon-rpc.com"