| | |
| | | import com.dsh.course.feignClient.account.model.TCityManager; |
| | | import com.dsh.course.feignClient.competition.CompetitionClient; |
| | | import com.dsh.course.feignClient.competition.model.*; |
| | | import com.dsh.course.feignClient.course.CourseClient; |
| | | import com.dsh.course.feignClient.course.model.TCoursePackage; |
| | | import com.dsh.course.mapper.UserMapper; |
| | | 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.ToolUtil; |
| | | import com.dsh.guns.modular.system.model.TCity; |
| | | import com.dsh.guns.modular.system.model.TCourse; |
| | | import com.dsh.guns.modular.system.model.TStore; |
| | | import com.dsh.guns.modular.system.model.User; |
| | | import com.dsh.guns.modular.system.model.dto.SelectDto; |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.IUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | |
| | | |
| | | @Resource |
| | | private UserMapper userMapper; |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | |
| | | /** |
| | |
| | | Page<TCityManager> competitions = cityClient.list(listQuery); |
| | | return super.packForBT(competitions); |
| | | } |
| | | |
| | | |
| | | @Resource |
| | | private CourseClient courseClient; |
| | | @RequestMapping(value = "/timeChange") |
| | | @ResponseBody |
| | | public List<SelectDto> timeChange(Integer oneId) { |
| | | List<SelectDto> integerList = courseClient.timeChange(oneId); |
| | | return integerList ; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @RequestMapping(value = "/add") |
| | |
| | | @RequestMapping(value = "/onChange") |
| | | @ResponseBody |
| | | public Object onChange(Integer oneId) { |
| | | if (oneId == null) return null; |
| | | if (oneId == null) { |
| | | return null; |
| | | } |
| | | try { |
| | | TCity one = cityService.getOne(new LambdaQueryWrapper<TCity>().eq(TCity::getCode, oneId)); |
| | | QueryWrapper<TCity> query = new QueryWrapper<TCity>().eq("parent_id", one.getId()); |
| | |
| | | @ResponseBody |
| | | public Object pwd(Integer id) { |
| | | try { |
| | | userMapper.selectOne(new LambdaQueryWrapper<User>().eq(User::getObjectId,id).eq(User::getObjectType,2)); |
| | | // 查询门店 获取门店店长id |
| | | TStore store = storeService.getById(id); |
| | | User user = userService.getById(store.getStoreStaffId()); |
| | | user.setPassword(SecureUtil.md5("a123456")); |
| | | userService.updateById(user); |
| | | userMapper.selectOne(new LambdaQueryWrapper<User>() |
| | | .eq(User::getObjectId,id) |
| | | .eq(User::getObjectType,2)); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |