| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dsh.activity.entity.Coupon; |
| | | import com.dsh.activity.entity.TStudent; |
| | | import com.dsh.activity.feignclient.account.AppUserClient; |
| | | import com.dsh.activity.feignclient.account.StudentClient; |
| | | import com.dsh.activity.feignclient.account.model.AppUser; |
| | |
| | | import com.dsh.activity.feignclient.model.CouponListOfSearch; |
| | | import com.dsh.activity.mapper.CouponMapper; |
| | | import com.dsh.activity.model.CouponListVo; |
| | | import com.dsh.activity.model.request.IntegralGoodsOfSearch; |
| | | import com.dsh.activity.service.ICouponService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | if (1 == appUser.getIsVip()) { |
| | | userPopulation.add(2);//年度会员 |
| | | } |
| | | List<Student> students = studentClient.queryStudentList(uid); |
| | | List<TStudent> students = studentClient.queryStudentList(uid); |
| | | if (students.size() > 0) { |
| | | userPopulation.add(3);//已有学员用户 |
| | | } |
| | | List<Coupon> list = this.list(new QueryWrapper<Coupon>().eq("distributionMethod", distributionMethod).in("userPopulation", userPopulation) |
| | | List<Coupon> list = this.list(new QueryWrapper<Coupon>().eq("distributionMethod", distributionMethod) |
| | | .in("userPopulation", userPopulation) |
| | | .eq("auditStatus", 2).eq("status", 2).eq("state", 1) |
| | | .last(" and now() between startTime and endTime order by insertTime desc")); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> queryCouponListOfSearch(CouponListOfSearch ofSearch) { |
| | | return this.baseMapper.queryCouponListOfSearch(ofSearch.getName(),ofSearch.getType(),ofSearch.getDistributionMethod(),ofSearch.getUserPopulation(),ofSearch.getStatus(),ofSearch.getState(),ofSearch.getPage()); |
| | | return this.baseMapper.queryCouponListOfSearch(ofSearch.getName(), |
| | | ofSearch.getType(), |
| | | ofSearch.getDistributionMethod(), |
| | | ofSearch.getUserPopulation(), |
| | | ofSearch.getStatus(), |
| | | ofSearch.getState(), |
| | | ofSearch.getPage(), |
| | | ofSearch.getCityCode(), |
| | | ofSearch.getStoreId(), |
| | | ofSearch.getOperatorId(), |
| | | ofSearch.getObjType()); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> queryCouponListOfSearch1(CouponListOfSearch ofSearch) { |
| | | return this.baseMapper.queryCouponListOfSearch1(ofSearch.getName(),ofSearch.getType(),ofSearch.getDistributionMethod(),ofSearch.getUserPopulation(),ofSearch.getStatus(),ofSearch.getState(),ofSearch.getPage(),ofSearch.getCityCode(),ofSearch.getStoreId()); |
| | | } |
| | | @Override |
| | | public List<Map<String, Object>> queryCouponExamineList(CouponExamineListSearch ofSearch) { |
| | | return this.baseMapper.queryCouponExamineList(ofSearch.getName(),ofSearch.getType(),ofSearch.getUserPopulation(),ofSearch.getDistributionMethod(),ofSearch.getAuditStatus(),ofSearch.getPage()); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> listRecord(Page<Object> objectPage, Integer id, List<Integer> ids, Integer type) { |
| | | return this.baseMapper.listRecord(objectPage,id,ids,type); |
| | | } |
| | | |
| | | @Override |
| | | public void updateType(Long id) { |
| | | this.baseMapper.updateType(id); |
| | | } |
| | | |
| | | } |