主页-我的课程
This commit is contained in:
@@ -0,0 +1,357 @@
|
||||
package com.peanut.modules.common.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.common.entity.*;
|
||||
import com.peanut.modules.common.service.*;
|
||||
import com.peanut.modules.sys.service.SysDictDataService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@RestController("commonMedicaldes")
|
||||
@RequestMapping("common/medicaldes")
|
||||
public class MedicaldesController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private MedicaldesLightService lightService;
|
||||
@Autowired
|
||||
private MedicaldesBookService medicaldesBookService;
|
||||
@Autowired
|
||||
private MedicaldesInheritService inheritService;
|
||||
@Autowired
|
||||
private MedicaldesInheritRelationService relationService;
|
||||
@Autowired
|
||||
private SysDictDataService sysDictDataService;
|
||||
@Autowired
|
||||
private BookService bookService;
|
||||
@Autowired
|
||||
private StringRedisTemplate redisTemplate;
|
||||
@Autowired
|
||||
private ProvinceService provinceService;
|
||||
@Autowired
|
||||
private CityService cityService;
|
||||
|
||||
|
||||
/**
|
||||
* 类型列表
|
||||
*/
|
||||
@RequestMapping(path = "/typeList")
|
||||
public R typeList(String label) {
|
||||
LambdaQueryWrapper<com.peanut.modules.book.entity.SysDictDataEntity> wrapper = new LambdaQueryWrapper();
|
||||
wrapper.eq(com.peanut.modules.book.entity.SysDictDataEntity::getDictLabel,label);
|
||||
return R.ok().put("result",sysDictDataService.list(wrapper));
|
||||
}
|
||||
|
||||
/**
|
||||
* 书列表
|
||||
*/
|
||||
@RequestMapping(path = "/bookList")
|
||||
public R bookList() {
|
||||
LambdaQueryWrapper<BookEntity> wrapper = new LambdaQueryWrapper();
|
||||
wrapper.eq(BookEntity::getBookType,0);
|
||||
wrapper.orderByDesc(BookEntity::getCreateTime);
|
||||
return R.ok().put("result",bookService.list(wrapper));
|
||||
}
|
||||
|
||||
/**
|
||||
* 专著出版关系列表
|
||||
*/
|
||||
@RequestMapping(path = "/bookRelationListByType")
|
||||
public R bookRelationListByType(@RequestBody Map map) {
|
||||
MPJLambdaWrapper<MedicaldesBook> wrapper = new MPJLambdaWrapper();
|
||||
wrapper.selectAll(MedicaldesBook.class);
|
||||
wrapper.leftJoin(BookEntity.class,BookEntity::getId,MedicaldesBook::getBookId);
|
||||
wrapper.eq(BookEntity::getBookType,0);
|
||||
if (map.containsKey("dictType")&& StringUtils.isNotEmpty(map.get("dictType").toString())){
|
||||
wrapper.eq(MedicaldesBook::getTypeId,map.get("dictType"));
|
||||
}
|
||||
if (map.containsKey("bookName")&&StringUtils.isNotEmpty(map.get("bookName").toString())){
|
||||
wrapper.like(BookEntity::getName,map.get("bookName"));
|
||||
}
|
||||
wrapper.orderByAsc(MedicaldesBook::getSort);
|
||||
Page<MedicaldesBook> res = medicaldesBookService.page(new Page<MedicaldesBook>(
|
||||
Long.parseLong(map.get("current").toString()), Long.parseLong(map.get("limit").toString())), wrapper);
|
||||
List<MedicaldesBook> list = res.getRecords();
|
||||
if (list.size() > 0) {
|
||||
for (MedicaldesBook b : list) {
|
||||
b.setBook(bookService.getById(b.getBookId()));
|
||||
}
|
||||
res.setRecords(list);
|
||||
}
|
||||
return R.ok().put("result", res);
|
||||
}
|
||||
|
||||
/**
|
||||
* 专著出版列表
|
||||
*/
|
||||
@RequestMapping(path = "/bookListByType")
|
||||
public R bookListByType(String type) {
|
||||
MPJLambdaWrapper<BookEntity> wrapper = new MPJLambdaWrapper();
|
||||
wrapper.selectAll(BookEntity.class);
|
||||
wrapper.leftJoin(MedicaldesBook.class,MedicaldesBook::getBookId,BookEntity::getId);
|
||||
wrapper.eq(MedicaldesBook::getTypeId,type);
|
||||
wrapper.eq(BookEntity::getBookType,0);
|
||||
wrapper.orderByAsc(MedicaldesBook::getSort);
|
||||
List<BookEntity> list = bookService.list(wrapper);
|
||||
return R.ok().put("result", list);
|
||||
}
|
||||
|
||||
@RequestMapping(path = "/saveOrUpdateBookRelation")
|
||||
public R saveOrUpdateBookRelation(@RequestBody MedicaldesBook medicaldesBook) {
|
||||
MPJLambdaWrapper<MedicaldesBook> wrapper = new MPJLambdaWrapper();
|
||||
wrapper.eq(MedicaldesBook::getBookId,medicaldesBook.getBookId());
|
||||
wrapper.eq(MedicaldesBook::getTypeId,medicaldesBook.getTypeId());
|
||||
if (medicaldesBookService.getOne(wrapper)!=null){
|
||||
medicaldesBookService.remove(wrapper);
|
||||
}
|
||||
medicaldesBookService.saveOrUpdate(medicaldesBook);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@RequestMapping(path = "/delBookRelation")
|
||||
public R delBookRelation(String id) {
|
||||
medicaldesBookService.removeById(id);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 学术传承列表分页
|
||||
*/
|
||||
@RequestMapping(path = "/inheritListByPage")
|
||||
public R inheritListByPage(@RequestBody Map map) {
|
||||
MPJLambdaWrapper<MedicaldesInherit> wrapper = new MPJLambdaWrapper();
|
||||
wrapper.leftJoin(MedicaldesInheritRelation.class,MedicaldesInheritRelation::getInheritId,MedicaldesInherit::getId);
|
||||
wrapper.leftJoin(City.class,City::getCityId,MedicaldesInherit::getCityId);
|
||||
wrapper.leftJoin(Province.class,Province::getProvId,City::getProvId);
|
||||
wrapper.selectAll(MedicaldesInherit.class);
|
||||
if (map.containsKey("dictType")&&StringUtils.isNotEmpty(map.get("dictType").toString())){
|
||||
wrapper.eq(MedicaldesInheritRelation::getTypeId,map.get("dictType"));
|
||||
}
|
||||
if (map.containsKey("name")&&StringUtils.isNotEmpty(map.get("name").toString())){
|
||||
wrapper.like(MedicaldesInherit::getName,map.get("name"));
|
||||
}
|
||||
wrapper.selectAs(MedicaldesInheritRelation::getTypeId,"type");
|
||||
wrapper.selectAs(MedicaldesInheritRelation::getSort,"sort");
|
||||
wrapper.orderByAsc(MedicaldesInheritRelation::getSort);
|
||||
Page<MedicaldesInherit> page = inheritService.page(new Page<>(
|
||||
Long.parseLong(map.get("current").toString()), Long.parseLong(map.get("limit").toString())),wrapper);
|
||||
return R.ok().put("result", page);
|
||||
}
|
||||
|
||||
//国际医师可能来自国外在省市里加入外国
|
||||
public List<com.peanut.modules.book.entity.SysDictDataEntity> getCounts() {
|
||||
LambdaQueryWrapper<com.peanut.modules.book.entity.SysDictDataEntity> wrapper = new LambdaQueryWrapper();
|
||||
wrapper.eq(com.peanut.modules.book.entity.SysDictDataEntity::getDictLabel,"inheritPro");
|
||||
List<com.peanut.modules.book.entity.SysDictDataEntity> dataList = sysDictDataService.list(wrapper);
|
||||
return dataList;
|
||||
}
|
||||
|
||||
public List getCityList(String cityName,int countId) {
|
||||
List<City> cityList = new ArrayList<>();
|
||||
City city = new City();
|
||||
city.setProvId((long)countId);
|
||||
city.setCityName(cityName);
|
||||
city.setCityId((long)countId);
|
||||
cityList.add(city);
|
||||
return cityList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 学术传承列表按类型、地区
|
||||
*/
|
||||
@RequestMapping(path = "/inheritListByTypeProvId")
|
||||
public R inheritListByTypeProvId(String type,String provId) {
|
||||
MPJLambdaWrapper<MedicaldesInherit> wrapper = new MPJLambdaWrapper();
|
||||
wrapper.leftJoin(MedicaldesInheritRelation.class,MedicaldesInheritRelation::getInheritId,MedicaldesInherit::getId);
|
||||
wrapper.eq(MedicaldesInheritRelation::getTypeId,type);
|
||||
wrapper.leftJoin(City.class,City::getCityId,MedicaldesInherit::getCityId);
|
||||
wrapper.leftJoin(Province.class,Province::getProvId,City::getProvId);
|
||||
wrapper.selectAll(MedicaldesInherit.class);
|
||||
if ("0".equals(provId)){
|
||||
int[] val = new int[] {0};
|
||||
//未知地址
|
||||
if (getCounts()!=null&&getCounts().size() > 0){
|
||||
for (int i=1;i<=getCounts().size(); i++){
|
||||
val[i] = i;
|
||||
}
|
||||
}
|
||||
wrapper.in(MedicaldesInherit::getCityId,val);
|
||||
}else {
|
||||
wrapper.eq(Province::getProvId,provId);
|
||||
}
|
||||
wrapper.selectAs(MedicaldesInheritRelation::getSort,"sort");
|
||||
wrapper.orderByAsc(MedicaldesInheritRelation::getSort);
|
||||
List<MedicaldesInherit> list = inheritService.list(wrapper);
|
||||
return R.ok().put("result", list);
|
||||
}
|
||||
|
||||
//获取地址
|
||||
@RequestMapping(path = "/getMedicaldesProList")
|
||||
public R getMedicaldesProList() {
|
||||
String s = redisTemplate.opsForValue().get("Province");
|
||||
List<Province> provinceList = new ArrayList<>();
|
||||
if (getCounts() != null&&getCounts().size() > 0){
|
||||
for (int i=0;i<getCounts().size();i++){
|
||||
Province p = new Province();
|
||||
p.setProvName(getCounts().get(i).getDictValue());
|
||||
p.setProvId(Long.valueOf(getCounts().get(i).getDictType()));
|
||||
p.setCityList(getCityList(getCounts().get(i).getDictValue(),Integer.parseInt(getCounts().get(i).getDictType())));
|
||||
provinceList.add(p);
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(s)) {
|
||||
List<Object> redisData = JSONArray.parseArray(s);
|
||||
for (Object object : redisData) {
|
||||
Province ret = JSONObject.parseObject(object.toString(), Province.class);
|
||||
provinceList.add(ret);
|
||||
}
|
||||
return R.ok().put("provinceEntity", provinceList);
|
||||
}else {
|
||||
provinceList.addAll(provinceService.getCity());
|
||||
}
|
||||
return R.ok().put("provinceEntity", provinceList);
|
||||
}
|
||||
|
||||
//获取市列表
|
||||
@RequestMapping(path = "/getCityByPro")
|
||||
public R getCityByPro(@RequestParam("provId") Integer provId) {
|
||||
List<City> prov = new ArrayList<>();
|
||||
List<com.peanut.modules.book.entity.SysDictDataEntity> list = getCounts();
|
||||
boolean flag = false;
|
||||
if (list != null && list.size() > 0) {
|
||||
for (com.peanut.modules.book.entity.SysDictDataEntity data:list) {
|
||||
if (provId==Integer.parseInt(data.getDictType())){
|
||||
prov.addAll(getCityList(data.getDictValue(),Integer.parseInt(data.getDictType())));
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!flag) {
|
||||
prov = cityService.getBaseMapper().selectList(new QueryWrapper<City>()
|
||||
.eq("prov_id", provId));
|
||||
}
|
||||
return R.ok().put("prov", prov);
|
||||
}
|
||||
|
||||
@RequestMapping(path = "/getInheritById")
|
||||
public R getInheritById(String id) {
|
||||
MPJLambdaWrapper<MedicaldesInherit> wrapper = new MPJLambdaWrapper();
|
||||
wrapper.eq(MedicaldesInherit::getId,id);
|
||||
wrapper.leftJoin(MedicaldesInheritRelation.class,MedicaldesInheritRelation::getInheritId,MedicaldesInherit::getId);
|
||||
wrapper.leftJoin(City.class,City::getCityId,MedicaldesInherit::getCityId);
|
||||
wrapper.leftJoin(Province.class,Province::getProvId,City::getProvId);
|
||||
wrapper.leftJoin(" (select dict_type,dict_value from sys_dict_data where dict_label = 'inheritPro') dd on dd.dict_type = t.city_id");
|
||||
wrapper.select("t.*,ifnull(t2.city_name,ifnull(dd.dict_value,'其他')) as city_name,ifnull(t3.prov_name,ifnull(dd.dict_value,'其他')) as prov_name,t1.sort as sort");
|
||||
Map<String,Object> inherit = inheritService.getMap(wrapper);
|
||||
return R.ok().put("result",inherit);
|
||||
}
|
||||
|
||||
@RequestMapping(path = "/saveOrUpdateInherit")
|
||||
public R addInherit(@RequestBody MedicaldesInherit inherit) {
|
||||
MedicaldesInheritRelation relation = null;
|
||||
if (inherit.getId()==null) {
|
||||
relation = new MedicaldesInheritRelation();
|
||||
}else {
|
||||
LambdaQueryWrapper<MedicaldesInheritRelation> wrapper = new LambdaQueryWrapper();
|
||||
wrapper.eq(MedicaldesInheritRelation::getInheritId,inherit.getId());
|
||||
relation = relationService.getOne(wrapper);
|
||||
}
|
||||
inheritService.saveOrUpdate(inherit);
|
||||
relation.setTypeId(inherit.getType());
|
||||
relation.setInheritId(inherit.getId());
|
||||
relation.setSort(inherit.getSort());
|
||||
relationService.saveOrUpdate(relation);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@RequestMapping(path = "/delInherit")
|
||||
public R delInherit(String id) {
|
||||
inheritService.removeById(id);
|
||||
LambdaQueryWrapper<MedicaldesInheritRelation> wrapper = new LambdaQueryWrapper();
|
||||
wrapper.eq(MedicaldesInheritRelation::getInheritId,id);
|
||||
relationService.removeById(relationService.getOne(wrapper));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@RequestMapping(path = "/getList")
|
||||
public List<Map<String,Object>> getList(String type) {
|
||||
MPJLambdaWrapper<MedicaldesInherit> wrapper = new MPJLambdaWrapper();
|
||||
wrapper.select("count(1) count,ifnull(t3.prov_id,ifnull(dd.dict_type,'0')) AS prov_id,ifnull(t3.prov_name,ifnull(dd.dict_value,'其他')) AS prov_name ");
|
||||
wrapper.leftJoin(MedicaldesInheritRelation.class,MedicaldesInheritRelation::getInheritId,MedicaldesInherit::getId);
|
||||
wrapper.eq(MedicaldesInheritRelation::getTypeId,type);
|
||||
wrapper.leftJoin(City.class,City::getCityId,MedicaldesInherit::getCityId);
|
||||
wrapper.leftJoin(Province.class,Province::getProvId,City::getProvId);
|
||||
wrapper.leftJoin(" (select dict_type,dict_value from sys_dict_data where dict_label = 'inheritPro') dd on dd.dict_type = t.city_id");
|
||||
wrapper.groupBy("prov_name","dict_value");
|
||||
wrapper.orderByAsc("t3.region_code","dict_value");
|
||||
List<Map<String,Object>> list = inheritService.listMaps(wrapper);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 吴门之光列表
|
||||
*/
|
||||
@RequestMapping(path = "/lightListByType")
|
||||
public R lightListByType(String type) {
|
||||
LambdaQueryWrapper<MedicaldesLight> wrapper = new LambdaQueryWrapper();
|
||||
if (StringUtils.isNotEmpty(type)){
|
||||
wrapper.eq(MedicaldesLight::getType,type);
|
||||
}
|
||||
wrapper.orderByAsc(MedicaldesLight::getSort);
|
||||
List<MedicaldesLight> list = lightService.list(wrapper);
|
||||
return R.ok().put("result", list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 吴门之光列表
|
||||
*/
|
||||
@RequestMapping(path = "/lightListByPage")
|
||||
public R lightListByPage(@RequestBody Map map) {
|
||||
LambdaQueryWrapper<MedicaldesLight> wrapper = new LambdaQueryWrapper();
|
||||
if (map.containsKey("type")&&StringUtils.isNotEmpty(map.get("type").toString())){
|
||||
wrapper.eq(MedicaldesLight::getType,map.get("type"));
|
||||
}
|
||||
if (map.containsKey("name")&&StringUtils.isNotEmpty(map.get("name").toString())){
|
||||
wrapper.like(MedicaldesLight::getName,map.get("name"));
|
||||
}
|
||||
wrapper.orderByAsc(MedicaldesLight::getSort);
|
||||
Page<MedicaldesLight> page = lightService.page(new Page<>(
|
||||
Long.parseLong(map.get("current").toString()), Long.parseLong(map.get("limit").toString())),wrapper);
|
||||
return R.ok().put("result", page);
|
||||
}
|
||||
|
||||
@RequestMapping(path = "/getLightById")
|
||||
public R getLightById(String id) {
|
||||
return R.ok().put("result",lightService.getById(id));
|
||||
}
|
||||
|
||||
@RequestMapping(path = "/saveOrUpdateLight")
|
||||
public R addLight(@RequestBody MedicaldesLight light) {
|
||||
lightService.saveOrUpdate(light);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@RequestMapping(path = "/delLight")
|
||||
public R delLight(String id) {
|
||||
lightService.removeById(id);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.peanut.modules.common.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.peanut.modules.common.entity.ShopProductMedicineLabel;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface ShopProductMedicineLabelDao extends BaseMapper<ShopProductMedicineLabel> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.peanut.modules.common.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.peanut.modules.common.entity.ShopProductMedicineMarket;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface ShopProductMedicineMarketDao extends BaseMapper<ShopProductMedicineMarket> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.peanut.modules.common.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.peanut.modules.common.entity.ShopProductSociologyLabel;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface ShopProductSociologyLabelDao extends BaseMapper<ShopProductSociologyLabel> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.peanut.modules.common.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.peanut.modules.common.entity.ShopProductSociologyMarket;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface ShopProductSociologyMarketDao extends BaseMapper<ShopProductSociologyMarket> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.peanut.modules.common.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.peanut.modules.common.entity.ShopProductToMedicineLabel;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface ShopProductToMedicineLabelDao extends BaseMapper<ShopProductToMedicineLabel> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.peanut.modules.common.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.peanut.modules.common.entity.ShopProductToMedicineMarket;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface ShopProductToMedicineMarketDao extends BaseMapper<ShopProductToMedicineMarket> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.peanut.modules.common.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.peanut.modules.common.entity.ShopProductToSociologyLabel;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface ShopProductToSociologyLabelDao extends BaseMapper<ShopProductToSociologyLabel> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.peanut.modules.common.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.peanut.modules.common.entity.ShopProductToSociologyMarket;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface ShopProductToSociologyMarketDao extends BaseMapper<ShopProductToSociologyMarket> {
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.peanut.modules.common.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@TableName("shop_product_medicine_label")
|
||||
public class ShopProductMedicineLabel implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 父id
|
||||
*/
|
||||
private Integer pid;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 0否1是
|
||||
*/
|
||||
private Integer isLast;
|
||||
|
||||
/**
|
||||
* 权重
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ShopProductMedicineLabel> children;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.peanut.modules.common.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@TableName("shop_product_medicine_market")
|
||||
public class ShopProductMedicineMarket implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 父id
|
||||
*/
|
||||
private Integer pid;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 0否1是
|
||||
*/
|
||||
private Integer isLast;
|
||||
|
||||
/**
|
||||
* 权重
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ShopProductMedicineMarket> children;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.peanut.modules.common.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@TableName("shop_product_sociology_label")
|
||||
public class ShopProductSociologyLabel implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 父id
|
||||
*/
|
||||
private Integer pid;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 0否1是
|
||||
*/
|
||||
private Integer isLast;
|
||||
|
||||
/**
|
||||
* 权重
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ShopProductSociologyLabel> children;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.peanut.modules.common.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@TableName("shop_product_sociology_market")
|
||||
public class ShopProductSociologyMarket implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 父id
|
||||
*/
|
||||
private Integer pid;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 0否1是
|
||||
*/
|
||||
private Integer isLast;
|
||||
|
||||
/**
|
||||
* 权重
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ShopProductSociologyMarket> children;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.peanut.modules.common.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("shop_product_to_medicine_label")
|
||||
public class ShopProductToMedicineLabel implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Integer id;
|
||||
|
||||
private Integer productId;
|
||||
|
||||
private Integer medicineLabelId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
@TableField(exist = false)
|
||||
private ShopProduct product;
|
||||
@TableField(exist = false)
|
||||
private ShopProductToMedicineLabel label;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.peanut.modules.common.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("shop_product_to_medicine_market")
|
||||
public class ShopProductToMedicineMarket implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Integer id;
|
||||
|
||||
private Integer productId;
|
||||
|
||||
private Integer medicineMarketId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
@TableField(exist = false)
|
||||
private ShopProduct product;
|
||||
@TableField(exist = false)
|
||||
private ShopProductToMedicineMarket market;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.peanut.modules.common.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("shop_product_to_sociology_label")
|
||||
public class ShopProductToSociologyLabel implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Integer id;
|
||||
|
||||
private Integer productId;
|
||||
|
||||
private Integer sociologyLabelId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
@TableField(exist = false)
|
||||
private ShopProduct product;
|
||||
@TableField(exist = false)
|
||||
private ShopProductSociologyLabel label;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.peanut.modules.common.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("shop_product_to_sociology_market")
|
||||
public class ShopProductToSociologyMarket implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId
|
||||
private Integer id;
|
||||
|
||||
private Integer productId;
|
||||
|
||||
private Integer sociologyMarketId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
@TableField(exist = false)
|
||||
private ShopProduct product;
|
||||
@TableField(exist = false)
|
||||
private ShopProductSociologyMarket market;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.peanut.modules.common.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.peanut.modules.common.entity.BookEntity;
|
||||
|
||||
public interface BookService extends IService<BookEntity> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.peanut.modules.common.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.peanut.modules.common.entity.MedicaldesBook;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public interface MedicaldesBookService extends IService<MedicaldesBook> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.peanut.modules.common.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.peanut.modules.common.entity.MedicaldesInheritRelation;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public interface MedicaldesInheritRelationService extends IService<MedicaldesInheritRelation> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.peanut.modules.common.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.peanut.modules.common.entity.MedicaldesInherit;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public interface MedicaldesInheritService extends IService<MedicaldesInherit> {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.peanut.modules.common.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.peanut.modules.common.entity.MedicaldesLight;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public interface MedicaldesLightService extends IService<MedicaldesLight> {
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.peanut.modules.common.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.peanut.modules.common.dao.BookDao;
|
||||
import com.peanut.modules.common.entity.BookEntity;
|
||||
import com.peanut.modules.common.service.BookService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Slf4j
|
||||
@Service("commonBookService")
|
||||
public class BookServiceImpl extends ServiceImpl<BookDao, BookEntity> implements BookService {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.peanut.modules.common.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.peanut.modules.common.dao.MedicaldesBookDao;
|
||||
import com.peanut.modules.common.entity.MedicaldesBook;
|
||||
import com.peanut.modules.common.service.MedicaldesBookService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service("commonMedicaldesBookService")
|
||||
public class MedicaldesBookServiceImpl extends ServiceImpl<MedicaldesBookDao, MedicaldesBook> implements MedicaldesBookService {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.peanut.modules.common.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.peanut.modules.common.dao.MedicaldesInheritRelationDao;
|
||||
import com.peanut.modules.common.entity.MedicaldesInheritRelation;
|
||||
import com.peanut.modules.common.service.MedicaldesInheritRelationService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service("commonMedicaldesInheritRelationService")
|
||||
public class MedicaldesInheritRelationServiceImpl extends ServiceImpl<MedicaldesInheritRelationDao, MedicaldesInheritRelation> implements MedicaldesInheritRelationService {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.peanut.modules.common.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.peanut.modules.common.dao.MedicaldesInheritDao;
|
||||
import com.peanut.modules.common.entity.MedicaldesInherit;
|
||||
import com.peanut.modules.common.service.MedicaldesInheritService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service("commonMedicaldesInheritService")
|
||||
public class MedicaldesInheritServiceImpl extends ServiceImpl<MedicaldesInheritDao, MedicaldesInherit> implements MedicaldesInheritService {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.peanut.modules.common.service.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.peanut.modules.common.dao.MedicaldesLightDao;
|
||||
import com.peanut.modules.common.entity.MedicaldesLight;
|
||||
import com.peanut.modules.common.service.MedicaldesLightService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service("commonMedicaldesLightService")
|
||||
public class MedicaldesLightServiceImpl extends ServiceImpl<MedicaldesLightDao, MedicaldesLight> implements MedicaldesLightService {
|
||||
}
|
||||
Reference in New Issue
Block a user