Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/PlayPai
| | |
| | | @ResponseBody |
| | | @PostMapping("/base/coupon/queryCouponListSearch") |
| | | public List<Map<String,Object>> getCouponListOfSearch(@RequestBody CouponListOfSearch ofSearch){ |
| | | List<Map<String, Object>> mapList = couponService.queryCouponListOfSearch(ofSearch); |
| | | List<Map<String, Object>> mapList1 = couponService.queryCouponListOfSearch(ofSearch); |
| | | List<Map<String, Object>> mapList = new ArrayList<>(); |
| | | |
| | | if(ofSearch.getStoreId()!=null){ |
| | | for (Map<String, Object> map : mapList1) { |
| | | List<CouponStore> id = couStoreService.list(new LambdaQueryWrapper<CouponStore>().eq(CouponStore::getCouponId, map.get("id").toString())); |
| | | List<Integer> collect = id.stream().map(CouponStore::getStoreId).collect(Collectors.toList()); |
| | | if(collect.size()==0){ |
| | | collect.add(-1); |
| | | } |
| | | if(collect.contains(ofSearch.getStoreId())){ |
| | | mapList.add(map); |
| | | } |
| | | } |
| | | } |
| | | if (mapList.size() > 0){ |
| | | for (Map<String, Object> stringObjectMap : mapList) { |
| | | Integer o = (Integer) stringObjectMap.get("id"); |
| | |
| | | @ResponseBody |
| | | @PostMapping("/base/pointMerchars/ticketList") |
| | | public List<Map<String,Object>> ticketList(@RequestBody IntegralGoodsOfSearch ofSearch){ |
| | | List<Map<String, Object>> result = pmdsService.ticketList(ofSearch); |
| | | List<Map<String, Object>> result1 = pmdsService.ticketList(ofSearch); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | if(ofSearch.getObjType()==3){ |
| | | for (Map<String, Object> map : result1) { |
| | | List<PointsMerchandiseStore> id = pmdstoService.list(new LambdaQueryWrapper<PointsMerchandiseStore>().eq(PointsMerchandiseStore::getPointsMerchandiseId, map.get("id"))); |
| | | List<Integer> collect = id.stream().map(PointsMerchandiseStore::getStoreId).collect(Collectors.toList()); |
| | | if(collect.size()==0){ |
| | | collect.add(-1); |
| | | } |
| | | if(collect.contains(ofSearch.getObjId())){ |
| | | if(id.size()>1){ |
| | | map.put("size",1); |
| | | }else { |
| | | map.put("size",0); |
| | | } |
| | | result.add(map); |
| | | } |
| | | } |
| | | } |
| | | if (result.size() > 0){ |
| | | for (Map<String, Object> stringObjectMap : result) { |
| | | Integer o = (Integer) stringObjectMap.get("id"); |
| | |
| | | private Integer state; |
| | | |
| | | private Page<Map<String, Object>> page; |
| | | |
| | | private Integer objType; |
| | | |
| | | private Integer objId; |
| | | } |
| | |
| | | package com.dsh.course.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.dsh.course.entity.CancelledClasses; |
| | | import com.dsh.course.entity.CoursePackageScheduling; |
| | | import com.dsh.course.entity.TCoursePackage; |
| | | import com.dsh.course.entity.TCoursePackagePayment; |
| | | import com.dsh.course.feignclient.account.AppUserClient; |
| | | import com.dsh.course.feignclient.account.CoachClient; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | query.setCoachIds(c); |
| | | } |
| | | } |
| | | List<Integer> collect =new ArrayList<>(); |
| | | if(query.getStoreId()!=null){ |
| | | List<TCoursePackage> list = coursePackageService.list(new LambdaQueryWrapper<TCoursePackage>().eq(TCoursePackage::getStoreId, query.getStoreId())); |
| | | collect = list.stream().map(TCoursePackage::getId).collect(Collectors.toList()); |
| | | if(collect.size()==0){ |
| | | collect.add(-1); |
| | | } |
| | | } |
| | | |
| | | List<CancelClassesVO> result = cancelledClassesService.listAll(query); |
| | | List<CancelClassesVO> result = cancelledClassesService.listAll(query,collect); |
| | | for (CancelClassesVO cancelClassesVO : result) { |
| | | CoursePackageScheduling byId1 = coursePackageSchedulingService.getById(cancelClassesVO.getCoursePackageSchedulingId()); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | |
| | | |
| | | public interface CancelledClassesMapper extends BaseMapper<CancelledClasses> { |
| | | |
| | | List<CancelClassesVO> listAll(@Param("query") CancelClassesQuery query,@Param("sTime")String sTime,@Param("eTime")String eTime); |
| | | List<CancelClassesVO> listAll(@Param("query") CancelClassesQuery query, @Param("sTime")String sTime, @Param("eTime")String eTime, @Param("collect") List<Integer> collect); |
| | | |
| | | List<MoneyBack> getRefund(); |
| | | |
| | |
| | | private List<Integer> coachIds; |
| | | // 学员ids |
| | | private List<Integer> studentIds; |
| | | |
| | | private Integer storeId; |
| | | } |
| | |
| | | */ |
| | | public interface CancelledClassesService extends IService<CancelledClasses> { |
| | | |
| | | List<CancelClassesVO> listAll(CancelClassesQuery query); |
| | | List<CancelClassesVO> listAll(CancelClassesQuery query, List<Integer> collect); |
| | | |
| | | } |
| | |
| | | private CancelledClassesMapper cancelledClassesMapper; |
| | | |
| | | @Override |
| | | public List<CancelClassesVO> listAll(CancelClassesQuery query) { |
| | | public List<CancelClassesVO> listAll(CancelClassesQuery query, List<Integer> collect) { |
| | | String STime = null; |
| | | String ETime = null; |
| | | if (StringUtils.hasLength(query.getTime())) { |
| | | STime = query.getTime().split(" - ")[0] + " 00:00:00"; |
| | | ETime = query.getTime().split(" - ")[1] + " 23:59:59"; |
| | | } |
| | | return cancelledClassesMapper.listAll(query,STime,ETime); |
| | | return cancelledClassesMapper.listAll(query,STime,ETime,collect); |
| | | } |
| | | } |
| | |
| | | @Override |
| | | public List<DiscountList> queryDiscountList(QueryDiscountList queryDiscountList) { |
| | | Page<DiscountList> discountListPage = new Page<>(queryDiscountList.getOffset(), queryDiscountList.getLimit()); |
| | | List<Integer> ids = queryDiscountList.getIds(); |
| | | if(ids.size()==0){ |
| | | ids.add(-1); |
| | | queryDiscountList.setIds(ids); |
| | | } |
| | | List<DiscountList> discountLists = this.baseMapper.queryDiscountList(discountListPage, queryDiscountList.getPCode(), queryDiscountList.getCCode(), queryDiscountList.getName(), queryDiscountList.getType(), queryDiscountList.getIds()); |
| | | for (DiscountList discountList : discountLists) { |
| | | List<TCoursePackageDiscount> tCoursePackageDiscounts = this.baseMapper.selectList(new LambdaQueryWrapper<TCoursePackageDiscount>().eq(TCoursePackageDiscount::getCoursePackageId, discountList.getCourseId()).eq(TCoursePackageDiscount::getAuditStatus,2).orderByAsc(TCoursePackageDiscount::getType)); |
| | |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="collect != null and collect.size>0"> |
| | | AND t2.id IN |
| | | <foreach collection="collect" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="getRefund" resultType="com.dsh.course.entity.MoneyBack"> |
| | |
| | | private Integer state; |
| | | |
| | | private Page<Map<String, Object>> page; |
| | | |
| | | private Integer objType; |
| | | |
| | | private Integer objId; |
| | | } |
| | |
| | | vo.setIds(collect); |
| | | }else if(roleType == 3){ |
| | | List<Integer> list = new ArrayList<>(); |
| | | TStoreStaff storeByStoreStaffId = storeStaffClient.getStoreByStoreStaffId(objectId); |
| | | list.add(storeByStoreStaffId.getStoreId()); |
| | | list.add(objectId); |
| | | vo.setIds(list); |
| | | } |
| | | List<QueryBodySideAppointmentVO> queryBodySideAppointmentVOS = bodySideAppointmentClient.listAll(vo); |
| | |
| | | ofSearch.setUserPopulation(userPopulation); |
| | | ofSearch.setStatus(status); |
| | | ofSearch.setState(state); |
| | | if (UserExt.getUser().getObjectType()==3) { |
| | | ofSearch.setStoreId(UserExt.getUser().getObjectId()); |
| | | } |
| | | return client.getCouponListOfSearch(ofSearch); |
| | | } |
| | | |
| | |
| | | import com.dsh.course.feignClient.course.CoursePackagePaymentConfigClient; |
| | | import com.dsh.course.feignClient.course.model.*; |
| | | import com.dsh.course.model.AuditDiscount; |
| | | import com.dsh.guns.config.UserExt; |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.core.base.tips.ErrorTip; |
| | | import com.dsh.guns.core.base.tips.SuccessTip; |
| | |
| | | if(ToolUtil.isNotEmpty(shopName)){ |
| | | wrapper.like(TStore::getName, shopName); |
| | | } |
| | | if(UserExt.getUser().getObjectType()==3){ |
| | | wrapper.eq(TStore::getId, UserExt.getUser().getObjectId()); |
| | | } |
| | | List<TStore> list = storeService.list(wrapper); |
| | | Page<DiscountList> page = new PageFactory<DiscountList>().defaultPage(); |
| | | List<DiscountList> discountLists = courseClient.queryDiscountList(new QueryDiscountList(page.getCurrent(),page.getSize(),provinceCode,cityCode,name,type,list.stream().map(TStore::getId).collect(Collectors.toList()))); |
| | |
| | | coachQuery.setCoachName(coachName); |
| | | coachQuery.setCourseName(courseName); |
| | | coachQuery.setTime(beginTime); |
| | | if(UserExt.getUser().getObjectType()==3){ |
| | | coachQuery.setStoreId(UserExt.getUser().getObjectId()); |
| | | } |
| | | return cancelledClassesClient.listAll(coachQuery); |
| | | } |
| | | /** |
| | |
| | | } |
| | | pointMercharsClient.addCitys(objects); |
| | | }else if(useScope==3){ |
| | | |
| | | if(UserExt.getUser().getObjectType()==3){ |
| | | storeIds=UserExt.getUser().getObjectId().toString(); |
| | | } |
| | | Integer oid=null; |
| | | String[] split = storeIds.split(","); |
| | | for (int i = 0; i < split.length; i++) { |
| | |
| | | integralGoodsOfSearch.setActiveStatus(activeStatus); |
| | | integralGoodsOfSearch.setState(state); |
| | | integralGoodsOfSearch.setPage(page); |
| | | integralGoodsOfSearch.setObjType(UserExt.getUser().getObjectType()); |
| | | integralGoodsOfSearch.setObjId(UserExt.getUser().getObjectId()); |
| | | return pointMercharsClient.ticketList(integralGoodsOfSearch); |
| | | } |
| | | |
| | |
| | | private List<Integer> coachIds; |
| | | // 学员ids |
| | | private List<Integer> studentIds; |
| | | |
| | | private Integer storeId; |
| | | } |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | @if(userType!=3){ |
| | | <div class="row" id="storeSelect" > |
| | | <div class="form-group"> |
| | | <div class="form-group"> |
| | |
| | | |
| | | </div> |
| | | </div> |
| | | @} |
| | | <div class="form-group" style="margin-left:262px"> |
| | | <label class="col-sm-1 control-label">兑换说明:</label> |
| | | <div class="col-sm-5"> |
| | |
| | | |
| | | } |
| | | TGoodsInfoDlg.addSubmit1 = function() { |
| | | let company = document.querySelector('input[name="company"]:checked').value; |
| | | let company = 3; |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | |
| | | |
| | | |
| | | var stores = ""; |
| | | if (company === '3'){ |
| | | if (company === 3 && $("#userType").val()!="3"){ |
| | | console.log('3---this.storeIds',this.storeIds); |
| | | if (TGoodsInfoDlg.storeIds.length === 0 ){ |
| | | return Feng.error('请至少选择一个门店'); |
| | |
| | | */ |
| | | TPointProducts.openEditPage = function () { |
| | | if (this.check()) { |
| | | let size = TPointProducts.seItem.size |
| | | if(size>0){ |
| | | Feng.info("没有操作权限"); |
| | | return; |
| | | } |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title:'编辑', |
| | |
| | | */ |
| | | TPointProducts.onShelf = function () { |
| | | if (this.check()){ |
| | | let size = TPointProducts.seItem.size |
| | | if(size>0){ |
| | | Feng.info("没有操作权限"); |
| | | return; |
| | | } |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | const data1 = { |
| | | ids:[], |
| | |
| | | */ |
| | | TPointProducts.offShelf = function () { |
| | | if (this.check()){ |
| | | let size = TPointProducts.seItem.size |
| | | if(size>0){ |
| | | Feng.info("没有操作权限"); |
| | | return; |
| | | } |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | const data1 = { |
| | | ids:[], |