| | |
| | | import cc.mrbird.febs.rabbit.producer.ChainProducer; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | /** |
| | | * 质押恢复 |
| | | */ |
| | | @PostMapping("zhiyaAddNew") |
| | | @ControllerEndpoint(operation = "质押恢复", exceptionMessage = "操作失败") |
| | | public FebsResponse zhiyaAddNew() { |
| | | return iAdminBannerService.zhiyaAddNew(); |
| | | } |
| | | |
| | | /** |
| | | * 质押恢复 |
| | | */ |
| | | @PostMapping("zhiyaAdd") |
| | | @ControllerEndpoint(operation = "质押恢复", exceptionMessage = "操作失败") |
| | | public FebsResponse zhiyaAdd(@Valid ZhiyaAddDto zhiyaAddDto) { |
| | |
| | | |
| | | import javax.validation.Valid; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.math.BigDecimal; |
| | | |
| | | public interface IAdminBannerService extends IService<PlatformBanner> { |
| | | IPage<PlatformBanner> findPlatformBannerInPage(PlatformBanner platformBannerEntity, QueryRequest request); |
| | |
| | | IPage<DappMemberEntity> inviteList(DappMemberEntity dappMemberEntity, QueryRequest request); |
| | | |
| | | FebsResponse zhiyaAdd(ZhiyaAddDto zhiyaAddDto); |
| | | |
| | | FebsResponse zhiyaAddNew(); |
| | | } |
| | |
| | | // asyncCjService.calculateAchieve(dappAchieve); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse zhiyaAddNew() { |
| | | List<DappFundFlowEntity> dappFundFlowEntities = dappFundFlowDao.selectList( |
| | | new QueryWrapper<DappFundFlowEntity>() |
| | | .ge("id", 7599L) |
| | | .lt("id", 7688L)); |
| | | |
| | | if(CollUtil.isNotEmpty(dappFundFlowEntities)){ |
| | | for(DappFundFlowEntity dappFundFlowEntity : dappFundFlowEntities){ |
| | | Integer type = dappFundFlowEntity.getType(); |
| | | if(FlowTypeEnum.HUA_DIAN_GEREN.getValue() == type || FlowTypeEnum.HUA_DIAN_TUANDUI_USDT.getValue() == type){ |
| | | Long memberId = dappFundFlowEntity.getMemberId(); |
| | | BigDecimal amount = dappFundFlowEntity.getAmount(); |
| | | DappMemberEntity dappMemberEntity = dappMemberDao.selectById(memberId); |
| | | BigDecimal usdtBalance = dappMemberEntity.getUsdtBalance(); |
| | | dappMemberEntity.setUsdtBalance(usdtBalance.subtract(amount)); |
| | | dappMemberDao.updateUsdtBalanceWithVersion(dappMemberEntity); |
| | | log.info("流水处理中。。。。。。"+dappFundFlowEntity.getId()+",处理金额"+amount+",账户余额:"+usdtBalance+",操作后余额:"+dappMemberEntity.getUsdtBalance()); |
| | | dappFundFlowDao.deleteById(dappFundFlowEntity.getId()); |
| | | } |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | |
| | | </div> |
| | | </form> |
| | | <table lay-filter="withdrawDbTable" lay-data="{id: 'withdrawDbTable'}"></table> |
| | | |
| | | <style type="text/css"> |
| | | /*.layui-table-cell{*/ |
| | | /* text-align:center;*/ |
| | | /* height: auto;*/ |
| | | /* white-space: nowrap; !*文本不会换行,在同一行显示*!*/ |
| | | /* overflow: hidden; !*超出隐藏*!*/ |
| | | /* text-overflow: ellipsis; !*省略号显示*!*/ |
| | | /*}*/ |
| | | /*.layui-table img{*/ |
| | | /* max-width:100px*/ |
| | | /*}*/ |
| | | ::-webkit-scrollbar { |
| | | height: 20px !important; |
| | | background-color: #f4f4f4; |
| | | } |
| | | </style> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | toolbar: '#tableToolBarOrderDB', |
| | | cols: [[ |
| | | {type: 'checkbox', fixed: 'left'}, |
| | | {title: '地址', templet: '#approve-list', minWidth: 130}, |
| | | {field: 'createTime', title: '创建时间', minWidth: 180}, |
| | | {title: '地址', templet: '#approve-list', minWidth: 400}, |
| | | {field: 'createTime', title: '创建时间', minWidth: 200}, |
| | | {field: 'amount', title: '金额(代币)', minWidth: 130}, |
| | | {title: '提现状态', templet: '#withdraw-status'}, |
| | | {title: '提现状态', templet: '#withdraw-status', minWidth: 130}, |
| | | // {field: 'fee', title: '手续费', minWidth: 130}, |
| | | // {title: '操作', toolbar: '#withdraw-option', minWidth: 200} |
| | | ]] |
| | |
| | | </div> |
| | | </form> |
| | | <table lay-filter="withdrawTable" lay-data="{id: 'withdrawTable'}"></table> |
| | | |
| | | <style type="text/css"> |
| | | /*.layui-table-cell{*/ |
| | | /* text-align:center;*/ |
| | | /* height: auto;*/ |
| | | /* white-space: nowrap; !*文本不会换行,在同一行显示*!*/ |
| | | /* overflow: hidden; !*超出隐藏*!*/ |
| | | /* text-overflow: ellipsis; !*省略号显示*!*/ |
| | | /*}*/ |
| | | /*.layui-table img{*/ |
| | | /* max-width:100px*/ |
| | | /*}*/ |
| | | ::-webkit-scrollbar { |
| | | height: 20px !important; |
| | | background-color: #f4f4f4; |
| | | } |
| | | </style> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <style> |
| | | .layui-table-cell { |
| | | height: auto !important; |
| | | } |
| | | </style> |
| | | <!--<style>--> |
| | | <!-- .layui-table-cell {--> |
| | | <!-- height: auto !important;--> |
| | | <!-- }--> |
| | | <!--</style>--> |
| | | <script type="text/html" id="withdraw-status"> |
| | | {{# |
| | | var status = { |
| | |
| | | toolbar: '#tableToolBarOrder', |
| | | cols: [[ |
| | | {type: 'checkbox', fixed: 'left'}, |
| | | {title: '地址', templet: '#approve-list', minWidth: 130}, |
| | | {field: 'createTime', title: '创建时间', minWidth: 180}, |
| | | {title: '地址', templet: '#approve-list', minWidth: 400}, |
| | | {field: 'createTime', title: '创建时间', minWidth: 200}, |
| | | {field: 'amount', title: '金额(USDT)', minWidth: 130}, |
| | | {title: '提现状态', templet: '#withdraw-status'}, |
| | | {title: '提现状态', templet: '#withdraw-status', minWidth: 130}, |
| | | // {field: 'fee', title: '手续费', minWidth: 130}, |
| | | // {title: '操作', toolbar: '#withdraw-option', minWidth: 200} |
| | | ]] |
| | |
| | | </div> |
| | | <div class="layui-card-footer"> |
| | | <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="zhiya-add-form-submit" id="submit">保存</button> |
| | | <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="zhiya-add-form-submitBtn" id="submitBtn">流水恢复</button> |
| | | </div> |
| | | </div> |
| | | </form> |
| | |
| | | return false; |
| | | }); |
| | | |
| | | form.on('submit(zhiya-add-form-submitBtn)', function (data) { |
| | | console.log(data); |
| | | febs.post(ctx + 'admin/banner/zhiyaAddNew', null, function (res) { |
| | | febs.alert.success('操作成功'); |
| | | }); |
| | | return false; |
| | | }); |
| | | |
| | | }); |
| | | </script> |