xuhy
2025-01-09 712f70b2936079a131ecb1e63c6d337171618cad
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
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
package com.stylefeng.guns.modular.system.service.impl;
 
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.stylefeng.guns.core.util.ToolUtil;
import com.stylefeng.guns.modular.cloudPayment.example.AllocationExample;
import com.stylefeng.guns.modular.cloudPayment.example.WithdrawalExample;
import com.stylefeng.guns.modular.cloudPayment.req.AllocationReq;
import com.stylefeng.guns.modular.system.controller.util.Base64Util;
import com.stylefeng.guns.modular.system.dao.IncomeMapper;
import com.stylefeng.guns.modular.system.dao.TEnterpriseWithdrawalMapper;
import com.stylefeng.guns.modular.system.model.*;
import com.stylefeng.guns.modular.system.dao.TCompanyMapper;
import com.stylefeng.guns.modular.system.service.*;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.stylefeng.guns.modular.system.util.ResultUtil;
import com.unionpay.upyzt.exception.UpyztException;
import com.unionpay.upyzt.resp.AllocationResp;
import com.unionpay.upyzt.resp.WithdrawalResp;
import org.apache.poi.hssf.usermodel.*;
//import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.formula.functions.T;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.util.CellRangeAddress;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.ZoneId;
import java.time.temporal.ChronoUnit;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
 
/**
 * <p>
 * 公司信息表 服务实现类
 * </p>
 *
 * @author 吕雪
 * @since 2020-06-06
 */
@Service
public class TCompanyServiceImpl extends ServiceImpl<TCompanyMapper, TCompany> implements ITCompanyService {
 
 
    @Resource
    private TCompanyMapper companyMapper;
 
 
 
 
    @Override
    public List<Map<String, Object>> getCompanyList(Page<Map<String, Object>> page, String beginTime, String endTime, String name, String principalName, String principalPhone, String adminName, String adminPhone, String serviceStr, Integer state) {
        return this.baseMapper.getCompanyList(page, beginTime, endTime, name, principalName, principalPhone, adminName, adminPhone, serviceStr, state);
    }
 
    @Override
    public List<Map<String, Object>> getCompanyScopeById(Integer id) {
        return this.baseMapper.getCompanyScopeById(id);
    }
 
    @Override
    public List<Map<String, Object>> getFranchiseeList(Page<Map<String, Object>> page, String beginTime, String endTime, String name, String account, String principalName, String principalPhone, String serviceStr, Integer state, Integer roleType, Integer nowUserId) {
        return this.baseMapper.getFranchiseeList(page, beginTime, endTime, name, account, principalName, principalPhone, serviceStr, state, roleType, nowUserId);
    }
 
