44323
2023-12-12 689873e9964374d9d6df388dcd956f558e055428
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
package com.dsh.guns.modular.system.controller.code;
 
 
import cn.hutool.crypto.SecureUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.R;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dsh.course.feignClient.account.StoreStaffClient;
import com.dsh.course.feignClient.account.model.TStoreStaff;
import com.dsh.guns.config.UserExt;
import com.dsh.guns.core.base.controller.BaseController;
import com.dsh.guns.core.base.tips.SuccessTip;
import com.dsh.guns.core.common.constant.factory.PageFactory;
import com.dsh.guns.core.util.SinataUtil;
import com.dsh.guns.modular.system.model.*;
import com.dsh.guns.modular.system.service.*;
import com.dsh.guns.modular.system.service.impl.TOperatorUserServiceImpl;
import com.dsh.guns.modular.system.util.ResultUtil;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
 
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
 
 
/**
 * 运营商管理
 */
@Controller
@RequestMapping("/operatorUser")
public class OperatorUserController extends BaseController {
 
    private String PREFIX = "/system/operatorUser/";
    @Autowired
    private TOperatorService operatorService;
    @Autowired
    private TOperatorCityService operatorCityService;
    @Autowired
    private IUserService userService;
    @Autowired
    private ICityService cityService;
    @Autowired
    private IOperatorUserService operatorUserService;
    @Autowired
    private IStoreService storeService;
    @Autowired
    private StoreStaffClient storeStaffClient;
    /**
     * 跳转运营商管理首页
     */
    @RequestMapping("")
    public String index(Model model) {
        List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0));
        model.addAttribute("provinceList",list);
        return PREFIX + "OperatorUser.html";
    }
 
 
 
    /**
     * 获取运营商列表
     */
    @RequestMapping(value = "/listAll")
    @ResponseBody
    public Object listAll(String province,String city,String userName, String phone,Integer platform,Integer type,Integer state) {
 
        List<OperatorUserVO> list =  operatorUserService.
                listAll(province,city,userName,phone,platform,type,state);
        return list;
    }
 
    @RequestMapping(value = "/mgtShopAuth", method = RequestMethod.POST)
    @ApiOperation(value = "微信平台商户进件")
    @ResponseBody
    public Object mgtShopAuth(Integer operatorId,String aliasName, String name,String phone,
                              String bodyType,String businessName,String businessNumber,String legalPerson,
                              String legalRepresentative,String registerAddress,String businessTerm,String businessPicture,
                              String businessEnd,String legalNumber,String accountType,
                              Integer blBusinessFoeverFlag, String leagleNumber,String legalAddress,
                              String legalTerm,String legalEnd, Integer lpIcForeverFlag,String legalFront,String legalBack,
                              String legalPhone,String legalEmail, String settlementAccountType,String saBank,String saAccountName,
                              String saBankProvinceCode,String saBankCityCode, String saBankName,String saNumber,String baPics,
                              String baDesc,Integer owner, String uboName,String uboIdCard,String uboIcStartDate,String uboIcEndDate,
                              String uboIcFront,String uboIcBack, String uboIcAddress) {
        MgtShopAuthDto mgtShopAuthDto = new MgtShopAuthDto();
        Integer userId = Objects.requireNonNull(UserExt.getUser()).getId();
        mgtShopAuthDto.setUserId(userId);
        mgtShopAuthDto.setAuthId("1");
        mgtShopAuthDto.setShopId(Long.valueOf(operatorId));
        mgtShopAuthDto.setShopName(businessName);
        mgtShopAuthDto.setShopownerName(name);
        mgtShopAuthDto.setShopownerPhone(phone);
        mgtShopAuthDto.setMainType(Integer.valueOf(bodyType));
        mgtShopAuthDto.setBlShopName(businessName);
        mgtShopAuthDto.setBlNumber(businessNumber);
        mgtShopAuthDto.setBlCorporateName(legalRepresentative);
        mgtShopAuthDto.setBlRegisteredAddress(registerAddress);
        mgtShopAuthDto.setBlBusinessStartTime(businessTerm);
        mgtShopAuthDto.setBlBusinessDeanline(businessEnd);
        mgtShopAuthDto.setBlBusinessFoeverFlag(blBusinessFoeverFlag);
        mgtShopAuthDto.setBlImage(businessPicture);
        mgtShopAuthDto.setLpCorporateName(legalPerson);
        mgtShopAuthDto.setLpIdCard(legalNumber);
        mgtShopAuthDto.setLpIdAddress(legalAddress);
        mgtShopAuthDto.setLpIcStartDate(legalTerm);
        mgtShopAuthDto.setLpIcEndDate(legalEnd);
        mgtShopAuthDto.setLpIcForeverFlag(lpIcForeverFlag);
        mgtShopAuthDto.setLpIcFront(legalFront);
        mgtShopAuthDto.setLpIcBack(legalBack);
        mgtShopAuthDto.setLpMobilePhone(legalPhone);
        mgtShopAuthDto.setLpContactEmail("法人邮箱");
        mgtShopAuthDto.setSettlementAccountType(accountType);
        mgtShopAuthDto.setSaBank("开户行");
        mgtShopAuthDto.setSaAccountName("开户名称");
        mgtShopAuthDto.setSaBankProvinceCode("开户所在省");
        mgtShopAuthDto.setSaBankCityCode("开户所在市");
        mgtShopAuthDto.setSaBankName("开户行全称");
        mgtShopAuthDto.setSaNumber("银行卡号");
        mgtShopAuthDto.setOwner(1);
        mgtShopAuthDto.setUboName("ck");
        mgtShopAuthDto.setUboIdCard("513701199910156123");
        mgtShopAuthDto.setUboIcStartDate("2020-05-05");
        mgtShopAuthDto.setUboIcEndDate("2025-05-05");
        mgtShopAuthDto.setUboIcFront("受益人身份证正面");
        mgtShopAuthDto.setUboIcBack("受益人身份证正面");
        mgtShopAuthDto.setUboIcAddress("受益人居住地址");
        operatorUserService.mgtShopAuth(mgtShopAuthDto);
        return SUCCESS_TIP;
    }
 
}