| | |
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.metadata.IPage;
|
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.taobao.api.internal.toplink.embedded.websocket.util.StringUtil;
|
| | | import com.xcong.excoin.common.LoginUserUtils;
|
| | | import com.xcong.excoin.common.response.Result;
|
| | | import com.xcong.excoin.modules.coin.dao.OrderCoinsDao;
|
| | |
| | | import com.xcong.excoin.modules.documentary.dao.FollowFollowerProfitDao;
|
| | | import com.xcong.excoin.modules.documentary.dao.FollowFollowerSettingDao;
|
| | | import com.xcong.excoin.modules.documentary.dao.FollowTraderInfoDao;
|
| | | import com.xcong.excoin.modules.documentary.dao.FollowTraderLabelDao;
|
| | | import com.xcong.excoin.modules.documentary.dao.FollowTraderProfitDetailDao;
|
| | | import com.xcong.excoin.modules.documentary.dao.FollowTraderProfitInfoDao;
|
| | | import com.xcong.excoin.modules.documentary.dto.CancelDocumentaryOrderSetDto;
|
| | |
| | | import com.xcong.excoin.modules.documentary.entity.FollowFollowerProfitEntity;
|
| | | import com.xcong.excoin.modules.documentary.entity.FollowFollowerSettingEntity;
|
| | | import com.xcong.excoin.modules.documentary.entity.FollowTraderInfoEntity;
|
| | | import com.xcong.excoin.modules.documentary.entity.FollowTraderLabelEntity;
|
| | | import com.xcong.excoin.modules.documentary.entity.FollowTraderProfitInfoEntity;
|
| | | import com.xcong.excoin.modules.documentary.service.DocumentaryService;
|
| | | import com.xcong.excoin.modules.documentary.vo.DocumentaryOrderInfoVo;
|
| | |
| | | import com.xcong.excoin.modules.documentary.vo.TradeOrderInfoVo;
|
| | | import com.xcong.excoin.modules.documentary.vo.TradeProfitInfoVo;
|
| | | import com.xcong.excoin.modules.documentary.vo.TradeSetInfoVo;
|
| | | import com.xcong.excoin.modules.documentary.vo.TradeSetLabelInfoVo;
|
| | | import com.xcong.excoin.modules.documentary.vo.TraderStatusVo;
|
| | | import com.xcong.excoin.modules.member.dao.MemberDao;
|
| | | import com.xcong.excoin.modules.member.dao.MemberLevelRateDao;
|
| | |
| | | import cn.hutool.core.collection.CollUtil;
|
| | | import cn.hutool.core.util.ObjectUtil;
|
| | | import cn.hutool.core.util.StrUtil;
|
| | | import jnr.ffi.Struct.int16_t;
|
| | | import lombok.extern.slf4j.Slf4j;
|
| | |
|
| | | @Slf4j
|
| | |
| | | private FollowFollowerOrderRelationDao followFollowerOrderRelationDao;
|
| | | @Resource
|
| | | private FollowFollowerNoticeDao followFollowerNoticeDao;
|
| | | @Resource
|
| | | private FollowTraderLabelDao followTraderLabelDao;
|
| | |
|
| | |
|
| | | @Override
|
| | |
| | | FollowTraderProfitInfoVo.setDeclaration(declaration);
|
| | | Integer isAll = followTraderInfoEntity.getIsAll();
|
| | | FollowTraderProfitInfoVo.setIsAll(isAll);
|
| | | |
| | | String labels = followTraderInfoEntity.getLabels();
|
| | | if(StrUtil.isNotEmpty(labels)) {
|
| | | String labelsName = "";
|
| | | String[] split = labels.split(",");
|
| | | int length = split.length;
|
| | | for(int i = 0;i < length;i++) {
|
| | | String string = split[i];
|
| | | FollowTraderLabelEntity selectById = followTraderLabelDao.selectById(Long.parseLong(string));
|
| | | labelsName = selectById.getLabels();
|
| | | labelsName += (labelsName + ",");
|
| | | }
|
| | | FollowTraderProfitInfoVo.setLabels(labelsName);
|
| | | }
|
| | | |
| | | }
|
| | | }
|
| | | return Result.ok(followTraderProfitInfoVoList);
|
| | | }
|
| | | |
| | | public static void main(String[] args) {
|
| | | String labels = "";
|
| | | if(StrUtil.isNotEmpty(labels)) {
|
| | | String labelsName = "";
|
| | | String[] split = labels.split(",");
|
| | | int length = split.length;
|
| | | for(int i = 0;i < length;i++) {
|
| | | String string = split[i];
|
| | | labelsName += (string + ",");
|
| | | }
|
| | | System.out.println(labelsName);
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | tradeSetInfoVo.setDeclaration(declaration);
|
| | | Integer isOpen = followTraderInfoEntity.getIsOpen();
|
| | | tradeSetInfoVo.setIsOpen(isOpen);
|
| | | |
| | | String labels = followTraderInfoEntity.getLabels();
|
| | | if(StrUtil.isNotEmpty(labels)) {
|
| | | String labelsName = "";
|
| | | String[] split = labels.split(",");
|
| | | int length = split.length;
|
| | | for(int i = 0;i < length;i++) {
|
| | | String string = split[i];
|
| | | FollowTraderLabelEntity selectById = followTraderLabelDao.selectById(Long.parseLong(string));
|
| | | labelsName = selectById.getLabels();
|
| | | labelsName += (labelsName + ",");
|
| | | }
|
| | | tradeSetInfoVo.setLabels(labelsName);
|
| | | }
|
| | | return Result.ok(tradeSetInfoVo);
|
| | | }
|
| | |
|
| | |
| | | String nickname = updateTradeSetInfoDto.getNickname();
|
| | | String declaration = updateTradeSetInfoDto.getDeclaration();
|
| | | int isOpen = updateTradeSetInfoDto.getIsOpen();
|
| | | String labels = updateTradeSetInfoDto.getLabels();
|
| | | followTraderInfoEntity.setLabels(labels);
|
| | | followTraderInfoEntity.setAvatar(avatar);
|
| | | followTraderInfoEntity.setNickname(nickname);
|
| | | followTraderInfoEntity.setDeclaration(declaration);
|
| | |
| | | return Result.ok(arrayList);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public Result getTradeSetLabelInfo() {
|
| | | //获取用户ID
|
| | | Long memberId = LoginUserUtils.getAppLoginUser().getId();
|
| | | |
| | | Map<String, Object> columnMap = new HashMap<>();
|
| | | List<FollowTraderLabelEntity> selectByMap = followTraderLabelDao.selectByMap(columnMap);
|
| | | ArrayList<TradeSetLabelInfoVo> arrayList = new ArrayList<>();
|
| | | if(CollUtil.isNotEmpty(selectByMap)) {
|
| | | for(FollowTraderLabelEntity followTraderLabelEntity : selectByMap) {
|
| | | TradeSetLabelInfoVo tradeSetLabelInfoVo = new TradeSetLabelInfoVo();
|
| | | Long id = followTraderLabelEntity.getId();
|
| | | String labels = followTraderLabelEntity.getLabels();
|
| | | tradeSetLabelInfoVo.setId(id);
|
| | | tradeSetLabelInfoVo.setLabels(labels);
|
| | | arrayList.add(tradeSetLabelInfoVo);
|
| | | }
|
| | | }
|
| | | return Result.ok(arrayList);
|
| | | }
|
| | | |
| | |
|
| | |
|
| | |
|