| | |
| | | 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; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * 跳转运营商商户去认证页面 |
| | | */ |
| | | @RequestMapping("/proportion/{id}") |
| | | public String update(Model model,@PathVariable("id") Integer id) { |
| | | List<TCity> provinceList = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("provinceList",provinceList); |
| | | List<Bank> bankList = operatorService.getBankList(); |
| | | TStore store = storeService.getOne(new QueryWrapper<TStore>().eq("operatorId", id)); |
| | | model.addAttribute("storeName",store.getName()); |
| | | // TStoreStaff storeByStoreStaffId = storeStaffClient.getStoreByStoreStaffId(store.getStoreStaffId()); |
| | | // model.addAttribute("storeStaff",storeByStoreStaffId.getName()); |
| | | // model.addAttribute("storePhone",storeByStoreStaffId.getPhone()); |
| | | model.addAttribute("bankList",bankList); |
| | | return PREFIX + "OperatorUser_auth.html"; |
| | | } |
| | | /** |
| | | * 获取运营商列表 |
| | | */ |
| | | @RequestMapping(value = "/listAll") |
| | | @ResponseBody |
| | | public Object listAll(String province,String city,String userName, String phone,Integer platform,Integer type,Integer state) { |
| | | Page<Map<String,Object>> page = new PageFactory<Map<String,Object>>().defaultPage(); |
| | | List<Map<String,Object>> list = operatorUserService.listAll(page,province,city,userName,phone,platform,type,state); |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | |
| | | List<OperatorUserVO> list = operatorUserService. |
| | | listAll(province,city,userName,phone,platform,type,state); |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 批量重置密码 |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/addProportion") |
| | | @ResponseBody |
| | | public Object pwd(Integer id, BigDecimal alipay,BigDecimal wechat) { |
| | | List<OperatorUser> list = operatorUserService.list(new QueryWrapper<OperatorUser>().eq("operatorId", id)); |
| | | for (OperatorUser operatorUser : list) { |
| | | if (operatorUser.getPlatform()==1){ |
| | | operatorUser.setProportion(wechat); |
| | | operatorUserService.updateById(operatorUser); |
| | | }else { |
| | | operatorUser.setProportion(alipay); |
| | | operatorUserService.updateById(operatorUser); |
| | | } |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | } |