新增:网站后台管理功能模块
This commit is contained in:
@@ -1,17 +1,12 @@
|
|||||||
package com.gxwebsoft.cms.controller;
|
package com.gxwebsoft.cms.controller;
|
||||||
|
|
||||||
import com.gxwebsoft.common.core.web.BaseController;
|
|
||||||
import com.gxwebsoft.cms.service.AdService;
|
|
||||||
import com.gxwebsoft.cms.entity.Ad;
|
import com.gxwebsoft.cms.entity.Ad;
|
||||||
import com.gxwebsoft.cms.param.AdParam;
|
import com.gxwebsoft.cms.param.AdParam;
|
||||||
import com.gxwebsoft.common.core.web.ApiResult;
|
import com.gxwebsoft.cms.service.AdService;
|
||||||
import com.gxwebsoft.common.core.web.PageResult;
|
import com.gxwebsoft.common.core.web.*;
|
||||||
import com.gxwebsoft.common.core.web.PageParam;
|
|
||||||
import com.gxwebsoft.common.core.web.BatchParam;
|
|
||||||
import com.gxwebsoft.common.system.entity.User;
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -21,7 +16,7 @@ import java.util.List;
|
|||||||
* 广告位管理表控制器
|
* 广告位管理表控制器
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2023-10-22 15:47:09
|
* @since 2024-03-04 21:14:15
|
||||||
*/
|
*/
|
||||||
@Api(tags = "广告位管理表管理")
|
@Api(tags = "广告位管理表管理")
|
||||||
@RestController
|
@RestController
|
||||||
@@ -33,11 +28,8 @@ public class AdController extends BaseController {
|
|||||||
@ApiOperation("分页查询广告位管理表")
|
@ApiOperation("分页查询广告位管理表")
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
public ApiResult<PageResult<Ad>> page(AdParam param) {
|
public ApiResult<PageResult<Ad>> page(AdParam param) {
|
||||||
PageParam<Ad, AdParam> page = new PageParam<>(param);
|
|
||||||
page.setDefaultOrder("create_time desc");
|
|
||||||
return success(adService.page(page, page.getWrapper()));
|
|
||||||
// 使用关联查询
|
// 使用关联查询
|
||||||
//return success(adService.pageRel(param));
|
return success(adService.pageRel(param));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("查询全部广告位管理表")
|
@ApiOperation("查询全部广告位管理表")
|
||||||
|
|||||||
@@ -0,0 +1,106 @@
|
|||||||
|
package com.gxwebsoft.cms.controller;
|
||||||
|
|
||||||
|
import com.gxwebsoft.cms.entity.AdRecord;
|
||||||
|
import com.gxwebsoft.cms.param.AdRecordParam;
|
||||||
|
import com.gxwebsoft.cms.service.AdRecordService;
|
||||||
|
import com.gxwebsoft.common.core.web.*;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告图片记录表控制器
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:14:15
|
||||||
|
*/
|
||||||
|
@Api(tags = "广告图片记录表管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/cms/ad-record")
|
||||||
|
public class AdRecordController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private AdRecordService adRecordService;
|
||||||
|
|
||||||
|
@ApiOperation("分页查询广告图片记录表")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public ApiResult<PageResult<AdRecord>> page(AdRecordParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(adRecordService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询全部广告图片记录表")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<AdRecord>> list(AdRecordParam param) {
|
||||||
|
PageParam<AdRecord, AdRecordParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
return success(adRecordService.list(page.getOrderWrapper()));
|
||||||
|
// 使用关联查询
|
||||||
|
//return success(adRecordService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("根据id查询广告图片记录表")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<AdRecord> get(@PathVariable("id") Integer id) {
|
||||||
|
return success(adRecordService.getById(id));
|
||||||
|
// 使用关联查询
|
||||||
|
//return success(adRecordService.getByIdRel(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("添加广告图片记录表")
|
||||||
|
@PostMapping()
|
||||||
|
public ApiResult<?> save(@RequestBody AdRecord adRecord) {
|
||||||
|
if (adRecordService.save(adRecord)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改广告图片记录表")
|
||||||
|
@PutMapping()
|
||||||
|
public ApiResult<?> update(@RequestBody AdRecord adRecord) {
|
||||||
|
if (adRecordService.updateById(adRecord)) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("删除广告图片记录表")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
|
if (adRecordService.removeById(id)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量添加广告图片记录表")
|
||||||
|
@PostMapping("/batch")
|
||||||
|
public ApiResult<?> saveBatch(@RequestBody List<AdRecord> list) {
|
||||||
|
if (adRecordService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量修改广告图片记录表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<AdRecord> batchParam) {
|
||||||
|
if (batchParam.update(adRecordService, "ad_record_id")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量删除广告图片记录表")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (adRecordService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
package com.gxwebsoft.cms.controller;
|
||||||
|
|
||||||
|
import com.gxwebsoft.cms.entity.Design;
|
||||||
|
import com.gxwebsoft.cms.param.DesignParam;
|
||||||
|
import com.gxwebsoft.cms.service.DesignService;
|
||||||
|
import com.gxwebsoft.common.core.web.*;
|
||||||
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面管理记录表控制器
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:20:40
|
||||||
|
*/
|
||||||
|
@Api(tags = "页面管理记录表管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/cms/design")
|
||||||
|
public class DesignController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private DesignService designService;
|
||||||
|
|
||||||
|
@ApiOperation("分页查询页面管理记录表")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public ApiResult<PageResult<Design>> page(DesignParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(designService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询全部页面管理记录表")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<Design>> list(DesignParam param) {
|
||||||
|
PageParam<Design, DesignParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
return success(designService.list(page.getOrderWrapper()));
|
||||||
|
// 使用关联查询
|
||||||
|
//return success(designService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("根据id查询页面管理记录表")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<Design> get(@PathVariable("id") Integer id) {
|
||||||
|
return success(designService.getById(id));
|
||||||
|
// 使用关联查询
|
||||||
|
//return success(designService.getByIdRel(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("添加页面管理记录表")
|
||||||
|
@PostMapping()
|
||||||
|
public ApiResult<?> save(@RequestBody Design design) {
|
||||||
|
// 记录当前登录用户id
|
||||||
|
User loginUser = getLoginUser();
|
||||||
|
if (loginUser != null) {
|
||||||
|
design.setUserId(loginUser.getUserId());
|
||||||
|
}
|
||||||
|
if (designService.save(design)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改页面管理记录表")
|
||||||
|
@PutMapping()
|
||||||
|
public ApiResult<?> update(@RequestBody Design design) {
|
||||||
|
if (designService.updateById(design)) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("删除页面管理记录表")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
|
if (designService.removeById(id)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量添加页面管理记录表")
|
||||||
|
@PostMapping("/batch")
|
||||||
|
public ApiResult<?> saveBatch(@RequestBody List<Design> list) {
|
||||||
|
if (designService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量修改页面管理记录表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<Design> batchParam) {
|
||||||
|
if (batchParam.update(designService, "page_id")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量删除页面管理记录表")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (designService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
package com.gxwebsoft.cms.controller;
|
||||||
|
|
||||||
|
import com.gxwebsoft.cms.entity.DesignRecord;
|
||||||
|
import com.gxwebsoft.cms.param.DesignRecordParam;
|
||||||
|
import com.gxwebsoft.cms.service.DesignRecordService;
|
||||||
|
import com.gxwebsoft.common.core.web.*;
|
||||||
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面组件表控制器
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:20:40
|
||||||
|
*/
|
||||||
|
@Api(tags = "页面组件表管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/cms/design-record")
|
||||||
|
public class DesignRecordController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private DesignRecordService designRecordService;
|
||||||
|
|
||||||
|
@ApiOperation("分页查询页面组件表")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public ApiResult<PageResult<DesignRecord>> page(DesignRecordParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(designRecordService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询全部页面组件表")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<DesignRecord>> list(DesignRecordParam param) {
|
||||||
|
PageParam<DesignRecord, DesignRecordParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
return success(designRecordService.list(page.getOrderWrapper()));
|
||||||
|
// 使用关联查询
|
||||||
|
//return success(designRecordService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("根据id查询页面组件表")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<DesignRecord> get(@PathVariable("id") Integer id) {
|
||||||
|
return success(designRecordService.getById(id));
|
||||||
|
// 使用关联查询
|
||||||
|
//return success(designRecordService.getByIdRel(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("添加页面组件表")
|
||||||
|
@PostMapping()
|
||||||
|
public ApiResult<?> save(@RequestBody DesignRecord designRecord) {
|
||||||
|
// 记录当前登录用户id
|
||||||
|
User loginUser = getLoginUser();
|
||||||
|
if (loginUser != null) {
|
||||||
|
designRecord.setUserId(loginUser.getUserId());
|
||||||
|
}
|
||||||
|
if (designRecordService.save(designRecord)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改页面组件表")
|
||||||
|
@PutMapping()
|
||||||
|
public ApiResult<?> update(@RequestBody DesignRecord designRecord) {
|
||||||
|
if (designRecordService.updateById(designRecord)) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("删除页面组件表")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
|
if (designRecordService.removeById(id)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量添加页面组件表")
|
||||||
|
@PostMapping("/batch")
|
||||||
|
public ApiResult<?> saveBatch(@RequestBody List<DesignRecord> list) {
|
||||||
|
if (designRecordService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量修改页面组件表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<DesignRecord> batchParam) {
|
||||||
|
if (batchParam.update(designRecordService, "page_id")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量删除页面组件表")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (designRecordService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
package com.gxwebsoft.cms.controller;
|
||||||
|
|
||||||
|
import com.gxwebsoft.cms.entity.Navigation;
|
||||||
|
import com.gxwebsoft.cms.param.NavigationParam;
|
||||||
|
import com.gxwebsoft.cms.service.NavigationService;
|
||||||
|
import com.gxwebsoft.common.core.web.*;
|
||||||
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网站导航记录表控制器
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:27:55
|
||||||
|
*/
|
||||||
|
@Api(tags = "网站导航记录表管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/cms/navigation")
|
||||||
|
public class NavigationController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private NavigationService navigationService;
|
||||||
|
|
||||||
|
@ApiOperation("分页查询网站导航记录表")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public ApiResult<PageResult<Navigation>> page(NavigationParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(navigationService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询全部网站导航记录表")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<Navigation>> list(NavigationParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(navigationService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("根据id查询网站导航记录表")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<Navigation> get(@PathVariable("id") Integer id) {
|
||||||
|
return success(navigationService.getById(id));
|
||||||
|
// 使用关联查询
|
||||||
|
//return success(navigationService.getByIdRel(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("添加网站导航记录表")
|
||||||
|
@PostMapping()
|
||||||
|
public ApiResult<?> save(@RequestBody Navigation navigation) {
|
||||||
|
// 记录当前登录用户id
|
||||||
|
User loginUser = getLoginUser();
|
||||||
|
if (loginUser != null) {
|
||||||
|
navigation.setUserId(loginUser.getUserId());
|
||||||
|
}
|
||||||
|
if (navigationService.save(navigation)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改网站导航记录表")
|
||||||
|
@PutMapping()
|
||||||
|
public ApiResult<?> update(@RequestBody Navigation navigation) {
|
||||||
|
if (navigationService.updateById(navigation)) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("删除网站导航记录表")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
|
if (navigationService.removeById(id)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量添加网站导航记录表")
|
||||||
|
@PostMapping("/batch")
|
||||||
|
public ApiResult<?> saveBatch(@RequestBody List<Navigation> list) {
|
||||||
|
if (navigationService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量修改网站导航记录表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<Navigation> batchParam) {
|
||||||
|
if (batchParam.update(navigationService, "navigation_id")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量删除网站导航记录表")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (navigationService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,162 @@
|
|||||||
|
package com.gxwebsoft.cms.controller;
|
||||||
|
|
||||||
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.gxwebsoft.cms.entity.Website;
|
||||||
|
import com.gxwebsoft.cms.entity.WebsiteField;
|
||||||
|
import com.gxwebsoft.cms.param.WebsiteParam;
|
||||||
|
import com.gxwebsoft.cms.service.WebsiteFieldService;
|
||||||
|
import com.gxwebsoft.cms.service.WebsiteService;
|
||||||
|
import com.gxwebsoft.common.core.security.JwtUtil;
|
||||||
|
import com.gxwebsoft.common.core.web.*;
|
||||||
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
|
import com.gxwebsoft.oa.entity.Company;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网站信息记录表控制器
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:14:15
|
||||||
|
*/
|
||||||
|
@Api(tags = "网站信息记录表管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/cms/website")
|
||||||
|
public class WebsiteController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private WebsiteService websiteService;
|
||||||
|
@Resource
|
||||||
|
private WebsiteFieldService websiteFieldService;
|
||||||
|
|
||||||
|
@ApiOperation("分页查询网站信息记录表")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public ApiResult<PageResult<Website>> page(WebsiteParam param) {
|
||||||
|
// 使用关联查询
|
||||||
|
return success(websiteService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询全部网站信息记录表")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<Website>> list(WebsiteParam param) {
|
||||||
|
PageParam<Website, WebsiteParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
return success(websiteService.list(page.getOrderWrapper()));
|
||||||
|
// 使用关联查询
|
||||||
|
//return success(websiteService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("根据id查询网站信息记录表")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<Website> get(@PathVariable("id") Integer id, HttpServletRequest request) {
|
||||||
|
final Integer tenantId = getTenantId();
|
||||||
|
List<Website> list = websiteService.list(new LambdaQueryWrapper<Website>().eq(Website::getTenantId, tenantId));
|
||||||
|
if (CollectionUtils.isEmpty(list)) {
|
||||||
|
// 请求主服务器获取租户信息
|
||||||
|
String access_token = JwtUtil.getAccessToken(request);
|
||||||
|
// 链式构建请求
|
||||||
|
String result = HttpRequest.get("https://server.gxwebsoft.com/api/auth/tenant")
|
||||||
|
.header("Authorization", access_token)
|
||||||
|
.header("Tenantid", tenantId.toString())
|
||||||
|
.timeout(20000)//超时,毫秒
|
||||||
|
.execute().body();
|
||||||
|
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
|
System.out.println("jsonObject = " + jsonObject);
|
||||||
|
final String data = jsonObject.getString("data");
|
||||||
|
System.out.println("data = " + data);
|
||||||
|
final Company company = JSONObject.parseObject(data, Company.class);
|
||||||
|
System.out.println("company = " + company);
|
||||||
|
final Website website = new Website();
|
||||||
|
website.setTenantId(company.getTenantId());
|
||||||
|
website.setWebsiteName(company.getShortName());
|
||||||
|
website.setWebsiteLogo(company.getCompanyLogo());
|
||||||
|
website.setWebsiteIcon("/favicon.ico");
|
||||||
|
website.setWebsiteType("企业官网");
|
||||||
|
website.setDomain(company.getDomain());
|
||||||
|
website.setExpirationTime(company.getExpirationTime());
|
||||||
|
website.setIndustryParent(company.getIndustryParent());
|
||||||
|
website.setIndustryChild(company.getIndustryChild());
|
||||||
|
website.setCompanyId(company.getCompanyId());
|
||||||
|
website.setAddress(company.getAddress());
|
||||||
|
website.setComments(company.getComments());
|
||||||
|
website.setKeywords(company.getCompanyName());
|
||||||
|
website.setUserId(company.getUserId());
|
||||||
|
websiteService.save(website);
|
||||||
|
List<Website> websites = websiteService.list(new LambdaQueryWrapper<Website>().eq(Website::getTenantId, getTenantId()));
|
||||||
|
final Website website1 = websites.get(0);
|
||||||
|
website1.setFields(websiteFieldService.list(new LambdaQueryWrapper<WebsiteField>().eq(WebsiteField::getWebsiteId,website1.getWebsiteId())));
|
||||||
|
return success(website1);
|
||||||
|
}
|
||||||
|
final Website website = list.get(0);
|
||||||
|
website.setFields(websiteFieldService.list(new LambdaQueryWrapper<WebsiteField>().eq(WebsiteField::getWebsiteId,website.getWebsiteId())));
|
||||||
|
return success(website);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("添加网站信息记录表")
|
||||||
|
@PostMapping()
|
||||||
|
public ApiResult<?> save(@RequestBody Website website) {
|
||||||
|
// 记录当前登录用户id
|
||||||
|
User loginUser = getLoginUser();
|
||||||
|
if (loginUser != null) {
|
||||||
|
website.setUserId(loginUser.getUserId());
|
||||||
|
}
|
||||||
|
if (websiteService.save(website)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改网站信息记录表")
|
||||||
|
@PutMapping()
|
||||||
|
public ApiResult<?> update(@RequestBody Website website) {
|
||||||
|
if (websiteService.updateById(website)) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("删除网站信息记录表")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
|
if (websiteService.removeById(id)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量添加网站信息记录表")
|
||||||
|
@PostMapping("/batch")
|
||||||
|
public ApiResult<?> saveBatch(@RequestBody List<Website> list) {
|
||||||
|
if (websiteService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量修改网站信息记录表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<Website> batchParam) {
|
||||||
|
if (batchParam.update(websiteService, "website_id")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量删除网站信息记录表")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (websiteService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
package com.gxwebsoft.cms.controller;
|
||||||
|
|
||||||
|
import com.gxwebsoft.cms.entity.WebsiteField;
|
||||||
|
import com.gxwebsoft.cms.param.WebsiteFieldParam;
|
||||||
|
import com.gxwebsoft.cms.service.WebsiteFieldService;
|
||||||
|
import com.gxwebsoft.common.core.web.*;
|
||||||
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用参数控制器
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-05 15:53:44
|
||||||
|
*/
|
||||||
|
@Api(tags = "应用参数管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/cms/website-field")
|
||||||
|
public class WebsiteFieldController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private WebsiteFieldService websiteFieldService;
|
||||||
|
|
||||||
|
@ApiOperation("分页查询应用参数")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public ApiResult<PageResult<WebsiteField>> page(WebsiteFieldParam param) {
|
||||||
|
PageParam<WebsiteField, WebsiteFieldParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("sort_number desc");
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
return success(websiteFieldService.page(page, page.getWrapper()));
|
||||||
|
// 使用关联查询
|
||||||
|
//return success(websiteFieldService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询全部应用参数")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<WebsiteField>> list(WebsiteFieldParam param) {
|
||||||
|
PageParam<WebsiteField, WebsiteFieldParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
return success(websiteFieldService.list(page.getOrderWrapper()));
|
||||||
|
// 使用关联查询
|
||||||
|
//return success(websiteFieldService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("根据id查询应用参数")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<WebsiteField> get(@PathVariable("id") Integer id) {
|
||||||
|
return success(websiteFieldService.getById(id));
|
||||||
|
// 使用关联查询
|
||||||
|
//return success(websiteFieldService.getByIdRel(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("添加应用参数")
|
||||||
|
@PostMapping()
|
||||||
|
public ApiResult<?> save(@RequestBody WebsiteField websiteField) {
|
||||||
|
// 记录当前登录用户id
|
||||||
|
User loginUser = getLoginUser();
|
||||||
|
if (loginUser != null) {
|
||||||
|
websiteField.setUserId(loginUser.getUserId());
|
||||||
|
}
|
||||||
|
if (websiteFieldService.save(websiteField)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改应用参数")
|
||||||
|
@PutMapping()
|
||||||
|
public ApiResult<?> update(@RequestBody WebsiteField websiteField) {
|
||||||
|
if (websiteFieldService.updateById(websiteField)) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("删除应用参数")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
|
if (websiteFieldService.removeById(id)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量添加应用参数")
|
||||||
|
@PostMapping("/batch")
|
||||||
|
public ApiResult<?> saveBatch(@RequestBody List<WebsiteField> list) {
|
||||||
|
if (websiteFieldService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量修改应用参数")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<WebsiteField> batchParam) {
|
||||||
|
if (batchParam.update(websiteFieldService, "id")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量删除应用参数")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (websiteFieldService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,22 +1,21 @@
|
|||||||
package com.gxwebsoft.cms.entity;
|
package com.gxwebsoft.cms.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import java.time.LocalDateTime;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 广告位管理表
|
* 广告位管理表
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2023-10-22 15:47:09
|
* @since 2024-03-04 21:14:15
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
package com.gxwebsoft.cms.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告图片记录表
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:14:15
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value = "AdRecord对象", description = "广告图片记录表")
|
||||||
|
@TableName("cms_ad_record")
|
||||||
|
public class AdRecord implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "ID")
|
||||||
|
@TableId(value = "ad_record_id", type = IdType.AUTO)
|
||||||
|
private Integer adRecordId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "广告标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "图片地址")
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "链接地址")
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "广告位ID")
|
||||||
|
private Integer adId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户id")
|
||||||
|
private Integer tenantId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "注册时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
package com.gxwebsoft.cms.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面管理记录表
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:20:40
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value = "Design对象", description = "页面管理记录表")
|
||||||
|
@TableName("cms_design")
|
||||||
|
public class Design implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "ID")
|
||||||
|
@TableId(value = "page_id", type = IdType.AUTO)
|
||||||
|
private Integer pageId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "上级id, 0是顶级")
|
||||||
|
private Integer parentId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "页面标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "页面关键词")
|
||||||
|
private String keywords;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "页面描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "页面路由地址")
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "缩列图")
|
||||||
|
private String photo;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户ID")
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户id")
|
||||||
|
private Integer tenantId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "注册时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
package com.gxwebsoft.cms.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面组件表
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:20:40
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value = "DesignRecord对象", description = "页面组件表")
|
||||||
|
@TableName("cms_design_record")
|
||||||
|
public class DesignRecord implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "ID")
|
||||||
|
@TableId(value = "page_id", type = IdType.AUTO)
|
||||||
|
private Integer pageId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "上级id, 0是顶级")
|
||||||
|
private Integer parentId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "页面标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "页面关键词")
|
||||||
|
private String keywords;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "页面描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "页面路由地址")
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "缩列图")
|
||||||
|
private String photo;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户ID")
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户id")
|
||||||
|
private Integer tenantId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "注册时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
package com.gxwebsoft.cms.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网站导航记录表
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:27:55
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value = "Navigation对象", description = "网站导航记录表")
|
||||||
|
@TableName("cms_navigation")
|
||||||
|
public class Navigation implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "ID")
|
||||||
|
@TableId(value = "navigation_id", type = IdType.AUTO)
|
||||||
|
private Integer navigationId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "上级id, 0是顶级")
|
||||||
|
private Integer parentId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "菜单名称")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "菜单路由地址")
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "菜单组件地址, 目录可为空")
|
||||||
|
private String component;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "打开位置")
|
||||||
|
private String target;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "菜单图标")
|
||||||
|
private String icon;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "图标颜色")
|
||||||
|
private String color;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)")
|
||||||
|
private Integer hide;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "菜单侧栏选中的path")
|
||||||
|
private String active;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "其它路由元信息")
|
||||||
|
private String meta;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户ID")
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户id")
|
||||||
|
private Integer tenantId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "注册时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
package com.gxwebsoft.cms.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网站信息记录表
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:14:15
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value = "Website对象", description = "网站信息记录表")
|
||||||
|
@TableName("cms_website")
|
||||||
|
public class Website implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "站点ID")
|
||||||
|
@TableId(value = "website_id", type = IdType.AUTO)
|
||||||
|
private Integer websiteId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "网站名称")
|
||||||
|
private String websiteName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "网站标识")
|
||||||
|
private String websiteCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "网站LOGO")
|
||||||
|
private String websiteIcon;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "网站LOGO")
|
||||||
|
private String websiteLogo;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "网站类型")
|
||||||
|
private String websiteType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "绑定域名")
|
||||||
|
private String domain;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "网站关键词")
|
||||||
|
private String keywords;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "服务到期时间")
|
||||||
|
private Date expirationTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "模版ID")
|
||||||
|
private Integer templateId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "行业类型(父级)")
|
||||||
|
private String industryParent;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "行业类型(子级)")
|
||||||
|
private String industryChild;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "企业ID")
|
||||||
|
private Integer companyId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "所在国家")
|
||||||
|
private String country;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "所在省份")
|
||||||
|
private String province;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "所在城市")
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "所在辖区")
|
||||||
|
private String region;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "街道地址")
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "经度")
|
||||||
|
private String longitude;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "纬度")
|
||||||
|
private String latitude;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否推荐")
|
||||||
|
private Integer recommend;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序号")
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户ID")
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||||
|
@TableLogic
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户id")
|
||||||
|
private Integer tenantId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "预设字段")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<WebsiteField> fields;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package com.gxwebsoft.cms.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用参数
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-05 15:53:43
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value = "WebsiteField对象", description = "应用参数")
|
||||||
|
@TableName("cms_website_field")
|
||||||
|
public class WebsiteField implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "自增ID")
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "网站ID")
|
||||||
|
private Integer websiteId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户ID")
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态, 0正常, 1删除")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户id")
|
||||||
|
private Integer tenantId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "注册时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -12,7 +12,7 @@ import java.util.List;
|
|||||||
* 广告位管理表Mapper
|
* 广告位管理表Mapper
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2023-10-22 15:47:09
|
* @since 2024-03-04 21:14:15
|
||||||
*/
|
*/
|
||||||
public interface AdMapper extends BaseMapper<Ad> {
|
public interface AdMapper extends BaseMapper<Ad> {
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.gxwebsoft.cms.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.gxwebsoft.cms.entity.AdRecord;
|
||||||
|
import com.gxwebsoft.cms.param.AdRecordParam;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告图片记录表Mapper
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:14:15
|
||||||
|
*/
|
||||||
|
public interface AdRecordMapper extends BaseMapper<AdRecord> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<AdRecord>
|
||||||
|
*/
|
||||||
|
List<AdRecord> selectPageRel(@Param("page") IPage<AdRecord> page,
|
||||||
|
@Param("param") AdRecordParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<AdRecord> selectListRel(@Param("param") AdRecordParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.gxwebsoft.cms.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.gxwebsoft.cms.entity.Design;
|
||||||
|
import com.gxwebsoft.cms.param.DesignParam;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面管理记录表Mapper
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:20:40
|
||||||
|
*/
|
||||||
|
public interface DesignMapper extends BaseMapper<Design> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<Design>
|
||||||
|
*/
|
||||||
|
List<Design> selectPageRel(@Param("page") IPage<Design> page,
|
||||||
|
@Param("param") DesignParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<Design> selectListRel(@Param("param") DesignParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.gxwebsoft.cms.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.gxwebsoft.cms.entity.DesignRecord;
|
||||||
|
import com.gxwebsoft.cms.param.DesignRecordParam;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面组件表Mapper
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:20:40
|
||||||
|
*/
|
||||||
|
public interface DesignRecordMapper extends BaseMapper<DesignRecord> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<DesignRecord>
|
||||||
|
*/
|
||||||
|
List<DesignRecord> selectPageRel(@Param("page") IPage<DesignRecord> page,
|
||||||
|
@Param("param") DesignRecordParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<DesignRecord> selectListRel(@Param("param") DesignRecordParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.gxwebsoft.cms.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.gxwebsoft.cms.entity.Navigation;
|
||||||
|
import com.gxwebsoft.cms.param.NavigationParam;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网站导航记录表Mapper
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:27:55
|
||||||
|
*/
|
||||||
|
public interface NavigationMapper extends BaseMapper<Navigation> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<Navigation>
|
||||||
|
*/
|
||||||
|
List<Navigation> selectPageRel(@Param("page") IPage<Navigation> page,
|
||||||
|
@Param("param") NavigationParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<Navigation> selectListRel(@Param("param") NavigationParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.gxwebsoft.cms.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.gxwebsoft.cms.entity.WebsiteField;
|
||||||
|
import com.gxwebsoft.cms.param.WebsiteFieldParam;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用参数Mapper
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-05 15:53:44
|
||||||
|
*/
|
||||||
|
public interface WebsiteFieldMapper extends BaseMapper<WebsiteField> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<WebsiteField>
|
||||||
|
*/
|
||||||
|
List<WebsiteField> selectPageRel(@Param("page") IPage<WebsiteField> page,
|
||||||
|
@Param("param") WebsiteFieldParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<WebsiteField> selectListRel(@Param("param") WebsiteFieldParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.gxwebsoft.cms.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.gxwebsoft.cms.entity.Website;
|
||||||
|
import com.gxwebsoft.cms.param.WebsiteParam;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网站信息记录表Mapper
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:14:15
|
||||||
|
*/
|
||||||
|
public interface WebsiteMapper extends BaseMapper<Website> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<Website>
|
||||||
|
*/
|
||||||
|
List<Website> selectPageRel(@Param("page") IPage<Website> page,
|
||||||
|
@Param("param") WebsiteParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<Website> selectListRel(@Param("param") WebsiteParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.cms.mapper.AdRecordMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*
|
||||||
|
FROM cms_ad_record a
|
||||||
|
<where>
|
||||||
|
<if test="param.adRecordId != null">
|
||||||
|
AND a.ad_record_id = #{param.adRecordId}
|
||||||
|
</if>
|
||||||
|
<if test="param.title != null">
|
||||||
|
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.path != null">
|
||||||
|
AND a.path LIKE CONCAT('%', #{param.path}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.url != null">
|
||||||
|
AND a.url LIKE CONCAT('%', #{param.url}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.adId != null">
|
||||||
|
AND a.ad_id = #{param.adId}
|
||||||
|
</if>
|
||||||
|
<if test="param.sortNumber != null">
|
||||||
|
AND a.sort_number = #{param.sortNumber}
|
||||||
|
</if>
|
||||||
|
<if test="param.comments != null">
|
||||||
|
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.status != null">
|
||||||
|
AND a.status = #{param.status}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.AdRecord">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.AdRecord">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.cms.mapper.DesignMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*
|
||||||
|
FROM cms_design a
|
||||||
|
<where>
|
||||||
|
<if test="param.pageId != null">
|
||||||
|
AND a.page_id = #{param.pageId}
|
||||||
|
</if>
|
||||||
|
<if test="param.parentId != null">
|
||||||
|
AND a.parent_id = #{param.parentId}
|
||||||
|
</if>
|
||||||
|
<if test="param.title != null">
|
||||||
|
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.keywords != null">
|
||||||
|
AND a.keywords LIKE CONCAT('%', #{param.keywords}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.description != null">
|
||||||
|
AND a.description LIKE CONCAT('%', #{param.description}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.path != null">
|
||||||
|
AND a.path LIKE CONCAT('%', #{param.path}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.photo != null">
|
||||||
|
AND a.photo LIKE CONCAT('%', #{param.photo}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.sortNumber != null">
|
||||||
|
AND a.sort_number = #{param.sortNumber}
|
||||||
|
</if>
|
||||||
|
<if test="param.comments != null">
|
||||||
|
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.status != null">
|
||||||
|
AND a.status = #{param.status}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.Design">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.Design">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.cms.mapper.DesignRecordMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*
|
||||||
|
FROM cms_design_record a
|
||||||
|
<where>
|
||||||
|
<if test="param.pageId != null">
|
||||||
|
AND a.page_id = #{param.pageId}
|
||||||
|
</if>
|
||||||
|
<if test="param.parentId != null">
|
||||||
|
AND a.parent_id = #{param.parentId}
|
||||||
|
</if>
|
||||||
|
<if test="param.title != null">
|
||||||
|
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.keywords != null">
|
||||||
|
AND a.keywords LIKE CONCAT('%', #{param.keywords}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.description != null">
|
||||||
|
AND a.description LIKE CONCAT('%', #{param.description}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.path != null">
|
||||||
|
AND a.path LIKE CONCAT('%', #{param.path}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.photo != null">
|
||||||
|
AND a.photo LIKE CONCAT('%', #{param.photo}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.sortNumber != null">
|
||||||
|
AND a.sort_number = #{param.sortNumber}
|
||||||
|
</if>
|
||||||
|
<if test="param.comments != null">
|
||||||
|
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.status != null">
|
||||||
|
AND a.status = #{param.status}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.DesignRecord">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.DesignRecord">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.cms.mapper.NavigationMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*
|
||||||
|
FROM cms_navigation a
|
||||||
|
<where>
|
||||||
|
<if test="param.navigationId != null">
|
||||||
|
AND a.navigation_id = #{param.navigationId}
|
||||||
|
</if>
|
||||||
|
<if test="param.parentId != null">
|
||||||
|
AND a.parent_id = #{param.parentId}
|
||||||
|
</if>
|
||||||
|
<if test="param.title != null">
|
||||||
|
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.path != null">
|
||||||
|
AND a.path LIKE CONCAT('%', #{param.path}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.component != null">
|
||||||
|
AND a.component LIKE CONCAT('%', #{param.component}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.target != null">
|
||||||
|
AND a.target LIKE CONCAT('%', #{param.target}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.icon != null">
|
||||||
|
AND a.icon LIKE CONCAT('%', #{param.icon}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.color != null">
|
||||||
|
AND a.color LIKE CONCAT('%', #{param.color}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.hide != null">
|
||||||
|
AND a.hide = #{param.hide}
|
||||||
|
</if>
|
||||||
|
<if test="param.active != null">
|
||||||
|
AND a.active LIKE CONCAT('%', #{param.active}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.meta != null">
|
||||||
|
AND a.meta LIKE CONCAT('%', #{param.meta}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.sortNumber != null">
|
||||||
|
AND a.sort_number = #{param.sortNumber}
|
||||||
|
</if>
|
||||||
|
<if test="param.comments != null">
|
||||||
|
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.status != null">
|
||||||
|
AND a.status = #{param.status}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.Navigation">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.Navigation">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.cms.mapper.WebsiteFieldMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*
|
||||||
|
FROM cms_website_field a
|
||||||
|
<where>
|
||||||
|
<if test="param.id != null">
|
||||||
|
AND a.id = #{param.id}
|
||||||
|
</if>
|
||||||
|
<if test="param.websiteId != null">
|
||||||
|
AND a.website_id = #{param.websiteId}
|
||||||
|
</if>
|
||||||
|
<if test="param.name != null">
|
||||||
|
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.comments != null">
|
||||||
|
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.status != null">
|
||||||
|
AND a.status = #{param.status}
|
||||||
|
</if>
|
||||||
|
<if test="param.sortNumber != null">
|
||||||
|
AND a.sort_number = #{param.sortNumber}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.WebsiteField">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.WebsiteField">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,107 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.cms.mapper.WebsiteMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*
|
||||||
|
FROM cms_website a
|
||||||
|
<where>
|
||||||
|
<if test="param.websiteId != null">
|
||||||
|
AND a.website_id = #{param.websiteId}
|
||||||
|
</if>
|
||||||
|
<if test="param.websiteName != null">
|
||||||
|
AND a.website_name LIKE CONCAT('%', #{param.websiteName}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.websiteCode != null">
|
||||||
|
AND a.website_code LIKE CONCAT('%', #{param.websiteCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.websiteIcon != null">
|
||||||
|
AND a.website_icon LIKE CONCAT('%', #{param.websiteIcon}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.websiteLogo != null">
|
||||||
|
AND a.website_logo LIKE CONCAT('%', #{param.websiteLogo}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.websiteType != null">
|
||||||
|
AND a.website_type LIKE CONCAT('%', #{param.websiteType}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.domain != null">
|
||||||
|
AND a.domain LIKE CONCAT('%', #{param.domain}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.expirationTime != null">
|
||||||
|
AND a.expiration_time LIKE CONCAT('%', #{param.expirationTime}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.templateId != null">
|
||||||
|
AND a.template_id = #{param.templateId}
|
||||||
|
</if>
|
||||||
|
<if test="param.industryParent != null">
|
||||||
|
AND a.industry_parent LIKE CONCAT('%', #{param.industryParent}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.industryChild != null">
|
||||||
|
AND a.industry_child LIKE CONCAT('%', #{param.industryChild}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.companyId != null">
|
||||||
|
AND a.company_id = #{param.companyId}
|
||||||
|
</if>
|
||||||
|
<if test="param.country != null">
|
||||||
|
AND a.country LIKE CONCAT('%', #{param.country}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.province != null">
|
||||||
|
AND a.province LIKE CONCAT('%', #{param.province}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.city != null">
|
||||||
|
AND a.city LIKE CONCAT('%', #{param.city}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.region != null">
|
||||||
|
AND a.region LIKE CONCAT('%', #{param.region}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.address != null">
|
||||||
|
AND a.address LIKE CONCAT('%', #{param.address}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.longitude != null">
|
||||||
|
AND a.longitude LIKE CONCAT('%', #{param.longitude}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.latitude != null">
|
||||||
|
AND a.latitude LIKE CONCAT('%', #{param.latitude}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.comments != null">
|
||||||
|
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.recommend != null">
|
||||||
|
AND a.recommend = #{param.recommend}
|
||||||
|
</if>
|
||||||
|
<if test="param.status != null">
|
||||||
|
AND a.status = #{param.status}
|
||||||
|
</if>
|
||||||
|
<if test="param.sortNumber != null">
|
||||||
|
AND a.sort_number = #{param.sortNumber}
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.deleted != null">
|
||||||
|
AND a.deleted = #{param.deleted}
|
||||||
|
</if>
|
||||||
|
<if test="param.deleted == null">
|
||||||
|
AND a.deleted = 0
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.Website">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.Website">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode;
|
|||||||
* 广告位管理表查询参数
|
* 广告位管理表查询参数
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2023-10-22 15:47:09
|
* @since 2024-03-04 21:14:15
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package com.gxwebsoft.cms.param;
|
||||||
|
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
|
import com.gxwebsoft.common.core.web.BaseParam;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告图片记录表查询参数
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:14:15
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
@ApiModel(value = "AdRecordParam对象", description = "广告图片记录表查询参数")
|
||||||
|
public class AdRecordParam extends BaseParam {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer adRecordId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "广告标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "图片地址")
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "链接地址")
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "广告位ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer adId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.gxwebsoft.cms.param;
|
||||||
|
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
|
import com.gxwebsoft.common.core.web.BaseParam;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面管理记录表查询参数
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:20:40
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
@ApiModel(value = "DesignParam对象", description = "页面管理记录表查询参数")
|
||||||
|
public class DesignParam extends BaseParam {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer pageId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "上级id, 0是顶级")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer parentId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "页面标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "页面关键词")
|
||||||
|
private String keywords;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "页面描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "页面路由地址")
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "缩列图")
|
||||||
|
private String photo;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.gxwebsoft.cms.param;
|
||||||
|
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
|
import com.gxwebsoft.common.core.web.BaseParam;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面组件表查询参数
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:20:40
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
@ApiModel(value = "DesignRecordParam对象", description = "页面组件表查询参数")
|
||||||
|
public class DesignRecordParam extends BaseParam {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer pageId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "上级id, 0是顶级")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer parentId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "页面标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "页面关键词")
|
||||||
|
private String keywords;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "页面描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "页面路由地址")
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "缩列图")
|
||||||
|
private String photo;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
package com.gxwebsoft.cms.param;
|
||||||
|
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
|
import com.gxwebsoft.common.core.web.BaseParam;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网站导航记录表查询参数
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:27:55
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
@ApiModel(value = "NavigationParam对象", description = "网站导航记录表查询参数")
|
||||||
|
public class NavigationParam extends BaseParam {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer navigationId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "上级id, 0是顶级")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer parentId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "菜单名称")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "菜单路由地址")
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "菜单组件地址, 目录可为空")
|
||||||
|
private String component;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "打开位置")
|
||||||
|
private String target;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "菜单图标")
|
||||||
|
private String icon;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "图标颜色")
|
||||||
|
private String color;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer hide;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "菜单侧栏选中的path")
|
||||||
|
private String active;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "其它路由元信息")
|
||||||
|
private String meta;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.gxwebsoft.cms.param;
|
||||||
|
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
|
import com.gxwebsoft.common.core.web.BaseParam;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用参数查询参数
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-05 15:53:43
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
@ApiModel(value = "WebsiteFieldParam对象", description = "应用参数查询参数")
|
||||||
|
public class WebsiteFieldParam extends BaseParam {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "自增ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "网站ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer websiteId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态, 0正常, 1删除")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
package com.gxwebsoft.cms.param;
|
||||||
|
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
|
import com.gxwebsoft.common.core.web.BaseParam;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网站信息记录表查询参数
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:14:15
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
@ApiModel(value = "WebsiteParam对象", description = "网站信息记录表查询参数")
|
||||||
|
public class WebsiteParam extends BaseParam {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "站点ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer websiteId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "网站名称")
|
||||||
|
private String websiteName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "网站标识")
|
||||||
|
private String websiteCode;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "网站LOGO")
|
||||||
|
private String websiteIcon;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "网站LOGO")
|
||||||
|
private String websiteLogo;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "网站类型")
|
||||||
|
private String websiteType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "绑定域名")
|
||||||
|
private String domain;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "服务到期时间")
|
||||||
|
private String expirationTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "模版ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer templateId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "行业类型(父级)")
|
||||||
|
private String industryParent;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "行业类型(子级)")
|
||||||
|
private String industryChild;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "企业ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer companyId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "所在国家")
|
||||||
|
private String country;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "所在省份")
|
||||||
|
private String province;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "所在城市")
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "所在辖区")
|
||||||
|
private String region;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "街道地址")
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "经度")
|
||||||
|
private String longitude;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "纬度")
|
||||||
|
private String latitude;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否推荐")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer recommend;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序号")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gxwebsoft.cms.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.cms.entity.AdRecord;
|
||||||
|
import com.gxwebsoft.cms.param.AdRecordParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告图片记录表Service
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:14:15
|
||||||
|
*/
|
||||||
|
public interface AdRecordService extends IService<AdRecord> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<AdRecord>
|
||||||
|
*/
|
||||||
|
PageResult<AdRecord> pageRel(AdRecordParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<AdRecord>
|
||||||
|
*/
|
||||||
|
List<AdRecord> listRel(AdRecordParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param adRecordId ID
|
||||||
|
* @return AdRecord
|
||||||
|
*/
|
||||||
|
AdRecord getByIdRel(Integer adRecordId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -11,7 +11,7 @@ import java.util.List;
|
|||||||
* 广告位管理表Service
|
* 广告位管理表Service
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2023-10-22 15:47:09
|
* @since 2024-03-04 21:14:15
|
||||||
*/
|
*/
|
||||||
public interface AdService extends IService<Ad> {
|
public interface AdService extends IService<Ad> {
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gxwebsoft.cms.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.cms.entity.DesignRecord;
|
||||||
|
import com.gxwebsoft.cms.param.DesignRecordParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面组件表Service
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:20:40
|
||||||
|
*/
|
||||||
|
public interface DesignRecordService extends IService<DesignRecord> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<DesignRecord>
|
||||||
|
*/
|
||||||
|
PageResult<DesignRecord> pageRel(DesignRecordParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<DesignRecord>
|
||||||
|
*/
|
||||||
|
List<DesignRecord> listRel(DesignRecordParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param pageId ID
|
||||||
|
* @return DesignRecord
|
||||||
|
*/
|
||||||
|
DesignRecord getByIdRel(Integer pageId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gxwebsoft.cms.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.cms.entity.Design;
|
||||||
|
import com.gxwebsoft.cms.param.DesignParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面管理记录表Service
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:20:40
|
||||||
|
*/
|
||||||
|
public interface DesignService extends IService<Design> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<Design>
|
||||||
|
*/
|
||||||
|
PageResult<Design> pageRel(DesignParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<Design>
|
||||||
|
*/
|
||||||
|
List<Design> listRel(DesignParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param pageId ID
|
||||||
|
* @return Design
|
||||||
|
*/
|
||||||
|
Design getByIdRel(Integer pageId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gxwebsoft.cms.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.cms.entity.Navigation;
|
||||||
|
import com.gxwebsoft.cms.param.NavigationParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网站导航记录表Service
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:27:55
|
||||||
|
*/
|
||||||
|
public interface NavigationService extends IService<Navigation> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<Navigation>
|
||||||
|
*/
|
||||||
|
PageResult<Navigation> pageRel(NavigationParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<Navigation>
|
||||||
|
*/
|
||||||
|
List<Navigation> listRel(NavigationParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param navigationId ID
|
||||||
|
* @return Navigation
|
||||||
|
*/
|
||||||
|
Navigation getByIdRel(Integer navigationId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gxwebsoft.cms.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.cms.entity.WebsiteField;
|
||||||
|
import com.gxwebsoft.cms.param.WebsiteFieldParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用参数Service
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-05 15:53:44
|
||||||
|
*/
|
||||||
|
public interface WebsiteFieldService extends IService<WebsiteField> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<WebsiteField>
|
||||||
|
*/
|
||||||
|
PageResult<WebsiteField> pageRel(WebsiteFieldParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<WebsiteField>
|
||||||
|
*/
|
||||||
|
List<WebsiteField> listRel(WebsiteFieldParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param id 自增ID
|
||||||
|
* @return WebsiteField
|
||||||
|
*/
|
||||||
|
WebsiteField getByIdRel(Integer id);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gxwebsoft.cms.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.cms.entity.Website;
|
||||||
|
import com.gxwebsoft.cms.param.WebsiteParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网站信息记录表Service
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:14:15
|
||||||
|
*/
|
||||||
|
public interface WebsiteService extends IService<Website> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<Website>
|
||||||
|
*/
|
||||||
|
PageResult<Website> pageRel(WebsiteParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<Website>
|
||||||
|
*/
|
||||||
|
List<Website> listRel(WebsiteParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param websiteId 站点ID
|
||||||
|
* @return Website
|
||||||
|
*/
|
||||||
|
Website getByIdRel(Integer websiteId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.gxwebsoft.cms.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.gxwebsoft.cms.mapper.AdRecordMapper;
|
||||||
|
import com.gxwebsoft.cms.service.AdRecordService;
|
||||||
|
import com.gxwebsoft.cms.entity.AdRecord;
|
||||||
|
import com.gxwebsoft.cms.param.AdRecordParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告图片记录表Service实现
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:14:15
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class AdRecordServiceImpl extends ServiceImpl<AdRecordMapper, AdRecord> implements AdRecordService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<AdRecord> pageRel(AdRecordParam param) {
|
||||||
|
PageParam<AdRecord, AdRecordParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
List<AdRecord> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<AdRecord> listRel(AdRecordParam param) {
|
||||||
|
List<AdRecord> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<AdRecord, AdRecordParam> page = new PageParam<>();
|
||||||
|
//page.setDefaultOrder("create_time desc");
|
||||||
|
return page.sortRecords(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AdRecord getByIdRel(Integer adRecordId) {
|
||||||
|
AdRecordParam param = new AdRecordParam();
|
||||||
|
param.setAdRecordId(adRecordId);
|
||||||
|
return param.getOne(baseMapper.selectListRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -15,7 +15,7 @@ import java.util.List;
|
|||||||
* 广告位管理表Service实现
|
* 广告位管理表Service实现
|
||||||
*
|
*
|
||||||
* @author 科技小王子
|
* @author 科技小王子
|
||||||
* @since 2023-10-22 15:47:09
|
* @since 2024-03-04 21:14:15
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class AdServiceImpl extends ServiceImpl<AdMapper, Ad> implements AdService {
|
public class AdServiceImpl extends ServiceImpl<AdMapper, Ad> implements AdService {
|
||||||
@@ -23,7 +23,7 @@ public class AdServiceImpl extends ServiceImpl<AdMapper, Ad> implements AdServic
|
|||||||
@Override
|
@Override
|
||||||
public PageResult<Ad> pageRel(AdParam param) {
|
public PageResult<Ad> pageRel(AdParam param) {
|
||||||
PageParam<Ad, AdParam> page = new PageParam<>(param);
|
PageParam<Ad, AdParam> page = new PageParam<>(param);
|
||||||
//page.setDefaultOrder("create_time desc");
|
page.setDefaultOrder("create_time desc");
|
||||||
List<Ad> list = baseMapper.selectPageRel(page, param);
|
List<Ad> list = baseMapper.selectPageRel(page, param);
|
||||||
return new PageResult<>(list, page.getTotal());
|
return new PageResult<>(list, page.getTotal());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.gxwebsoft.cms.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.gxwebsoft.cms.mapper.DesignRecordMapper;
|
||||||
|
import com.gxwebsoft.cms.service.DesignRecordService;
|
||||||
|
import com.gxwebsoft.cms.entity.DesignRecord;
|
||||||
|
import com.gxwebsoft.cms.param.DesignRecordParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面组件表Service实现
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:20:40
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DesignRecordServiceImpl extends ServiceImpl<DesignRecordMapper, DesignRecord> implements DesignRecordService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<DesignRecord> pageRel(DesignRecordParam param) {
|
||||||
|
PageParam<DesignRecord, DesignRecordParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
List<DesignRecord> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DesignRecord> listRel(DesignRecordParam param) {
|
||||||
|
List<DesignRecord> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<DesignRecord, DesignRecordParam> page = new PageParam<>();
|
||||||
|
//page.setDefaultOrder("create_time desc");
|
||||||
|
return page.sortRecords(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DesignRecord getByIdRel(Integer pageId) {
|
||||||
|
DesignRecordParam param = new DesignRecordParam();
|
||||||
|
param.setPageId(pageId);
|
||||||
|
return param.getOne(baseMapper.selectListRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.gxwebsoft.cms.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.gxwebsoft.cms.mapper.DesignMapper;
|
||||||
|
import com.gxwebsoft.cms.service.DesignService;
|
||||||
|
import com.gxwebsoft.cms.entity.Design;
|
||||||
|
import com.gxwebsoft.cms.param.DesignParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面管理记录表Service实现
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:20:40
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> implements DesignService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<Design> pageRel(DesignParam param) {
|
||||||
|
PageParam<Design, DesignParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
List<Design> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Design> listRel(DesignParam param) {
|
||||||
|
List<Design> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<Design, DesignParam> page = new PageParam<>();
|
||||||
|
//page.setDefaultOrder("create_time desc");
|
||||||
|
return page.sortRecords(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Design getByIdRel(Integer pageId) {
|
||||||
|
DesignParam param = new DesignParam();
|
||||||
|
param.setPageId(pageId);
|
||||||
|
return param.getOne(baseMapper.selectListRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.gxwebsoft.cms.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.gxwebsoft.cms.mapper.NavigationMapper;
|
||||||
|
import com.gxwebsoft.cms.service.NavigationService;
|
||||||
|
import com.gxwebsoft.cms.entity.Navigation;
|
||||||
|
import com.gxwebsoft.cms.param.NavigationParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网站导航记录表Service实现
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:27:55
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class NavigationServiceImpl extends ServiceImpl<NavigationMapper, Navigation> implements NavigationService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<Navigation> pageRel(NavigationParam param) {
|
||||||
|
PageParam<Navigation, NavigationParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("sort_number desc,create_time desc");
|
||||||
|
List<Navigation> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Navigation> listRel(NavigationParam param) {
|
||||||
|
List<Navigation> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<Navigation, NavigationParam> page = new PageParam<>();
|
||||||
|
page.setDefaultOrder("sort_number desc,create_time desc");
|
||||||
|
return page.sortRecords(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Navigation getByIdRel(Integer navigationId) {
|
||||||
|
NavigationParam param = new NavigationParam();
|
||||||
|
param.setNavigationId(navigationId);
|
||||||
|
return param.getOne(baseMapper.selectListRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.gxwebsoft.cms.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.gxwebsoft.cms.mapper.WebsiteFieldMapper;
|
||||||
|
import com.gxwebsoft.cms.service.WebsiteFieldService;
|
||||||
|
import com.gxwebsoft.cms.entity.WebsiteField;
|
||||||
|
import com.gxwebsoft.cms.param.WebsiteFieldParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用参数Service实现
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-05 15:53:44
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WebsiteFieldServiceImpl extends ServiceImpl<WebsiteFieldMapper, WebsiteField> implements WebsiteFieldService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<WebsiteField> pageRel(WebsiteFieldParam param) {
|
||||||
|
PageParam<WebsiteField, WebsiteFieldParam> page = new PageParam<>(param);
|
||||||
|
//page.setDefaultOrder("create_time desc");
|
||||||
|
List<WebsiteField> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<WebsiteField> listRel(WebsiteFieldParam param) {
|
||||||
|
List<WebsiteField> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<WebsiteField, WebsiteFieldParam> page = new PageParam<>();
|
||||||
|
//page.setDefaultOrder("create_time desc");
|
||||||
|
return page.sortRecords(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WebsiteField getByIdRel(Integer id) {
|
||||||
|
WebsiteFieldParam param = new WebsiteFieldParam();
|
||||||
|
param.setId(id);
|
||||||
|
return param.getOne(baseMapper.selectListRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.gxwebsoft.cms.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.gxwebsoft.cms.mapper.WebsiteMapper;
|
||||||
|
import com.gxwebsoft.cms.service.WebsiteService;
|
||||||
|
import com.gxwebsoft.cms.entity.Website;
|
||||||
|
import com.gxwebsoft.cms.param.WebsiteParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 网站信息记录表Service实现
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-04 21:14:15
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class WebsiteServiceImpl extends ServiceImpl<WebsiteMapper, Website> implements WebsiteService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<Website> pageRel(WebsiteParam param) {
|
||||||
|
PageParam<Website, WebsiteParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
List<Website> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Website> listRel(WebsiteParam param) {
|
||||||
|
List<Website> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<Website, WebsiteParam> page = new PageParam<>();
|
||||||
|
//page.setDefaultOrder("create_time desc");
|
||||||
|
return page.sortRecords(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Website getByIdRel(Integer websiteId) {
|
||||||
|
WebsiteParam param = new WebsiteParam();
|
||||||
|
param.setWebsiteId(websiteId);
|
||||||
|
return param.getOne(baseMapper.selectListRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -54,7 +54,7 @@ public class AssetsController extends BaseController {
|
|||||||
);
|
);
|
||||||
Integer totalNum2 = assetsService.count(
|
Integer totalNum2 = assetsService.count(
|
||||||
new LambdaQueryWrapper<Assets>()
|
new LambdaQueryWrapper<Assets>()
|
||||||
.eq(Assets::getStatus, "已过期")
|
.eq(Assets::getStatus, "已到期")
|
||||||
);
|
);
|
||||||
Integer totalNum3 = assetsService.count(
|
Integer totalNum3 = assetsService.count(
|
||||||
new LambdaQueryWrapper<Assets>()
|
new LambdaQueryWrapper<Assets>()
|
||||||
|
|||||||
@@ -0,0 +1,115 @@
|
|||||||
|
package com.gxwebsoft.oa.controller;
|
||||||
|
|
||||||
|
import com.gxwebsoft.common.core.web.*;
|
||||||
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
|
import com.gxwebsoft.oa.entity.GoodsCategory;
|
||||||
|
import com.gxwebsoft.oa.param.GoodsCategoryParam;
|
||||||
|
import com.gxwebsoft.oa.service.GoodsCategoryService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品分类表控制器
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-01 12:37:25
|
||||||
|
*/
|
||||||
|
@Api(tags = "商品分类表管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/oa/goods-category")
|
||||||
|
public class GoodsCategoryController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private GoodsCategoryService goodsCategoryService;
|
||||||
|
|
||||||
|
@ApiOperation("分页查询商品分类表")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public ApiResult<PageResult<GoodsCategory>> page(GoodsCategoryParam param) {
|
||||||
|
PageParam<GoodsCategory, GoodsCategoryParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
return success(goodsCategoryService.page(page, page.getWrapper()));
|
||||||
|
// 使用关联查询
|
||||||
|
//return success(goodsCategoryService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询全部商品分类表")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<GoodsCategory>> list(GoodsCategoryParam param) {
|
||||||
|
PageParam<GoodsCategory, GoodsCategoryParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
return success(goodsCategoryService.list(page.getOrderWrapper()));
|
||||||
|
// 使用关联查询
|
||||||
|
//return success(goodsCategoryService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("根据id查询商品分类表")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<GoodsCategory> get(@PathVariable("id") Integer id) {
|
||||||
|
return success(goodsCategoryService.getById(id));
|
||||||
|
// 使用关联查询
|
||||||
|
//return success(goodsCategoryService.getByIdRel(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("添加商品分类表")
|
||||||
|
@PostMapping()
|
||||||
|
public ApiResult<?> save(@RequestBody GoodsCategory goodsCategory) {
|
||||||
|
// 记录当前登录用户id
|
||||||
|
User loginUser = getLoginUser();
|
||||||
|
if (loginUser != null) {
|
||||||
|
goodsCategory.setUserId(loginUser.getUserId());
|
||||||
|
}
|
||||||
|
if (goodsCategoryService.save(goodsCategory)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改商品分类表")
|
||||||
|
@PutMapping()
|
||||||
|
public ApiResult<?> update(@RequestBody GoodsCategory goodsCategory) {
|
||||||
|
if (goodsCategoryService.updateById(goodsCategory)) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("删除商品分类表")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
|
if (goodsCategoryService.removeById(id)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量添加商品分类表")
|
||||||
|
@PostMapping("/batch")
|
||||||
|
public ApiResult<?> saveBatch(@RequestBody List<GoodsCategory> list) {
|
||||||
|
if (goodsCategoryService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量修改商品分类表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<GoodsCategory> batchParam) {
|
||||||
|
if (batchParam.update(goodsCategoryService, "category_id")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量删除商品分类表")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (goodsCategoryService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,115 @@
|
|||||||
|
package com.gxwebsoft.oa.controller;
|
||||||
|
|
||||||
|
import com.gxwebsoft.common.core.web.*;
|
||||||
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
|
import com.gxwebsoft.oa.entity.Goods;
|
||||||
|
import com.gxwebsoft.oa.param.GoodsParam;
|
||||||
|
import com.gxwebsoft.oa.service.GoodsService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品记录表控制器
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-01 12:37:25
|
||||||
|
*/
|
||||||
|
@Api(tags = "商品记录表管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/oa/goods")
|
||||||
|
public class GoodsController extends BaseController {
|
||||||
|
@Resource
|
||||||
|
private GoodsService goodsService;
|
||||||
|
|
||||||
|
@ApiOperation("分页查询商品记录表")
|
||||||
|
@GetMapping("/page")
|
||||||
|
public ApiResult<PageResult<Goods>> page(GoodsParam param) {
|
||||||
|
PageParam<Goods, GoodsParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
return success(goodsService.page(page, page.getWrapper()));
|
||||||
|
// 使用关联查询
|
||||||
|
//return success(goodsService.pageRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询全部商品记录表")
|
||||||
|
@GetMapping()
|
||||||
|
public ApiResult<List<Goods>> list(GoodsParam param) {
|
||||||
|
PageParam<Goods, GoodsParam> page = new PageParam<>(param);
|
||||||
|
page.setDefaultOrder("create_time desc");
|
||||||
|
return success(goodsService.list(page.getOrderWrapper()));
|
||||||
|
// 使用关联查询
|
||||||
|
//return success(goodsService.listRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("根据id查询商品记录表")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ApiResult<Goods> get(@PathVariable("id") Integer id) {
|
||||||
|
return success(goodsService.getById(id));
|
||||||
|
// 使用关联查询
|
||||||
|
//return success(goodsService.getByIdRel(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("添加商品记录表")
|
||||||
|
@PostMapping()
|
||||||
|
public ApiResult<?> save(@RequestBody Goods goods) {
|
||||||
|
// 记录当前登录用户id
|
||||||
|
User loginUser = getLoginUser();
|
||||||
|
if (loginUser != null) {
|
||||||
|
goods.setUserId(loginUser.getUserId());
|
||||||
|
}
|
||||||
|
if (goodsService.save(goods)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改商品记录表")
|
||||||
|
@PutMapping()
|
||||||
|
public ApiResult<?> update(@RequestBody Goods goods) {
|
||||||
|
if (goodsService.updateById(goods)) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("删除商品记录表")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||||
|
if (goodsService.removeById(id)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量添加商品记录表")
|
||||||
|
@PostMapping("/batch")
|
||||||
|
public ApiResult<?> saveBatch(@RequestBody List<Goods> list) {
|
||||||
|
if (goodsService.saveBatch(list)) {
|
||||||
|
return success("添加成功");
|
||||||
|
}
|
||||||
|
return fail("添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量修改商品记录表")
|
||||||
|
@PutMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<Goods> batchParam) {
|
||||||
|
if (batchParam.update(goodsService, "goods_id")) {
|
||||||
|
return success("修改成功");
|
||||||
|
}
|
||||||
|
return fail("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("批量删除商品记录表")
|
||||||
|
@DeleteMapping("/batch")
|
||||||
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||||
|
if (goodsService.removeByIds(ids)) {
|
||||||
|
return success("删除成功");
|
||||||
|
}
|
||||||
|
return fail("删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.gxwebsoft.oa.controller;
|
package com.gxwebsoft.oa.controller;
|
||||||
|
|
||||||
|
import com.gxwebsoft.common.core.utils.CommonUtil;
|
||||||
import com.gxwebsoft.common.core.web.*;
|
import com.gxwebsoft.common.core.web.*;
|
||||||
import com.gxwebsoft.common.system.entity.User;
|
import com.gxwebsoft.common.system.entity.User;
|
||||||
import com.gxwebsoft.oa.entity.Order;
|
import com.gxwebsoft.oa.entity.Order;
|
||||||
@@ -58,6 +59,7 @@ public class OrderController extends BaseController {
|
|||||||
if (loginUser != null) {
|
if (loginUser != null) {
|
||||||
order.setUserId(loginUser.getUserId());
|
order.setUserId(loginUser.getUserId());
|
||||||
}
|
}
|
||||||
|
order.setOrderNo(CommonUtil.createOrderNo());
|
||||||
if (orderService.save(order)) {
|
if (orderService.save(order)) {
|
||||||
return success("添加成功");
|
return success("添加成功");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,90 @@
|
|||||||
|
package com.gxwebsoft.oa.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品记录表
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-01 12:37:25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value = "Goods对象", description = "商品记录表")
|
||||||
|
@TableName("oa_goods")
|
||||||
|
public class Goods implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "自增ID")
|
||||||
|
@TableId(value = "goods_id", type = IdType.AUTO)
|
||||||
|
private Integer goodsId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "类型 1实物商品 2虚拟商品")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商品编码")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商品标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分类ID")
|
||||||
|
private Integer categoryId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "规格")
|
||||||
|
private String specs;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "货架")
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "进货价格")
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "销售价格")
|
||||||
|
private BigDecimal salePrice;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否推荐")
|
||||||
|
private Boolean recommend;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态, 0正常, 1待修,2异常已修,3异常未修")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序号")
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "所有人")
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||||
|
@TableLogic
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户id")
|
||||||
|
private Integer tenantId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分类名称")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String categoryName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分类图标")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String categoryImage;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.gxwebsoft.oa.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品分类表
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-01 12:37:25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value = "GoodsCategory对象", description = "商品分类表")
|
||||||
|
@TableName("oa_goods_category")
|
||||||
|
public class GoodsCategory implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "自增ID")
|
||||||
|
@TableId(value = "category_id", type = IdType.AUTO)
|
||||||
|
private Integer categoryId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分类名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分类图标")
|
||||||
|
private String categoryImage;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分类编码")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态, 0正常, 1隐藏")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序号")
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "所有人")
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||||
|
@TableLogic
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "租户id")
|
||||||
|
private Integer tenantId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.gxwebsoft.oa.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.gxwebsoft.oa.entity.GoodsCategory;
|
||||||
|
import com.gxwebsoft.oa.param.GoodsCategoryParam;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品分类表Mapper
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-01 12:37:25
|
||||||
|
*/
|
||||||
|
public interface GoodsCategoryMapper extends BaseMapper<GoodsCategory> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<GoodsCategory>
|
||||||
|
*/
|
||||||
|
List<GoodsCategory> selectPageRel(@Param("page") IPage<GoodsCategory> page,
|
||||||
|
@Param("param") GoodsCategoryParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<GoodsCategory> selectListRel(@Param("param") GoodsCategoryParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.gxwebsoft.oa.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.gxwebsoft.oa.entity.Goods;
|
||||||
|
import com.gxwebsoft.oa.param.GoodsParam;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品记录表Mapper
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-01 12:37:25
|
||||||
|
*/
|
||||||
|
public interface GoodsMapper extends BaseMapper<Goods> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<Goods>
|
||||||
|
*/
|
||||||
|
List<Goods> selectPageRel(@Param("page") IPage<Goods> page,
|
||||||
|
@Param("param") GoodsParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<User>
|
||||||
|
*/
|
||||||
|
List<Goods> selectListRel(@Param("param") GoodsParam param);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.oa.mapper.GoodsCategoryMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*
|
||||||
|
FROM oa_goods_category a
|
||||||
|
<where>
|
||||||
|
<if test="param.categoryId != null">
|
||||||
|
AND a.category_id = #{param.categoryId}
|
||||||
|
</if>
|
||||||
|
<if test="param.name != null">
|
||||||
|
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.code != null">
|
||||||
|
AND a.code LIKE CONCAT('%', #{param.code}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.status != null">
|
||||||
|
AND a.status = #{param.status}
|
||||||
|
</if>
|
||||||
|
<if test="param.comments != null">
|
||||||
|
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.sortNumber != null">
|
||||||
|
AND a.sort_number = #{param.sortNumber}
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.deleted != null">
|
||||||
|
AND a.deleted = #{param.deleted}
|
||||||
|
</if>
|
||||||
|
<if test="param.deleted == null">
|
||||||
|
AND a.deleted = 0
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.oa.entity.GoodsCategory">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.oa.entity.GoodsCategory">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.gxwebsoft.oa.mapper.GoodsMapper">
|
||||||
|
|
||||||
|
<!-- 关联查询sql -->
|
||||||
|
<sql id="selectSql">
|
||||||
|
SELECT a.*,b.name,b.avatar
|
||||||
|
FROM oa_goods a
|
||||||
|
LEFT JOIN oa_goods_categroy b ON a.goods_id = b.goods_id
|
||||||
|
<where>
|
||||||
|
<if test="param.goodsId != null">
|
||||||
|
AND a.goods_id = #{param.goodsId}
|
||||||
|
</if>
|
||||||
|
<if test="param.type != null">
|
||||||
|
AND a.type = #{param.type}
|
||||||
|
</if>
|
||||||
|
<if test="param.code != null">
|
||||||
|
AND a.code LIKE CONCAT('%', #{param.code}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.title != null">
|
||||||
|
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.categoryId != null">
|
||||||
|
AND a.category_id = #{param.categoryId}
|
||||||
|
</if>
|
||||||
|
<if test="param.specs != null">
|
||||||
|
AND a.specs LIKE CONCAT('%', #{param.specs}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.position != null">
|
||||||
|
AND a.position LIKE CONCAT('%', #{param.position}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.price != null">
|
||||||
|
AND a.price = #{param.price}
|
||||||
|
</if>
|
||||||
|
<if test="param.salePrice != null">
|
||||||
|
AND a.sale_price = #{param.salePrice}
|
||||||
|
</if>
|
||||||
|
<if test="param.status != null">
|
||||||
|
AND a.status = #{param.status}
|
||||||
|
</if>
|
||||||
|
<if test="param.comments != null">
|
||||||
|
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.sortNumber != null">
|
||||||
|
AND a.sort_number = #{param.sortNumber}
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null">
|
||||||
|
AND a.user_id = #{param.userId}
|
||||||
|
</if>
|
||||||
|
<if test="param.deleted != null">
|
||||||
|
AND a.deleted = #{param.deleted}
|
||||||
|
</if>
|
||||||
|
<if test="param.deleted == null">
|
||||||
|
AND a.deleted = 0
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeStart != null">
|
||||||
|
AND a.create_time >= #{param.createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="param.createTimeEnd != null">
|
||||||
|
AND a.create_time <= #{param.createTimeEnd}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 分页查询 -->
|
||||||
|
<select id="selectPageRel" resultType="com.gxwebsoft.oa.entity.Goods">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询全部 -->
|
||||||
|
<select id="selectListRel" resultType="com.gxwebsoft.oa.entity.Goods">
|
||||||
|
<include refid="selectSql"></include>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package com.gxwebsoft.oa.param;
|
||||||
|
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
|
import com.gxwebsoft.common.core.web.BaseParam;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品分类表查询参数
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-01 12:37:25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
@ApiModel(value = "GoodsCategoryParam对象", description = "商品分类表查询参数")
|
||||||
|
public class GoodsCategoryParam extends BaseParam {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "自增ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer categoryId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分类名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分类编码")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态, 0正常, 1隐藏")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序号")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "所有人")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
package com.gxwebsoft.oa.param;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||||
|
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||||
|
import com.gxwebsoft.common.core.web.BaseParam;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品记录表查询参数
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-01 12:37:25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
@ApiModel(value = "GoodsParam对象", description = "商品记录表查询参数")
|
||||||
|
public class GoodsParam extends BaseParam {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "自增ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer goodsId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "类型 1实物商品 2虚拟商品")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商品编码")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "商品标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分类ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer categoryId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "规格")
|
||||||
|
private String specs;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "货架")
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "进货价格")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "销售价格")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private BigDecimal salePrice;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态, 0正常, 1待修,2异常已修,3异常未修")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String comments;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序号")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer sortNumber;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "所有人")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer deleted;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gxwebsoft.oa.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.oa.entity.GoodsCategory;
|
||||||
|
import com.gxwebsoft.oa.param.GoodsCategoryParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品分类表Service
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-01 12:37:25
|
||||||
|
*/
|
||||||
|
public interface GoodsCategoryService extends IService<GoodsCategory> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<GoodsCategory>
|
||||||
|
*/
|
||||||
|
PageResult<GoodsCategory> pageRel(GoodsCategoryParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<GoodsCategory>
|
||||||
|
*/
|
||||||
|
List<GoodsCategory> listRel(GoodsCategoryParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param categoryId 自增ID
|
||||||
|
* @return GoodsCategory
|
||||||
|
*/
|
||||||
|
GoodsCategory getByIdRel(Integer categoryId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gxwebsoft.oa.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import com.gxwebsoft.oa.entity.Goods;
|
||||||
|
import com.gxwebsoft.oa.param.GoodsParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品记录表Service
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-01 12:37:25
|
||||||
|
*/
|
||||||
|
public interface GoodsService extends IService<Goods> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页关联查询
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return PageResult<Goods>
|
||||||
|
*/
|
||||||
|
PageResult<Goods> pageRel(GoodsParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联查询全部
|
||||||
|
*
|
||||||
|
* @param param 查询参数
|
||||||
|
* @return List<Goods>
|
||||||
|
*/
|
||||||
|
List<Goods> listRel(GoodsParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param goodsId 自增ID
|
||||||
|
* @return Goods
|
||||||
|
*/
|
||||||
|
Goods getByIdRel(Integer goodsId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.gxwebsoft.oa.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.gxwebsoft.oa.mapper.GoodsCategoryMapper;
|
||||||
|
import com.gxwebsoft.oa.service.GoodsCategoryService;
|
||||||
|
import com.gxwebsoft.oa.entity.GoodsCategory;
|
||||||
|
import com.gxwebsoft.oa.param.GoodsCategoryParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品分类表Service实现
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-01 12:37:25
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class GoodsCategoryServiceImpl extends ServiceImpl<GoodsCategoryMapper, GoodsCategory> implements GoodsCategoryService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<GoodsCategory> pageRel(GoodsCategoryParam param) {
|
||||||
|
PageParam<GoodsCategory, GoodsCategoryParam> page = new PageParam<>(param);
|
||||||
|
//page.setDefaultOrder("create_time desc");
|
||||||
|
List<GoodsCategory> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<GoodsCategory> listRel(GoodsCategoryParam param) {
|
||||||
|
List<GoodsCategory> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<GoodsCategory, GoodsCategoryParam> page = new PageParam<>();
|
||||||
|
//page.setDefaultOrder("create_time desc");
|
||||||
|
return page.sortRecords(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GoodsCategory getByIdRel(Integer categoryId) {
|
||||||
|
GoodsCategoryParam param = new GoodsCategoryParam();
|
||||||
|
param.setCategoryId(categoryId);
|
||||||
|
return param.getOne(baseMapper.selectListRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.gxwebsoft.oa.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.gxwebsoft.oa.mapper.GoodsMapper;
|
||||||
|
import com.gxwebsoft.oa.service.GoodsService;
|
||||||
|
import com.gxwebsoft.oa.entity.Goods;
|
||||||
|
import com.gxwebsoft.oa.param.GoodsParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageParam;
|
||||||
|
import com.gxwebsoft.common.core.web.PageResult;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品记录表Service实现
|
||||||
|
*
|
||||||
|
* @author 科技小王子
|
||||||
|
* @since 2024-03-01 12:37:25
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements GoodsService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<Goods> pageRel(GoodsParam param) {
|
||||||
|
PageParam<Goods, GoodsParam> page = new PageParam<>(param);
|
||||||
|
//page.setDefaultOrder("create_time desc");
|
||||||
|
List<Goods> list = baseMapper.selectPageRel(page, param);
|
||||||
|
return new PageResult<>(list, page.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Goods> listRel(GoodsParam param) {
|
||||||
|
List<Goods> list = baseMapper.selectListRel(param);
|
||||||
|
// 排序
|
||||||
|
PageParam<Goods, GoodsParam> page = new PageParam<>();
|
||||||
|
//page.setDefaultOrder("create_time desc");
|
||||||
|
return page.sortRecords(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Goods getByIdRel(Integer goodsId) {
|
||||||
|
GoodsParam param = new GoodsParam();
|
||||||
|
param.setGoodsId(goodsId);
|
||||||
|
return param.getOne(baseMapper.selectListRel(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -41,19 +41,18 @@ public class CmsGenerator {
|
|||||||
private static final String MODULE_NAME = "cms";
|
private static final String MODULE_NAME = "cms";
|
||||||
// 需要生成的表
|
// 需要生成的表
|
||||||
private static final String[] TABLE_NAMES = new String[]{
|
private static final String[] TABLE_NAMES = new String[]{
|
||||||
"cms_article",
|
// "cms_article",
|
||||||
"cms_article_category",
|
// "cms_article_category",
|
||||||
"cms_article_like",
|
// "cms_article_like",
|
||||||
"cms_article_comment",
|
// "cms_article_comment",
|
||||||
"cms_docs",
|
|
||||||
"cms_ad",
|
|
||||||
// "cms_docs",
|
|
||||||
// "cms_docs",
|
|
||||||
// "cms_docs",
|
|
||||||
// "cms_docs",
|
|
||||||
// "cms_docs",
|
|
||||||
// "cms_docs",
|
|
||||||
// "cms_docs",
|
// "cms_docs",
|
||||||
|
// "cms_ad",
|
||||||
|
// "cms_ad_record",
|
||||||
|
// "cms_navigation",
|
||||||
|
// "cms_design",
|
||||||
|
// "cms_design_record",
|
||||||
|
// "cms_website",
|
||||||
|
"cms_website_field"
|
||||||
};
|
};
|
||||||
// 需要去除的表前缀
|
// 需要去除的表前缀
|
||||||
private static final String[] TABLE_PREFIX = new String[]{
|
private static final String[] TABLE_PREFIX = new String[]{
|
||||||
|
|||||||
@@ -58,7 +58,9 @@ public class OaGenerator {
|
|||||||
// "oa_link",
|
// "oa_link",
|
||||||
// "oa_company_field",
|
// "oa_company_field",
|
||||||
// "oa_company_user",
|
// "oa_company_user",
|
||||||
"oa_order"
|
// "oa_order",
|
||||||
|
"oa_goods",
|
||||||
|
"oa_goods_category"
|
||||||
};
|
};
|
||||||
// 需要去除的表前缀
|
// 需要去除的表前缀
|
||||||
private static final String[] TABLE_PREFIX = new String[]{
|
private static final String[] TABLE_PREFIX = new String[]{
|
||||||
|
|||||||
Reference in New Issue
Block a user