Compare commits

..

10 Commits

@ -0,0 +1,108 @@
package com.ruoyi.web.controller.columns;
import java.io.IOException;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.domain.columns.SysTeacher;
import com.ruoyi.system.service.columns.ISysTeacherService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author ruoyi
* @date 2025-10-28
*/
@RestController
@RequestMapping("/system/teacher")
public class SysTeacherController extends BaseController
{
@Autowired
private ISysTeacherService sysTeacherService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:teacher:list')")
@GetMapping("/list")
public TableDataInfo list(SysTeacher sysTeacher)
{
startPage();
// sysTeacher.setTenantId("2");
sysTeacher.setTenantId(SecurityUtils.getLoginUser().getNowTenantId());
List<SysTeacher> list = sysTeacherService.selectSysTeacherList(sysTeacher);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:teacher:export')")
@Log(title = "员工信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysTeacher sysTeacher) throws IOException {
List<SysTeacher> list = sysTeacherService.selectSysTeacherList(sysTeacher);
ExcelUtil<SysTeacher> util = new ExcelUtil<SysTeacher>(SysTeacher.class);
util.exportExcel(response, list, "员工信息数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:teacher:query')")
@GetMapping(value = "/{userId}")
public AjaxResult getInfo(@PathVariable("userId") Long userId)
{
return AjaxResult.success(sysTeacherService.selectSysTeacherByUserId(userId));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:teacher:add')")
@Log(title = "员工信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysTeacher sysTeacher)
{
return toAjax(sysTeacherService.insertSysTeacher(sysTeacher));
}
/**
*
*/
// @PreAuthorize("@ss.hasPermi('system:teacher:edit')")
@Log(title = "员工信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysTeacher sysTeacher)
{
return toAjax(sysTeacherService.updateSysTeacher(sysTeacher));
}
/**
*
*/
@PostMapping("/remove")
public AjaxResult remove( @RequestBody Long[] ids) {
{
return toAjax(sysTeacherService.deleteSysTeacherByUserIds(ids));
}
}
}

@ -0,0 +1,111 @@
package com.ruoyi.web.controller.columns;
import java.io.IOException;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.domain.columns.YjAppreciate;
import com.ruoyi.system.service.columns.IYjAppreciateService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author ruoyi
* @date 2025-10-29
*/
@RestController
@RequestMapping("/system/appreciate")
public class YjAppreciateController extends BaseController
{
@Autowired
private IYjAppreciateService yjAppreciateService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:appreciate:list')")
@GetMapping("/list")
public TableDataInfo list(YjAppreciate yjAppreciate)
{
startPage();
yjAppreciate.setTenantId(SecurityUtils.getLoginUser().getNowTenantId());
List<YjAppreciate> list = yjAppreciateService.selectYjAppreciateList(yjAppreciate);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:appreciate:export')")
@Log(title = "瑜伽欣赏", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, YjAppreciate yjAppreciate) throws IOException {
List<YjAppreciate> list = yjAppreciateService.selectYjAppreciateList(yjAppreciate);
ExcelUtil<YjAppreciate> util = new ExcelUtil<YjAppreciate>(YjAppreciate.class);
util.exportExcel(response, list, "瑜伽欣赏数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:appreciate:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return AjaxResult.success(yjAppreciateService.selectYjAppreciateById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:appreciate:add')")
@Log(title = "瑜伽欣赏", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody YjAppreciate yjAppreciate)
{
yjAppreciate.setId(IdWorker.get32UUID());
return toAjax(yjAppreciateService.insertYjAppreciate(yjAppreciate));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:appreciate:edit')")
@Log(title = "瑜伽欣赏", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody YjAppreciate yjAppreciate)
{
return toAjax(yjAppreciateService.updateYjAppreciate(yjAppreciate));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:appreciate:remove')")
@Log(title = "瑜伽欣赏", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(yjAppreciateService.deleteYjAppreciateByIds(ids));
}
}

@ -0,0 +1,110 @@
package com.ruoyi.web.controller.columns;
import java.io.IOException;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.domain.columns.YjHealthy;
import com.ruoyi.system.service.columns.IYjHealthyService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author ruoyi
* @date 2025-10-29
*/
@RestController
@RequestMapping("/system/healthy")
public class YjHealthyController extends BaseController
{
@Autowired
private IYjHealthyService yjHealthyService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:healthy:list')")
@GetMapping("/list")
public TableDataInfo list(YjHealthy yjHealthy)
{
startPage();
yjHealthy.setTenantId(SecurityUtils.getLoginUser().getNowTenantId());
List<YjHealthy> list = yjHealthyService.selectYjHealthyList(yjHealthy);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:healthy:export')")
@Log(title = "健康饮食", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, YjHealthy yjHealthy) throws IOException {
List<YjHealthy> list = yjHealthyService.selectYjHealthyList(yjHealthy);
ExcelUtil<YjHealthy> util = new ExcelUtil<YjHealthy>(YjHealthy.class);
util.exportExcel(response, list, "健康饮食数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:healthy:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return AjaxResult.success(yjHealthyService.selectYjHealthyById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:healthy:add')")
@Log(title = "健康饮食", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody YjHealthy yjHealthy)
{
yjHealthy.setId(IdWorker.get32UUID());
return toAjax(yjHealthyService.insertYjHealthy(yjHealthy));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:healthy:edit')")
@Log(title = "健康饮食", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody YjHealthy yjHealthy)
{
return toAjax(yjHealthyService.updateYjHealthy(yjHealthy));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:healthy:remove')")
@Log(title = "健康饮食", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(yjHealthyService.deleteYjHealthyByIds(ids));
}
}

@ -0,0 +1,129 @@
package com.ruoyi.web.controller.columns;
import java.io.IOException;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.domain.columns.YjInherit;
import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.columns.IYjInheritService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author ruoyi
* @date 2025-10-29
*/
@RestController
@RequestMapping("/system/inherit")
public class YjInheritController extends BaseController
{
@Autowired
private IYjInheritService yjInheritService;
@Autowired
private ISysDeptService iSysDeptService;
@PostMapping("/getBase")
public AjaxResult getBae()
{
SysDept sysDept =new SysDept();
sysDept.setTenantId(SecurityUtils.getLoginUser().getNowTenantId());
List<SysDept> sysDepts = iSysDeptService.selectDeptList(sysDept);
return AjaxResult.success(sysDepts);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:inherit:list')")
@GetMapping("/list")
public TableDataInfo list(YjInherit yjInherit)
{
startPage();
yjInherit.setTenantId(SecurityUtils.getLoginUser().getNowTenantId());
List<YjInherit> list = yjInheritService.selectYjInheritList(yjInherit);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:inherit:export')")
@Log(title = "瑜伽传承", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, YjInherit yjInherit) throws IOException {
List<YjInherit> list = yjInheritService.selectYjInheritList(yjInherit);
ExcelUtil<YjInherit> util = new ExcelUtil<YjInherit>(YjInherit.class);
util.exportExcel(response, list, "瑜伽传承数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:inherit:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return AjaxResult.success(yjInheritService.selectYjInheritById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:inherit:add')")
@Log(title = "瑜伽传承", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody YjInherit yjInherit)
{
yjInherit.setId(IdWorker.get32UUID());
return toAjax(yjInheritService.insertYjInherit(yjInherit));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:inherit:edit')")
@Log(title = "瑜伽传承", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody YjInherit yjInherit)
{
return toAjax(yjInheritService.updateYjInherit(yjInherit));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:inherit:remove')")
@Log(title = "瑜伽传承", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(yjInheritService.deleteYjInheritByIds(ids));
}
}

@ -0,0 +1,111 @@
package com.ruoyi.web.controller.columns;
import java.io.IOException;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.domain.columns.YjPracticeMoments;
import com.ruoyi.system.service.columns.IYjPracticeMomentsService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author ruoyi
* @date 2025-10-29
*/
@RestController
@RequestMapping("/system/moments")
public class YjPracticeMomentsController extends BaseController
{
@Autowired
private IYjPracticeMomentsService yjPracticeMomentsService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:moments:list')")
@GetMapping("/list")
public TableDataInfo list(YjPracticeMoments yjPracticeMoments)
{
startPage();
yjPracticeMoments.setTenantId(SecurityUtils.getLoginUser().getNowTenantId());
List<YjPracticeMoments> list = yjPracticeMomentsService.selectYjPracticeMomentsList(yjPracticeMoments);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:moments:export')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, YjPracticeMoments yjPracticeMoments) throws IOException {
List<YjPracticeMoments> list = yjPracticeMomentsService.selectYjPracticeMomentsList(yjPracticeMoments);
ExcelUtil<YjPracticeMoments> util = new ExcelUtil<YjPracticeMoments>(YjPracticeMoments.class);
util.exportExcel(response, list, "【请填写功能名称】数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:moments:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return AjaxResult.success(yjPracticeMomentsService.selectYjPracticeMomentsById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:moments:add')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody YjPracticeMoments yjPracticeMoments)
{
yjPracticeMoments.setId(IdWorker.get32UUID());
return toAjax(yjPracticeMomentsService.insertYjPracticeMoments(yjPracticeMoments));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:moments:edit')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody YjPracticeMoments yjPracticeMoments)
{
return toAjax(yjPracticeMomentsService.updateYjPracticeMoments(yjPracticeMoments));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:moments:remove')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(yjPracticeMomentsService.deleteYjPracticeMomentsByIds(ids));
}
}

@ -0,0 +1,113 @@
package com.ruoyi.web.controller.columns;
import java.io.IOException;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.domain.columns.YjSense;
import com.ruoyi.system.service.columns.IYjSenseService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author ruoyi
* @date 2025-10-29
*/
@RestController
@RequestMapping("/system/sense")
public class YjSenseController extends BaseController
{
@Autowired
private IYjSenseService yjSenseService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:sense:list')")
@GetMapping("/list")
public TableDataInfo list(YjSense yjSense)
{
startPage();
//Long nowTenantId = SecurityUtils.getLoginUser().getNowTenantId();
yjSense.setTenantId(SecurityUtils.getLoginUser().getNowTenantId());
List<YjSense> list = yjSenseService.selectYjSenseList(yjSense);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:sense:export')")
@Log(title = "瑜伽常识", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, YjSense yjSense) throws IOException {
List<YjSense> list = yjSenseService.selectYjSenseList(yjSense);
ExcelUtil<YjSense> util = new ExcelUtil<YjSense>(YjSense.class);
util.exportExcel(response, list, "瑜伽常识数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:sense:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return AjaxResult.success(yjSenseService.selectYjSenseById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:sense:add')")
@Log(title = "瑜伽常识", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody YjSense yjSense)
{
yjSense.setId(IdWorker.get32UUID());
return toAjax(
yjSenseService.insertYjSense(yjSense));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:sense:edit')")
@Log(title = "瑜伽常识", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody YjSense yjSense)
{
return toAjax(yjSenseService.updateYjSense(yjSense));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:sense:remove')")
@Log(title = "瑜伽常识", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(yjSenseService.deleteYjSenseByIds(ids));
}
}

@ -0,0 +1,108 @@
package com.ruoyi.web.controller.columns;
import java.io.IOException;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.domain.columns.YjStore;
import com.ruoyi.system.service.columns.IYjStoreService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author ruoyi
* @date 2025-10-31
*/
@RestController
@RequestMapping("/system/store")
public class YjStoreController extends BaseController
{
@Autowired
private IYjStoreService yjStoreService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:store:list')")
@GetMapping("/list")
public TableDataInfo list(YjStore yjStore)
{
startPage();
yjStore.setTenantId(SecurityUtils.getLoginUser().getNowTenantId());
List<YjStore> list = yjStoreService.selectYjStoreList(yjStore);
return getDataTable(list);
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:store:export')")
@Log(title = "门店", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, YjStore yjStore) throws IOException {
List<YjStore> list = yjStoreService.selectYjStoreList(yjStore);
ExcelUtil<YjStore> util = new ExcelUtil<YjStore>(YjStore.class);
util.exportExcel(response, list, "门店数据");
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:store:query')")
@GetMapping(value = "/{deptId}")
public AjaxResult getInfo(@PathVariable("deptId") Long deptId)
{
return AjaxResult.success(yjStoreService.selectYjStoreByDeptId(deptId));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:store:add')")
@Log(title = "门店", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody YjStore yjStore)
{
return toAjax(yjStoreService.insertYjStore(yjStore));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:store:edit')")
@Log(title = "门店", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody YjStore yjStore)
{
return toAjax(yjStoreService.updateYjStore(yjStore));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('system:store:remove')")
@Log(title = "门店", businessType = BusinessType.DELETE)
@DeleteMapping("/{deptIds}")
public AjaxResult remove(@PathVariable Long[] deptIds)
{
return toAjax(yjStoreService.deleteYjStoreByDeptIds(deptIds));
}
}

@ -38,13 +38,13 @@ public class CommonController
@Operation(summary = "上传商城相关图片", description = "上传图片,上传后返回原图和缩略图的url") @Operation(summary = "上传商城相关图片", description = "上传图片,上传后返回原图和缩略图的url")
@PostMapping("/productImage/upload") @PostMapping("/productImage/upload")
public RestResponse uploadProductImage(@RequestParam("file") MultipartFile file) { public RestResponse uploadProductImage(@RequestParam("file") MultipartFile file) {
return new RestResponse().setData(fileService.uploadProductImage(file)); return new RestResponse().setData(fileService.uploadProductImage(file)).setSuccess(true);
} }
@Operation(summary = "上传文件", description = "上传文件上传后返回文件url") @Operation(summary = "上传文件", description = "上传文件上传后返回文件url")
@PostMapping("/file/upload") @PostMapping("/file/upload")
public RestResponse uploadFile(@RequestParam("file") MultipartFile file) { public RestResponse uploadFile(@RequestParam("file") MultipartFile file) {
return new RestResponse().setData(fileService.uploadFile(file)); return new RestResponse().setSuccess(true).setCode(200).setData(fileService.uploadFile(file));
} }

@ -0,0 +1,86 @@
package com.ruoyi.web.controller.mall;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.mall.domain.Brand;
import com.ruoyi.mall.domain.query.BrandQuery;
import com.ruoyi.mall.service.BrandService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* Controller
*/
@Api(description ="品牌管理接口列表")
@RestController
@RequestMapping("/pms/brand")
public class BrandController extends BaseController {
@Autowired
private BrandService service;
@ApiOperation("查询品牌管理列表")
@PreAuthorize("@ss.hasPermi('pms:brand:list')")
@PostMapping("/list")
public ResponseEntity<Page<Brand>> list(@RequestBody BrandQuery query, Pageable page) {
List<Brand> list = service.selectList(query, page);
return ResponseEntity.ok(new PageImpl<>(list, page, ((com.github.pagehelper.Page)list).getTotal()));
}
@ApiOperation("所有品牌管理列表")
@PreAuthorize("@ss.hasPermi('pms:brand:list')")
@PostMapping("/all")
public ResponseEntity<List<Brand>> all(@RequestBody BrandQuery query) {
return ResponseEntity.ok(service.selectList(query, null));
}
@ApiOperation("导出品牌管理列表")
@PreAuthorize("@ss.hasPermi('pms:brand:export')")
@Log(title = "品牌管理", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public ResponseEntity<String> export(BrandQuery query) {
// List<Brand> list = service.selectList(query, null);
// ExcelUtil<BrandVO> util = new ExcelUtil<>(BrandVO.class);
// return ResponseEntity.ok(util.writeExcel(convert.dos2vos(list), "品牌管理数据"));
return null;
}
@ApiOperation("获取品牌管理详细信息")
@PreAuthorize("@ss.hasPermi('pms:brand:query')")
@GetMapping(value = "/{id}")
public ResponseEntity<Brand> getInfo(@PathVariable("id") Long id) {
return ResponseEntity.ok(service.selectById(id));
}
@ApiOperation("新增品牌管理")
@PreAuthorize("@ss.hasPermi('pms:brand:add')")
@Log(title = "品牌管理", businessType = BusinessType.INSERT)
@PostMapping
public ResponseEntity<Integer> add(@RequestBody Brand brand) {
return ResponseEntity.ok(service.insert(brand));
}
@ApiOperation("修改品牌管理")
@PreAuthorize("@ss.hasPermi('pms:brand:edit')")
@Log(title = "品牌管理", businessType = BusinessType.UPDATE)
@PutMapping
public ResponseEntity<Integer> edit(@RequestBody Brand brand) {
return ResponseEntity.ok(service.update(brand));
}
@ApiOperation("删除品牌管理")
@PreAuthorize("@ss.hasPermi('pms:brand:remove')")
@Log(title = "品牌管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{id}")
public ResponseEntity<Integer> remove(@PathVariable Long id) {
return ResponseEntity.ok(service.deleteById(id));
}
}

@ -0,0 +1,51 @@
package com.ruoyi.web.controller.mall;
import com.ruoyi.mall.domain.query.GoodsStatisticsQuery;
import com.ruoyi.mall.domain.query.OrderStatisticsQuery;
import com.ruoyi.mall.domain.vo.OrderAndAftersaleStatisticsVO;
import com.ruoyi.mall.domain.vo.OrderStatisticsVO;
import com.ruoyi.mall.domain.vo.ProductTopVO;
import com.ruoyi.mall.service.IndexStatisticsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@Slf4j
@Api(tags = "管理端,首页统计数据接口")
@RestController
@RequestMapping("/dev/statistics/index")
public class IndexStatisticsManagerController {
/**
*
*/
@Autowired
private IndexStatisticsService indexStatisticsService;
@ApiOperation(value = "获取首页查询热卖商品TOP10")
@GetMapping("/goodsStatistics")
public ResponseEntity<List<ProductTopVO>> goodsStatistics(@Validated GoodsStatisticsQuery goodsStatisticsQuery) {
return ResponseEntity.ok(indexStatisticsService.goodsStatistics(goodsStatisticsQuery));
}
@ApiOperation(value = "订单与售后单统计")
@GetMapping("/order/aftersale/statistics")
public ResponseEntity<OrderAndAftersaleStatisticsVO> orderAndAftersaleStatistics(){
return ResponseEntity.ok(indexStatisticsService.orderAndAftersaleStatistics());
}
@ApiOperation(value = "订单信息")
@PostMapping("/orderStatistics")
public ResponseEntity<List<OrderStatisticsVO>> orderStatistics(@RequestBody OrderStatisticsQuery param) {
return ResponseEntity.ok(indexStatisticsService.orderStatistics(param));
}
}

@ -0,0 +1,71 @@
package com.ruoyi.web.controller.mall;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.mall.domain.ProductCategory;
import com.ruoyi.mall.domain.query.ProductCategoryQuery;
import com.ruoyi.mall.domain.vo.ProductCategoryVO;
import com.ruoyi.mall.service.ProductCategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* Controller
*
* @author
* @date 2022-11-28
*/
@Api(description ="商品分类接口列表")
@RestController
@RequestMapping("/pms/productCategory")
public class ProductCategoryController extends BaseController {
@Autowired
private ProductCategoryService service;
@ApiOperation("查询商品分类列表")
@PreAuthorize("@ss.hasPermi('pms:productCategory:list')")
@PostMapping("/list")
public ResponseEntity<List<ProductCategoryVO>> list(@RequestBody ProductCategoryQuery query) {
List<ProductCategoryVO> list = service.selectList(query, null);
return ResponseEntity.ok(list);
}
@ApiOperation("获取商品分类详细信息")
@PreAuthorize("@ss.hasPermi('pms:productCategory:query')")
@GetMapping(value = "/{id}")
public ResponseEntity<ProductCategory> getInfo(@PathVariable("id") Long id) {
return ResponseEntity.ok(service.selectById(id));
}
@ApiOperation("新增商品分类")
@PreAuthorize("@ss.hasPermi('pms:productCategory:add')")
@Log(title = "商品分类", businessType = BusinessType.INSERT)
@PostMapping
public ResponseEntity<Integer> add(@RequestBody ProductCategory productCategory) {
return ResponseEntity.ok(service.insert(productCategory));
}
@ApiOperation("修改商品分类")
@PreAuthorize("@ss.hasPermi('pms:productCategory:edit')")
@Log(title = "商品分类", businessType = BusinessType.UPDATE)
@PutMapping
public ResponseEntity<Integer> edit(@RequestBody ProductCategory productCategory) {
return ResponseEntity.ok(service.update(productCategory));
}
@ApiOperation("删除商品分类")
@PreAuthorize("@ss.hasPermi('pms:productCategory:remove')")
@Log(title = "商品分类", businessType = BusinessType.DELETE)
@DeleteMapping("/{id}")
public ResponseEntity<Integer> remove(@PathVariable Long id) {
return ResponseEntity.ok(service.deleteById(id));
}
}

@ -0,0 +1,96 @@
package com.ruoyi.web.controller.mall;
import cn.xluobo.business.sc.course.domain.req.ReqSearchScCourse;
import cn.xluobo.business.sc.course.domain.resp.course.RespSearchCourse;
import cn.xluobo.business.sc.course.service.IScCourseService;
import cn.xluobo.core.page.RespPage;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.mall.domain.Product;
import com.ruoyi.mall.domain.query.ProductQuery;
import com.ruoyi.mall.domain.vo.ProductVO;
import com.ruoyi.mall.service.ProductService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* Controller
*
* @author zcc
* @date 2022-11-28
*/
@Api(description ="商品信息接口列表")
@RestController
@RequestMapping("/pms/product")
public class ProductController extends BaseController {
@Autowired
private ProductService service;
@Autowired
private IScCourseService courseService;
@ApiOperation("查询商品信息列表")
@PreAuthorize("@ss.hasPermi('pms:product:list')")
@PostMapping("/list")
public ResponseEntity<Page<Product>> list(@RequestBody ProductQuery query, Pageable page) {
// service.getIds(query);
List<Product> list = service.selectList(query, page);
return ResponseEntity.ok(new PageImpl<>(list, page, ((com.github.pagehelper.Page)list).getTotal()));
}
@ApiOperation("导出商品信息列表")
@PreAuthorize("@ss.hasPermi('pms:product:export')")
@Log(title = "商品信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public ResponseEntity<String> export(ProductQuery query) {
// List<Product> list = service.selectList(query, null);
// ExcelUtil<ProductVO> util = new ExcelUtil<>(ProductVO.class);
// return ResponseEntity.ok(util.writeExcel(convert.dos2vos(list), "商品信息数据"));
return null;
}
@ApiOperation("获取商品信息详细信息")
@PreAuthorize("@ss.hasPermi('pms:product:query')")
@GetMapping(value = "/{id}")
public ResponseEntity<ProductVO> getInfo(@PathVariable("id") Long id) {
return ResponseEntity.ok(service.selectById(id));
}
@ApiOperation("新增商品信息")
@PreAuthorize("@ss.hasPermi('pms:product:add')")
@Log(title = "商品信息", businessType = BusinessType.INSERT)
@PostMapping
public ResponseEntity<Integer> add(@RequestBody ProductVO product) {
return ResponseEntity.ok(service.insert(product));
}
@ApiOperation("修改商品信息")
@PreAuthorize("@ss.hasPermi('pms:product:edit')")
@Log(title = "商品信息", businessType = BusinessType.UPDATE)
@PutMapping
public ResponseEntity<Integer> edit(@RequestBody ProductVO product) {
return ResponseEntity.ok(service.update(product));
}
@ApiOperation("删除商品信息")
@PreAuthorize("@ss.hasPermi('pms:product:remove')")
@Log(title = "商品信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{id}")
public ResponseEntity<Integer> remove(@PathVariable Long id) {
return ResponseEntity.ok(service.deleteById(id));
}
@PostMapping("/courseList")
public ResponseEntity<RespPage<RespSearchCourse>> listCourseForProduct(@RequestBody ReqSearchScCourse query){
return ResponseEntity.ok(courseService.searchCourse(query));
}
}

@ -5,7 +5,6 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysMenu; import com.ruoyi.common.core.domain.entity.SysMenu;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginBody; import com.ruoyi.common.core.domain.model.LoginBody;
import com.ruoyi.common.core.domain.model.PhoneLoginBody;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.framework.web.service.SysLoginService; import com.ruoyi.framework.web.service.SysLoginService;
import com.ruoyi.framework.web.service.SysPermissionService; import com.ruoyi.framework.web.service.SysPermissionService;
@ -49,19 +48,6 @@ public class SysLoginController {
return ajax; return ajax;
} }
/**
* 使
*
* @param loginBody
* @return
*/
@PostMapping("/login/phone")
public AjaxResult login(@RequestBody PhoneLoginBody loginBody) {
AjaxResult ajax = AjaxResult.success();
SysUser user = loginService.phoneLogin(loginBody.getPhone(), loginBody.getCode(), loginBody.getUuid());
ajax.put(Constants.TOKEN, loginService.createToken(user));
return ajax;
}
/** /**
* *
@ -70,11 +56,14 @@ public class SysLoginController {
*/ */
@GetMapping("getInfo") @GetMapping("getInfo")
public AjaxResult getInfo() { public AjaxResult getInfo() {
SysUser user = SecurityUtils.getLoginUser().getUser(); SysUser user = SecurityUtils.getLoginUser().getUser();
// 角色集合 // 角色集合
Set<String> roles = permissionService.getRolePermission(user); Set<String> roles = permissionService.getRolePermission(user);
// 权限集合 // 权限集合
Set<String> permissions = permissionService.getMenuPermission(user); Set<String> permissions = permissionService.getMenuPermission(user);
//所属租户
AjaxResult ajax = AjaxResult.success(); AjaxResult ajax = AjaxResult.success();
ajax.put("user", user); ajax.put("user", user);
ajax.put("roles", roles); ajax.put("roles", roles);

@ -1,17 +1,5 @@
package com.ruoyi.web.controller.system; package com.ruoyi.web.controller.system;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
@ -28,6 +16,12 @@ import com.ruoyi.framework.web.service.TokenService;
import com.ruoyi.system.domain.SysUserRole; import com.ruoyi.system.domain.SysUserRole;
import com.ruoyi.system.service.ISysRoleService; import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.service.ISysUserService; import com.ruoyi.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/** /**
* *
@ -97,6 +91,7 @@ public class SysRoleController extends BaseController
return AjaxResult.error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在"); return AjaxResult.error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
} }
role.setCreateBy(getUserId()); role.setCreateBy(getUserId());
role.setTenantId(getLoginUser().getNowTenantId());
return toAjax(roleService.insertRole(role)); return toAjax(roleService.insertRole(role));
} }

@ -0,0 +1,92 @@
package com.ruoyi.web.controller.system;
import com.ruoyi.common.core.domain.RestResponse;
import com.ruoyi.system.domain.SysTenant;
import com.ruoyi.system.domain.vo.ReqBusinessAddTenant;
import com.ruoyi.system.domain.vo.ReqSearchSysTenant;
import com.ruoyi.system.service.SysTenantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* <p>
*
* </p>
*
* @author zhangby
* @since 2019-11-06
*/
@RestController
@RequestMapping("/system/tenant")
public class SysTenantController {
@Autowired
private SysTenantService sysTenantService;
/**
*
*
* @param reqSearchSysTenant
* @return
*/
@GetMapping("/list/searchList")
public RestResponse searchList(ReqSearchSysTenant reqSearchSysTenant) {
return sysTenantService.searchList(reqSearchSysTenant);
}
/**
* select
*
* @return
*/
@GetMapping("/list/treeSelect")
public RestResponse treeSelect() {
return sysTenantService.treeSelect();
}
/**
*
*
* @param tenantId
* @return
*/
@GetMapping("/info/detailById/{tenantId}")
public RestResponse detailById(@PathVariable("tenantId") Long tenantId) {
return sysTenantService.detailById(tenantId);
}
/**
*
*
* @param reqBusinessAddTenant
* @return
*/
@PostMapping("/add/addTenant")
public RestResponse addSysTenant(@RequestBody ReqBusinessAddTenant reqBusinessAddTenant) {
return sysTenantService.addTenant(reqBusinessAddTenant);
}
/**
*
*
* @param sysTenant
* @return
*/
@PutMapping("/update/updateTenant")
public RestResponse updateTenant(@RequestBody SysTenant sysTenant) {
return sysTenantService.updateTenant(sysTenant);
}
/**
*
*
* @param tenantIds
* @return
*/
@DeleteMapping("/delete/deleteById/{tenantIds}")
public RestResponse deleteById(@PathVariable("tenantIds") String[] tenantIds) {
return sysTenantService.deleteById(tenantIds);
}
}

@ -1,20 +1,5 @@
package com.ruoyi.web.controller.system; package com.ruoyi.web.controller.system;
import java.util.List;
import java.util.stream.Collectors;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
@ -29,6 +14,15 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.service.ISysPostService; import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.system.service.ISysRoleService; import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.service.ISysUserService; import com.ruoyi.system.service.ISysUserService;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
import java.util.stream.Collectors;
/** /**
* *
@ -60,6 +54,17 @@ public class SysUserController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
*
*/
@GetMapping("/listAll")
public TableDataInfo listAll(SysUser user)
{
// startPage();
List<SysUser> list = userService.selectUserList(user);
return getDataTable(list);
}
@Log(title = "用户管理", businessType = BusinessType.EXPORT) @Log(title = "用户管理", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:user:export')") @PreAuthorize("@ss.hasPermi('system:user:export')")
@GetMapping("/export") @GetMapping("/export")
@ -133,6 +138,7 @@ public class SysUserController extends BaseController
} }
user.setCreateBy(getUserId()); user.setCreateBy(getUserId());
user.setPassword(SecurityUtils.encryptPassword(user.getPassword())); user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
user.setTenantId(getLoginUser().getNowTenantId());
return toAjax(userService.insertUser(user)); return toAjax(userService.insertUser(user));
} }

@ -151,7 +151,7 @@ xss:
# 过滤开关 # 过滤开关
enabled: true enabled: true
# 排除链接(多个用逗号分隔) # 排除链接(多个用逗号分隔)
excludes: /system/notice excludes: /system/notice,/system/teacher,/system/inherit,/system/appreciate,/system/healthy,/system/moments,/system/sense,/system/store
# 匹配链接 # 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/* urlPatterns: /system/*,/monitor/*,/tool/*
extra: extra:

@ -85,6 +85,7 @@ public class BaseController
TableDataInfo rspData = new TableDataInfo(); TableDataInfo rspData = new TableDataInfo();
rspData.setCode(HttpStatus.SUCCESS); rspData.setCode(HttpStatus.SUCCESS);
rspData.setMsg("查询成功"); rspData.setMsg("查询成功");
System.out.println("list = " + list);
rspData.setRows(list); rspData.setRows(list);
rspData.setTotal(new PageInfo(list).getTotal()); rspData.setTotal(new PageInfo(list).getTotal());
return rspData; return rspData;

@ -12,6 +12,7 @@ public class RestResponse extends HashMap<String, Object> {
RestResponse restResponse = new RestResponse(); RestResponse restResponse = new RestResponse();
restResponse.setSuccess(true); restResponse.setSuccess(true);
restResponse.setMessage(message); restResponse.setMessage(message);
restResponse.setCode(200);
return restResponse; return restResponse;
} }
@ -27,7 +28,10 @@ public class RestResponse extends HashMap<String, Object> {
if (success != null) put("success", success); if (success != null) put("success", success);
return this; return this;
} }
public RestResponse setCode(Integer success) {
if (success != null) put("code", success);
return this;
}
public RestResponse setMessage(String message) { public RestResponse setMessage(String message) {
if (message != null) put("message", message); if (message != null) put("message", message);
return this; return this;

@ -1,8 +1,10 @@
package com.ruoyi.common.core.domain.entity; package com.ruoyi.common.core.domain.entity;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.data.annotation.Id;
import javax.validation.constraints.Email; import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
@ -15,11 +17,13 @@ import java.util.List;
* *
* @author ruoyi * @author ruoyi
*/ */
@Data
public class SysDept extends BaseEntity public class SysDept extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 部门ID */ /** 部门ID */
@Id
private Long deptId; private Long deptId;
/** 父部门ID */ /** 父部门ID */
@ -48,11 +52,16 @@ public class SysDept extends BaseEntity
private String status; private String status;
/** 删除标志0代表存在 2代表删除 */ /** 删除标志0代表存在 2代表删除 */
private String delFlag; private String deleteFlag;
/** 父部门名称 */ /** 父部门名称 */
private String parentName; private String parentName;
//
private String tenantId;
private String deptType;
/** 子部门 */ /** 子部门 */
private List<SysDept> children = new ArrayList<SysDept>(); private List<SysDept> children = new ArrayList<SysDept>();
@ -152,14 +161,14 @@ public class SysDept extends BaseEntity
this.status = status; this.status = status;
} }
public String getDelFlag() public String getDeleteFlag()
{ {
return delFlag; return deleteFlag;
} }
public void setDelFlag(String delFlag) public void setDeleteFlag(String deleteFlag)
{ {
this.delFlag = delFlag; this.deleteFlag = deleteFlag;
} }
public String getParentName() public String getParentName()
@ -194,7 +203,7 @@ public class SysDept extends BaseEntity
.append("phone", getPhone()) .append("phone", getPhone())
.append("email", getEmail()) .append("email", getEmail())
.append("status", getStatus()) .append("status", getStatus())
.append("delFlag", getDelFlag()) .append("delFlag", getDeleteFlag())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("updateBy", getUpdateBy()) .append("updateBy", getUpdateBy())

@ -1,12 +1,13 @@
package com.ruoyi.common.core.domain.entity; package com.ruoyi.common.core.domain.entity;
import java.util.ArrayList; import com.ruoyi.common.core.domain.BaseEntity;
import java.util.List;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.domain.BaseEntity;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;
/** /**
* sys_menu * sys_menu
@ -62,6 +63,8 @@ public class SysMenu extends BaseEntity
/** 菜单图标 */ /** 菜单图标 */
private String icon; private String icon;
/** 子菜单 */ /** 子菜单 */
private List<SysMenu> children = new ArrayList<SysMenu>(); private List<SysMenu> children = new ArrayList<SysMenu>();

@ -1,12 +1,13 @@
package com.ruoyi.common.core.domain.entity; package com.ruoyi.common.core.domain.entity;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Excel.ColumnType; import com.ruoyi.common.annotation.Excel.ColumnType;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
/** /**
* sys_role * sys_role
@ -59,6 +60,16 @@ public class SysRole extends BaseEntity
/** 部门组(数据权限) */ /** 部门组(数据权限) */
private Long[] deptIds; private Long[] deptIds;
private String tenantId;
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
public SysRole() public SysRole()
{ {

@ -1,12 +1,5 @@
package com.ruoyi.common.core.domain.entity; package com.ruoyi.common.core.domain.entity;
import java.util.Date;
import java.util.List;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
@ -14,6 +7,14 @@ import com.ruoyi.common.annotation.Excel.ColumnType;
import com.ruoyi.common.annotation.Excel.Type; import com.ruoyi.common.annotation.Excel.Type;
import com.ruoyi.common.annotation.Excels; import com.ruoyi.common.annotation.Excels;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;
/** /**
* sys_user * sys_user
@ -66,7 +67,7 @@ public class SysUser extends BaseEntity
private String status; private String status;
/** 删除标志0代表存在 2代表删除 */ /** 删除标志0代表存在 2代表删除 */
private String delFlag; private String deleteFlag;
/** 最后登录IP */ /** 最后登录IP */
@Excel(name = "最后登录IP", type = Type.EXPORT) @Excel(name = "最后登录IP", type = Type.EXPORT)
@ -83,6 +84,8 @@ public class SysUser extends BaseEntity
}) })
private SysDept dept; private SysDept dept;
private int teacher;//是否为任课教师 1是 0否
/** 角色对象 */ /** 角色对象 */
private List<SysRole> roles; private List<SysRole> roles;
@ -95,6 +98,8 @@ public class SysUser extends BaseEntity
/** 角色ID */ /** 角色ID */
private Long roleId; private Long roleId;
public String tenantId;
public SysUser() public SysUser()
{ {
@ -105,6 +110,22 @@ public class SysUser extends BaseEntity
this.userId = userId; this.userId = userId;
} }
public int getTeacher() {
return teacher;
}
public void setTeacher(int teacher) {
this.teacher = teacher;
}
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
public Long getUserId() public Long getUserId()
{ {
return userId; return userId;
@ -233,14 +254,14 @@ public class SysUser extends BaseEntity
this.status = status; this.status = status;
} }
public String getDelFlag() public String getDeleteFlag()
{ {
return delFlag; return deleteFlag;
} }
public void setDelFlag(String delFlag) public void setDeleteFlag(String deleteFlag)
{ {
this.delFlag = delFlag; this.deleteFlag = deleteFlag;
} }
public String getLoginIp() public String getLoginIp()
@ -327,7 +348,7 @@ public class SysUser extends BaseEntity
.append("password", getPassword()) .append("password", getPassword())
.append("salt", getSalt()) .append("salt", getSalt())
.append("status", getStatus()) .append("status", getStatus())
.append("delFlag", getDelFlag()) .append("delFlag", getDeleteFlag())
.append("loginIp", getLoginIp()) .append("loginIp", getLoginIp())
.append("loginDate", getLoginDate()) .append("loginDate", getLoginDate())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())

@ -1,14 +1,14 @@
package com.ruoyi.common.core.domain.model; package com.ruoyi.common.core.domain.model;
import java.util.Collection; import com.alibaba.fastjson.annotation.JSONField;
import java.util.Set; import com.ruoyi.common.core.domain.entity.SysUser;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetails;
import com.alibaba.fastjson.annotation.JSONField;
import com.ruoyi.common.core.domain.entity.SysUser; import java.util.Collection;
import java.util.Set;
/** /**
* *
@ -124,6 +124,7 @@ public class LoginUser implements UserDetails
this.deptId = deptId; this.deptId = deptId;
this.user = user; this.user = user;
this.permissions = permissions; this.permissions = permissions;
this.nowTenantId=user.getTenantId();
} }
@JSONField(serialize = false) @JSONField(serialize = false)

@ -11,21 +11,21 @@ import javax.annotation.PreDestroy;
public class SshTunnelConfig { public class SshTunnelConfig {
private Session session; private Session session;
@Value("${ssh.host}") //@Value("${ssh.host}")
private String sshHost="62.234.183.14"; private String sshHost="62.234.183.14";
@Value("${ssh.port}") // @Value("${ssh.port}")
private int sshPort=22; private int sshPort=22;
@Value("${ssh.user}") // @Value("${ssh.user}")
private String sshUser="root"; private String sshUser="root";
@Value("${ssh.identity}") // @Value("${ssh.identity}")
private String sshIdentity="E:/yoga-app-manager/private_key/runpeng20250915.pem"; private String sshIdentity="D:\\rpkj\\yoga-app-manager\\private_key\\runpeng20250915.pem";
@Value("${ssh.remote.db.host}") // @Value("${ssh.remote.db.host}")
private String remoteDbHost="127.0.0.1"; private String remoteDbHost="127.0.0.1";
@Value("${ssh.local.port}") // @Value("${ssh.local.port}")
private int localPort=32768; private int localPort=32768;
@Value("${ssh.remote.db.port}") // @Value("${ssh.remote.db.port}")
private int remoteDbPort=19116; private int remoteDbPort=19116;
public void createSshTunnel() throws Exception { public void createSshTunnel() throws Exception {

@ -0,0 +1,20 @@
package com.ruoyi.common.json;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException;
/**
* @author zhangbaoyu
* @date Created in 2020/8/18 19:45
*/
public class LongJsonSerializer extends JsonSerializer<Long> {
@Override
public void serialize(Long aLong, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
if (aLong != null) {
jsonGenerator.writeNumber(aLong);
}
}
}

@ -0,0 +1,17 @@
package com.ruoyi.common.page;
import lombok.Data;
/**
*
* @author zhangbaoyu
* @date Created in 2020/10/24 09:25
*/
@Data
public class ReqDeptCondition {
private Long deptId;
private String userId;
}

@ -0,0 +1,18 @@
package com.ruoyi.common.page;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
*
* @author zhangbaoyu
* @date Created in 2020-01-15 21:41
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class ReqPageBase extends ReqDeptCondition{
private long pageNum = 1;
private long pageSize = 10;
}

@ -0,0 +1,50 @@
package com.ruoyi.common.page;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ruoyi.common.json.LongJsonSerializer;
import java.util.Collections;
import java.util.List;
/**
* @author zhangbaoyu
* @date Created in 2020-01-15 21:52
*/
public class RespPage<T> extends Page<T> {
private List<T> rows = Collections.emptyList();
@JsonSerialize(using = LongJsonSerializer.class)
private long total;
public RespPage(long current, long size) {
super(current, size);
}
@Override
public Page<T> setRecords(List<T> records) {
this.rows=records;
return this;
}
@Override
public Page<T> setTotal(long total) {
this.total=total;
return this;
}
public List<T> getRows() {
return rows;
}
public void setRows(List<T> rows) {
this.rows = rows;
}
@Override
public long getTotal() {
return total;
}
}

@ -10,7 +10,6 @@ import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.exception.user.CaptchaException; import com.ruoyi.common.exception.user.CaptchaException;
import com.ruoyi.common.exception.user.CaptchaExpireException; import com.ruoyi.common.exception.user.CaptchaExpireException;
import com.ruoyi.common.exception.user.UserException;
import com.ruoyi.common.exception.user.UserPasswordNotMatchException; import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.MessageUtils; import com.ruoyi.common.utils.MessageUtils;
@ -31,10 +30,8 @@ import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* *
@ -164,39 +161,7 @@ public class SysLoginService {
userService.updateUserProfile(user); userService.updateUserProfile(user);
} }
public SysUser phoneLogin(String phone, String code, String uuid) {
// 校验数据
// if (!phoneCodeService.validCode(uuid, phone, code)) {
// throw new GlobalException("校验失败");
// }
SysUser user = userService.selectUserByUserName(phone);
// TODO 内测版,只要电话号码对的上就行
if (user == null) {
throw new UserException("user.password.not.match", null);
}
SysRole vipRole = sysRoleService.selectRoleByKey("vip");
// 如果用户不存在,则创建用户,赋予权限
if (user == null) {
user = new SysUser();
user.setUserName(phone);
user.setNickName("love_" + RandomUtil.randomNumbers(6));
user.setPhonenumber(phone);
user.setPassword(SecurityUtils.encryptPassword(RandomUtil.randomString(32)));
boolean regFlag = userService.registerUser(user);
// 增加用户的权限,绑定角色
sysRoleService.insertAuthUsers(vipRole.getRoleId(), new Long[]{user.getUserId()});
} else {
// 查询用户是否具有会员角色,如果没有绑定
List<Integer> roles = sysRoleService.selectRoleListByUserId(user.getUserId());
Integer roleId = vipRole.getRoleId().intValue();
if (!roles.contains(roleId)) {
sysRoleService.insertAuthUsers(vipRole.getRoleId(), new Long[]{user.getUserId()});
}
}
AsyncManager.me().execute(AsyncFactory.recordLogininfor(phone, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")));
recordLoginInfo(user);
return user;
}
public SysUser initVipUser(ExtraUserBody body) { public SysUser initVipUser(ExtraUserBody body) {
Date now = new Date(); Date now = new Date();

@ -39,7 +39,7 @@ public class UserDetailsServiceImpl implements UserDetailsService
log.info("登录用户:{} 不存在.", username); log.info("登录用户:{} 不存在.", username);
throw new ServiceException("登录用户:" + username + " 不存在"); throw new ServiceException("登录用户:" + username + " 不存在");
} }
else if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) else if (UserStatus.DELETED.getCode().equals(user.getDeleteFlag()))
{ {
log.info("登录用户:{} 已被删除.", username); log.info("登录用户:{} 已被删除.", username);
throw new ServiceException("对不起,您的账号:" + username + " 已被删除"); throw new ServiceException("对不起,您的账号:" + username + " 已被删除");

@ -0,0 +1,84 @@
package com.ruoyi.mall.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseAudit;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* oms_aftersale
*
* @author zcc
*/
@Data
@TableName("oms_aftersale")
public class Aftersale extends BaseAudit {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private Long id;
@Excel(name = "MEMBER_ID")
private Long memberId;
@Excel(name = "订单id")
private Long orderId;
@Excel(name = "退款金额")
private BigDecimal returnAmount;
@Excel(name = "售后类型1退款2退货退款")
private Integer type;
@Excel(name = "申请状态0->待处理1->退货中2->已完成3->已拒绝")
private Integer status;
@Excel(name = "处理时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime handleTime;
@Excel(name = "退货数量")
private Integer quantity;
@Excel(name = "原因")
private String reason;
@Excel(name = "描述")
private String description;
@Excel(name = "凭证图片,以逗号隔开")
private String proofPics;
@Excel(name = "处理备注")
private String handleNote;
@Excel(name = "处理人员")
private String handleMan;
@Excel(name = "退款快递公司")
private String refundWpCode;
@Excel(name = "退货快递号")
private String refundWaybillCode;
}

@ -0,0 +1,39 @@
package com.ruoyi.mall.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseAudit;
import lombok.Data;
/**
* mall_brand
*
* @author
*/
@Data
@TableName("mall_brand")
public class Brand extends BaseAudit {
private static final long serialVersionUID = 1L;
private Long id;
@Excel(name = "NAME")
private String name;
@Excel(name = "SORT")
private Integer sort;
@Excel(name = "SHOW_STATUS")
private Integer showStatus;
@Excel(name = "品牌logo")
private String logo;
private Long storeId;
}

@ -0,0 +1,143 @@
package com.ruoyi.mall.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseAudit;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* oms_order
*
*/
@Data
@TableName("oms_order")
public class Order extends BaseAudit {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.ASSIGN_ID)
private Long id;
private Long payId;
@Excel(name = "订单编号")
private String orderSn;
@Excel(name = "MEMBER_ID")
private Long memberId;
@Excel(name = "用户帐号")
private String memberUsername;
@Excel(name = "订单总金额")
private BigDecimal totalAmount;
@Excel(name = "采购价")
private BigDecimal purchasePrice;
@Excel(name = "应付金额", readConverterExp = "实际支付金额")
private BigDecimal payAmount;
@Excel(name = "运费金额")
private BigDecimal freightAmount;
@Excel(name = "支付方式0->未支付1->支付宝2->微信")
private Integer payType;
@Excel(name = "订单状态0->待付款1->待发货2->已发货3->已完成4->已关闭5->无效订单")
private Integer status;
@Excel(name = "退款状态枚举值1无售后或售后关闭2售后处理中3退款中4 退款成功")
private Integer aftersaleStatus;
@Excel(name = "物流公司(配送方式)")
private String deliveryCompany;
@Excel(name = "物流单号")
private String deliverySn;
@Excel(name = "自动确认时间", readConverterExp = "天=")
private Integer autoConfirmDay;
@Excel(name = "收货人姓名")
private String receiverName;
@Excel(name = "收货人电话")
private String receiverPhone;
@Excel(name = "加密的手机号")
private String receiverPhoneEncrypted;
@Excel(name = "收货人邮编")
private String receiverPostCode;
@Excel(name = "省份/直辖市")
private String receiverProvince;
@Excel(name = "城市")
private String receiverCity;
@Excel(name = "区")
private String receiverDistrict;
@Excel(name = "省份/直辖市id")
private Long receiverProvinceId;
@Excel(name = "城市id")
private Long receiverCityId;
@Excel(name = "区id")
private Long receiverDistrictId;
@Excel(name = "详细地址")
private String receiverDetailAddress;
@Excel(name = "订单备注")
private String note;
@Excel(name = "商家备注")
private String merchantNote;
@Excel(name = "确认收货状态0->未确认1->已确认")
private Integer confirmStatus;
@Excel(name = "删除状态0->未删除1->已删除")
private Integer deleteStatus;
@Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime paymentTime;
@Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime deliveryTime;
@Excel(name = "确认收货时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime receiveTime;
private Long memberCouponId;
private BigDecimal couponAmount;
}

@ -0,0 +1,101 @@
package com.ruoyi.mall.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseAudit;
import lombok.Data;
import java.math.BigDecimal;
/**
* mall_product
*
* @author zcc
*/
@Data
@TableName("mall_product")
public class Product extends BaseAudit {
private static final long serialVersionUID = 1L;
private Long id;
@Excel(name = "BRAND_ID")
private Long brandId;
@Excel(name = "CATEGORY_ID")
private Long categoryId;
@Excel(name = "商品编码")
private String outProductId;
@Excel(name = "NAME")
private String name;
@Excel(name = "主图")
private String pic;
@Excel(name = "画册图片连产品图片限制为5张以逗号分割")
private String albumPics;
@Excel(name = "上架状态0->下架1->上架")
private Integer publishStatus;
@Excel(name = "排序")
private Integer sort;
@Excel(name = "PRICE")
private BigDecimal price;
@Excel(name = "单位")
private String unit;
@Excel(name = "商品重量,默认为克")
private BigDecimal weight;
@Excel(name = "商品销售属性json格式")
//"[{\"name\":\"颜色\",\"options\":[{\"name\":\"粉\"},{\"name\":\"绿色\"},{\"name\":null}]},{\"name\":\"尺寸\",\"options\":[{\"name\":\"大\"},{\"name\":\"小\"},{\"name\":null}]}]"
private String productAttr;
@Excel(name = "产品详情网页内容")
private String detailHtml;
@Excel(name = "移动端网页详情")
private String detailMobileHtml;
@Excel(name = "品牌名称")
private String brandName;
@Excel(name = "商品分类名称")
private String productCategoryName;
// 0->商品1->课程
private Integer isCourse;
private Long courseId;
/**
* id
*/
private Long customerService;
/**
* id
*/
private Long instructor;
private Long storeId;
}

@ -0,0 +1,47 @@
package com.ruoyi.mall.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseAudit;
import lombok.Data;
/**
* mall_product_category
*
* @author zcc
*/
@Data
@TableName("mall_product_category")
public class ProductCategory extends BaseAudit {
private static final long serialVersionUID = 1L;
private Long id;
@Excel(name = "上级分类的编号0表示一级分类")
private Long parentId;
@Excel(name = "NAME")
private String typeName;
@Excel(name = "分类级别0->1级1->2级")
private Integer level;
@Excel(name = "显示状态0->不显示1->显示")
private Integer showStatus;
@Excel(name = "SORT")
private Integer sort;
@Excel(name = "图标")
private String icon;
private Long storeId;
}

@ -0,0 +1,47 @@
package com.ruoyi.mall.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseAudit;
import lombok.Data;
import java.math.BigDecimal;
/**
* sku mall_sku
*
* @author zcc
*/
@Data
@TableName("mall_sku")
public class Sku extends BaseAudit {
private static final long serialVersionUID = 1L;
private Long id;
@Excel(name = "PRODUCT_ID")
private Long productId;
@Excel(name = "sku编码")
private String outSkuId;
@Excel(name = "PRICE")
private BigDecimal price;
@Excel(name = "展示图片")
private String pic;
@Excel(name = "商品销售属性json格式")
//"{\"颜色\":\"粉\",\"尺寸\":\"大\"}"
private String spData;
@Excel(name = "库存数")
private Integer stock;
}

@ -0,0 +1,25 @@
package com.ruoyi.mall.domain.query;
import lombok.Data;
/**
*
*
* @author
*/
@Data
public class BrandQuery {
private String nameLike;
private Integer sort;
private Integer showStatus;
private String logo;
}

@ -0,0 +1,24 @@
package com.ruoyi.mall.domain.query;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
*
*
* @author zhangcheng
* @since 2023/05/15 13:53
*/
@Data
public class GoodsStatisticsQuery {
@NotNull(message = "统计类型 1商品规格排行 2商品排行")
private Integer statType;
@NotNull(message = "参数size不能为空")
private Integer size;
@NotBlank(message = "参数startDate不能为空")
private String startDate;
@NotBlank(message = "参数endDate不能为空")
private String endDate;
}

@ -0,0 +1,11 @@
package com.ruoyi.mall.domain.query;
import lombok.Data;
//订单统计查询条件对象
@Data
public class OrderStatisticsQuery {
//查询范围类型 1近一周 2近一个月
private Integer type;
}

@ -0,0 +1,31 @@
package com.ruoyi.mall.domain.query;
import lombok.Data;
/**
*
*
* @author
*/
@Data
public class ProductCategoryQuery {
//"上级分类的编号0表示一级分类 精确匹配")
private Long parentId;
//"NAME 精确匹配")
private String nameLike;
//"分类级别0->1级1->2级 精确匹配")
private Integer level;
//"显示状态0->不显示1->显示 精确匹配")
private Integer showStatus;
//"SORT 精确匹配")
private Integer sort;
//"图标 精确匹配")
private String icon;
}

@ -0,0 +1,83 @@
package com.ruoyi.mall.domain.query;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
*
*
* @author
*/
//商品信息 查询 对象")
@Data
public class ProductQuery {
//"BRAND_ID 精确匹配")
private Long brandId;
//"CATEGORY_ID 精确匹配")
private Long categoryId;
//"商品编码 精确匹配")
private String outProductId;
//"NAME 精确匹配")
private String nameLike;
//"主图 精确匹配")
private String pic;
//"画册图片连产品图片限制为5张以逗号分割 精确匹配")
private String albumPics;
//"上架状态0->下架1->上架 精确匹配")
private Integer publishStatus;
//"排序 精确匹配")
private Integer sort;
//"PRICE 精确匹配")
private BigDecimal price;
//"单位 精确匹配")
private String unit;
//name = "商品销售属性json格式")
private String productAttr;
//"商品重量,默认为克 精确匹配")
private BigDecimal weight;
//"产品详情网页内容 精确匹配")
private String detailHtml;
//"移动端网页详情 精确匹配")
private String detailMobileHtml;
//"品牌名称 精确匹配")
private String brandNameLike;
//"商品分类名称 精确匹配")
private String productCategoryNameLike;
//"排序字段")
private String orderField = "sort";
//"排序规则")
private String orderSort = "desc";
//"搜索关键字")
private String search;
// 0->商品1->课程
private Integer isCourse;
//排查的id
private List<Long> excludeProductIds;
private List<Long> ids;
private List<Long> brandIds;
private List<Long> CategoryIds;
}

@ -0,0 +1,30 @@
package com.ruoyi.mall.domain.query;
import lombok.Data;
import java.math.BigDecimal;
/**
* sku
*
* @author
*/
//sku信息 查询 对象")
@Data
public class SkuQuery {
//"PRODUCT_ID 精确匹配")
private Long productId;
//"sku编码 精确匹配")
private String outSkuId;
//"PRICE 精确匹配")
private BigDecimal price;
//"展示图片 精确匹配")
private String pic;
//"商品销售属性json格式 精确匹配")
private String spData;
}

@ -0,0 +1,27 @@
package com.ruoyi.mall.domain.vo;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseAudit;
import lombok.Data;
/**
*
*
* @author zcc
*/
@Data
public class BrandVO extends BaseAudit {
/** ID */
private Long id;
/** NAME */
@Excel(name = "NAME")
private String name;
/** SORT */
@Excel(name = "SORT")
private Integer sort;
/** SHOW_STATUS */
@Excel(name = "SHOW_STATUS")
private Integer showStatus;
/** 品牌logo */
@Excel(name = "品牌logo")
private String logo;
}

@ -0,0 +1,21 @@
package com.ruoyi.mall.domain.vo;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class OrderAndAftersaleStatisticsVO {
/** 待处理售后 */
private Integer pendingAftersaleCount;
/** 处理中售后 */
private Integer processingAftersaleCount;
/** 待发货 */
private Integer waitDeliveredCount;
/** 已发货 */
private Integer todayHasDeliveredCount;
/** 订单数 */
private Integer todayOrderCount;
/** 成交额 */
private BigDecimal todayTransactionAmount;
}

@ -0,0 +1,16 @@
package com.ruoyi.mall.domain.vo;
import lombok.Data;
@Data
public class OrderStatisticsVO {
private String date;
//订单笔数
private Double orderCount;
//订单金额
private Double orderAmount;
private Double numPaidOrders;
private Double numPendingOrders;
private Double numRefundOrders;
}

@ -0,0 +1,30 @@
package com.ruoyi.mall.domain.vo;
import com.ruoyi.common.core.domain.BaseAudit;
import lombok.Data;
import java.util.List;
/**
*
*
* @author zcc
*/
@Data
public class ProductCategoryVO extends BaseAudit {
/** ID */
private Long id;
/** 上级分类的编号0表示一级分类 */
private Long parentId;
/** NAME */
private String typeName;
/** 分类级别0->1级1->2级 */
private Integer level;
/** 显示状态0->不显示1->显示 */
private Integer showStatus;
/** SORT */
private Integer sort;
/** 图标 */
private String icon;
private List<ProductCategoryVO> children;
}

@ -0,0 +1,15 @@
package com.ruoyi.mall.domain.vo;
import com.ruoyi.mall.domain.Brand;
import com.ruoyi.mall.domain.Product;
import com.ruoyi.mall.domain.Sku;
import lombok.Data;
import java.util.List;
@Data
public class ProductDetailVO {
private Product product;
private List<Sku> skus;
private Brand brand;
}

@ -0,0 +1,12 @@
package com.ruoyi.mall.domain.vo;
import lombok.Data;
@Data
public class ProductTopVO {
private String productName;
private int totalSales;
private String pic;
private String spData;
}

@ -0,0 +1,67 @@
package com.ruoyi.mall.domain.vo;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseAudit;
import com.ruoyi.mall.domain.Sku;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
*
*
* @author zcc
*/
@Data
public class ProductVO extends BaseAudit {
/** ID */
private Long id;
/** BRAND_ID */
@Excel(name = "BRAND_ID")
private Long brandId;
/** CATEGORY_ID */
@Excel(name = "CATEGORY_ID")
private Long categoryId;
/** 商品编码 */
@Excel(name = "商品编码")
private String outProductId;
/** NAME */
@Excel(name = "NAME")
private String name;
/** 主图 */
@Excel(name = "主图")
private String pic;
/** 画册图片连产品图片限制为5张以逗号分割 */
@Excel(name = "画册图片连产品图片限制为5张以逗号分割")
private String albumPics;
/** 上架状态0->下架1->上架 */
@Excel(name = "上架状态0->下架1->上架")
private Integer publishStatus;
/** 排序 */
@Excel(name = "排序")
private Integer sort;
/** PRICE */
@Excel(name = "PRICE")
private BigDecimal price;
/** 单位 */
@Excel(name = "单位")
private String unit;
/** 商品重量,默认为克 */
@Excel(name = "商品重量,默认为克")
private BigDecimal weight;
/** 产品详情网页内容 */
@Excel(name = "产品详情网页内容")
private String detailHtml;
/** 移动端网页详情 */
@Excel(name = "移动端网页详情")
private String detailMobileHtml;
/** 品牌名称 */
@Excel(name = "品牌名称")
private String brandName;
/** 商品分类名称 */
@Excel(name = "商品分类名称")
private String productCategoryName;
@Excel(name = "商品销售属性json格式")
private String productAttr;
private List<Sku> skuList;
}

@ -0,0 +1,34 @@
package com.ruoyi.mall.domain.vo;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseAudit;
import lombok.Data;
import java.math.BigDecimal;
/**
* sku
*
* @author zcc
*/
@Data
public class SkuVO extends BaseAudit {
/** ID */
private Long id;
/** PRODUCT_ID */
@Excel(name = "PRODUCT_ID")
private Long productId;
/** sku编码 */
@Excel(name = "sku编码")
private String outSkuId;
/** PRICE */
@Excel(name = "PRICE")
private BigDecimal price;
/** 展示图片 */
@Excel(name = "展示图片")
private String pic;
/** 商品销售属性json格式 */
@Excel(name = "商品销售属性json格式")
private String spData;
@Excel(name = "库存数")
private Integer stock;
}

@ -0,0 +1,11 @@
package com.ruoyi.mall.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.mall.domain.Aftersale;
import com.ruoyi.mall.domain.vo.OrderAndAftersaleStatisticsVO;
public interface AftersaleMapper extends BaseMapper<Aftersale> {
OrderAndAftersaleStatisticsVO statPendingAndProcessing();
}

@ -0,0 +1,21 @@
package com.ruoyi.mall.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.mall.domain.Brand;
import java.util.List;
/**
* Mapper
*
* @author zcc
*/
public interface BrandMapper extends BaseMapper<Brand> {
/**
*
*
* @param brand
* @return
*/
List<Brand> selectByEntity(Brand brand);
}

@ -0,0 +1,18 @@
package com.ruoyi.mall.mapper;
import com.ruoyi.mall.domain.query.GoodsStatisticsQuery;
import com.ruoyi.mall.domain.query.OrderStatisticsQuery;
import com.ruoyi.mall.domain.vo.OrderStatisticsVO;
import com.ruoyi.mall.domain.vo.ProductTopVO;
import java.util.List;
public interface IndexStatisticsMapper {
List<ProductTopVO> goodsSkuStatistics(GoodsStatisticsQuery goodsStatisticsQuery);
List<ProductTopVO> goodsStatistics(GoodsStatisticsQuery goodsStatisticsQuery);
List<OrderStatisticsVO> orderStatistics(OrderStatisticsQuery param);
}

@ -0,0 +1,16 @@
package com.ruoyi.mall.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.mall.domain.Order;
import com.ruoyi.mall.domain.vo.OrderAndAftersaleStatisticsVO;
import org.apache.ibatis.annotations.Param;
import java.time.LocalDateTime;
public interface OrderMapper extends BaseMapper<Order> {
Integer statWaitDelivered();
OrderAndAftersaleStatisticsVO statTodayData(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);
}

@ -0,0 +1,21 @@
package com.ruoyi.mall.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.mall.domain.ProductCategory;
import java.util.List;
/**
* Mapper
*
* @author zcc
*/
public interface ProductCategoryMapper extends BaseMapper<ProductCategory> {
/**
*
*
* @param productCategory
* @return
*/
List<ProductCategory> selectByEntity(ProductCategory productCategory);
}

@ -0,0 +1,21 @@
package com.ruoyi.mall.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.mall.domain.Product;
import java.util.List;
/**
* Mapper
*
* @author zcc
*/
public interface ProductMapper extends BaseMapper<Product> {
/**
*
*
* @param product
* @return
*/
List<Product> selectByEntity(Product product);
}

@ -0,0 +1,25 @@
package com.ruoyi.mall.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.mall.domain.Sku;
import org.apache.ibatis.annotations.Param;
import java.time.LocalDateTime;
import java.util.List;
/**
* skuMapper
*
* @author zcc
*/
public interface SkuMapper extends BaseMapper<Sku> {
/**
* sku
*
* @param sku sku
* @return sku
*/
List<Sku> selectByEntity(Sku sku);
int updateStockById(@Param("skuId")Long skuId, @Param("optDate")LocalDateTime optDate, @Param("quantity")Integer quantity);
}

@ -0,0 +1,103 @@
package com.ruoyi.mall.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.mall.domain.Brand;
import com.ruoyi.mall.domain.query.BrandQuery;
import com.ruoyi.mall.mapper.BrandMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.List;
/**
* Service
*
*
* @author zcc
*/
@Service
public class BrandService {
@Autowired
private BrandMapper brandMapper;
/**
*
*
* @param id
* @return
*/
public Brand selectById(Long id) {
return brandMapper.selectById(id);
}
/**
*
*
* @param query
* @param page
* @return
*/
public List<Brand> selectList(BrandQuery query, Pageable page) {
if (page != null) {
PageHelper.startPage(page.getPageNumber() + 1, page.getPageSize());
}
QueryWrapper<Brand> qw = new QueryWrapper<>();
String nameLike = query.getNameLike();
if (!StringUtils.isEmpty(nameLike)) {
qw.like("name", nameLike);
}
Integer sort = query.getSort();
if (sort != null) {
qw.eq("sort", sort);
}
Integer showStatus = query.getShowStatus();
if (showStatus != null) {
qw.eq("show_status", showStatus);
}
String logo = query.getLogo();
if (!StringUtils.isEmpty(logo)) {
qw.eq("logo", logo);
}
qw.eq("store_id", SecurityUtils.getDeptId());
qw.orderByAsc("sort");
return brandMapper.selectList(qw);
}
/**
*
*
* @param brand
* @return
*/
public int insert(Brand brand) {
brand.setCreateTime(LocalDateTime.now());
brand.setStoreId(SecurityUtils.getDeptId());
return brandMapper.insert(brand);
}
/**
*
*
* @param brand
* @return
*/
public int update(Brand brand) {
return brandMapper.updateById(brand);
}
/**
*
*
* @param id
* @return
*/
public int deleteById(Long id) {
return brandMapper.deleteById(id);
}
}

@ -0,0 +1,59 @@
package com.ruoyi.mall.service;
import com.ruoyi.mall.domain.query.GoodsStatisticsQuery;
import com.ruoyi.mall.domain.query.OrderStatisticsQuery;
import com.ruoyi.mall.domain.vo.OrderAndAftersaleStatisticsVO;
import com.ruoyi.mall.domain.vo.OrderStatisticsVO;
import com.ruoyi.mall.domain.vo.ProductTopVO;
import com.ruoyi.mall.mapper.AftersaleMapper;
import com.ruoyi.mall.mapper.IndexStatisticsMapper;
import com.ruoyi.mall.mapper.OrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.List;
/**
* ,Service
*/
@Service
public class IndexStatisticsService {
@Autowired
private AftersaleMapper aftersaleMapper;
@Autowired
private OrderMapper orderMapper;
@Autowired
private IndexStatisticsMapper indexStatisticsMapper;
public List<ProductTopVO> goodsStatistics(GoodsStatisticsQuery goodsStatisticsQuery) {
if (goodsStatisticsQuery.getStatType() == 1){
return indexStatisticsMapper.goodsSkuStatistics(goodsStatisticsQuery);
}else {
return indexStatisticsMapper.goodsStatistics(goodsStatisticsQuery);
}
}
public OrderAndAftersaleStatisticsVO orderAndAftersaleStatistics() {
//统计售后
OrderAndAftersaleStatisticsVO vo = aftersaleMapper.statPendingAndProcessing();
//统计未发货数
vo.setWaitDeliveredCount(orderMapper.statWaitDelivered());
//统计今日订单数,成交金额,发货数
LocalDateTime startTime = LocalDateTime.of(LocalDate.now(), LocalTime.MIN);
LocalDateTime endTime = LocalDateTime.of(LocalDate.now(), LocalTime.MAX);
OrderAndAftersaleStatisticsVO todayData = orderMapper.statTodayData(startTime, endTime);
vo.setTodayOrderCount(todayData.getTodayOrderCount());
vo.setTodayHasDeliveredCount(todayData.getTodayHasDeliveredCount());
vo.setTodayTransactionAmount(todayData.getTodayTransactionAmount());
return vo;
}
public List<OrderStatisticsVO> orderStatistics(OrderStatisticsQuery param) {
return indexStatisticsMapper.orderStatistics(param);
}
}

@ -0,0 +1,154 @@
package com.ruoyi.mall.service;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.mall.domain.ProductCategory;
import com.ruoyi.mall.domain.query.ProductCategoryQuery;
import com.ruoyi.mall.domain.vo.ProductCategoryVO;
import com.ruoyi.mall.mapper.ProductCategoryMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
/**
* Service
*
* @author zcc
*/
@Service
public class ProductCategoryService {
@Autowired
private ProductCategoryMapper productCategoryMapper;
/**
*
*
* @param id
* @return
*/
public ProductCategory selectById(Long id) {
return productCategoryMapper.selectById(id);
}
/**
*
*
* @param query
* @param page
* @return
*/
public List<ProductCategoryVO> selectList(ProductCategoryQuery query, Pageable page) {
if (page != null) {
PageHelper.startPage(page.getPageNumber() + 1, page.getPageSize());
}
QueryWrapper<ProductCategory> qw = new QueryWrapper<>();
Long parentId = query.getParentId();
if (parentId != null) {
qw.eq("parent_id", parentId);
}
String nameLike = query.getNameLike();
if (!StringUtils.isEmpty(nameLike)) {
qw.like("type_name", nameLike);
}
Integer level = query.getLevel();
if (level != null) {
qw.eq("level", level);
}
Integer showStatus = query.getShowStatus();
if (showStatus != null) {
qw.eq("show_status", showStatus);
}
Integer sort = query.getSort();
if (sort != null) {
qw.eq("sort", sort);
}
String icon = query.getIcon();
if (!StringUtils.isEmpty(icon)) {
qw.eq("icon", icon);
}
qw.eq("store_id", SecurityUtils.getDeptId());
qw.orderByAsc("sort");
List<ProductCategory> productCategories = productCategoryMapper.selectList(qw);
List<ProductCategoryVO> productCategoryVOS = BeanUtil.copyToList(productCategories,ProductCategoryVO.class);
return formatTree(productCategoryVOS);
}
private List<ProductCategoryVO> formatTree(List<ProductCategoryVO> nodes) {
List<ProductCategoryVO> tree = new ArrayList<>();
List<ProductCategoryVO> children = new ArrayList<>();
// 1先获取到所有根节点
for (ProductCategoryVO node : nodes) {
if (node.getParentId() == null || node.getParentId() == 0) {
tree.add(node);
} else {
children.add(node);
}
}
// 2把所有除根结点外的节点作为子节点然后遍历每一个根节点
for (ProductCategoryVO node : tree) {
// 3递归构建此根的子节点
recur(node, children);
}
return tree;
}
private void recur(ProductCategoryVO rootNode, List<ProductCategoryVO> children) {
// 1遍历剩余子节点找出当前根的子节点
for (ProductCategoryVO node : children) {
// 2如果子节点的父id等于根节点的id那么就将这个节点加到根节点的children列表中
if (rootNode.getId() == node.getParentId()) {
if (rootNode.getChildren() == null) {
rootNode.setChildren(new ArrayList<>());
}
rootNode.getChildren().add(node);
// 3以当前节点作为根节点进行递归检查是否还有子节点。
recur(node, children);
}
}
}
/**
*
*
* @param productCategory
* @return
*/
public int insert(ProductCategory productCategory) {
productCategory.setCreateTime(LocalDateTime.now());
productCategory.setStoreId(SecurityUtils.getDeptId());
return productCategoryMapper.insert(productCategory);
}
/**
*
*
* @param productCategory
* @return
*/
public int update(ProductCategory productCategory) {
return productCategoryMapper.updateById(productCategory);
}
/**
*
*
* @param id
* @return
*/
public int deleteById(Long id) {
return productCategoryMapper.deleteById(id);
}
}

@ -0,0 +1,268 @@
package com.ruoyi.mall.service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.mall.domain.Brand;
import com.ruoyi.mall.domain.Product;
import com.ruoyi.mall.domain.ProductCategory;
import com.ruoyi.mall.domain.Sku;
import com.ruoyi.mall.domain.query.ProductQuery;
import com.ruoyi.mall.domain.vo.ProductDetailVO;
import com.ruoyi.mall.domain.vo.ProductVO;
import com.ruoyi.mall.mapper.BrandMapper;
import com.ruoyi.mall.mapper.ProductCategoryMapper;
import com.ruoyi.mall.mapper.ProductMapper;
import com.ruoyi.mall.mapper.SkuMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* Service
*
*
* @author zcc
*/
@Service
@Slf4j
public class ProductService {
@Autowired
private ProductMapper productMapper;
@Autowired
private ProductCategoryMapper productCategoryMapper;
@Autowired
private SkuMapper skuMapper;
@Autowired
private BrandMapper brandMapper;
/**
*
*
* @param id
* @return
*/
public ProductVO selectById(Long id) {
Product product = productMapper.selectById(id);
ProductVO productVO = BeanUtil.toBean(product,ProductVO.class);
QueryWrapper<Sku> qw = new QueryWrapper<>();
qw.eq("product_id", product.getId());
List<Sku> skus = skuMapper.selectList(qw);
productVO.setSkuList(skus);
return productVO;
}
/**
*
*
* @param query
* @param page
* @return
*/
public List<Product> selectList(ProductQuery query, Pageable page) {
if (page != null) {
PageHelper.startPage(page.getPageNumber() + 1, page.getPageSize());
}
QueryWrapper<Product> qw = new QueryWrapper<>();
if (StringUtils.isNoneEmpty(query.getOrderField())){
if (StringUtils.isNotEmpty(query.getOrderSort()) && "desc".equalsIgnoreCase(query.getOrderSort())) {
qw.orderByDesc(query.getOrderField());
} else {
qw.orderByAsc(query.getOrderField());
}
}else {
qw.orderByDesc("publish_status");
qw.orderByAsc("sort");
}
Long categoryId = query.getCategoryId();
if (categoryId != null) {
qw.eq("category_id", categoryId);
}
Integer publishStatus = query.getPublishStatus();
if (publishStatus != null) {
qw.eq("publish_status", publishStatus);
}
String search = query.getSearch();
if (StringUtils.isNoneEmpty(search)){
qw.like("name", "%".concat(query.getSearch().trim()).concat("%"));
}
if (CollectionUtil.isNotEmpty(query.getExcludeProductIds())) {
qw.notIn("id",query.getExcludeProductIds());
}
if (CollectionUtil.isNotEmpty(query.getIds())) {
qw.in("id",query.getIds());
}
String nameLike = query.getNameLike();
if (StringUtils.isNoneEmpty(nameLike)){
qw.like("name", "%".concat(nameLike).concat("%"));
}
if (ObjectUtil.isNotEmpty(query.getIsCourse())){
qw.eq("is_Course", query.getIsCourse());
}
if (ObjectUtil.isNotEmpty(query.getOutProductId())){
qw.eq("out_product_id", query.getOutProductId());
}
if (StringUtils.isNotEmpty(query.getBrandNameLike())){
qw.like("brand_name", "%".concat(query.getBrandNameLike()).concat("%"));
}
if (StringUtils.isNotEmpty(query.getProductCategoryNameLike())){
qw.like("product_category_name", "%".concat(query.getProductCategoryNameLike()).concat("%"));
}
qw.eq("store_id",SecurityUtils.getDeptId());
return productMapper.selectList(qw);
}
public void getIds(ProductQuery query){
if (ObjectUtil.isNotEmpty(query.getBrandNameLike())){
List<Brand> brands= brandMapper.selectList(new QueryWrapper<Brand>()
.eq("store_id",SecurityUtils.getDeptId())
.like("name","%".concat(query.getBrandNameLike()).concat("%")));
if (brands.size()>0){
List<Long> brandsIds = brands.stream()
.map(it -> it.getId()).collect(Collectors.toList());
query.setBrandIds(brandsIds);
}
}
if (ObjectUtil.isNotEmpty(query.getProductCategoryNameLike())){
List<ProductCategory> categories= productCategoryMapper.selectList(new QueryWrapper<ProductCategory>()
.eq("store_id",SecurityUtils.getDeptId())
.like("type_name","%".concat(query.getProductCategoryNameLike()).concat("%")));
if (categories.size()>0){
List<Long> ids = categories.stream()
.map(it -> it.getId()).collect(Collectors.toList());
query.setCategoryIds(ids);
}
}
}
/**
*
*
* @param productVO
* @return
*/
@Transactional
public int insert(ProductVO productVO) {
Product product = BeanUtil.toBean(productVO,Product.class);
product.setCreateTime(LocalDateTime.now());
List<Sku> skuList = productVO.getSkuList();
productMapper.insert(product);
if(skuList!=null){
skuList.forEach(sku -> {
sku.setProductId(product.getId());
sku.setCreateTime(LocalDateTime.now());
skuMapper.insert(sku);
});
}
return 1;
}
/**
*
*
* @param productVO
* @return
*/
@Transactional
public int update(ProductVO productVO) {
Product dbProduct = productMapper.selectById(productVO.getId());
List<Long> idList = productVO.getSkuList().stream().filter(it -> it.getId() != null).map(it -> it.getId()).collect(Collectors.toList());
if (dbProduct == null) {
return 0;
}
Long userId = SecurityUtils.getUserId();
Product product = BeanUtil.toBean(productVO,Product.class);
List<Sku> skuList = productVO.getSkuList();
product.setUpdateBy(userId);
product.setUpdateTime(LocalDateTime.now());
productMapper.updateById(product);
//查找库中所有的sku
Map<String,Object> map = new HashMap<>();
map.put("product_id", product.getId());
Map<Long, Sku> skuMap = skuMapper.selectByMap(map).stream().collect(Collectors.toMap(it -> it.getId(), it -> it));
//针对已有的进行编辑
List<Sku> updateList = productVO.getSkuList().stream().filter(it -> it.getId() != null).collect(Collectors.toList());
if (!CollectionUtil.isEmpty(updateList)) {
log.info("共有{}个sku需要修改{}productId{}",updateList.size(), JSONUtil.toJsonStr(updateList),productVO.getId());
updateList.forEach(it->{
Sku sku = skuMap.get(it.getId());
sku.setUpdateBy(SecurityUtils.getUserId());
sku.setUpdateTime(LocalDateTime.now());
sku.setPrice(it.getPrice());
sku.setSpData(it.getSpData());
sku.setPic(it.getPic());
sku.setOutSkuId(it.getOutSkuId());
sku.setStock(it.getStock());
skuMapper.updateById(sku);
});
}
//针对没有的进行新增
List<Sku> addList = productVO.getSkuList().stream().filter(it -> it.getId() == null).collect(Collectors.toList());
if (!CollectionUtil.isEmpty(addList)) {
log.info("共有{}个sku需要新增{}productId{}",addList.size(), JSONUtil.toJsonStr(addList),productVO.getId());
addList.forEach(sku -> {
sku.setProductId(product.getId());
sku.setCreateTime(LocalDateTime.now());
skuMapper.insert(sku);
});
}
//删除
List<Long> deleteIds = skuMap.keySet().stream().filter(it -> !idList.contains(it)).collect(Collectors.toList());
if (!CollectionUtil.isEmpty(deleteIds)) {
log.info("共有{}个sku需要删除{}productId{}",deleteIds.size(), JSONUtil.toJsonStr(deleteIds),productVO.getId());
skuMapper.deleteBatchIds(deleteIds);
}
return 1;
}
/**
*
*
* @param id
* @return
*/
public int deleteById(Long id) {
return productMapper.deleteById(id);
}
public ProductDetailVO queryDetail(Long id) {
ProductDetailVO res = new ProductDetailVO();
Product d = productMapper.selectById(id);
res.setProduct(d);
LambdaQueryWrapper<Sku> qw = new LambdaQueryWrapper<>();
qw.eq(Sku::getProductId, id);
res.setSkus(skuMapper.selectList(qw));
if (d.getBrandId() != null) {
res.setBrand(brandMapper.selectById(d.getBrandId()));
}
return res;
}
}

@ -1,12 +1,13 @@
package com.ruoyi.system.domain; package com.ruoyi.system.domain;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Excel.ColumnType; import com.ruoyi.common.annotation.Excel.ColumnType;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
/** /**
* sys_post * sys_post
@ -36,6 +37,15 @@ public class SysPost extends BaseEntity
/** 状态0正常 1停用 */ /** 状态0正常 1停用 */
@Excel(name = "状态", readConverterExp = "0=正常,1=停用") @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private String status; private String status;
private String tenantId;
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
/** 用户是否存在此岗位标识 默认不存在 */ /** 用户是否存在此岗位标识 默认不存在 */
private boolean flag = false; private boolean flag = false;

@ -16,6 +16,16 @@ public class SysRoleMenu
/** 菜单ID */ /** 菜单ID */
private Long menuId; private Long menuId;
private String tenantId;
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
public Long getRoleId() public Long getRoleId()
{ {
return roleId; return roleId;

@ -0,0 +1,141 @@
package com.ruoyi.system.domain;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author xn
* @since 2022-09-28
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_tenant")
public class SysTenant implements Serializable {
private static final long serialVersionUID=1L;
@TableId(value = "tenant_id",type = IdType.ASSIGN_ID)
private String tenantId;
/**
*
*/
@TableField("tenant_name")
private String tenantName;
/**
*
*/
@TableField("super_tenant")
private Boolean superTenant;
/**
*
*/
@TableField("contact_name")
private String contactName;
/**
*
*/
@TableField("contact_phone")
private String contactPhone;
/**
*
*/
@TableField("contact_address")
private String contactAddress;
/**
*
*/
@TableField("begin_time")
private Date beginTime;
/**
*
*/
@TableField("end_time")
private Date endTime;
/**
*
*/
@TableField("memo")
private String memo;
/**
* 1 0
*/
@TableField("in_use")
private String inUse;
/**
* 1 0
*/
@TableField("delete_flag")
@TableLogic
private String deleteFlag;
/**
*
*/
@TableField("create_user")
private Long createUser;
/**
*
*/
@TableField("create_time")
private Date createTime;
/**
*
*/
@TableField("last_update_user")
private Long lastUpdateUser;
/**
*
*/
@TableField("last_update_time")
private Date lastUpdateTime;
@TableField(exist = false)
private String[] useDateRange;
//当前租户
@TableField(exist = false)
private boolean nowTenant = false;
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
public Date getBeginTime() {
return beginTime;
}
@JsonFormat(pattern="yyyy-MM-dd")
public void setBeginTime(Date beginTime) {
this.beginTime = beginTime;
}
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
public Date getEndTime() {
return endTime;
}
@JsonFormat(pattern="yyyy-MM-dd")
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
}

@ -0,0 +1,58 @@
package com.ruoyi.system.domain.columns;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* sys_teacher
*
* @author ruoyi
* @date 2025-10-28
*/
@Data
public class SysTeacher extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 员工id */
private Long userId;
/** 老师名称 */
@Excel(name = "老师名称")
private String teacherName;
/** 头像 */
@Excel(name = "头像")
private String avatarImg;
/** 教练风采简介 */
@Excel(name = "教练风采简介")
private String intro;
/** 教练风采内容 */
@Excel(name = "教练风采内容")
private String context;
/** 教练风采相册 */
@Excel(name = "教练风采相册")
private String url;
/** 教练风采简短介绍 */
@Excel(name = "教练风采简短介绍")
private String introduce;
/** 教练风采状态0 不展示 1展示 */
@Excel(name = "教练风采状态0 不展示 1展示")
private Integer releases;
/** 排序 */
@Excel(name = "排序")
private Long sort;
private String tenantId;
}

@ -0,0 +1,157 @@
package com.ruoyi.system.domain.columns;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* yj_appreciate
*
* @author ruoyi
* @date 2025-10-29
*/
@Data
public class YjAppreciate extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private String id;
/** 标题 */
@Excel(name = "标题")
private String title;
/** 封面 */
@Excel(name = "封面")
private String image;
/** 阅读量 */
@Excel(name = "阅读量")
private Long readNum;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date startTime;
/** 内容(富文本) */
@Excel(name = "内容", readConverterExp = "富=文本")
private String content;
/** 是否展示 */
@Excel(name = "是否展示")
private Integer status;
/** 修改时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date modifyTime;
/** 门店/校区id */
@Excel(name = "门店/校区id")
private Long deptId;
private String tenantId;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setTitle(String title)
{
this.title = title;
}
public String getTitle()
{
return title;
}
public void setImage(String image)
{
this.image = image;
}
public String getImage()
{
return image;
}
public void setReadNum(Long readNum)
{
this.readNum = readNum;
}
public Long getReadNum()
{
return readNum;
}
public void setStartTime(Date startTime)
{
this.startTime = startTime;
}
public Date getStartTime()
{
return startTime;
}
public void setContent(String content)
{
this.content = content;
}
public String getContent()
{
return content;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public void setModifyTime(Date modifyTime)
{
this.modifyTime = modifyTime;
}
public Date getModifyTime()
{
return modifyTime;
}
public void setDeptId(Long deptId)
{
this.deptId = deptId;
}
public Long getDeptId()
{
return deptId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("title", getTitle())
.append("image", getImage())
.append("readNum", getReadNum())
.append("startTime", getStartTime())
.append("content", getContent())
.append("status", getStatus())
.append("modifyTime", getModifyTime())
.append("deptId", getDeptId())
.toString();
}
}

@ -0,0 +1,158 @@
package com.ruoyi.system.domain.columns;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* yj_healthy
*
* @author ruoyi
* @date 2025-10-29
*/
@Data
public class YjHealthy extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private String id;
/** 标题 */
@Excel(name = "标题")
private String title;
/** 封面 */
@Excel(name = "封面")
private String image;
/** 阅读量 */
@Excel(name = "阅读量")
private Long readNum;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date startTime;
/** 内容(富文本) */
@Excel(name = "内容", readConverterExp = "富=文本")
private String content;
/** 是否展示 */
@Excel(name = "是否展示")
private Integer status;
/** 修改时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date modifyTime;
/** 门店/校区id */
@Excel(name = "门店/校区id")
private Long deptId;
private String tenantId;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setTitle(String title)
{
this.title = title;
}
public String getTitle()
{
return title;
}
public void setImage(String image)
{
this.image = image;
}
public String getImage()
{
return image;
}
public void setReadNum(Long readNum)
{
this.readNum = readNum;
}
public Long getReadNum()
{
return readNum;
}
public void setStartTime(Date startTime)
{
this.startTime = startTime;
}
public Date getStartTime()
{
return startTime;
}
public void setContent(String content)
{
this.content = content;
}
public String getContent()
{
return content;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public void setModifyTime(Date modifyTime)
{
this.modifyTime = modifyTime;
}
public Date getModifyTime()
{
return modifyTime;
}
public void setDeptId(Long deptId)
{
this.deptId = deptId;
}
public Long getDeptId()
{
return deptId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("title", getTitle())
.append("image", getImage())
.append("readNum", getReadNum())
.append("startTime", getStartTime())
.append("content", getContent())
.append("status", getStatus())
.append("modifyTime", getModifyTime())
.append("deptId", getDeptId())
.toString();
}
}

@ -0,0 +1,161 @@
package com.ruoyi.system.domain.columns;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* yj_inherit
*
* @author ruoyi
* @date 2025-10-29
*/
@Data
public class YjInherit extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private String id;
/** 标题 */
@Excel(name = "标题")
private String title;
/** 封面 */
@Excel(name = "封面")
private String image;
/** 阅读量 */
@Excel(name = "阅读量")
private Long readNum;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date startTime;
/** 内容(富文本) */
@Excel(name = "内容", readConverterExp = "富=文本")
private String content;
/** 是否展示 */
@Excel(name = "是否展示")
private Integer status;
/** 修改时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date modifyTime;
/** 门店/校区id */
@Excel(name = "门店/校区id")
private Long deptId;
private String tenantId;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setTitle(String title)
{
this.title = title;
}
public String getTitle()
{
return title;
}
public void setImage(String image)
{
this.image = image;
}
public String getImage()
{
return image;
}
public void setReadNum(Long readNum)
{
this.readNum = readNum;
}
public Long getReadNum()
{
return readNum;
}
public void setStartTime(Date startTime)
{
this.startTime = startTime;
}
public Date getStartTime()
{
return startTime;
}
public void setContent(String content)
{
this.content = content;
}
public String getContent()
{
return content;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public void setModifyTime(Date modifyTime)
{
this.modifyTime = modifyTime;
}
public Date getModifyTime()
{
return modifyTime;
}
public void setDeptId(Long deptId)
{
this.deptId = deptId;
}
public Long getDeptId()
{
return deptId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("title", getTitle())
.append("image", getImage())
.append("readNum", getReadNum())
.append("startTime", getStartTime())
.append("content", getContent())
.append("status", getStatus())
.append("modifyTime", getModifyTime())
.append("deptId", getDeptId())
.toString();
}
}

@ -0,0 +1,156 @@
package com.ruoyi.system.domain.columns;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* yj_practice_moments
*
* @author ruoyi
* @date 2025-10-29
*/
@Data
public class YjPracticeMoments extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private String id;
/** 标题 */
@Excel(name = "标题")
private String title;
/** 封面 */
@Excel(name = "封面")
private String image;
/** 阅读量 */
@Excel(name = "阅读量")
private Long readNum;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date startTime;
/** 内容(富文本) */
@Excel(name = "内容", readConverterExp = "富=文本")
private String content;
/** 是否展示 */
@Excel(name = "是否展示")
private Integer status;
/** 修改时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date modifyTime;
/** 门店/校区id */
@Excel(name = "门店/校区id")
private Long deptId;
private String tenantId;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setTitle(String title)
{
this.title = title;
}
public String getTitle()
{
return title;
}
public void setImage(String image)
{
this.image = image;
}
public String getImage()
{
return image;
}
public void setReadNum(Long readNum)
{
this.readNum = readNum;
}
public Long getReadNum()
{
return readNum;
}
public void setStartTime(Date startTime)
{
this.startTime = startTime;
}
public Date getStartTime()
{
return startTime;
}
public void setContent(String content)
{
this.content = content;
}
public String getContent()
{
return content;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public void setModifyTime(Date modifyTime)
{
this.modifyTime = modifyTime;
}
public Date getModifyTime()
{
return modifyTime;
}
public void setDeptId(Long deptId)
{
this.deptId = deptId;
}
public Long getDeptId()
{
return deptId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("title", getTitle())
.append("image", getImage())
.append("readNum", getReadNum())
.append("startTime", getStartTime())
.append("content", getContent())
.append("status", getStatus())
.append("modifyTime", getModifyTime())
.append("deptId", getDeptId())
.toString();
}
}

@ -0,0 +1,158 @@
package com.ruoyi.system.domain.columns;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* yj_sense
*
* @author ruoyi
* @date 2025-10-29
*/
@Data
public class YjSense extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private String id;
/** 标题 */
@Excel(name = "标题")
private String title;
/** 封面 */
@Excel(name = "封面")
private String image;
/** 阅读量 */
@Excel(name = "阅读量")
private Long readNum;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date startTime;
/** 内容(富文本) */
@Excel(name = "内容", readConverterExp = "富=文本")
private String content;
/** 是否展示 */
@Excel(name = "是否展示")
private Integer status;
/** 修改时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date modifyTime;
/** 门店/校区id */
@Excel(name = "门店/校区id")
private Long deptId;
private String tenantId;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setTitle(String title)
{
this.title = title;
}
public String getTitle()
{
return title;
}
public void setImage(String image)
{
this.image = image;
}
public String getImage()
{
return image;
}
public void setReadNum(Long readNum)
{
this.readNum = readNum;
}
public Long getReadNum()
{
return readNum;
}
public void setStartTime(Date startTime)
{
this.startTime = startTime;
}
public Date getStartTime()
{
return startTime;
}
public void setContent(String content)
{
this.content = content;
}
public String getContent()
{
return content;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public void setModifyTime(Date modifyTime)
{
this.modifyTime = modifyTime;
}
public Date getModifyTime()
{
return modifyTime;
}
public void setDeptId(Long deptId)
{
this.deptId = deptId;
}
public Long getDeptId()
{
return deptId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("title", getTitle())
.append("image", getImage())
.append("readNum", getReadNum())
.append("startTime", getStartTime())
.append("content", getContent())
.append("status", getStatus())
.append("modifyTime", getModifyTime())
.append("deptId", getDeptId())
.toString();
}
}

@ -0,0 +1,127 @@
package com.ruoyi.system.domain.columns;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* yj_store
*
* @author ruoyi
* @date 2025-10-31
*/
@Data
public class YjStore extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String banner;
/** 门店名称 */
@Excel(name = "门店名称")
private String storeName;
/** 地址 */
@Excel(name = "地址")
private String address;
/** 门店电话 */
@Excel(name = "门店电话")
private String phone;
/** 创始人/店长简介(富文本) */
@Excel(name = "创始人/店长简介", readConverterExp = "富=文本")
private String founder;
/** 企业/门店简介(富文本) */
@Excel(name = "企业/门店简介", readConverterExp = "富=文本")
private String profile;
/** $column.columnComment */
private Long deptId;
private String tenantId;
private String deptName;
public void setBanner(String banner)
{
this.banner = banner;
}
public String getBanner()
{
return banner;
}
public void setStoreName(String storeName)
{
this.storeName = storeName;
}
public String getStoreName()
{
return storeName;
}
public void setAddress(String address)
{
this.address = address;
}
public String getAddress()
{
return address;
}
public void setPhone(String phone)
{
this.phone = phone;
}
public String getPhone()
{
return phone;
}
public void setFounder(String founder)
{
this.founder = founder;
}
public String getFounder()
{
return founder;
}
public void setProfile(String profile)
{
this.profile = profile;
}
public String getProfile()
{
return profile;
}
public void setDeptId(Long deptId)
{
this.deptId = deptId;
}
public Long getDeptId()
{
return deptId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("banner", getBanner())
.append("storeName", getStoreName())
.append("address", getAddress())
.append("phone", getPhone())
.append("founder", getFounder())
.append("profile", getProfile())
.append("deptId", getDeptId())
.toString();
}
}

@ -0,0 +1,36 @@
package com.ruoyi.system.domain.vo;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.domain.SysTenant;
import lombok.Data;
/**
* @author zhangbaoyu
* @date Created in 2020/10/25 12:27
*/
@Data
public class ReqBusinessAddTenant extends SysTenant {
private String emailAddress;
private String sex;
private String username;
private String password;
private String checkPass;
public SysUser transferToSysUser() {
SysUser sysUser = new SysUser();
sysUser.setUserName(this.getUsername());
sysUser.setPassword(this.getPassword());
sysUser.setNickName(this.getContactName());
sysUser.setPhonenumber(this.getContactPhone());
sysUser.setEmail(this.getEmailAddress());
return sysUser;
}
}

@ -0,0 +1,18 @@
package com.ruoyi.system.domain.vo;
import com.ruoyi.common.page.ReqPageBase;
import lombok.Data;
import java.io.Serializable;
@Data
public class ReqSearchSysTenant extends ReqPageBase implements Serializable {
private String tenantName;
private String contactName;
private String inUse;
//过期开始时间
private String beginTime;
//过期结束
private String endTime;
}

@ -1,8 +1,9 @@
package com.ruoyi.system.mapper; package com.ruoyi.system.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.common.core.domain.entity.SysDept; import com.ruoyi.common.core.domain.entity.SysDept;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* *
@ -26,7 +27,9 @@ public interface SysDeptMapper
* @param deptCheckStrictly * @param deptCheckStrictly
* @return * @return
*/ */
public List<Integer> selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly); public List<Integer> selectDeptListByRoleId(@Param("roleId") Long roleId
, @Param("deptCheckStrictly") boolean deptCheckStrictly
, @Param("tenantId") String tenantId);
/** /**
* ID * ID

@ -1,8 +1,9 @@
package com.ruoyi.system.mapper; package com.ruoyi.system.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.common.core.domain.entity.SysMenu; import com.ruoyi.common.core.domain.entity.SysMenu;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* *
@ -32,7 +33,7 @@ public interface SysMenuMapper
* @param menu * @param menu
* @return * @return
*/ */
public List<SysMenu> selectMenuListByUserId(SysMenu menu); public List<SysMenu> selectMenuListByUserId(@Param("userId")Long userId, @Param("tenantId") String tenantId);
/** /**
* ID * ID
@ -40,7 +41,7 @@ public interface SysMenuMapper
* @param userId ID * @param userId ID
* @return * @return
*/ */
public List<String> selectMenuPermsByUserId(Long userId); public List<String> selectMenuPermsByUserId( @Param("userId")Long userId, @Param("tenantId") String tenantId);
/** /**
* ID * ID

@ -1,7 +1,9 @@
package com.ruoyi.system.mapper; package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.SysPost; import com.ruoyi.system.domain.SysPost;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* *
@ -23,7 +25,7 @@ public interface SysPostMapper
* *
* @return * @return
*/ */
public List<SysPost> selectPostAll(); public List<SysPost> selectPostAll(String tenantId);
/** /**
* ID * ID
@ -39,7 +41,7 @@ public interface SysPostMapper
* @param userId ID * @param userId ID
* @return ID * @return ID
*/ */
public List<Integer> selectPostListByUserId(Long userId); public List<Integer> selectPostListByUserId(@Param("userId") Long userId,@Param("tenantId") String tenantId);
/** /**
* *

@ -1,9 +1,11 @@
package com.ruoyi.system.mapper; package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysRole;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import java.util.List;
/** /**
* *
* *
@ -40,7 +42,7 @@ public interface SysRoleMapper
* @param userId ID * @param userId ID
* @return ID * @return ID
*/ */
public List<Integer> selectRoleListByUserId(Long userId); public List<Integer> selectRoleListByUserId(@Param("userId") Long userId,@Param("tenantId")String tenantId);
/** /**
* ID * ID

@ -0,0 +1,34 @@
package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.SysTenant;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* <p>
* Mapper
* </p>
*/
public interface SysTenantMapper extends BaseMapper<SysTenant> {
/**
*
*
* @param userId
* @return
*/
List<SysTenant> selectUserTenantList(@Param("userId")String userId, @Param("limitTenantUserId")String limitTenantUserId);
/**
*
*
* @param userId
* @param tenantId
* @return
*/
SysTenant selectInUseUserTenant(@Param("userId")String userId, @Param("tenantId")String tenantId);
int tenantHaveContent(String tenantId);
}

@ -0,0 +1,62 @@
package com.ruoyi.system.mapper.colums;
import com.ruoyi.system.domain.columns.SysTeacher;
import java.util.List;
/**
* Mapper
*
* @author ruoyi
* @date 2025-10-28
*/
public interface SysTeacherMapper
{
/**
*
*
* @param userId
* @return
*/
public SysTeacher selectSysTeacherByUserId(Long userId);
/**
*
*
* @param sysTeacher
* @return
*/
public List<SysTeacher> selectSysTeacherList(SysTeacher sysTeacher);
/**
*
*
* @param sysTeacher
* @return
*/
public int insertSysTeacher(SysTeacher sysTeacher);
/**
*
*
* @param sysTeacher
* @return
*/
public int updateSysTeacher(SysTeacher sysTeacher);
/**
*
*
* @param userId
* @return
*/
public int deleteSysTeacherByUserId(Long userId);
/**
*
*
* @param userIds
* @return
*/
public int deleteSysTeacherByUserIds(Long[] userIds);
}

@ -0,0 +1,62 @@
package com.ruoyi.system.mapper.colums;
import com.ruoyi.system.domain.columns.YjAppreciate;
import java.util.List;
/**
* Mapper
*
* @author ruoyi
* @date 2025-10-29
*/
public interface YjAppreciateMapper
{
/**
*
*
* @param id
* @return
*/
public YjAppreciate selectYjAppreciateById(String id);
/**
*
*
* @param yjAppreciate
* @return
*/
public List<YjAppreciate> selectYjAppreciateList(YjAppreciate yjAppreciate);
/**
*
*
* @param yjAppreciate
* @return
*/
public int insertYjAppreciate(YjAppreciate yjAppreciate);
/**
*
*
* @param yjAppreciate
* @return
*/
public int updateYjAppreciate(YjAppreciate yjAppreciate);
/**
*
*
* @param id
* @return
*/
public int deleteYjAppreciateById(String id);
/**
*
*
* @param ids
* @return
*/
public int deleteYjAppreciateByIds(String[] ids);
}

@ -0,0 +1,62 @@
package com.ruoyi.system.mapper.colums;
import com.ruoyi.system.domain.columns.YjHealthy;
import java.util.List;
/**
* Mapper
*
* @author ruoyi
* @date 2025-10-29
*/
public interface YjHealthyMapper
{
/**
*
*
* @param id
* @return
*/
public YjHealthy selectYjHealthyById(String id);
/**
*
*
* @param yjHealthy
* @return
*/
public List<YjHealthy> selectYjHealthyList(YjHealthy yjHealthy);
/**
*
*
* @param yjHealthy
* @return
*/
public int insertYjHealthy(YjHealthy yjHealthy);
/**
*
*
* @param yjHealthy
* @return
*/
public int updateYjHealthy(YjHealthy yjHealthy);
/**
*
*
* @param id
* @return
*/
public int deleteYjHealthyById(String id);
/**
*
*
* @param ids
* @return
*/
public int deleteYjHealthyByIds(String[] ids);
}

@ -0,0 +1,62 @@
package com.ruoyi.system.mapper.colums;
import com.ruoyi.system.domain.columns.YjInherit;
import java.util.List;
/**
* Mapper
*
* @author ruoyi
* @date 2025-10-29
*/
public interface YjInheritMapper
{
/**
*
*
* @param id
* @return
*/
public YjInherit selectYjInheritById(String id);
/**
*
*
* @param yjInherit
* @return
*/
public List<YjInherit> selectYjInheritList(YjInherit yjInherit);
/**
*
*
* @param yjInherit
* @return
*/
public int insertYjInherit(YjInherit yjInherit);
/**
*
*
* @param yjInherit
* @return
*/
public int updateYjInherit(YjInherit yjInherit);
/**
*
*
* @param id
* @return
*/
public int deleteYjInheritById(String id);
/**
*
*
* @param ids
* @return
*/
public int deleteYjInheritByIds(String[] ids);
}

@ -0,0 +1,62 @@
package com.ruoyi.system.mapper.colums;
import com.ruoyi.system.domain.columns.YjPracticeMoments;
import java.util.List;
/**
* Mapper
*
* @author ruoyi
* @date 2025-10-29
*/
public interface YjPracticeMomentsMapper
{
/**
*
*
* @param id
* @return
*/
public YjPracticeMoments selectYjPracticeMomentsById(String id);
/**
*
*
* @param yjPracticeMoments
* @return
*/
public List<YjPracticeMoments> selectYjPracticeMomentsList(YjPracticeMoments yjPracticeMoments);
/**
*
*
* @param yjPracticeMoments
* @return
*/
public int insertYjPracticeMoments(YjPracticeMoments yjPracticeMoments);
/**
*
*
* @param yjPracticeMoments
* @return
*/
public int updateYjPracticeMoments(YjPracticeMoments yjPracticeMoments);
/**
*
*
* @param id
* @return
*/
public int deleteYjPracticeMomentsById(String id);
/**
*
*
* @param ids
* @return
*/
public int deleteYjPracticeMomentsByIds(String[] ids);
}

@ -0,0 +1,62 @@
package com.ruoyi.system.mapper.colums;
import com.ruoyi.system.domain.columns.YjSense;
import java.util.List;
/**
* Mapper
*
* @author ruoyi
* @date 2025-10-29
*/
public interface YjSenseMapper
{
/**
*
*
* @param id
* @return
*/
public YjSense selectYjSenseById(String id);
/**
*
*
* @param yjSense
* @return
*/
public List<YjSense> selectYjSenseList(YjSense yjSense);
/**
*
*
* @param yjSense
* @return
*/
public int insertYjSense(YjSense yjSense);
/**
*
*
* @param yjSense
* @return
*/
public int updateYjSense(YjSense yjSense);
/**
*
*
* @param id
* @return
*/
public int deleteYjSenseById(String id);
/**
*
*
* @param ids
* @return
*/
public int deleteYjSenseByIds(String[] ids);
}

@ -0,0 +1,62 @@
package com.ruoyi.system.mapper.colums;
import com.ruoyi.system.domain.columns.YjStore;
import java.util.List;
/**
* Mapper
*
* @author ruoyi
* @date 2025-10-31
*/
public interface YjStoreMapper
{
/**
*
*
* @param deptId
* @return
*/
public YjStore selectYjStoreByDeptId(Long deptId);
/**
*
*
* @param yjStore
* @return
*/
public List<YjStore> selectYjStoreList(YjStore yjStore);
/**
*
*
* @param yjStore
* @return
*/
public int insertYjStore(YjStore yjStore);
/**
*
*
* @param yjStore
* @return
*/
public int updateYjStore(YjStore yjStore);
/**
*
*
* @param deptId
* @return
*/
public int deleteYjStoreByDeptId(Long deptId);
/**
*
*
* @param deptIds
* @return
*/
public int deleteYjStoreByDeptIds(Long[] deptIds);
}

@ -0,0 +1,35 @@
package com.ruoyi.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.RestResponse;
import com.ruoyi.system.domain.SysTenant;
import com.ruoyi.system.domain.vo.ReqBusinessAddTenant;
import com.ruoyi.system.domain.vo.ReqSearchSysTenant;
import java.util.List;
public interface SysTenantService extends IService<SysTenant> {
/**
*
* @param userId
* @param limitTenantUserId
* @return
*/
List<SysTenant> selectUserTenantList(String userId, String limitTenantUserId);
/**
*
* @param userId
* @param tenantId
* @return
*/
boolean checkUserTenantInUse(String userId,String tenantId);
RestResponse searchList(ReqSearchSysTenant reqSearchSysTenant);
RestResponse treeSelect();
RestResponse detailById(Long tenantId);
RestResponse addTenant(ReqBusinessAddTenant reqBusinessAddTenant);
RestResponse updateTenant(SysTenant sysTenant);
RestResponse deleteById(String[] tenantIds);
}

@ -0,0 +1,62 @@
package com.ruoyi.system.service.columns;
import com.ruoyi.system.domain.columns.SysTeacher;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2025-10-28
*/
public interface ISysTeacherService
{
/**
*
*
* @param userId
* @return
*/
public SysTeacher selectSysTeacherByUserId(Long userId);
/**
*
*
* @param sysTeacher
* @return
*/
public List<SysTeacher> selectSysTeacherList(SysTeacher sysTeacher);
/**
*
*
* @param sysTeacher
* @return
*/
public int insertSysTeacher(SysTeacher sysTeacher);
/**
*
*
* @param sysTeacher
* @return
*/
public int updateSysTeacher(SysTeacher sysTeacher);
/**
*
*
* @param userIds
* @return
*/
public int deleteSysTeacherByUserIds(Long[] userIds);
/**
*
*
* @param userId
* @return
*/
public int deleteSysTeacherByUserId(Long userId);
}

@ -0,0 +1,62 @@
package com.ruoyi.system.service.columns;
import com.ruoyi.system.domain.columns.YjAppreciate;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2025-10-29
*/
public interface IYjAppreciateService
{
/**
*
*
* @param id
* @return
*/
public YjAppreciate selectYjAppreciateById(String id);
/**
*
*
* @param yjAppreciate
* @return
*/
public List<YjAppreciate> selectYjAppreciateList(YjAppreciate yjAppreciate);
/**
*
*
* @param yjAppreciate
* @return
*/
public int insertYjAppreciate(YjAppreciate yjAppreciate);
/**
*
*
* @param yjAppreciate
* @return
*/
public int updateYjAppreciate(YjAppreciate yjAppreciate);
/**
*
*
* @param ids
* @return
*/
public int deleteYjAppreciateByIds(String[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteYjAppreciateById(String id);
}

@ -0,0 +1,62 @@
package com.ruoyi.system.service.columns;
import com.ruoyi.system.domain.columns.YjHealthy;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2025-10-29
*/
public interface IYjHealthyService
{
/**
*
*
* @param id
* @return
*/
public YjHealthy selectYjHealthyById(String id);
/**
*
*
* @param yjHealthy
* @return
*/
public List<YjHealthy> selectYjHealthyList(YjHealthy yjHealthy);
/**
*
*
* @param yjHealthy
* @return
*/
public int insertYjHealthy(YjHealthy yjHealthy);
/**
*
*
* @param yjHealthy
* @return
*/
public int updateYjHealthy(YjHealthy yjHealthy);
/**
*
*
* @param ids
* @return
*/
public int deleteYjHealthyByIds(String[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteYjHealthyById(String id);
}

@ -0,0 +1,62 @@
package com.ruoyi.system.service.columns;
import com.ruoyi.system.domain.columns.YjInherit;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2025-10-29
*/
public interface IYjInheritService
{
/**
*
*
* @param id
* @return
*/
public YjInherit selectYjInheritById(String id);
/**
*
*
* @param yjInherit
* @return
*/
public List<YjInherit> selectYjInheritList(YjInherit yjInherit);
/**
*
*
* @param yjInherit
* @return
*/
public int insertYjInherit(YjInherit yjInherit);
/**
*
*
* @param yjInherit
* @return
*/
public int updateYjInherit(YjInherit yjInherit);
/**
*
*
* @param ids
* @return
*/
public int deleteYjInheritByIds(String[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteYjInheritById(String id);
}

@ -0,0 +1,62 @@
package com.ruoyi.system.service.columns;
import com.ruoyi.system.domain.columns.YjPracticeMoments;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2025-10-29
*/
public interface IYjPracticeMomentsService
{
/**
*
*
* @param id
* @return
*/
public YjPracticeMoments selectYjPracticeMomentsById(String id);
/**
*
*
* @param yjPracticeMoments
* @return
*/
public List<YjPracticeMoments> selectYjPracticeMomentsList(YjPracticeMoments yjPracticeMoments);
/**
*
*
* @param yjPracticeMoments
* @return
*/
public int insertYjPracticeMoments(YjPracticeMoments yjPracticeMoments);
/**
*
*
* @param yjPracticeMoments
* @return
*/
public int updateYjPracticeMoments(YjPracticeMoments yjPracticeMoments);
/**
*
*
* @param ids
* @return
*/
public int deleteYjPracticeMomentsByIds(String[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteYjPracticeMomentsById(String id);
}

@ -0,0 +1,62 @@
package com.ruoyi.system.service.columns;
import com.ruoyi.system.domain.columns.YjSense;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2025-10-29
*/
public interface IYjSenseService
{
/**
*
*
* @param id
* @return
*/
public YjSense selectYjSenseById(String id);
/**
*
*
* @param yjSense
* @return
*/
public List<YjSense> selectYjSenseList(YjSense yjSense);
/**
*
*
* @param yjSense
* @return
*/
public int insertYjSense(YjSense yjSense);
/**
*
*
* @param yjSense
* @return
*/
public int updateYjSense(YjSense yjSense);
/**
*
*
* @param ids
* @return
*/
public int deleteYjSenseByIds(String[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteYjSenseById(String id);
}

@ -0,0 +1,62 @@
package com.ruoyi.system.service.columns;
import com.ruoyi.system.domain.columns.YjStore;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2025-10-31
*/
public interface IYjStoreService
{
/**
*
*
* @param deptId
* @return
*/
public YjStore selectYjStoreByDeptId(Long deptId);
/**
*
*
* @param yjStore
* @return
*/
public List<YjStore> selectYjStoreList(YjStore yjStore);
/**
*
*
* @param yjStore
* @return
*/
public int insertYjStore(YjStore yjStore);
/**
*
*
* @param yjStore
* @return
*/
public int updateYjStore(YjStore yjStore);
/**
*
*
* @param deptIds
* @return
*/
public int deleteYjStoreByDeptIds(Long[] deptIds);
/**
*
*
* @param deptId
* @return
*/
public int deleteYjStoreByDeptId(Long deptId);
}

@ -0,0 +1,98 @@
package com.ruoyi.system.service.columns.impl;
import java.time.LocalDateTime;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.columns.SysTeacher;
import com.ruoyi.system.mapper.colums.SysTeacherMapper;
import com.ruoyi.system.service.columns.ISysTeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Service
*
* @author ruoyi
* @date 2025-10-28
*/
@Service
public class SysTeacherServiceImpl implements ISysTeacherService
{
@Autowired
private SysTeacherMapper sysTeacherMapper;
/**
*
*
* @param userId
* @return
*/
@Override
public SysTeacher selectSysTeacherByUserId(Long userId)
{
return sysTeacherMapper.selectSysTeacherByUserId(userId);
}
/**
*
*
* @param sysTeacher
* @return
*/
@Override
public List<SysTeacher> selectSysTeacherList(SysTeacher sysTeacher)
{
return sysTeacherMapper.selectSysTeacherList(sysTeacher);
}
/**
*
*
* @param sysTeacher
* @return
*/
@Override
public int insertSysTeacher(SysTeacher sysTeacher)
{
sysTeacher.setCreateTime(LocalDateTime.now());
return sysTeacherMapper.insertSysTeacher(sysTeacher);
}
/**
*
*
* @param sysTeacher
* @return
*/
@Override
public int updateSysTeacher(SysTeacher sysTeacher)
{
sysTeacher.setUpdateTime(LocalDateTime.now());
return sysTeacherMapper.updateSysTeacher(sysTeacher);
}
/**
*
*
* @param userIds
* @return
*/
@Override
public int deleteSysTeacherByUserIds(Long[] userIds)
{
return sysTeacherMapper.deleteSysTeacherByUserIds(userIds);
}
/**
*
*
* @param userId
* @return
*/
@Override
public int deleteSysTeacherByUserId(Long userId)
{
return sysTeacherMapper.deleteSysTeacherByUserId(userId);
}
}

@ -0,0 +1,95 @@
package com.ruoyi.system.service.columns.impl;
import java.util.List;
import com.ruoyi.system.domain.columns.YjAppreciate;
import com.ruoyi.system.mapper.colums.YjAppreciateMapper;
import com.ruoyi.system.service.columns.IYjAppreciateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Service
*
* @author ruoyi
* @date 2025-10-29
*/
@Service
public class YjAppreciateServiceImpl implements IYjAppreciateService
{
@Autowired
private YjAppreciateMapper yjAppreciateMapper;
/**
*
*
* @param id
* @return
*/
@Override
public YjAppreciate selectYjAppreciateById(String id)
{
return yjAppreciateMapper.selectYjAppreciateById(id);
}
/**
*
*
* @param yjAppreciate
* @return
*/
@Override
public List<YjAppreciate> selectYjAppreciateList(YjAppreciate yjAppreciate)
{
return yjAppreciateMapper.selectYjAppreciateList(yjAppreciate);
}
/**
*
*
* @param yjAppreciate
* @return
*/
@Override
public int insertYjAppreciate(YjAppreciate yjAppreciate)
{
return yjAppreciateMapper.insertYjAppreciate(yjAppreciate);
}
/**
*
*
* @param yjAppreciate
* @return
*/
@Override
public int updateYjAppreciate(YjAppreciate yjAppreciate)
{
return yjAppreciateMapper.updateYjAppreciate(yjAppreciate);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteYjAppreciateByIds(String[] ids)
{
return yjAppreciateMapper.deleteYjAppreciateByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteYjAppreciateById(String id)
{
return yjAppreciateMapper.deleteYjAppreciateById(id);
}
}

@ -0,0 +1,95 @@
package com.ruoyi.system.service.columns.impl;
import java.util.List;
import com.ruoyi.system.domain.columns.YjHealthy;
import com.ruoyi.system.mapper.colums.YjHealthyMapper;
import com.ruoyi.system.service.columns.IYjHealthyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Service
*
* @author ruoyi
* @date 2025-10-29
*/
@Service
public class YjHealthyServiceImpl implements IYjHealthyService
{
@Autowired
private YjHealthyMapper yjHealthyMapper;
/**
*
*
* @param id
* @return
*/
@Override
public YjHealthy selectYjHealthyById(String id)
{
return yjHealthyMapper.selectYjHealthyById(id);
}
/**
*
*
* @param yjHealthy
* @return
*/
@Override
public List<YjHealthy> selectYjHealthyList(YjHealthy yjHealthy)
{
return yjHealthyMapper.selectYjHealthyList(yjHealthy);
}
/**
*
*
* @param yjHealthy
* @return
*/
@Override
public int insertYjHealthy(YjHealthy yjHealthy)
{
return yjHealthyMapper.insertYjHealthy(yjHealthy);
}
/**
*
*
* @param yjHealthy
* @return
*/
@Override
public int updateYjHealthy(YjHealthy yjHealthy)
{
return yjHealthyMapper.updateYjHealthy(yjHealthy);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteYjHealthyByIds(String[] ids)
{
return yjHealthyMapper.deleteYjHealthyByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteYjHealthyById(String id)
{
return yjHealthyMapper.deleteYjHealthyById(id);
}
}

@ -0,0 +1,94 @@
package com.ruoyi.system.service.columns.impl;
import java.util.List;
import com.ruoyi.system.domain.columns.YjInherit;
import com.ruoyi.system.mapper.colums.YjInheritMapper;
import com.ruoyi.system.service.columns.IYjInheritService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Service
*
* @author ruoyi
* @date 2025-10-29
*/
@Service
public class YjInheritServiceImpl implements IYjInheritService
{
@Autowired
private YjInheritMapper yjInheritMapper;
/**
*
*
* @param id
* @return
*/
@Override
public YjInherit selectYjInheritById(String id)
{
return yjInheritMapper.selectYjInheritById(id);
}
/**
*
*
* @param yjInherit
* @return
*/
@Override
public List<YjInherit> selectYjInheritList(YjInherit yjInherit)
{
return yjInheritMapper.selectYjInheritList(yjInherit);
}
/**
*
*
* @param yjInherit
* @return
*/
@Override
public int insertYjInherit(YjInherit yjInherit)
{
return yjInheritMapper.insertYjInherit(yjInherit);
}
/**
*
*
* @param yjInherit
* @return
*/
@Override
public int updateYjInherit(YjInherit yjInherit)
{
return yjInheritMapper.updateYjInherit(yjInherit);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteYjInheritByIds(String[] ids)
{
return yjInheritMapper.deleteYjInheritByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteYjInheritById(String id)
{
return yjInheritMapper.deleteYjInheritById(id);
}
}

@ -0,0 +1,95 @@
package com.ruoyi.system.service.columns.impl;
import java.util.List;
import com.ruoyi.system.domain.columns.YjPracticeMoments;
import com.ruoyi.system.mapper.colums.YjPracticeMomentsMapper;
import com.ruoyi.system.service.columns.IYjPracticeMomentsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Service
*
* @author ruoyi
* @date 2025-10-29
*/
@Service
public class YjPracticeMomentsServiceImpl implements IYjPracticeMomentsService
{
@Autowired
private YjPracticeMomentsMapper yjPracticeMomentsMapper;
/**
*
*
* @param id
* @return
*/
@Override
public YjPracticeMoments selectYjPracticeMomentsById(String id)
{
return yjPracticeMomentsMapper.selectYjPracticeMomentsById(id);
}
/**
*
*
* @param yjPracticeMoments
* @return
*/
@Override
public List<YjPracticeMoments> selectYjPracticeMomentsList(YjPracticeMoments yjPracticeMoments)
{
return yjPracticeMomentsMapper.selectYjPracticeMomentsList(yjPracticeMoments);
}
/**
*
*
* @param yjPracticeMoments
* @return
*/
@Override
public int insertYjPracticeMoments(YjPracticeMoments yjPracticeMoments)
{
return yjPracticeMomentsMapper.insertYjPracticeMoments(yjPracticeMoments);
}
/**
*
*
* @param yjPracticeMoments
* @return
*/
@Override
public int updateYjPracticeMoments(YjPracticeMoments yjPracticeMoments)
{
return yjPracticeMomentsMapper.updateYjPracticeMoments(yjPracticeMoments);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteYjPracticeMomentsByIds(String[] ids)
{
return yjPracticeMomentsMapper.deleteYjPracticeMomentsByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteYjPracticeMomentsById(String id)
{
return yjPracticeMomentsMapper.deleteYjPracticeMomentsById(id);
}
}

@ -0,0 +1,95 @@
package com.ruoyi.system.service.columns.impl;
import java.util.List;
import com.ruoyi.system.domain.columns.YjSense;
import com.ruoyi.system.mapper.colums.YjSenseMapper;
import com.ruoyi.system.service.columns.IYjSenseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Service
*
* @author ruoyi
* @date 2025-10-29
*/
@Service
public class YjSenseServiceImpl implements IYjSenseService
{
@Autowired
private YjSenseMapper yjSenseMapper;
/**
*
*
* @param id
* @return
*/
@Override
public YjSense selectYjSenseById(String id)
{
return yjSenseMapper.selectYjSenseById(id);
}
/**
*
*
* @param yjSense
* @return
*/
@Override
public List<YjSense> selectYjSenseList(YjSense yjSense)
{
return yjSenseMapper.selectYjSenseList(yjSense);
}
/**
*
*
* @param yjSense
* @return
*/
@Override
public int insertYjSense(YjSense yjSense)
{
return yjSenseMapper.insertYjSense(yjSense);
}
/**
*
*
* @param yjSense
* @return
*/
@Override
public int updateYjSense(YjSense yjSense)
{
return yjSenseMapper.updateYjSense(yjSense);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteYjSenseByIds(String[] ids)
{
return yjSenseMapper.deleteYjSenseByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteYjSenseById(String id)
{
return yjSenseMapper.deleteYjSenseById(id);
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save