Merge remote-tracking branch 'origin/master'
| | |
| | | import com.dsh.account.service.ICityManagerService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2023/8/1 17:06 |
| | |
| | | @RequestMapping("") |
| | | public class CityManagerController { |
| | | |
| | | @Resource |
| | | private ICityManagerService cityManagerService; |
| | | |
| | | |
| | |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | @ApiImplicitParam(value = "学员id", name = "stuId", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "预约状态 0=全部 1=待上课 2=已完成 3=已取消", name = "appointStatus", required = false, dataType = "int"), |
| | | @ApiImplicitParam(value = "时间类型 0=全部 1=近一周 2=近一个月 3=近一年", name = "appointStatus", required = false, dataType = "int"), |
| | | @ApiImplicitParam(value = "时间类型 0=全部 1=近一周 2=近一个月 3=近一年", name = "timeType", required = false, dataType = "int"), |
| | | @ApiImplicitParam(value = "课程名称", name = "appointStatus", required = false, dataType = "string"), |
| | | }) |
| | | public ResultUtil<AppointmentRecordVo> cgeClassAppointmentRecordList(Integer stuId,Integer appointStatus,Integer timeType,String search){ |
| | |
| | | |
| | | @ApiModelProperty(value = "课后视频标题") |
| | | private String videoName; |
| | | |
| | | @ApiModelProperty(value = "课后视频id") |
| | | private Integer videoId; |
| | | |
| | | @ApiModelProperty(value = "课包id") |
| | | private Integer coursePackageId; |
| | | } |
| | |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param stuId 学员id |
| | | * @param appUserId 用户id |
| | | * @param appointStatus 预约状态 0=全部 1=待上课 2=已完成 3=已取消 |
| | | * @param timeType 时间类型 0=全部 1=近一周 2=近一个月 3=近一年 |
| | | * @param search 课程名称 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public AppointmentRecordVo getAppointmentRecords(Integer stuId, Integer appUserId,Integer appointStatus,Integer timeType,String search) { |
| | | AppointmentRecordVo recordVo = new AppointmentRecordVo(); |
| | |
| | | |
| | | @ApiModelProperty(value = "课后视频标题") |
| | | private String videoName; |
| | | |
| | | |
| | | @ApiModelProperty(value = "课后视频id") |
| | | private Integer videoId; |
| | | |
| | | @ApiModelProperty(value = "课包id") |
| | | private Integer coursePackageId; |
| | | } |
| | |
| | | @ApiModelProperty(value = "课程介绍图片") |
| | | private String detailedDiagram; |
| | | |
| | | @ApiModelProperty("封面图") |
| | | private String cover; |
| | | |
| | | } |
| | |
| | | response.setPackageName(coursePackage.getName()); |
| | | response.setSynopsis(videosWithIds.getIntroduction()); |
| | | response.setDetailedDiagram(coursePackage.getIntroduceDrawing()); |
| | | response.setCover(videosWithIds.getCover()); |
| | | } |
| | | |
| | | return response; |
| | |
| | | recordVo.setCourseStuRecordId(coursePackageStudent.getId()); |
| | | String classWeeks = coursePackage.getClassWeeks(); |
| | | String[] split = classWeeks.split(";"); |
| | | List<Integer> integerList = Arrays.stream(split) |
| | | .map(Integer::parseInt) |
| | | .collect(Collectors.toList()); |
| | | int dayOfWeek = DateTimeHelper.getDayOfWeek(new Date()); |
| | | List<String> integerList = Arrays.asList(split); |
| | | String weekOfDate = DateTimeHelper.getWeekOfDate(new Date()); |
| | | |
| | | if (integerList.contains(dayOfWeek)){ |
| | | if (integerList.contains(weekOfDate)){ |
| | | String dat = simpleDateFormat.format(date) +" "+ classStartTime; |
| | | |
| | | Date start = null; |
| | |
| | | <mapper namespace="com.dsh.course.mapper.PostCourseVideoMapper"> |
| | | |
| | | <select id="queryCourseOfVideos" resultType="com.dsh.course.feignclient.model.ExerciseVideo"> |
| | | SELECT tc.introduce as videoName, tc.coverDrawing as videoCoverImgUrl, tc.courseVideo as videoUrl |
| | | SELECT tc.introduce as videoName, tc.coverDrawing as videoCoverImgUrl, tc.courseVideo as videoUrl, |
| | | courseId as videoId,coursePackageId |
| | | FROM t_post_course_video tpcv |
| | | LEFT JOIN t_course tc on tc.id = tpcv.courseId |
| | | where tc.state = 1 |
| | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.feignClient.account.CityManagerClient; |
| | | import com.dsh.course.feignClient.account.model.CityManager; |
| | | import com.dsh.course.feignClient.activity.CouponClient; |
| | | import com.dsh.course.feignClient.activity.model.CouponListOfSearch; |
| | | import com.dsh.guns.config.UserExt; |
| | |
| | | private IRegionService regiService; |
| | | |
| | | @Resource |
| | | private IStoreService storeService; |
| | | |
| | | @Resource |
| | | private CouponClient client; |
| | | |
| | | @Resource |
| | | private IStoreService storeService; |
| | | private CityManagerClient cmgrClient; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跳转到优惠券管理首页 |
| | |
| | | return PREFIX + "TStoreList.html"; |
| | | } |
| | | |
| | | @RequestMapping("/storeList") |
| | | @RequestMapping("/storeDetailsOfSearch") |
| | | @ResponseBody |
| | | public Object listOfStore(Integer province,Integer cityCode,Integer cityManagerId,String storeName){ |
| | | Region provinceRegion = regiService.getById(province); |
| | | Region cityRegion = regiService.getById(cityCode); |
| | | public Object listOfStore(Integer provinceId,Integer cityId,Integer cityManagerId,String storeName){ |
| | | System.out.println("provinceId"+provinceId); |
| | | System.out.println("cityId"+cityId); |
| | | System.out.println("cityManagerId"+cityManagerId); |
| | | System.out.println("storeName"+storeName); |
| | | String provinceCode = null; |
| | | String cityCode = null; |
| | | if (ToolUtil.isNotEmpty(provinceId)){ |
| | | Region provinceRegion = regiService.getById(provinceId); |
| | | provinceCode = provinceRegion.getCode(); |
| | | } |
| | | if (ToolUtil.isNotEmpty(cityId)){ |
| | | Region cityRegion = regiService.getById(cityId); |
| | | provinceCode = cityRegion.getCode(); |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | List<Map<String,Object>> storeList = storeService.queryListOfpage(provinceRegion.getCode(),cityRegion.getCode(),cityManagerId,storeName,page); |
| | | |
| | | |
| | | return null; |
| | | List<Map<String,Object>> storeList = storeService.queryListOfpage(provinceCode,cityCode,cityManagerId,storeName,page); |
| | | if (storeList.size() > 0 ){ |
| | | for (Map<String, Object> stringObjectMap : storeList) { |
| | | String provinceName = (String) stringObjectMap.get("province"); |
| | | String cityName = (String) stringObjectMap.get("city"); |
| | | stringObjectMap.put("provinceCity",provinceName+cityName); |
| | | Integer managerId = (Integer) stringObjectMap.get("cityManagerId"); |
| | | CityManager cityManager = cmgrClient.queryCityManagerById(managerId); |
| | | if (ToolUtil.isNotEmpty(cityManager)){ |
| | | stringObjectMap.put("accountName",cityManager.getName()+"+"+cityManager.getPhone()); |
| | | } |
| | | } |
| | | } |
| | | return storeList; |
| | | } |
| | | |
| | | /** |
| | |
| | | <select id="queryListOfpage" resultType="java.util.Map"> |
| | | SELECT id, cityManagerId, province, city, `name` |
| | | from t_store |
| | | where 1=1 |
| | | <if test="provinceCode != null"> |
| | | and provinceCode = #{provinceCode} |
| | | </if> |
| | | <if test="cityCode != null"> |
| | | and cityCode = #{cityCode} |
| | | </if> |
| | | <if test="cityManagerId != null"> |
| | | and cityManagerId = #{cityManagerId} |
| | | </if> |
| | | <if test="storeName != null and storeName != ' '"> |
| | | and `name` like CONCAT('%',#{storeName},'%') |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | */ |
| | | TStoreProvince.search = function () { |
| | | var queryData = {}; |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['type'] = $("#type").val(); |
| | | queryData['distributionMethod'] = $("#distributionMethod").val(); |
| | | queryData['userPopulation'] = $("#userPopulation").val(); |
| | | queryData['status'] = $("#status").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | |
| | | var provinceElement = document.getElementById("province"); |
| | | var provinceId = provinceElement.value; |
| | | |
| | | var cityElement = document.getElementById("city"); |
| | | var cityElementId = cityElement.value; |
| | | |
| | | queryData['provinceId'] = provinceId; |
| | | queryData['cityId'] = cityElementId; |
| | | queryData['cityManagerId'] = $("#userPopulation").val(); |
| | | queryData['storeName'] = $("#storeName").val(); |
| | | TStoreProvince.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | |
| | | * 重置搜索 |
| | | */ |
| | | TStoreProvince.resetSearch = function () { |
| | | $("#name").val(''); |
| | | $("#type").val(''); |
| | | $("#distributionMethod").val(''); |
| | | var provinceSelect = document.getElementById("province"); |
| | | provinceSelect.innerHTML = '<option value="">全部</option>'; |
| | | |
| | | var citySelect = document.getElementById("city"); |
| | | citySelect.innerHTML = '<option value="">全部</option>'; |
| | | |
| | | queryProvince(); |
| | | |
| | | $("#userPopulation").val(''); |
| | | $("#status").val(''); |
| | | $("#state").val(''); |
| | | $("#storeName").val(''); |
| | | TStoreProvince.search(); |
| | | }; |
| | | |
| | |
| | | |
| | | $(function () { |
| | | var defaultColunms = TStoreProvince.initColumn(); |
| | | var table = new BSTable(TStoreProvince.id, "/tCouponManage/storeList", defaultColunms); |
| | | var table = new BSTable(TStoreProvince.id, "/tCouponManage/storeDetailsOfSearch", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TStoreProvince.table = table.init(); |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/store/queryStoreById") |
| | | public Store queryStoreById(@RequestBody Integer id){ |
| | | try { |
| | | return storeService.getById(id); |