xiaoyong931011
2022-12-08 8b7e2c47b56bfe506ffd32b4f6268c5525248d7f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
package cc.mrbird.febs.dapp.controller;
 
import cc.mrbird.febs.common.contants.AppContants;
import cc.mrbird.febs.common.entity.FebsConstant;
import cc.mrbird.febs.common.utils.FebsUtil;
import cc.mrbird.febs.common.utils.RedisUtils;
import cc.mrbird.febs.dapp.entity.AppVersion;
import cc.mrbird.febs.dapp.entity.DappMemberEntity;
import cc.mrbird.febs.dapp.entity.DappMessageEntity;
import cc.mrbird.febs.dapp.entity.IgtOnHookPlanOrder;
import cc.mrbird.febs.dapp.mapper.DappMemberDao;
import cc.mrbird.febs.dapp.mapper.DappMessageDao;
import cc.mrbird.febs.dapp.service.DappMemberService;
import lombok.RequiredArgsConstructor;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
 
import java.math.BigDecimal;
 
/**
 * @author 
 * @date 2022-03-21
 **/
@Controller("dappView")
@RequestMapping(FebsConstant.VIEW_PREFIX + "dappView")
@RequiredArgsConstructor
public class ViewController {
 
    private final RedisUtils redisUtils;
 
    private final DappMemberService dappMemberService;
    private final DappMemberDao dappMemberDao;
    private final DappMessageDao dappMessageDao;
 
    @GetMapping(value = "admin")
    @RequiresPermissions("admin:view")
    public String user() {
        return FebsUtil.view("dapp/user");
    }
 
    @GetMapping(value = "admin/add")
    @RequiresPermissions("admin:add")
    public String addUser() {
        return FebsUtil.view("dapp/userAdd");
    }
 
    @GetMapping(value = "admin/update")
    @RequiresPermissions("admin:update")
    public String updateUser() {
        return FebsUtil.view("dapp/userUpdate");
    }
 
    @GetMapping(value = "admin/simulate")
    @RequiresPermissions("admin:simulate")
    public String simulate() {
        return FebsUtil.view("dapp/simulate-data");
    }
 
    @GetMapping(value = "admin/simulateResult/{batch}")
    public String simulateResult(@PathVariable("batch") String batch, Model model) {
        String url = "https://birdworld.vip/index.html?isDev=true&batchNo=" + batch;
        model.addAttribute("url", url);
        return FebsUtil.view("dapp/simulate-result");
    }
 
    /**
     * igt会员列表
     * @return
     */
    @GetMapping("member")
    @RequiresPermissions("member:view")
    public String member() {
        return FebsUtil.view("dapp/member");
    }
 
    @GetMapping("memberWithdraw")
    @RequiresPermissions("withdraw:view")
    public String memberWithdraw() {
        return FebsUtil.view("dapp/member-withdraw");
    }
 
    @GetMapping("walletCoin")
    @RequiresPermissions("walletCoin:view")
    public String walletCoin() {
        return FebsUtil.view("dapp/member-wallet-coin");
    }
 
    @GetMapping("walletMine")
    @RequiresPermissions("walletMine:view")
    public String walletMine() {
        return FebsUtil.view("dapp/member-wallet-mine");
    }
 
    @GetMapping("moneyChange")
    @RequiresPermissions("moneyChange:view")
    public String moneyChange() {
        return FebsUtil.view("dapp/money-change-flow");
    }
 
    @GetMapping("transfer")
    @RequiresPermissions("transfer:view")
    public String transfer() {
        return FebsUtil.view("dapp/member-transter");
    }
 
    @GetMapping(value = "ratio")
    @RequiresPermissions("ratio:view")
    public String returnRatio() {
        return FebsUtil.view("dapp/return-ratio");
    }
 
 
    @GetMapping(value = "agentReturn")
    @RequiresPermissions("agentReturn:view")
    public String agentReturn() {
        return FebsUtil.view("dapp/agent-return");
    }
 
 
    @GetMapping(value ="priceSetting")
    @RequiresPermissions("price:setting:view")
    public String priceSetting(Model model) {
        BigDecimal price = (BigDecimal) redisUtils.get(AppContants.REDIS_KEY_ETH_NEW_PRICE);
        model.addAttribute("newestPrice", price);
        return FebsUtil.view("dapp/newest-price-setting");
    }
 
    /**
     * 会员等级设置
     * @return
     */
    @GetMapping("memberLevelSet")
    @RequiresPermissions("memberLevelSet:view")
    public String memberLevelSet() {
        return FebsUtil.view("dapp/member-level-set");
    }
 
    /**
     * 挂机方案设置
     * @return
     */
    @GetMapping("onHookPlanSet")
    @RequiresPermissions("onHookPlanSet:view")
    public String onHookPlanSet() {
        return FebsUtil.view("dapp/on-hook-plan-set");
    }
 
    /**
     * App版本-列表
     * @return
     */
    @GetMapping("appVersionList")
    @RequiresPermissions("appVersionList:view")
    public String appVersionList() {
        return FebsUtil.view("dapp/appVersionList");
    }
 
    /**
     * App版本-新增
     * @return
     */
    @GetMapping("appVersionAdd")
    @RequiresPermissions("appVersionAdd:add")
    public String appVersionAdd() {
        return FebsUtil.view("dapp/appVersionAdd");
    }
 
    /**
     * App版本-详情
     * @param id
     * @param model
     * @return
     */
    @GetMapping("appVerSionUpdate/{id}")
    @RequiresPermissions("appVerSionUpdate:update")
    public String appVerSionUpdate(@PathVariable long id, Model model) {
        AppVersion data = dappMemberService.getAppVersionInfoById(id);
        model.addAttribute("appVersion", data);
        return FebsUtil.view("dapp/appVerSionUpdate");
    }
 
    /**
     * 充值-列表
     * @return
     */
    @GetMapping("chargeList")
    @RequiresPermissions("chargeList:view")
    public String chargeList() {
        return FebsUtil.view("dapp/member-charge");
    }
 
    /**
     * 会员列表-拨付
     * @param id
     * @param model
     * @return
     */
    @GetMapping("payUsdt/{id}")
    @RequiresPermissions("payUsdt:update")
    public String payUsdt(@PathVariable long id, Model model) {
        DappMemberEntity data = dappMemberDao.selectById(id);
        model.addAttribute("dappMember", data);
        return FebsUtil.view("dapp/payUsdt");
    }
 
    /**
     * 会员列表-设置会员等级
     * @param id
     * @param model
     * @return
     */
    @GetMapping("identitySet/{id}")
    @RequiresPermissions("identitySet:update")
    public String identitySet(@PathVariable long id, Model model) {
        DappMemberEntity data = dappMemberDao.selectById(id);
        model.addAttribute("dappMember", data);
        return FebsUtil.view("dapp/identitySet");
    }
 
    /**
     * 客服消息-列表
     * @return
     */
    @GetMapping("messageList")
    @RequiresPermissions("messageList:view")
    public String messageList() {
        return FebsUtil.view("dapp/message-list");
    }
 
    /**
     * 客服消息-列表
     * @return
     */
    @GetMapping("sendBackMessage")
    @RequiresPermissions("user:sendBack")
    public String sendBackMessage() {
        return FebsUtil.view("dapp/send-Back-Message");
    }
 
    /**
     * 客服消息-回复
     * @param id
     * @param model
     * @return
     */
    @GetMapping("sendBackMessage/{id}")
    @RequiresPermissions("user:sendBack")
    public String sendBackMessage(@PathVariable long id, Model model) {
        DappMessageEntity data = dappMessageDao.selectById(id);
        model.addAttribute("dappMessage", data);
        return FebsUtil.view("dapp/send-Back-Message");
    }
 
 
    public static long showMessageInfoFlow;
    /**
     * 客服消息-记录
     * @param id
     * @param model
     * @return
     */
    @GetMapping("/showMessage/{id}")
    @RequiresPermissions("showMessage:update")
    public String amountFlow(@PathVariable long id, Model model) {
        showMessageInfoFlow = id;
        DappMessageEntity data = dappMessageDao.selectById(id);
        model.addAttribute("dappMessage", data);
        return FebsUtil.view("dapp/show-message-list");
    }
 
    /**
     * 每日资产总览-列表
     * @return
     */
    @GetMapping("moneyTotal")
    @RequiresPermissions("moneyTotal:view")
    public String moneyTotal() {
        return FebsUtil.view("dapp/money-total");
    }
 
    /**
     * 每日资产总览-充值详情
     * @param createTime
     * @param model
     * @return
     */
    public static String createTimeStr;
    @GetMapping("/amountFlow/{createTime}")
    @RequiresPermissions("amountFlow:update")
    public String amountFlow(@PathVariable String createTime, Model model) {
        createTimeStr = createTime;
        return FebsUtil.view("dapp/money-total-flow");
    }
 
    /**
     * 每日资产总览-提现详情
     * @param createTime
     * @param model
     * @return
     */
    @GetMapping("/amountOutFlow/{createTime}")
    @RequiresPermissions("amountOutFlow:update")
    public String amountOutFlow(@PathVariable String createTime, Model model) {
        createTimeStr = createTime;
        return FebsUtil.view("dapp/money-total-flow-out");
    }
 
    public static long idMemberTeamInfo;
    /**
     * 用户列表-团队详情
     * @param id
     * @param model
     * @return
     */
    @GetMapping("/teamInfo/{id}")
    @RequiresPermissions("teamInfo:update")
    public String teamInfo(@PathVariable long id, Model model) {
        idMemberTeamInfo = id;
        DappMemberEntity data = dappMemberDao.selectById(id);
        model.addAttribute("teamInfo", data);
        return FebsUtil.view("dapp/teamInfo");
    }
 
    /**
     * 一键操作
     * @return
     */
    @GetMapping("reloadSystem")
    @RequiresPermissions("reloadSystem:update")
    public String reloadSystem() {
        return FebsUtil.view("dapp/system-reload");
    }
 
}