    @Override
    public ResultUtil selectCompanyInfoById(String id) throws Exception {
        Map<String, Object> map = new HashMap<>();
        TCompany companyInfo = this.selectById(id);
        /*Address address = addressService.selectById((String) companyInfo.getDetailAddress());
        companyInfo.setAddressId(address);
        Map<String, List<Region>> regions = null;
        if(null != address){
            //查询注册地址对应的行政数据
            regions = regionService.getRegions(address.getProvince(), address.getCity());
        }
        //查询企业的超级管理员
        EntityWrapper<User> entityWrapper = new EntityWrapper<>();
        entityWrapper.eq("is_admin", "0");
        entityWrapper.eq("company_info_id", companyInfo.getCompanyId());
        entityWrapper.ne("status", 3);
        User user = userService.selectOne(entityWrapper);
 
        //查询企业的经营范围
        List<OperateRegion> OperateRegions = operateRegionService.getDataByCompanyInfoId(companyInfo.getCompanyId());
 
        map.put("companyInfo", companyInfo);
        map.put("region", regions);
        map.put("OperateRegion", OperateRegions);
        map.put("admin", user);*/
        return ResultUtil.success(map);
    }
 
 
    /**
     * 获取运营汇总数据
     * @param type
     * @param start
     * @param end
     * @param companyId
     * @param offset
     * @param limit
     * @return
     * @throws Exception
     */
    @Override
    public Map<String, Object> queryOperationalData(Integer type, String start, String end, Integer companyId, Integer offset, Integer limit) throws Exception {
        Map<String, Object> map = new HashMap<>();
        List<Map<String, Object>> list = companyMapper.queryOperationalData(type, start, end, companyId, offset, limit);
        int i = companyMapper.queryOperationalDataCount(type, start, end, companyId);
        map.put("rows", list);
        map.put("total", i);
        return map;
    }
 
 
    /**
     * 下载运营汇总数据
     * @param type
     * @param companyId
     * @return
     * @throws Exception
     */
    @Override
    public HSSFWorkbook downloadOperationalData(Integer type, String start, String end, Integer companyId) throws Exception {
        List<Map<String, Object>> list = companyMapper.queryOperationalData(type, start, end, companyId, null, null);
 
        List<List<String>> lists = new ArrayList<>();
        List<String> list1 = new ArrayList<>();
        list1.add("类别:");
        list1.add(type == 1 ? "快车" : type == 2 ? "出租车" : type == 3 ? "城际" : "小件物流");
        list1.add("");
        list1.add("");
        list1.add("起止时间:");
        list1.add(null == start || "".equals(start) ? "" : start + " ~ " + end);
        list1.add("");
        list1.add("");
        list1.add("运营商:");
        String company = "";
        if(null != companyId){
            company = companyMapper.selectById(companyId).getName();
        }
        list1.add(company);
        list1.add("");
        list1.add("");
        lists.add(list1);
        list1 = new ArrayList<>();
        list1.add("日期");
        list1.add("用户注册数量");
        list1.add("在线司机数");
        list1.add("订单情况");
        list1.add("");
        list1.add("");
        list1.add("支付情况");
        list1.add("");
        list1.add("");
        list1.add("");
        list1.add("");
        list1.add("投诉数量");
        lists.add(list1);
        list1 = new ArrayList<>();
        list1.add("");
        list1.add("");
        list1.add("");
        list1.add("下单数量");
        list1.add("乘客取消数量");
        list1.add("取消占比");
        list1.add("通过平台支付(单)");
        list1.add("通过其它支付(单)");
        list1.add("合计");
        list1.add("平台支付占比%");
        list1.add("金额");
        list1.add("");
        lists.add(list1);
 
        List<List<List<String>>> lists1 = new ArrayList<>();
        List<List<String>> lists2 = new ArrayList<>();
        for(Map<String, Object> map : list){
            List<String> list2 = new ArrayList<>();
            list2.add(null != map.get("time") ? map.get("time").toString() : "");
            list2.add(null != map.get("register") ? map.get("register").toString() : "");
            list2.add(null != map.get("online") ? map.get("online").toString() : "");
            list2.add(null != map.get("orderNum") ? map.get("orderNum").toString() : "");
            list2.add(null != map.get("cancelNum") ? map.get("cancelNum").toString() : "");
            list2.add(null != map.get("cancelProportion") ? map.get("cancelProportion").toString() : "");
            list2.add(null != map.get("onlinePay") ? map.get("onlinePay").toString() : "");
            list2.add(null != map.get("offlinePay") ? map.get("offlinePay").toString() : "");
            list2.add(null != map.get("total") ? map.get("total").toString() : "");
            list2.add(null != map.get("payProportion") ? map.get("payProportion").toString() : "");
            list2.add(null != map.get("money") ? map.get("money").toString() : "");
            list2.add(null != map.get("complaint") ? map.get("complaint").toString() : "");
            lists2.add(list2);
        }
        lists1.add(lists2);
        HSSFWorkbook hssfWorkbook = new HSSFWorkbook();
        HSSFSheet hssfSheet = hssfWorkbook.createSheet();
        hssfSheet.setColumnWidth(0, 6 * 256);
        hssfSheet.setDefaultRowHeightInPoints(20f);
        for(int i = 0; i < lists.size(); i++){
            HSSFRow hssfRow = hssfSheet.createRow(i);//设置第一行数据(标题)
            HSSFCellStyle style = hssfWorkbook.createCellStyle();
            HSSFFont font = hssfWorkbook.createFont();
//            font.setBold(true);
            style.setFont(font);
//            style.setAlignment(HorizontalAlignment.CENTER);
            for (int l = 0; l < lists.get(i).size(); l++) {
                HSSFCell hssfCell = hssfRow.createCell(l);
//                hssfCell.setCellType(CellType.STRING);//设置表格类型
                hssfCell.setCellValue(lists.get(i).get(l));
                hssfCell.setCellStyle(style);
                if(l > 0) {
                    hssfSheet.setColumnWidth(l , 20 * 256);
                }
 
            }
        }
        //这个就是合并单元格
        //参数说明:1:开始行 2:结束行  3:开始列 4:结束列
        //比如我要合并 第二行到第四行的    第六列到第八列     sheet.addMergedRegion(new CellRangeAddress(1,3,5,7));
        hssfSheet.addMergedRegion(new CellRangeAddress(0,0,1,3));
        hssfSheet.addMergedRegion(new CellRangeAddress(0,0,5,7));
        hssfSheet.addMergedRegion(new CellRangeAddress(0,0,9,10));
        hssfSheet.addMergedRegion(new CellRangeAddress(1,2,0,0));
        hssfSheet.addMergedRegion(new CellRangeAddress(1,2,1,1));
        hssfSheet.addMergedRegion(new CellRangeAddress(1,2,2,2));
        hssfSheet.addMergedRegion(new CellRangeAddress(1,1,3,5));
        hssfSheet.addMergedRegion(new CellRangeAddress(1,1,6,10));
        hssfSheet.addMergedRegion(new CellRangeAddress(1,2,11,11));
 
 
        for(int i = 0; i < lists1.size(); i++){
            //将数据添加到表格中
            List<String> data = null;
            for (int l = 0; l < lists1.get(i).size(); l++) {
                HSSFRow row = hssfSheet.createRow(l + 3);
                data = lists1.get(i).get(l);
                for (int j = 0; j < data.size(); j++) {
                    HSSFCell hssfCell = row.createCell(j);
//                    hssfCell.setCellType(CellType.STRING);//设置表格类型
                    hssfCell.setCellValue(data.get(j));
                }
            }
        }
        return hssfWorkbook;
    }
 
