1
This commit is contained in:
@@ -24,6 +24,8 @@ public class UserToCourseEntity {
|
||||
|
||||
private Integer days;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
private Date startTime;
|
||||
|
||||
private Date endTime;
|
||||
|
||||
@@ -8,6 +8,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Slf4j
|
||||
@Service("medicineShopProductMedicineLabelService")
|
||||
@Service("masterShopProductMedicineLabelService")
|
||||
public class ShopProductMedicineLabelServiceImpl extends ServiceImpl<ShopProductMedicineLabelDao, ShopProductMedicineLabel> implements ShopProductMedicineLabelService {
|
||||
}
|
||||
|
||||
@@ -8,6 +8,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Slf4j
|
||||
@Service("medicineShopProductMedicineMarketService")
|
||||
@Service("masterShopProductMedicineMarketService")
|
||||
public class ShopProductMedicineMarketServiceImpl extends ServiceImpl<ShopProductMedicineMarketDao, ShopProductMedicineMarket> implements ShopProductMedicineMarketService {
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
@Service("sociologyShopProductSociologyLabelService")
|
||||
@Service("masterShopProductSociologyLabelService")
|
||||
public class ShopProductSociologyLabelServiceImpl extends ServiceImpl<ShopProductSociologyLabelDao, ShopProductSociologyLabel> implements ShopProductSociologyLabelService {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
@Service("sociologyShopProductSociologyMarketService")
|
||||
@Service("masterShopProductSociologyMarketService")
|
||||
public class ShopProductSociologyMarketServiceImpl extends ServiceImpl<ShopProductSociologyMarketDao, ShopProductSociologyMarket> implements ShopProductSociologyMarketService {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -8,6 +8,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Slf4j
|
||||
@Service("medicineShopProductToMedicineLabelService")
|
||||
@Service("masterShopProductToMedicineLabelService")
|
||||
public class ShopProductToMedicineLabelServiceImpl extends ServiceImpl<ShopProductToMedicineLabelDao, ShopProductToMedicineLabel> implements ShopProductToMedicineLabelService {
|
||||
}
|
||||
|
||||
@@ -8,6 +8,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Slf4j
|
||||
@Service("medicineShopProductToMedicineMarketService")
|
||||
@Service("masterShopProductToMedicineMarketService")
|
||||
public class ShopProductToMedicineMarketServiceImpl extends ServiceImpl<ShopProductToMedicineMarketDao, ShopProductToMedicineMarket> implements ShopProductToMedicineMarketService {
|
||||
}
|
||||
|
||||
@@ -8,6 +8,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Slf4j
|
||||
@Service("sociologyShopProductToSociologyLabelService")
|
||||
@Service("masterShopProductToSociologyLabelService")
|
||||
public class ShopProductToSociologyLabelServiceImpl extends ServiceImpl<ShopProductToSociologyLabelDao, ShopProductToSociologyLabel> implements ShopProductToSociologyLabelService {
|
||||
}
|
||||
|
||||
@@ -8,6 +8,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Slf4j
|
||||
@Service("sociologyShopProductToSociologyMarketService")
|
||||
@Service("masterShopProductToSociologyMarketService")
|
||||
public class ShopProductToSociologyMarketServiceImpl extends ServiceImpl<ShopProductToSociologyMarketDao, ShopProductToSociologyMarket> implements ShopProductToSociologyMarketService {
|
||||
}
|
||||
|
||||
@@ -2,9 +2,13 @@ package com.peanut.modules.sociology.controller;
|
||||
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.common.entity.CourseEntity;
|
||||
import com.peanut.modules.common.entity.CourseSociologyEntity;
|
||||
import com.peanut.modules.common.to.ParamTo;
|
||||
import com.peanut.modules.sociology.service.CourseService;
|
||||
import com.peanut.modules.sociology.service.CourseSociologyService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import java.util.List;
|
||||
@@ -16,6 +20,10 @@ public class HomeController {
|
||||
|
||||
@Autowired
|
||||
private CourseService courseService;
|
||||
@Autowired
|
||||
private CourseSociologyService courseSociologyService;
|
||||
|
||||
|
||||
|
||||
//首页-我的课程
|
||||
@RequestMapping("/getMyCourse")
|
||||
@@ -24,4 +32,13 @@ public class HomeController {
|
||||
return R.ok().put("myCourse",courseList);
|
||||
}
|
||||
|
||||
@RequestMapping("/getSociologyLabels")
|
||||
public R getSociologyLabels(@RequestBody ParamTo param){
|
||||
List<CourseSociologyEntity> sociologyLabels = courseSociologyService.getSociologyLabels(param.getId());
|
||||
return R.ok().put("labels",sociologyLabels);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.peanut.modules.sociology.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.peanut.modules.common.entity.CourseSociologyEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CourseSociologyService extends IService<CourseSociologyEntity> {
|
||||
|
||||
List<CourseSociologyEntity> getSociologyLabels(Integer id);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.peanut.modules.sociology.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.peanut.modules.common.dao.CourseSociologyDao;
|
||||
import com.peanut.modules.common.entity.CourseSociologyEntity;
|
||||
import com.peanut.modules.sociology.service.CourseSociologyService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service("sociologyCourseSociologyService")
|
||||
public class CourseSociologyServiceImpl extends ServiceImpl<CourseSociologyDao, CourseSociologyEntity> implements CourseSociologyService {
|
||||
|
||||
@Override
|
||||
public List<CourseSociologyEntity> getSociologyLabels(Integer id) {
|
||||
LambdaQueryWrapper<CourseSociologyEntity> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(CourseSociologyEntity::getPid,id);
|
||||
wrapper.orderByAsc(CourseSociologyEntity::getSort);
|
||||
List<CourseSociologyEntity> list = this.list(wrapper);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user