puzhibing
2024-01-03 168d852672f8f671a01d6f0f053349d0d321ec7c
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
package com.dsh.guns.modular.system.service.impl;
 
import com.alipay.api.domain.Shop;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsh.course.dto.StudentSearch;
import com.dsh.course.dto.TStudentDto;
import com.dsh.course.feignClient.account.AppUserClient;
import com.dsh.course.mapper.TOperatorAuthMapper;
import com.dsh.course.mapper.TOperatorMapper;
import com.dsh.course.mapper.TOperatorUserMapper;
import com.dsh.course.mapper.TSiteMapper;
import com.dsh.course.util.UUIDUtil;
import com.dsh.guns.core.exception.ServiceException;
import com.dsh.guns.modular.system.model.*;
import com.dsh.guns.modular.system.service.IOperatorAuthService;
import com.dsh.guns.modular.system.service.IOperatorUserService;
import com.dsh.guns.modular.system.service.ITStudentService;
import com.dsh.guns.modular.system.util.WeChatUtil;
import com.github.binarywang.wxpay.bean.ecommerce.ApplymentsResult;
import com.github.binarywang.wxpay.service.EcommerceService;
import com.github.binarywang.wxpay.service.WxPayService;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.commons.util.IdUtils;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
 
/**
 * <p>
 * 学员信息 服务实现类
 * </p>
 *
 * @author stylefeng
 * @since 2023-09-12
 */
@Service
public class TOperatorUserServiceImpl extends ServiceImpl<TOperatorUserMapper, OperatorUser> implements IOperatorUserService {
 
    @Autowired
    private IOperatorAuthService operatorAuthService;
    @Autowired
    private TOperatorMapper operatorMapper;
    @Autowired
    private WeChatUtil weChatUtil;
 
//    @Override
//    public void mgtShopAuth(MgtShopAuthDto mgtShopAuthDto) {
//
//        OperatorAuthAlipay shopAuthentication = new OperatorAuth();
//
//        if(mgtShopAuthDto.getBlBusinessFoeverFlag()!=null&&mgtShopAuthDto.getBlBusinessFoeverFlag()==1){
//            mgtShopAuthDto.setBlBusinessDeanline("长期");
//        }
//        if(mgtShopAuthDto.getLpIcForeverFlag()!=null&&mgtShopAuthDto.getLpIcForeverFlag()==1){
//            mgtShopAuthDto.setLpIcEndDate("长期");
//        }
//        BeanUtils.copyProperties(mgtShopAuthDto , shopAuthentication);
//        TOperator operator = operatorMapper.selectById(shopAuthentication.getOperatorId());
//        String applyNumber = UUIDUtil.getNativeUUID().replace("-","");
//        shopAuthentication.setOutBizNo(applyNumber);
//        ApplymentsResult applymentsResult;
//        try {
//            applymentsResult = weChatUtil.ecommerceApply(shopAuthentication,applyNumber,operator);
//        } catch (Exception e) {
//            throw new ServiceException(e.getMessage());
//        }
//        shopAuthentication.setOrderStatus("AUDITING");
//        shopAuthentication.setOrderNo(applymentsResult.getApplymentId());
//        operatorAuthService.saveOrUpdate(shopAuthentication);
//    }
 
    @Override
    public void mgtShopAuth(MgtShopAuthDto mgtShopAuthDto) {
 
    }
 
    @Override
    public List<OperatorUserVO> listAll(String province, String city, String userName, String phone, Integer platform, Integer type, Integer state) {
        return this.baseMapper.listAll(province,city,userName,phone,platform,type,state);
    }
}