    @Override
    public List<Map<String, Object>> getCompanyIncomeList(Page<Map<String, Object>> page, String beginTime, String endTime, String userId) {
        return this.baseMapper.getCompanyIncomeList(page,beginTime,endTime,userId);
    }
 
    @Override
    public List<Map<String, Object>> getCompanyIncomeListEx(String beginTime, String endTime, String userId) {
        return this.baseMapper.getCompanyIncomeListEx(beginTime,endTime,userId);
    }
 
    @Override
    public Double getSumCompanyIncomeMoney(String beginTime, String endTime, String userId) {
        return this.baseMapper.getSumCompanyIncomeMoney(beginTime,endTime,userId);
    }
    @Resource
    private TEnterpriseWithdrawalMapper enterpriseWithdrawalMapper;
    @Resource
    private IIncomeService incomeService;
 
    @Resource
    private ITDriverService driverService;
 
    @Resource
    private IUserWithdrawalService userWithdrawalService;
 
    @Resource
    private ITDriverPayDaysService driverPayDaysService;
 
    @Override
    public void updateMoney() {
        // 平台
        TCompany company1 = baseMapper.selectList(new EntityWrapper<TCompany>().eq("type", 1)).get(0);
        TEnterpriseWithdrawal enterpriseWithdrawal = enterpriseWithdrawalMapper.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", company1.getId())).get(0);
        // 转出 电子账簿id
        String balanceAcctId = enterpriseWithdrawal.getBalanceAcctId();
        String code = enterpriseWithdrawal.getTransactionAuthorizationCode();
         code = Base64Util.decode(code);
 
 
 
        // 获取分公司分账时间
        // 获取所有分公司
        List<TCompany> companies = baseMapper.selectList(new EntityWrapper<TCompany>().eq("type", 2));
 
        // 获取所有未分账的信息
        List<Income> state = incomeService.selectList(new EntityWrapper<Income>().eq("state", 0));
        for (TCompany company : companies) {
            Integer paymentDays = company.getPaymentDays();
            LocalDate localDate = new Date().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
            System.out.println(localDate);
            LocalDate localDate1 = company.getUpdateTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
            System.out.println(localDate1);
            long between = ChronoUnit.DAYS.between(localDate, localDate1);
            System.out.println(between);
            if(between%paymentDays==0){
                // 开始分账
                System.out.println("-----------分公司开始分账----------");
                // 获取当前收入电子账簿id
                List<TEnterpriseWithdrawal> enterpriseWithdrawal1 = enterpriseWithdrawalMapper.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", company.getId()));
                if(enterpriseWithdrawal1.size()>0){
                    // 获取当前公司未分账的金额
                    Double sum = state.stream().filter(e -> e.getUserType() == 1 && company.getId().equals(e.getObjectId())).mapToDouble(Income::getMoney).sum();
                    System.out.println("金额 分:"+sum);
                    System.out.println("公司id:"+company.getId());
                    if(sum==null || sum==0){
                        continue;
                    }
                    Double v = sum * 100;
                    int money = v.intValue();
                    TEnterpriseWithdrawal enterpriseWithdrawal2 = enterpriseWithdrawal1.get(0);
                    String balanceAcctId1 = enterpriseWithdrawal2.getBalanceAcctId();
                    AllocationReq allocationReq = new AllocationReq();
                    allocationReq.setOutOrderNo(ToolUtil.getRandomString(32));
                    allocationReq.setPayBalanceAcctId(balanceAcctId);
                    allocationReq.setRecvBalanceAcctId(balanceAcctId1);
                    allocationReq.setAmount(money);
                    allocationReq.setPassword(code);
                    allocationReq.setProductCount(1);
                    allocationReq.setProductName("分公司分账");
                    allocationReq.setOrderNo(ToolUtil.getRandomString(32));
                    allocationReq.setOrderAmount(1l);
                    try {
                        AllocationResp allocationResp = AllocationExample.create(allocationReq);
                        System.out.println(company.getId()+"::"+company.getName()+"-----分账状态"+allocationResp.getStatus()+"--------------");
                        if("processing".equals(allocationResp.getStatus())){
                            List<Income> collect = state.stream().filter(e -> e.getUserType() == 1 && company.getId().equals(e.getObjectId())).collect(Collectors.toList());
                            collect.stream().forEach(e->e.setAllNo(allocationResp.getAllocationId()));
                            incomeService.updateBatchById(collect);
                        }
                        if("succeeded".equals(allocationResp.getStatus())){
                            List<Income> collect = state.stream().filter(e -> e.getUserType() == 1 && company.getId().equals(e.getObjectId())).collect(Collectors.toList());
                            collect.stream().forEach(e->e.setState(1));
                            incomeService.updateBatchById(collect);
                        }
                    } catch (UpyztException e) {
                        e.printStackTrace();
                    }
                }
            }
        }
 
        // 司机分账
        List<String> collect2 = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("applicationStatus", "succeeded")).stream().map(e -> e.getPhone()).collect(Collectors.toList());
        if(collect2.size()==0){
            collect2.add("0");
        }
 
        // 获取所有司机
        List<TDriver> tDrivers = driverService.selectList(new EntityWrapper<TDriver>().in("phone",collect2));
 
        // 所有司机公司的分账时间
        List<TDriverPayDays> tDriverPayDays = driverPayDaysService.selectList(null);
 
        for (TDriverPayDays tDriverPayDay : tDriverPayDays) {
            Integer day = tDriverPayDay.getDay();
            LocalDate localDate = new Date().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
            LocalDate localDate1 = tDriverPayDay.getUpdateTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
            long between = ChronoUnit.DAYS.between(localDate, localDate1);
            if(between%day==0){
                // 当前公司的司机
                List<TDriver> collect = tDrivers.stream().filter(e -> e.getCompanyId() == tDriverPayDay.getCompanyId()).collect(Collectors.toList());
                for (TDriver tDriver : collect) {
                    // 获取司机的电子账簿
                    List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("phone", tDriver.getPhone()).eq("applicationStatus", "succeeded"));
                    if(userWithdrawals.size()>0){
                        // 当前司机分账金额
                        Double sum = state.stream().filter(e ->(e.getUserType() == 2 && tDriver.getId().equals(e.getObjectId()))).mapToDouble(Income::getMoney).sum();
                        if(sum==null || sum==0){
                            continue;
                        }
                        Double v = sum * 100;
                        int money = v.intValue();
                        UserWithdrawal userWithdrawal = userWithdrawals.get(0);
                        String balanceAcctId1 = userWithdrawal.getBalanceAcctId();
                        AllocationReq allocationReq = new AllocationReq();
                        allocationReq.setOutOrderNo(ToolUtil.getRandomString(32));
                        allocationReq.setPayBalanceAcctId(balanceAcctId);
                        allocationReq.setRecvBalanceAcctId(balanceAcctId1);
                        allocationReq.setAmount(money);
                        allocationReq.setProductName("司机分账");
                        allocationReq.setProductCount(1);
                        allocationReq.setOrderNo(ToolUtil.getRandomString(32));
                        allocationReq.setOrderAmount(1l);
                        allocationReq.setPassword(code);
                        try {
                            AllocationResp allocationResp = AllocationExample.create(allocationReq);
                            System.out.println(tDriver.getId()+"::"+tDriver.getName()+"-----分账状态"+allocationResp.getStatus()+"--------------");
                            if("processing".equals(allocationResp.getStatus())){
                                List<Income> collect1 = state.stream().filter(e -> e.getUserType() == 2 && tDriver.getId().equals(e.getObjectId()) ).collect(Collectors.toList());
                                collect1.stream().forEach(e->e.setAllNo(allocationResp.getAllocationId()));
                                incomeService.updateBatchById(collect1);
                            }
                            if("succeeded".equals(allocationResp.getStatus())){
                                List<Income> collect1 = state.stream().filter(e -> e.getUserType() == 2 && tDriver.getId().equals(e.getObjectId()) ).collect(Collectors.toList());
                                collect1.stream().forEach(e->e.setState(1));
                                incomeService.updateBatchById(collect1);
                            }
                        } catch (UpyztException e) {
                            e.printStackTrace();
                        }
                    }
 
                }
            }
 
 
        }
 
 
    }
    @Override
    public void aaa() throws UpyztException {
        AllocationResp allocationResp = AllocationExample.retrieveById("3008203473415955501");
        System.out.println(allocationResp);
    }
 
    @Override
    public void taskDayFenzhang() {
        List<Income> state = incomeService.selectList(new EntityWrapper<Income>().eq("state", 0).isNotNull("allNo"));
        List<String> collect = state.stream().map(Income::getAllNo).distinct().collect(Collectors.toList());
        for (String s : collect) {
            try {
                AllocationResp allocationResp = AllocationExample.retrieveById(s);
                System.out.println("分账定时查询:"+allocationResp);
                if("succeeded".equals(allocationResp.getStatus())){
                    companyMapper.updateState(s);
                }
            } catch (UpyztException e) {
                e.printStackTrace();
            }
        }
    }
 
    @Autowired
    private ITCompanyWithdrawService tCompanyWithdrawService;
 
    @Autowired
    private ITPubWithdrawalService tPubWithdrawalService;
 
    @Override
    public void taskTixian() {
        // 获取公司提现信息
        List<TCompanyWithdraw> tCompanyWithdraws = tCompanyWithdrawService.selectList(new EntityWrapper<TCompanyWithdraw>().eq("status", 0).isNotNull("withdrawId"));
        for (TCompanyWithdraw tCompanyWithdraw : tCompanyWithdraws) {
            try {
                WithdrawalResp withdrawalResp = WithdrawalExample.retrieveById(tCompanyWithdraw.getWithdrawId());
                if("succeeded".equals(withdrawalResp.getStatus())){
                    tCompanyWithdraw.setStatus(1);
                }else if("failed".equals(withdrawalResp.getStatus())){
                    tCompanyWithdraw.setStatus(2);
                    tCompanyWithdraw.setRemark(withdrawalResp.getReason());
                }
                tCompanyWithdrawService.updateById(tCompanyWithdraw);
            } catch (UpyztException e) {
                e.printStackTrace();
            }
        }
 
        List<TPubWithdrawal> tPubWithdrawals = tPubWithdrawalService.selectList(new EntityWrapper<TPubWithdrawal>().eq("state", 1).isNotNull("withdrawId"));
        for (TPubWithdrawal tPubWithdrawal : tPubWithdrawals) {
            try {
                WithdrawalResp withdrawalResp = WithdrawalExample.retrieveById(tPubWithdrawal.getWithdrawId());
                if("failed".equals(withdrawalResp.getStatus())){
                    tPubWithdrawal.setState(3);
                    tPubWithdrawal.setRemark(withdrawalResp.getReason());
                    if(tPubWithdrawal.getUserType()==1){
                        TUser tUser = userService.selectById(tPubWithdrawal.getUserId());
                        tUser.setBalance(tUser.getBalance().add(tPubWithdrawal.getMoney()));
                        userService.updateById(tUser);
                    }else {
                        TDriver driver = driverService.selectById(tPubWithdrawal.getUserId());
                        driver.setLaveBusinessMoney(new BigDecimal(driver.getLaveBusinessMoney()).add(tPubWithdrawal.getMoney()).doubleValue());
                        driverService.updateById(driver);
                    }
                }else if("succeeded".equals(withdrawalResp.getStatus())){
                    tPubWithdrawal.setState(2);
                    tPubWithdrawal.setSuccessTime(new Date());
                }
                tPubWithdrawalService.updateById(tPubWithdrawal);
            } catch (UpyztException e) {
                e.printStackTrace();
            }
        }
 
    }
    @Autowired
    private ITUserService userService;
 
}