后端代码提交
@@ -0,0 +1,142 @@
|
||||
package com.zbkj.admin.controller;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.zbkj.common.constants.DateConstants;
|
||||
import com.zbkj.common.model.acticitystyle.ActivityStyle;
|
||||
import com.zbkj.common.page.CommonPage;
|
||||
import com.zbkj.common.request.ActivityStyleRequest;
|
||||
import com.zbkj.common.request.ActivityStyleSearchRequest;
|
||||
import com.zbkj.common.request.ActivityStyleUpdateStatusRequest;
|
||||
import com.zbkj.common.request.PageParamRequest;
|
||||
import com.zbkj.common.response.ActivityStyleResponse;
|
||||
import com.zbkj.common.result.CommonResult;
|
||||
import com.zbkj.common.utils.CrmebDateUtil;
|
||||
import com.zbkj.service.service.ActivityStyleService;
|
||||
import com.zbkj.service.service.SystemAttachmentService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 活动样式 前端控制器
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("api/admin/activitystyle")
|
||||
@Api(tags = "活动样式") //配合swagger使用
|
||||
public class ActivityStyleController {
|
||||
|
||||
@Autowired
|
||||
private ActivityStyleService activityStyleService;
|
||||
@Autowired
|
||||
private SystemAttachmentService systemAttachmentService;
|
||||
|
||||
/**
|
||||
* 分页显示
|
||||
*
|
||||
* @param request 搜索条件
|
||||
* @param pageParamRequest 分页参数
|
||||
* @author dazongzi
|
||||
* @since 2023-01-05
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('admin:activitystyle:list')")
|
||||
@ApiOperation(value = "分页列表") //配合swagger使用
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
public CommonResult<CommonPage<ActivityStyleResponse>> getList(@Validated ActivityStyleSearchRequest request,
|
||||
@ModelAttribute PageParamRequest pageParamRequest) {
|
||||
CommonPage<ActivityStyleResponse> activityStyleCommonPage = CommonPage.restPage(activityStyleService.getList(request, pageParamRequest));
|
||||
return CommonResult.success(activityStyleCommonPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param activityStyleRequest 新增参数
|
||||
* @author dazongzi
|
||||
* @since 2023-01-05
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('admin:activitystyle:save')")
|
||||
@ApiOperation(value = "新增")
|
||||
@RequestMapping(value = "/save", method = RequestMethod.POST)
|
||||
public CommonResult<String> save(@RequestBody @Validated ActivityStyleRequest activityStyleRequest) {
|
||||
ActivityStyle activityStyle = new ActivityStyle();
|
||||
BeanUtils.copyProperties(activityStyleRequest, activityStyle);
|
||||
activityStyle.setStarttime(CrmebDateUtil.strToDate(activityStyleRequest.getStarttime(), DateConstants.DATE_FORMAT));
|
||||
activityStyle.setEndtime(CrmebDateUtil.strToDate(activityStyleRequest.getEndtime(), DateConstants.DATE_FORMAT));
|
||||
activityStyle.setStyle(systemAttachmentService.clearPrefix(activityStyle.getStyle()));
|
||||
if (activityStyleService.save(activityStyle)) {
|
||||
return CommonResult.success();
|
||||
} else {
|
||||
return CommonResult.failed();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param id Integer
|
||||
* @author dazongzi
|
||||
* @since 2023-01-05
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('admin:activitystyle:delete')")
|
||||
@ApiOperation(value = "删除")
|
||||
@RequestMapping(value = "/delete", method = RequestMethod.GET)
|
||||
public CommonResult<String> delete(@RequestParam(value = "id") Integer id) {
|
||||
if (activityStyleService.removeById(id)) {
|
||||
return CommonResult.success();
|
||||
} else {
|
||||
return CommonResult.failed();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param activityStyleRequest 修改参数
|
||||
* @author dazongzi
|
||||
* @since 2023-01-05
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('admin:activitystyle:edite')")
|
||||
@ApiOperation(value = "修改")
|
||||
@RequestMapping(value = "/update", method = RequestMethod.POST)
|
||||
public CommonResult<String> update(@RequestBody @Validated ActivityStyleRequest activityStyleRequest) {
|
||||
ActivityStyle activityStyle = new ActivityStyle();
|
||||
BeanUtils.copyProperties(activityStyleRequest, activityStyle);
|
||||
activityStyle.setId(activityStyleRequest.getId());
|
||||
activityStyle.setStyle(systemAttachmentService.clearPrefix(activityStyle.getStyle()));
|
||||
activityStyle.setStarttime(CrmebDateUtil.strToDate(activityStyleRequest.getStarttime(), DateConstants.DATE_FORMAT));
|
||||
activityStyle.setEndtime(CrmebDateUtil.strToDate(activityStyleRequest.getEndtime(), DateConstants.DATE_FORMAT));
|
||||
activityStyle.setUpdatetime(DateUtil.date());
|
||||
if (activityStyleService.updateById(activityStyle)) {
|
||||
return CommonResult.success();
|
||||
} else {
|
||||
return CommonResult.failed();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新状态
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('admin:activitystyle:updatestatus')")
|
||||
@ApiOperation(value = "更新状态")
|
||||
@RequestMapping(value = "/status", method = RequestMethod.POST)
|
||||
public CommonResult<String> updateStatus(@RequestBody @Validated ActivityStyleUpdateStatusRequest activityStyleUpdateStatusRequest) {
|
||||
boolean result = activityStyleService.updateStatus(activityStyleUpdateStatusRequest.getId(), activityStyleUpdateStatusRequest.getStatus());
|
||||
if (result) {
|
||||
return CommonResult.success();
|
||||
} else {
|
||||
return CommonResult.failed();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.zbkj.admin.controller;
|
||||
|
||||
import com.zbkj.admin.copyright.CopyrightInfoResponse;
|
||||
import com.zbkj.admin.copyright.CopyrightUpdateInfoRequest;
|
||||
import com.zbkj.admin.service.CopyrightService;
|
||||
import com.zbkj.common.result.CommonResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
|
||||
/**
|
||||
* 版权控制器
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("api/admin/copyright")
|
||||
@Api(tags = "版权控制器")
|
||||
public class CopyrightController {
|
||||
|
||||
@Autowired
|
||||
private CopyrightService copyrightService;
|
||||
|
||||
@PreAuthorize("hasAuthority('admin:copyright:get:info')")
|
||||
@ApiOperation(value = "获取版权信息")
|
||||
@RequestMapping(value = "/get/info", method = RequestMethod.GET)
|
||||
public CommonResult<CopyrightInfoResponse> getInfo() {
|
||||
return CommonResult.success(copyrightService.getInfo());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
package com.zbkj.admin.controller;
|
||||
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.zbkj.common.exception.CrmebException;
|
||||
import com.zbkj.common.model.page.PageDiy;
|
||||
import com.zbkj.common.page.CommonPage;
|
||||
import com.zbkj.common.request.PageParamRequest;
|
||||
import com.zbkj.common.request.page.PageDiyEditNameRequest;
|
||||
import com.zbkj.common.request.page.PageDiyRequest;
|
||||
import com.zbkj.common.response.page.PageDiyResponse;
|
||||
import com.zbkj.common.result.CommonResult;
|
||||
import com.zbkj.service.service.PageDiyService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
||||
/**
|
||||
* DIY数据表 前端控制器
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("api/admin/pagediy")
|
||||
@Api(tags = "DIY 控制器") //配合swagger使用
|
||||
|
||||
public class PageDiyController {
|
||||
|
||||
@Autowired
|
||||
private PageDiyService pageDiyService;
|
||||
|
||||
/**
|
||||
* 分页显示DIY数据表
|
||||
* @author dazongzi
|
||||
* @since 2023-05-16
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('admin:pagediy:list')")
|
||||
@ApiOperation(value = "分页列表") //配合swagger使用
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "name", value = "搜索关键子", dataType = "String")
|
||||
})
|
||||
public CommonResult<CommonPage<PageDiy>> getList(@RequestParam String name,PageParamRequest pageParamRequest){
|
||||
CommonPage<PageDiy> pageDiyCommonPage = CommonPage.restPage(pageDiyService.getList(name, pageParamRequest));
|
||||
return CommonResult.success(pageDiyCommonPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置首页
|
||||
* @param id 待设置的首页id
|
||||
* @author dazongzi
|
||||
* @since 2023-05-16
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('admin:pagediy:setdefault')")
|
||||
@ApiOperation(value = "设置商城首页")
|
||||
@RequestMapping(value = "/setdefault/{id}", method = RequestMethod.GET)
|
||||
public CommonResult<String> setDefault(@PathVariable(value = "id") Integer id ){
|
||||
if(pageDiyService.setDiyPageHome(id)){
|
||||
return CommonResult.success();
|
||||
}else{
|
||||
return CommonResult.failed();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取已经设置的首页模版数据
|
||||
* @return 首页模版id
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('admin:pagediy:getdefault')")
|
||||
@ApiOperation(value = "获取商城首页")
|
||||
@RequestMapping(value = "/getdefault", method = RequestMethod.GET)
|
||||
public CommonResult<Integer> getDefault(){
|
||||
return CommonResult.success(pageDiyService.getDiyPageHome(Boolean.TRUE).getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增DIY数据表
|
||||
* @param pageDiyRequest 新增参数
|
||||
* @author dazongzi
|
||||
* @since 2023-05-16
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('admin:pagediy:save')")
|
||||
@ApiOperation(value = "新增")
|
||||
@RequestMapping(value = "/save", method = RequestMethod.POST)
|
||||
public CommonResult<PageDiy> save(@RequestBody @Validated PageDiyRequest pageDiyRequest){
|
||||
PageDiy pageDiy = new PageDiy();
|
||||
BeanUtils.copyProperties(pageDiyRequest, pageDiy);
|
||||
pageDiy.setValue(JSON.toJSONString(pageDiyRequest.getValue()));
|
||||
return CommonResult.success(pageDiyService.savePageDiy(pageDiy));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除DIY数据表
|
||||
* @param id Integer
|
||||
* @author dazongzi
|
||||
* @since 2023-05-16
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('admin:pagediy:delete')")
|
||||
@ApiOperation(value = "删除")
|
||||
@RequestMapping(value = "/delete", method = RequestMethod.GET)
|
||||
public CommonResult<String> delete(@RequestParam(value = "id") Integer id){
|
||||
if(pageDiyService.removeById(id)){
|
||||
return CommonResult.success();
|
||||
}else{
|
||||
return CommonResult.failed();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改DIY数据表
|
||||
* @param pageDiyRequest 修改参数
|
||||
* @author dazongzi
|
||||
* @since 2023-05-16
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('admin:pagediy:update')")
|
||||
@ApiOperation(value = "修改")
|
||||
@RequestMapping(value = "/update", method = RequestMethod.POST)
|
||||
public CommonResult<String> update(@RequestBody @Validated PageDiyRequest pageDiyRequest){
|
||||
PageDiy pageDiy = new PageDiy();
|
||||
BeanUtils.copyProperties(pageDiyRequest, pageDiy);
|
||||
pageDiy.setValue(JSON.toJSONString(pageDiyRequest.getValue()));
|
||||
if(pageDiyService.editPageDiy(pageDiy)){
|
||||
return CommonResult.success();
|
||||
}else{
|
||||
return CommonResult.failed();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* DIY 模版名称更新
|
||||
* @param pageDiyEditNameRequest 更新模版名称对象
|
||||
* @return 更新结果
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('admin:pagediy:updatename')")
|
||||
@ApiOperation(value = "DIY 模版名称更新")
|
||||
@RequestMapping(value = "/updatename", method = RequestMethod.POST)
|
||||
public CommonResult<String> update(@RequestBody @Validated PageDiyEditNameRequest pageDiyEditNameRequest){
|
||||
if(pageDiyService.editPageDiyName(pageDiyEditNameRequest)){
|
||||
return CommonResult.success();
|
||||
}else{
|
||||
return CommonResult.failed();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询DIY数据表信息
|
||||
* @param id Integer
|
||||
* @author dazongzi
|
||||
* @since 2023-05-16
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('admin:pagediy:info')")
|
||||
@ApiOperation(value = "详情")
|
||||
@RequestMapping(value = "/info/{id}", method = RequestMethod.GET)
|
||||
public CommonResult<PageDiyResponse> info(@PathVariable(value = "id") Integer id){
|
||||
PageDiy pageDiy = pageDiyService.getDiyPageByPageIdForAdmin(id);
|
||||
if(ObjectUtil.isNull(pageDiy)) throw new CrmebException("未找到对应模版信息");
|
||||
PageDiyResponse response = new PageDiyResponse();
|
||||
BeanUtils.copyProperties(pageDiy, response);
|
||||
response.setValue(JSON.parseObject(pageDiy.getValue()));
|
||||
return CommonResult.success(response);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
package com.zbkj.admin.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zbkj.common.response.pagelayout.PageLayoutBottomNavigationResponse;
|
||||
import com.zbkj.common.result.CommonResult;
|
||||
import com.zbkj.service.service.PageLayoutService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 页面布局 前端控制器
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("api/admin/page/layout")
|
||||
@Api(tags = "页面布局管理")
|
||||
public class PageLayoutController {
|
||||
|
||||
@Autowired
|
||||
private PageLayoutService pageLayoutService;
|
||||
|
||||
/**
|
||||
* 页面首页
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('admin:page:layout:index')")
|
||||
@ApiOperation(value = "页面首页")
|
||||
@RequestMapping(value = "/index", method = RequestMethod.GET)
|
||||
public CommonResult<HashMap<String, Object>> index() {
|
||||
return CommonResult.success(pageLayoutService.index());
|
||||
}
|
||||
|
||||
/**
|
||||
* 页面首页保存
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('admin:page:layout:save')")
|
||||
@ApiOperation(value = "页面首页保存(不建议调用)")
|
||||
@RequestMapping(value = "/save", method = RequestMethod.POST)
|
||||
public CommonResult<Object> save(@RequestBody JSONObject jsonObject) {
|
||||
if (pageLayoutService.save(jsonObject)) {
|
||||
return CommonResult.success();
|
||||
}
|
||||
return CommonResult.failed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 页面首页banner保存
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('admin:page:layout:index:banner:save')")
|
||||
@ApiOperation(value = "页面首页banner保存")
|
||||
@RequestMapping(value = "/index/banner/save", method = RequestMethod.POST)
|
||||
public CommonResult<Object> indexBannerSave(@RequestBody JSONObject jsonObject) {
|
||||
if (pageLayoutService.indexBannerSave(jsonObject)) {
|
||||
return CommonResult.success();
|
||||
}
|
||||
return CommonResult.failed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 页面首页menu保存
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('admin:page:layout:index:menu:save')")
|
||||
@ApiOperation(value = "页面首页menu保存")
|
||||
@RequestMapping(value = "/index/menu/save", method = RequestMethod.POST)
|
||||
public CommonResult<Object> indexMenuSave(@RequestBody JSONObject jsonObject) {
|
||||
if (pageLayoutService.indexMenuSave(jsonObject)) {
|
||||
return CommonResult.success();
|
||||
}
|
||||
return CommonResult.failed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 页面首页新闻保存
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('admin:page:layout:index:news:save')")
|
||||
@ApiOperation(value = "页面首页新闻保存")
|
||||
@RequestMapping(value = "/index/news/save", method = RequestMethod.POST)
|
||||
public CommonResult<Object> indexNewsSave(@RequestBody JSONObject jsonObject) {
|
||||
if (pageLayoutService.indexNewsSave(jsonObject)) {
|
||||
return CommonResult.success();
|
||||
}
|
||||
return CommonResult.failed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 页面用户中心banner保存
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('admin:page:layout:index:banner:save')")
|
||||
@ApiOperation(value = "页面用户中心banner保存")
|
||||
@RequestMapping(value = "/user/banner/save", method = RequestMethod.POST)
|
||||
public CommonResult<Object> userBannerSave(@RequestBody JSONObject jsonObject) {
|
||||
if (pageLayoutService.userBannerSave(jsonObject)) {
|
||||
return CommonResult.success();
|
||||
}
|
||||
return CommonResult.failed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 页面用户中心导航保存
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('admin:page:layout:user:menu:save')")
|
||||
@ApiOperation(value = "页面用户中心导航保存")
|
||||
@RequestMapping(value = "/user/menu/save", method = RequestMethod.POST)
|
||||
public CommonResult<Object> userMenuSave(@RequestBody JSONObject jsonObject) {
|
||||
if (pageLayoutService.userMenuSave(jsonObject)) {
|
||||
return CommonResult.success();
|
||||
}
|
||||
return CommonResult.failed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 页面用户中心商品table保存
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('admin:page:layout:index:table:save')")
|
||||
@ApiOperation(value = "页面用户中心商品table保存")
|
||||
@RequestMapping(value = "/index/table/save", method = RequestMethod.POST)
|
||||
public CommonResult<Object> indexTableSave(@RequestBody JSONObject jsonObject) {
|
||||
if (pageLayoutService.indexTableSave(jsonObject)) {
|
||||
return CommonResult.success();
|
||||
}
|
||||
return CommonResult.failed();
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('admin:page:layout:bottom:navigation')")
|
||||
@ApiOperation(value = "页面底部导航")
|
||||
@RequestMapping(value = "/bottom/navigation/get", method = RequestMethod.GET)
|
||||
public CommonResult<PageLayoutBottomNavigationResponse> getBottomNavigation() {
|
||||
return CommonResult.success(pageLayoutService.getBottomNavigation());
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('admin:page:layout:bottom:navigation:save')")
|
||||
@ApiOperation(value = "底部导航保存")
|
||||
@RequestMapping(value = "/bottom/navigation/save", method = RequestMethod.POST)
|
||||
public CommonResult<Object> bottomNavigationSave(@RequestBody JSONObject jsonObject) {
|
||||
if (pageLayoutService.bottomNavigationSave(jsonObject)) {
|
||||
return CommonResult.success();
|
||||
}
|
||||
return CommonResult.failed();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
package com.zbkj.admin.controller;
|
||||
|
||||
import com.zbkj.admin.model.ScheduleJob;
|
||||
import com.zbkj.admin.model.ScheduleJobLog;
|
||||
import com.zbkj.admin.service.ScheduleJobLogService;
|
||||
import com.zbkj.admin.service.ScheduleJobService;
|
||||
|
||||
import com.zbkj.common.page.CommonPage;
|
||||
import com.zbkj.common.request.PageParamRequest;
|
||||
import com.zbkj.common.request.ScheduleJobLogSearchRequest;
|
||||
import com.zbkj.common.request.ScheduleJobRequest;
|
||||
import com.zbkj.common.result.CommonResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 定时任务控制器
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("api/admin/schedule/job")
|
||||
@Api(tags = "定时任务控制器")
|
||||
public class ScheduleJobController {
|
||||
|
||||
@Autowired
|
||||
private ScheduleJobService scheduleJobService;
|
||||
@Autowired
|
||||
private ScheduleJobLogService scheduleJobLogService;
|
||||
|
||||
@PreAuthorize("hasAuthority('admin:schedule:job:list')")
|
||||
@ApiOperation(value = "定时任务列表")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
public CommonResult<List<ScheduleJob>> getList() {
|
||||
return CommonResult.success(scheduleJobService.getAll());
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('admin:schedule:job:add')")
|
||||
@ApiOperation(value = "添加定时任务")
|
||||
@RequestMapping(value = "/add", method = RequestMethod.POST)
|
||||
public CommonResult<String> add(@RequestBody @Validated ScheduleJobRequest request) {
|
||||
if (scheduleJobService.add(request)) {
|
||||
return CommonResult.success();
|
||||
}
|
||||
return CommonResult.failed();
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('admin:schedule:job:update')")
|
||||
@ApiOperation(value = "定时任务编辑")
|
||||
@RequestMapping(value = "/update", method = RequestMethod.POST)
|
||||
public CommonResult<String> update(@RequestBody @Validated ScheduleJobRequest request) {
|
||||
if (scheduleJobService.edit(request)) {
|
||||
return CommonResult.success();
|
||||
}
|
||||
return CommonResult.failed();
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('admin:schedule:job:suspend')")
|
||||
@ApiOperation(value = "暂停定时任务")
|
||||
@RequestMapping(value = "/suspend/{jobId}", method = RequestMethod.POST)
|
||||
public CommonResult<String> suspend(@PathVariable(value = "jobId") Integer jobId) {
|
||||
if (scheduleJobService.suspend(jobId)) {
|
||||
return CommonResult.success();
|
||||
}
|
||||
return CommonResult.failed();
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('admin:schedule:job:start')")
|
||||
@ApiOperation(value = "启动定时任务")
|
||||
@RequestMapping(value = "/start/{jobId}", method = RequestMethod.POST)
|
||||
public CommonResult<String> start(@PathVariable(value = "jobId") Integer jobId) {
|
||||
if (scheduleJobService.start(jobId)) {
|
||||
return CommonResult.success();
|
||||
}
|
||||
return CommonResult.failed();
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('admin:schedule:job:delete')")
|
||||
@ApiOperation(value = "删除定时任务")
|
||||
@RequestMapping(value = "/delete/{jobId}", method = RequestMethod.POST)
|
||||
public CommonResult<String> delete(@PathVariable(value = "jobId") Integer jobId) {
|
||||
if (scheduleJobService.delete(jobId)) {
|
||||
return CommonResult.success();
|
||||
}
|
||||
return CommonResult.failed();
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('admin:schedule:job:trig')")
|
||||
@ApiOperation(value = "立即执行定时任务(一次)")
|
||||
@RequestMapping(value = "/trig/{jobId}", method = RequestMethod.POST)
|
||||
public CommonResult<String> trig(@PathVariable(value = "jobId") Integer jobId) {
|
||||
if (scheduleJobService.trig(jobId)) {
|
||||
return CommonResult.success();
|
||||
}
|
||||
return CommonResult.failed();
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('admin:schedule:job:log:list')")
|
||||
@ApiOperation(value = "定时任务日志分页列表")
|
||||
@RequestMapping(value = "/log/list", method = RequestMethod.GET)
|
||||
public CommonResult<CommonPage<ScheduleJobLog>> getLogList(@Validated ScheduleJobLogSearchRequest request,
|
||||
@Validated PageParamRequest pageParamRequest) {
|
||||
return CommonResult.success(CommonPage.restPage(scheduleJobLogService.findLogPageList(request, pageParamRequest)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.zbkj.admin.controller;
|
||||
|
||||
import com.zbkj.common.response.*;
|
||||
import com.zbkj.common.result.CommonResult;
|
||||
import com.zbkj.service.service.UserStatisticsService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 统计 -- 用户统计
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("api/admin/statistics/user")
|
||||
@Api(tags = "用户统计")
|
||||
public class UserStatisticsController {
|
||||
|
||||
@Autowired
|
||||
private UserStatisticsService statisticsService;
|
||||
|
||||
@PreAuthorize("hasAuthority('admin:statistics:user:overview')")
|
||||
@ApiOperation(value = "用户概览")
|
||||
@RequestMapping(value = "/overview", method = RequestMethod.GET)
|
||||
public CommonResult<UserOverviewResponse> getOverview(@RequestParam(value = "dateLimit", defaultValue = "") String dateLimit) {
|
||||
return CommonResult.success(statisticsService.getOverview(dateLimit));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('admin:statistics:user:channel')")
|
||||
@ApiOperation(value = "用户渠道数据")
|
||||
@RequestMapping(value = "/channel", method = RequestMethod.GET)
|
||||
public CommonResult<List<UserChannelDataResponse>> getChannelData() {
|
||||
return CommonResult.success(statisticsService.getChannelData());
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('admin:statistics:user:overview:list')")
|
||||
@ApiOperation(value = "用户概览列表")
|
||||
@RequestMapping(value = "/overview/list", method = RequestMethod.GET)
|
||||
public CommonResult<List<UserOverviewDateResponse>> getOverviewList(@RequestParam(value = "dateLimit", defaultValue = "") String dateLimit) {
|
||||
return CommonResult.success(statisticsService.getOverviewList(dateLimit));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.zbkj.admin.copyright;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 版权信息响应对象
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "CopyrightInfoResponse对象", description = "版权信息响应对象")
|
||||
public class CopyrightInfoResponse {
|
||||
|
||||
@ApiModelProperty(value = "管理端API域名")
|
||||
private String domainUrl;
|
||||
|
||||
@ApiModelProperty(value = "项目版本号")
|
||||
private String version;
|
||||
|
||||
@ApiModelProperty(value = "版权标签")
|
||||
private Integer label;
|
||||
|
||||
@ApiModelProperty(value = "授权码")
|
||||
private String authCode;
|
||||
|
||||
@ApiModelProperty(value = "版权状态:-2=API域名未配置 -1=未提交,0-待审核,1-授权成功,2-审核失败")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "公司信息")
|
||||
private String companyName;
|
||||
|
||||
@ApiModelProperty(value = "公司图片")
|
||||
private String companyImage;
|
||||
|
||||
@ApiModelProperty(value = "版权码")
|
||||
private String copyright;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.zbkj.admin.copyright;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 编辑公司版权信息请求对象
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "CopyrightUpdateInfoRequest对象", description = "编辑公司版权信息请求对象")
|
||||
public class CopyrightUpdateInfoRequest {
|
||||
|
||||
@ApiModelProperty(value = "公司信息")
|
||||
@NotBlank(message = "公司信息不能为空")
|
||||
private String companyName;
|
||||
|
||||
@ApiModelProperty(value = "公司图片")
|
||||
// @NotBlank(message = "公司版权图片不能为空")
|
||||
private String companyImage;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.zbkj.admin.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zbkj.admin.model.ScheduleJob;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 定时任务 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author HZW
|
||||
* @since 2021-11-30
|
||||
*/
|
||||
public interface ScheduleJobDao extends BaseMapper<ScheduleJob> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.zbkj.admin.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zbkj.admin.model.ScheduleJobLog;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 定时任务日志 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author HZW
|
||||
* @since 2021-11-30
|
||||
*/
|
||||
public interface ScheduleJobLogDao extends BaseMapper<ScheduleJobLog> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.zbkj.admin.model;
|
||||
|
||||
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 lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 定时任务
|
||||
* </p>
|
||||
*
|
||||
* @author HZW
|
||||
* @since 2021-11-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("eb_schedule_job")
|
||||
@ApiModel(value="ScheduleJob对象", description="定时任务")
|
||||
public class ScheduleJob implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty(value = "任务id")
|
||||
@TableId(value = "job_id", type = IdType.AUTO)
|
||||
private Integer jobId;
|
||||
|
||||
@ApiModelProperty(value = "spring bean名称")
|
||||
private String beanName;
|
||||
|
||||
@ApiModelProperty(value = "方法名")
|
||||
private String methodName;
|
||||
|
||||
@ApiModelProperty(value = "参数")
|
||||
private String params;
|
||||
|
||||
@ApiModelProperty(value = "cron表达式")
|
||||
private String cronExpression;
|
||||
|
||||
@ApiModelProperty(value = "任务状态 0:正常 1:暂停")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value = "是否删除")
|
||||
private Boolean isDelte;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.zbkj.admin.model;
|
||||
|
||||
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 lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 定时任务日志
|
||||
* </p>
|
||||
*
|
||||
* @author HZW
|
||||
* @since 2021-11-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("eb_schedule_job_log")
|
||||
@ApiModel(value="ScheduleJobLog对象", description="定时任务日志")
|
||||
public class ScheduleJobLog implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty(value = "任务日志id")
|
||||
@TableId(value = "log_id", type = IdType.AUTO)
|
||||
private Integer logId;
|
||||
|
||||
@ApiModelProperty(value = "任务id")
|
||||
private Integer jobId;
|
||||
|
||||
@ApiModelProperty(value = "spring bean名称")
|
||||
private String beanName;
|
||||
|
||||
@ApiModelProperty(value = "方法名")
|
||||
private String methodName;
|
||||
|
||||
@ApiModelProperty(value = "参数")
|
||||
private String params;
|
||||
|
||||
@ApiModelProperty(value = "任务状态 0:成功 1:失败")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "失败信息")
|
||||
private String error;
|
||||
|
||||
@ApiModelProperty(value = "耗时(单位:毫秒)")
|
||||
private Integer times;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.zbkj.admin.pub;
|
||||
|
||||
import com.anji.captcha.model.common.ResponseModel;
|
||||
import com.zbkj.common.result.CommonResult;
|
||||
import com.zbkj.service.service.SafetyService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* 安全验证控制器
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("api/public/safety")
|
||||
@Api(tags = "安全验证控制器")
|
||||
public class SafetyController {
|
||||
|
||||
@Autowired
|
||||
private SafetyService safetyService;
|
||||
|
||||
@ApiOperation(value = "获取行为验证码")
|
||||
@RequestMapping(value = "/get", method = RequestMethod.POST)
|
||||
public CommonResult<ResponseModel> getSafetyCode(@RequestBody com.anji.captcha.model.vo.CaptchaVO data, HttpServletRequest request) {
|
||||
return CommonResult.success(safetyService.getSafetyCode(data, request));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "验证行为验证码")
|
||||
@RequestMapping(value = "/check", method = RequestMethod.POST)
|
||||
public CommonResult<ResponseModel> checkSafetyCode(@RequestBody com.anji.captcha.model.vo.CaptchaVO data, HttpServletRequest request) {
|
||||
return CommonResult.success(safetyService.checkSafetyCode(data, request));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "行为验证码二次校验")
|
||||
@RequestMapping(value = "/verify", method = RequestMethod.POST)
|
||||
public CommonResult<ResponseModel> verifySafetyCode(@RequestBody com.anji.captcha.model.vo.CaptchaVO data, HttpServletRequest request) {
|
||||
return CommonResult.success(safetyService.verifySafetyCode(data));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.zbkj.admin.pub;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zbkj.common.result.CommonResult;
|
||||
import com.zbkj.common.vo.QrCodeVo;
|
||||
import com.zbkj.service.service.QrCodeService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 类的详细说明
|
||||
*
|
||||
* @author Han
|
||||
* @version 1.0.0
|
||||
* @Date 2025/11/25
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("api/public/wechat/mini")
|
||||
@Api(tags = "微信小程序公共控制器")
|
||||
public class WechatMiniCommonController {
|
||||
|
||||
@Autowired
|
||||
private QrCodeService qrCodeService;
|
||||
|
||||
@ApiOperation(value = "获取微信二维码")
|
||||
@RequestMapping(value = "/get/qrcode", method = RequestMethod.POST)
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "data", value = "生成小程序码 path 和 scene 不能为空 可查看具体参数https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/qrcode-link/qr-code/getUnlimitedQRCode.html#%E8%B0%83%E7%94%A8%E6%96%B9%E5%BC%8F", dataType = "JSONObject", required = true, paramType = "body")
|
||||
})
|
||||
public CommonResult<QrCodeVo> getWecahtQrCode(@RequestBody JSONObject data) {
|
||||
return CommonResult.success(qrCodeService.getWecahtQrCode(data));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.zbkj.admin.quartz;
|
||||
|
||||
import com.zbkj.admin.model.ScheduleJob;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.quartz.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
|
||||
/**
|
||||
* 该类将会被org.springframework.scheduling.quartz.SpringBeanJobFactory 实例化
|
||||
* 并使@Autowired 生效
|
||||
* @Author 指缝de阳光
|
||||
* @Date 2021/11/30 12:10
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@DisallowConcurrentExecution
|
||||
public class QuartzJob implements Job {
|
||||
|
||||
@Autowired
|
||||
private ApplicationEventPublisher publisher;
|
||||
|
||||
/**
|
||||
* 任务调度参数key
|
||||
*/
|
||||
public static final String JOB_PARAM_KEY = "JOB_PARAM_KEY";
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
JobDataMap mergedJobDataMap = jobExecutionContext.getMergedJobDataMap();
|
||||
Object o = mergedJobDataMap.get(JOB_PARAM_KEY);
|
||||
ScheduleJob sysJob = (ScheduleJob) o;
|
||||
publisher.publishEvent(new ScheduleJobEvent(sysJob));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.zbkj.admin.quartz;
|
||||
|
||||
/**
|
||||
* @Author 指缝de阳光
|
||||
* @Date 2021/11/30 12:19
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class ScheduleConstants {
|
||||
|
||||
public static final Integer NORMAL = 0;// 正常
|
||||
|
||||
public static final Integer PAUSE = 1;// 暂停
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.zbkj.admin.quartz;
|
||||
|
||||
import com.zbkj.admin.model.ScheduleJob;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 定时任务事件
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public class ScheduleJobEvent {
|
||||
|
||||
private final ScheduleJob scheduleJob;
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
package com.zbkj.admin.quartz;
|
||||
|
||||
import com.zbkj.admin.model.ScheduleJob;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.quartz.*;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 定时任务工具类
|
||||
* @Author 指缝de阳光
|
||||
* @Date 2021/11/30 12:16
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class ScheduleManager {
|
||||
|
||||
private final static String JOB_NAME = "TASK_";
|
||||
|
||||
private final Scheduler scheduler;
|
||||
|
||||
/**
|
||||
* 获取触发器key
|
||||
*/
|
||||
private TriggerKey getTriggerKey(ScheduleJob scheduleJob) {
|
||||
return TriggerKey.triggerKey(JOB_NAME + scheduleJob.getJobId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取jobKey
|
||||
*/
|
||||
private JobKey getJobKey(ScheduleJob scheduleJob) {
|
||||
return JobKey.jobKey(JOB_NAME + scheduleJob.getJobId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取表达式触发器
|
||||
*/
|
||||
public CronTrigger getCronTrigger(ScheduleJob scheduleJob) {
|
||||
try {
|
||||
return (CronTrigger) scheduler.getTrigger(getTriggerKey(scheduleJob));
|
||||
} catch (SchedulerException e) {
|
||||
throw new RuntimeException("获取定时任务CronTrigger出现异常", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建定时任务
|
||||
*/
|
||||
public void createScheduleJob(ScheduleJob scheduleJob) {
|
||||
try {
|
||||
//构建job信息
|
||||
JobDetail jobDetail = JobBuilder.newJob(QuartzJob.class).withIdentity(getJobKey(scheduleJob)).build();
|
||||
|
||||
//表达式调度构建器,可以根据scheduleJob修改withMisfireHandling方法,但是使用异步执行定时任务,没必要
|
||||
CronScheduleBuilder scheduleBuilder = CronScheduleBuilder.cronSchedule(scheduleJob.getCronExpression())
|
||||
.withMisfireHandlingInstructionFireAndProceed();
|
||||
|
||||
//按新的cronExpression表达式构建一个新的trigger
|
||||
CronTrigger trigger = TriggerBuilder.newTrigger().withIdentity(getTriggerKey(scheduleJob)).withSchedule(scheduleBuilder).build();
|
||||
|
||||
//放入参数,运行时的方法可以获取
|
||||
jobDetail.getJobDataMap().put(QuartzJob.JOB_PARAM_KEY, scheduleJob);
|
||||
|
||||
scheduler.scheduleJob(jobDetail, trigger);
|
||||
|
||||
//暂停任务
|
||||
if (scheduleJob.getStatus().equals(ScheduleConstants.PAUSE)) {
|
||||
pauseJob(scheduleJob);
|
||||
}
|
||||
} catch (SchedulerException e) {
|
||||
throw new RuntimeException("创建定时任务失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新定时任务
|
||||
*/
|
||||
public void updateScheduleJob(ScheduleJob scheduleJob) {
|
||||
try {
|
||||
TriggerKey triggerKey = getTriggerKey(scheduleJob);
|
||||
|
||||
//表达式调度构建器
|
||||
CronScheduleBuilder scheduleBuilder = CronScheduleBuilder.cronSchedule(scheduleJob.getCronExpression()).withMisfireHandlingInstructionFireAndProceed();
|
||||
|
||||
CronTrigger trigger = getCronTrigger(scheduleJob);
|
||||
|
||||
// 如果定时任务不存在,则创建定时任务
|
||||
if (trigger == null) {
|
||||
createScheduleJob(scheduleJob);
|
||||
return;
|
||||
}
|
||||
|
||||
//按新的cronExpression表达式重新构建trigger
|
||||
trigger = trigger.getTriggerBuilder().withIdentity(triggerKey).withSchedule(scheduleBuilder).build();
|
||||
|
||||
//参数
|
||||
trigger.getJobDataMap().put(QuartzJob.JOB_PARAM_KEY, scheduleJob);
|
||||
|
||||
scheduler.rescheduleJob(triggerKey, trigger);
|
||||
|
||||
//暂停任务
|
||||
if (scheduleJob.getStatus().equals(ScheduleConstants.PAUSE)) {
|
||||
pauseJob(scheduleJob);
|
||||
}
|
||||
|
||||
} catch (SchedulerException e) {
|
||||
throw new RuntimeException("更新定时任务失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 立即执行任务
|
||||
*/
|
||||
public void run(ScheduleJob scheduleJob) {
|
||||
try {
|
||||
//参数
|
||||
JobDataMap dataMap = new JobDataMap();
|
||||
dataMap.put(QuartzJob.JOB_PARAM_KEY, scheduleJob);
|
||||
|
||||
scheduler.triggerJob(getJobKey(scheduleJob), dataMap);
|
||||
} catch (SchedulerException e) {
|
||||
throw new RuntimeException("立即执行定时任务失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 暂停任务
|
||||
*/
|
||||
public void pauseJob(ScheduleJob scheduleJob) {
|
||||
try {
|
||||
scheduler.pauseJob(getJobKey(scheduleJob));
|
||||
} catch (SchedulerException e) {
|
||||
throw new RuntimeException("暂停定时任务失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 恢复任务
|
||||
*/
|
||||
public void resumeJob(ScheduleJob scheduleJob) {
|
||||
try {
|
||||
scheduler.resumeJob(getJobKey(scheduleJob));
|
||||
} catch (SchedulerException e) {
|
||||
throw new RuntimeException("恢复定时任务失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除定时任务
|
||||
*/
|
||||
public void deleteScheduleJob(ScheduleJob scheduleJob) {
|
||||
try {
|
||||
// 停止触发器
|
||||
scheduler.pauseTrigger(getTriggerKey(scheduleJob));
|
||||
//移除触发器
|
||||
scheduler.unscheduleJob(getTriggerKey(scheduleJob));
|
||||
//删除任务
|
||||
scheduler.deleteJob(getJobKey(scheduleJob));
|
||||
} catch (SchedulerException e) {
|
||||
throw new RuntimeException("删除定时任务失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.zbkj.admin.quartz;
|
||||
|
||||
import cn.hutool.core.date.SystemClock;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.zbkj.admin.model.ScheduleJob;
|
||||
import com.zbkj.admin.model.ScheduleJobLog;
|
||||
import com.zbkj.admin.service.ScheduleJobLogService;
|
||||
import com.zbkj.admin.util.SpringBeanTaskUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 异步监听定时任务事件,解决job线程无故丢失的问题
|
||||
* @Author 指缝de阳光
|
||||
* @Date 2021/11/30 16:59
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@EnableAsync
|
||||
@AllArgsConstructor
|
||||
public class SysJobListener {
|
||||
|
||||
private final ScheduleJobLogService scheduleJobLogService;
|
||||
|
||||
@Async
|
||||
@EventListener(ScheduleJobEvent.class)
|
||||
public void scheduleJobEventListener(ScheduleJobEvent event) {
|
||||
ScheduleJob scheduleJob = event.getScheduleJob();
|
||||
//数据库保存执行记录
|
||||
ScheduleJobLog jobLog = new ScheduleJobLog();
|
||||
jobLog.setJobId(scheduleJob.getJobId());
|
||||
jobLog.setBeanName(scheduleJob.getBeanName());
|
||||
jobLog.setMethodName(scheduleJob.getMethodName());
|
||||
jobLog.setParams(scheduleJob.getParams());
|
||||
jobLog.setCreateTime(new Date());
|
||||
|
||||
//任务开始时间
|
||||
long startTime = SystemClock.now();
|
||||
|
||||
try {
|
||||
//执行任务
|
||||
log.info("任务准备执行,任务ID:" + scheduleJob.getJobId());
|
||||
|
||||
SpringBeanTaskUtil.invokeMethod(scheduleJob);
|
||||
|
||||
//任务执行总时长
|
||||
long times = SystemClock.now() - startTime;
|
||||
jobLog.setTimes((int)times);
|
||||
jobLog.setStatus(1);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
log.info(sb.append("任务执行完毕,任务ID:").append(jobLog.getJobId()).append(" 总共耗时:").append(times).append("毫秒").toString());
|
||||
} catch (Exception e) {
|
||||
log.error("任务执行失败,任务ID:" + scheduleJob.getJobId(), e);
|
||||
|
||||
//任务执行总时长
|
||||
long times = SystemClock.now() - startTime;
|
||||
jobLog.setTimes((int)times);
|
||||
jobLog.setStatus(0);
|
||||
jobLog.setError(StrUtil.sub(e.toString(), 0, 2000));
|
||||
} finally {
|
||||
scheduleJobLogService.save(jobLog);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.zbkj.admin.service;
|
||||
|
||||
import com.zbkj.admin.copyright.CopyrightInfoResponse;
|
||||
import com.zbkj.admin.copyright.CopyrightUpdateInfoRequest;
|
||||
|
||||
/**
|
||||
* 版权服务
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
public interface CopyrightService {
|
||||
|
||||
/**
|
||||
* 获取版权信息
|
||||
*/
|
||||
CopyrightInfoResponse getInfo();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.zbkj.admin.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.zbkj.admin.model.ScheduleJobLog;
|
||||
import com.zbkj.common.request.PageParamRequest;
|
||||
import com.zbkj.common.request.ScheduleJobLogSearchRequest;
|
||||
|
||||
/**
|
||||
* @author HZW
|
||||
* @description ScheduleJobLogService 接口
|
||||
* @date 2021-11-30
|
||||
*/
|
||||
public interface ScheduleJobLogService extends IService<ScheduleJobLog> {
|
||||
|
||||
/**
|
||||
* 自动删除日志
|
||||
*/
|
||||
void autoDeleteLog();
|
||||
|
||||
/**
|
||||
* 日志分页列表
|
||||
*
|
||||
* @param request 搜索参数
|
||||
* @param pageRequest 分页参数
|
||||
* @return PageInfo
|
||||
*/
|
||||
PageInfo<ScheduleJobLog> findLogPageList(ScheduleJobLogSearchRequest request, PageParamRequest pageRequest);
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.zbkj.admin.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zbkj.admin.model.ScheduleJob;
|
||||
import com.zbkj.common.request.ScheduleJobRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ScheduleJobService 接口
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
public interface ScheduleJobService extends IService<ScheduleJob> {
|
||||
|
||||
/**
|
||||
* 所有定时任务列表
|
||||
*/
|
||||
List<ScheduleJob> getAll();
|
||||
|
||||
/**
|
||||
* 添加定时任务
|
||||
*
|
||||
* @param request 参数
|
||||
*/
|
||||
Boolean add(ScheduleJobRequest request);
|
||||
|
||||
/**
|
||||
* 定时任务编辑
|
||||
*
|
||||
* @param request 编辑参数
|
||||
*/
|
||||
Boolean edit(ScheduleJobRequest request);
|
||||
|
||||
/**
|
||||
* 暂停定时任务
|
||||
*
|
||||
* @param jobId 定时任务ID
|
||||
*/
|
||||
Boolean suspend(Integer jobId);
|
||||
|
||||
/**
|
||||
* 启动定时任务
|
||||
*
|
||||
* @param jobId 定时任务ID
|
||||
*/
|
||||
Boolean start(Integer jobId);
|
||||
|
||||
/**
|
||||
* 删除定时任务
|
||||
*
|
||||
* @param jobId 定时任务ID
|
||||
*/
|
||||
Boolean delete(Integer jobId);
|
||||
|
||||
/**
|
||||
* 立即触发定时任务(一次)
|
||||
*
|
||||
* @param jobId 定时任务ID
|
||||
*/
|
||||
Boolean trig(Integer jobId);
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.zbkj.admin.service.impl;
|
||||
|
||||
import com.anji.captcha.service.CaptchaCacheService;
|
||||
import com.zbkj.common.utils.RedisUtil;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 对于分布式部署的应用,我们建议应用自己实现CaptchaCacheService,比如用Redis,参考service/spring-boot代码示例。
|
||||
* 如果应用是单点的,也没有使用redis,那默认使用内存。
|
||||
* 内存缓存只适合单节点部署的应用,否则验证码生产与验证在节点之间信息不同步,导致失败。
|
||||
*
|
||||
* ☆☆☆ SPI: 在resources目录新建META-INF.services文件夹(两层),参考当前服务resources。
|
||||
*
|
||||
* @author Han
|
||||
* @version 1.0.0
|
||||
* @Date 2025/6/13
|
||||
*/
|
||||
public class CaptchaCacheServiceRedisImpl implements CaptchaCacheService {
|
||||
|
||||
@Resource
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
|
||||
@Override
|
||||
public String type() {
|
||||
return "redis";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void set(String key, String value, long expiresInSeconds) {
|
||||
redisUtil.getRedisTemplate().opsForValue().set(key, value, expiresInSeconds, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean exists(String key) {
|
||||
return Boolean.TRUE.equals(redisUtil.getRedisTemplate().hasKey(key));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(String key) {
|
||||
redisUtil.getRedisTemplate().delete(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String get(String key) {
|
||||
return (String) redisUtil.getRedisTemplate().opsForValue().get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long increment(String key, long val) {
|
||||
return redisUtil.getRedisTemplate().opsForValue().increment(key,val);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package com.zbkj.admin.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zbkj.admin.copyright.CopyrightInfoResponse;
|
||||
import com.zbkj.admin.copyright.CopyrightUpdateInfoRequest;
|
||||
import com.zbkj.admin.service.CopyrightService;
|
||||
import com.zbkj.common.config.CrmebConfig;
|
||||
import com.zbkj.common.constants.Constants;
|
||||
import com.zbkj.common.constants.SysConfigConstants;
|
||||
import com.zbkj.common.exception.CrmebException;
|
||||
import com.zbkj.common.utils.RestTemplateUtil;
|
||||
import com.zbkj.service.service.SystemAttachmentService;
|
||||
import com.zbkj.service.service.SystemConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 版权服务实现类
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Service
|
||||
public class CopyrightServiceImpl implements CopyrightService {
|
||||
|
||||
@Autowired
|
||||
private SystemConfigService systemConfigService;
|
||||
@Autowired
|
||||
private CrmebConfig crmebConfig;
|
||||
@Autowired
|
||||
private RestTemplateUtil restTemplateUtil;
|
||||
|
||||
|
||||
private static final String CRMEB_COPYRIGHT_URL = "https://authorize.crmeb.net/api/auth_cert_query?domain_name={}&label={}&version={}";
|
||||
private static final String CRMEB_COPYRIGHT_URL_DATA = "data";
|
||||
private static final String CRMEB_COPYRIGHT_URL_STATUS = "status";
|
||||
private static final String CRMEB_COPYRIGHT_URL_COPYRIGHT = "copyright";
|
||||
private static final String CRMEB_COPYRIGHT_URL_AUTHCODE = "auth_code";
|
||||
|
||||
|
||||
/**
|
||||
* 获取版权信息
|
||||
*/
|
||||
@Override
|
||||
public CopyrightInfoResponse getInfo() {
|
||||
CopyrightInfoResponse response = new CopyrightInfoResponse();
|
||||
String domainName = systemConfigService.getValueByKey(Constants.CONFIG_KEY_API_URL);
|
||||
if (StrUtil.isBlank(domainName)) {
|
||||
response.setStatus(-2);
|
||||
return response;
|
||||
}
|
||||
String label = systemConfigService.getValueByKey(SysConfigConstants.CONFIG_COPYRIGHT_LABEL);
|
||||
String version = crmebConfig.getVersion();
|
||||
if (StrUtil.isBlank(version)) {
|
||||
throw new CrmebException("请先在yml中配置版本号");
|
||||
}
|
||||
response.setDomainUrl(domainName);
|
||||
response.setLabel(Integer.parseInt(label));
|
||||
response.setVersion(version);
|
||||
|
||||
JSONObject jsonObject = restTemplateUtil.post(StrUtil.format(CRMEB_COPYRIGHT_URL, domainName, label, version));
|
||||
if (ObjectUtil.isNull(jsonObject.getInteger("status")) || !jsonObject.getInteger("status").equals(200)) {
|
||||
throw new CrmebException("CRMEB版权接口调用失败," + jsonObject);
|
||||
}
|
||||
System.out.println("==================================== " + jsonObject.toString());
|
||||
JSONObject dataJson = jsonObject.getJSONObject(CRMEB_COPYRIGHT_URL_DATA);
|
||||
|
||||
response.setStatus(dataJson.getInteger(CRMEB_COPYRIGHT_URL_STATUS));
|
||||
response.setCopyright(dataJson.getString(CRMEB_COPYRIGHT_URL_COPYRIGHT));
|
||||
if (!dataJson.getInteger(CRMEB_COPYRIGHT_URL_STATUS).equals(1)) {
|
||||
return response;
|
||||
}
|
||||
response.setAuthCode(dataJson.getString(CRMEB_COPYRIGHT_URL_AUTHCODE));
|
||||
response.setCompanyName(systemConfigService.getValueByKey(SysConfigConstants.CONFIG_COPYRIGHT_COMPANY_INFO));
|
||||
response.setCompanyImage(systemConfigService.getValueByKey(SysConfigConstants.CONFIG_COPYRIGHT_COMPANY_IMAGE));
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.zbkj.admin.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.zbkj.admin.dao.ScheduleJobLogDao;
|
||||
import com.zbkj.admin.model.ScheduleJobLog;
|
||||
import com.zbkj.admin.service.ScheduleJobLogService;
|
||||
import com.zbkj.common.page.CommonPage;
|
||||
import com.zbkj.common.request.PageParamRequest;
|
||||
import com.zbkj.common.request.ScheduleJobLogSearchRequest;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author HZW
|
||||
* @description ScheduleJobLogServiceImpl 接口实现
|
||||
* @date 2021-11-30
|
||||
*/
|
||||
@Service
|
||||
public class ScheduleJobLogServiceImpl extends ServiceImpl<ScheduleJobLogDao, ScheduleJobLog> implements ScheduleJobLogService {
|
||||
|
||||
@Resource
|
||||
private ScheduleJobLogDao dao;
|
||||
|
||||
/**
|
||||
* 自动删除日志
|
||||
*/
|
||||
@Override
|
||||
public void autoDeleteLog() {
|
||||
String beforeDate = DateUtil.offsetDay(new Date(), -9).toString("yyyy-MM-dd");
|
||||
UpdateWrapper<ScheduleJobLog> wrapper = Wrappers.update();
|
||||
wrapper.lt("create_time", beforeDate);
|
||||
dao.delete(wrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 日志分页列表
|
||||
*
|
||||
* @param request 搜索参数
|
||||
* @param pageRequest 分页参数
|
||||
* @return PageInfo
|
||||
*/
|
||||
@Override
|
||||
public PageInfo<ScheduleJobLog> findLogPageList(ScheduleJobLogSearchRequest request, PageParamRequest pageRequest) {
|
||||
Page<ScheduleJobLog> page = PageHelper.startPage(pageRequest.getPage(), pageRequest.getLimit());
|
||||
LambdaQueryWrapper<ScheduleJobLog> lqw = Wrappers.lambdaQuery();
|
||||
if (ObjectUtil.isNotNull(request.getJobId())) {
|
||||
lqw.eq(ScheduleJobLog::getJobId, request.getJobId());
|
||||
}
|
||||
if (StrUtil.isNotBlank(request.getBeanName())) {
|
||||
lqw.eq(ScheduleJobLog::getBeanName, request.getBeanName());
|
||||
}
|
||||
if (StrUtil.isNotBlank(request.getMethodName())) {
|
||||
lqw.eq(ScheduleJobLog::getMethodName, request.getMethodName());
|
||||
}
|
||||
if (ObjectUtil.isNotNull(request.getStatus())) {
|
||||
lqw.eq(ScheduleJobLog::getStatus, request.getStatus());
|
||||
}
|
||||
lqw.orderByDesc(ScheduleJobLog::getLogId);
|
||||
List<ScheduleJobLog> list = dao.selectList(lqw);
|
||||
return CommonPage.copyPageInfo(page, list);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
package com.zbkj.admin.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zbkj.admin.dao.ScheduleJobDao;
|
||||
import com.zbkj.admin.model.ScheduleJob;
|
||||
import com.zbkj.admin.quartz.ScheduleConstants;
|
||||
import com.zbkj.admin.quartz.ScheduleManager;
|
||||
import com.zbkj.admin.service.ScheduleJobService;
|
||||
import com.zbkj.common.exception.CrmebException;
|
||||
import com.zbkj.common.request.ScheduleJobRequest;
|
||||
import org.quartz.CronTrigger;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ScheduleJobServiceImpl 接口实现
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Service
|
||||
public class ScheduleJobServiceImpl extends ServiceImpl<ScheduleJobDao, ScheduleJob> implements ScheduleJobService {
|
||||
|
||||
@Resource
|
||||
private ScheduleJobDao dao;
|
||||
|
||||
@Autowired
|
||||
private ScheduleManager scheduleManager;
|
||||
|
||||
/**
|
||||
* 项目启动时,初始化定时器
|
||||
*/
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
getAll().forEach(scheduleJob -> {
|
||||
CronTrigger trigger = scheduleManager.getCronTrigger(scheduleJob);
|
||||
// 如果定时任务不存在,则创建定时任务
|
||||
if (trigger == null) {
|
||||
scheduleManager.createScheduleJob(scheduleJob);
|
||||
} else if (ScheduleConstants.NORMAL.equals(scheduleJob.getStatus())) {
|
||||
scheduleManager.resumeJob(scheduleJob);
|
||||
} else if (ScheduleConstants.PAUSE.equals(scheduleJob.getStatus())) {
|
||||
scheduleManager.pauseJob(scheduleJob);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有的job
|
||||
*
|
||||
* @return List<ScheduleJob>
|
||||
*/
|
||||
@Order
|
||||
public List<ScheduleJob> getAll() {
|
||||
LambdaQueryWrapper<ScheduleJob> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(ScheduleJob::getIsDelte, false);
|
||||
lqw.orderByDesc(ScheduleJob::getJobId);
|
||||
return dao.selectList(lqw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加定时任务
|
||||
*
|
||||
* @param request 参数
|
||||
*/
|
||||
@Override
|
||||
public Boolean add(ScheduleJobRequest request) {
|
||||
ScheduleJob scheduleJob = new ScheduleJob();
|
||||
BeanUtils.copyProperties(request, scheduleJob);
|
||||
scheduleJob.setJobId(null);
|
||||
scheduleJob.setStatus(ScheduleConstants.PAUSE);
|
||||
scheduleJob.setIsDelte(false);
|
||||
boolean save = save(scheduleJob);
|
||||
if (save) {
|
||||
scheduleManager.createScheduleJob(scheduleJob);
|
||||
}
|
||||
return save;
|
||||
}
|
||||
|
||||
/**
|
||||
* 定时任务编辑
|
||||
*
|
||||
* @param request 编辑参数
|
||||
*/
|
||||
@Override
|
||||
public Boolean edit(ScheduleJobRequest request) {
|
||||
if (ObjectUtil.isNull(request.getJobId())) {
|
||||
throw new CrmebException("定时任务ID不能为空");
|
||||
}
|
||||
ScheduleJob scheduleJob = getByIdException(request.getJobId());
|
||||
if (scheduleJob.getStatus().equals(ScheduleConstants.NORMAL)) {
|
||||
throw new CrmebException("请先暂停定时任务");
|
||||
}
|
||||
BeanUtils.copyProperties(request, scheduleJob);
|
||||
boolean update = updateById(scheduleJob);
|
||||
if (update) {
|
||||
scheduleManager.updateScheduleJob(scheduleJob);
|
||||
}
|
||||
return update;
|
||||
}
|
||||
|
||||
/**
|
||||
* 暂停定时任务
|
||||
*
|
||||
* @param jobId 定时任务ID
|
||||
*/
|
||||
@Override
|
||||
public Boolean suspend(Integer jobId) {
|
||||
ScheduleJob scheduleJob = getByIdException(jobId);
|
||||
if (scheduleJob.getStatus().equals(ScheduleConstants.PAUSE)) {
|
||||
throw new CrmebException("定时任务已暂停,请勿重复操作");
|
||||
}
|
||||
scheduleJob.setStatus(ScheduleConstants.PAUSE);
|
||||
boolean update = updateById(scheduleJob);
|
||||
if (update) {
|
||||
scheduleManager.pauseJob(scheduleJob);
|
||||
}
|
||||
return update;
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动定时任务
|
||||
*
|
||||
* @param jobId 定时任务ID
|
||||
*/
|
||||
@Override
|
||||
public Boolean start(Integer jobId) {
|
||||
ScheduleJob scheduleJob = getByIdException(jobId);
|
||||
if (scheduleJob.getStatus().equals(ScheduleConstants.NORMAL)) {
|
||||
throw new CrmebException("定时任务已启动,请勿重复操作");
|
||||
}
|
||||
scheduleJob.setStatus(ScheduleConstants.NORMAL);
|
||||
boolean update = updateById(scheduleJob);
|
||||
if (update) {
|
||||
scheduleManager.resumeJob(scheduleJob);
|
||||
}
|
||||
return update;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除定时任务
|
||||
*
|
||||
* @param jobId 定时任务ID
|
||||
*/
|
||||
@Override
|
||||
public Boolean delete(Integer jobId) {
|
||||
ScheduleJob scheduleJob = getByIdException(jobId);
|
||||
if (scheduleJob.getStatus().equals(ScheduleConstants.NORMAL)) {
|
||||
throw new CrmebException("请先暂停定时任务");
|
||||
}
|
||||
scheduleJob.setIsDelte(true);
|
||||
boolean delete = updateById(scheduleJob);
|
||||
if (delete) {
|
||||
scheduleManager.deleteScheduleJob(scheduleJob);
|
||||
}
|
||||
return delete;
|
||||
}
|
||||
|
||||
/**
|
||||
* 立即触发定时任务(一次)
|
||||
*
|
||||
* @param jobId 定时任务ID
|
||||
*/
|
||||
@Override
|
||||
public Boolean trig(Integer jobId) {
|
||||
ScheduleJob scheduleJob = getByIdException(jobId);
|
||||
scheduleManager.run(scheduleJob);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
private ScheduleJob getByIdException(Integer jobId) {
|
||||
ScheduleJob scheduleJob = getById(jobId);
|
||||
if (ObjectUtil.isNull(scheduleJob) || scheduleJob.getIsDelte()) {
|
||||
throw new CrmebException("定时任务不存在");
|
||||
}
|
||||
return scheduleJob;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.zbkj.admin.task.order;
|
||||
|
||||
import com.zbkj.common.utils.CrmebDateUtil;
|
||||
import com.zbkj.service.service.OrderTaskService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 系统自动确认收货Task
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Component("OrderAutoReceiptTask")
|
||||
public class OrderAutoReceiptTask {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(OrderAutoReceiptTask.class);
|
||||
|
||||
@Autowired
|
||||
private OrderTaskService orderTaskService;
|
||||
|
||||
public void autoTakeDelivery() {
|
||||
// cron : 0 0 0 */1 * ?
|
||||
LOGGER.info("---OrderAutoReceiptTask task------produce Data with fixed rate task: Execution Time - {}", CrmebDateUtil.nowDateTime());
|
||||
try {
|
||||
orderTaskService.autoTakeDelivery();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
LOGGER.error("OrderAutoReceiptTask.exception" + " | msg : " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.zbkj.admin.util;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.zbkj.common.utils.SpringUtil;
|
||||
import com.zbkj.admin.model.ScheduleJob;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/**
|
||||
* 定时任务spring bean 执行定时任务
|
||||
* @Author 指缝de阳光
|
||||
* @Date 2021/11/30 17:00
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class SpringBeanTaskUtil {
|
||||
|
||||
public static void invokeMethod(ScheduleJob scheduleJob) {
|
||||
Object target = SpringUtil.getBean(scheduleJob.getBeanName());
|
||||
try {
|
||||
if (StrUtil.isNotEmpty(scheduleJob.getParams())) {
|
||||
Method method = target.getClass().getDeclaredMethod(scheduleJob.getMethodName(), String.class);
|
||||
ReflectionUtils.makeAccessible(method);
|
||||
method.invoke(target, scheduleJob.getParams());
|
||||
} else {
|
||||
Method method = target.getClass().getDeclaredMethod(scheduleJob.getMethodName());
|
||||
ReflectionUtils.makeAccessible(method);
|
||||
method.invoke(target);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException("执行定时任务失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"properties": [
|
||||
{
|
||||
"name": "wx.miniapp.configs",
|
||||
"type": "java.util.List",
|
||||
"description": "Description for wx.miniapp.configs."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
com.zbkj.admin.service.impl.CaptchaCacheServiceRedisImpl
|
||||
68
crmeb/crmeb-admin/src/main/resources/application-trip.yml
Normal file
@@ -0,0 +1,68 @@
|
||||
# CRMEB 相关配置
|
||||
crmeb:
|
||||
version: CRMEB-JAVA-KY-v1.4 # 当前代码版本
|
||||
domain: #配合swagger使用 # 待部署域名
|
||||
wechat-api-url: #请求微信接口中专服务器
|
||||
wechat-js-api-debug: false #微信js api系列是否开启调试模式
|
||||
wechat-js-api-beta: true #微信js api是否是beta版本
|
||||
asyncConfig: true #是否同步config表数据到redis
|
||||
asyncWeChatProgramTempList: false #是否同步小程序公共模板库
|
||||
imagePath: /JAVA_PROJECT/SINGLE/trip/admin/ # 服务器图片路径配置 斜杠结尾
|
||||
captchaOn: false # 是否开启行为验证码
|
||||
demoSite: true # 是否演示站点 所有手机号码都会掩码
|
||||
|
||||
server:
|
||||
port: 20500
|
||||
|
||||
spring:
|
||||
profiles:
|
||||
# 配置的环境
|
||||
active: prod
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 50MB #设置单个文件大小
|
||||
max-request-size: 50MB #设置单次请求文件的总大小
|
||||
# 数据库配置
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/java_trip?characterEncoding=utf-8&useSSL=false&serverTimeZone=GMT+8
|
||||
username: java_trip
|
||||
password: 111111
|
||||
redis:
|
||||
host: 127.0.0.1 #地址
|
||||
port: 6379 #端口
|
||||
password: 111111
|
||||
timeout: 10000 # 连接超时时间(毫秒)
|
||||
database: 5 #默认数据库
|
||||
jedis:
|
||||
pool:
|
||||
max-active: 200 # 连接池最大连接数(使用负值表示没有限制)
|
||||
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-idle: 10 # 连接池中的最大空闲连接
|
||||
min-idle: 0 # 连接池中的最小空闲连接
|
||||
time-between-eviction-runs: -1 #逐出扫描的时间间隔(毫秒) 如果为负数,则不运行逐出线程, 默认-1
|
||||
|
||||
debug: true
|
||||
logging:
|
||||
level:
|
||||
io.swagger.*: error
|
||||
com.zbjk.crmeb: debug
|
||||
org.springframework.boot.autoconfigure: ERROR
|
||||
config: classpath:logback-spring.xml
|
||||
file:
|
||||
path: ./crmeb_log
|
||||
|
||||
# mybatis 配置
|
||||
mybatis-plus:
|
||||
# 配置sql打印日志
|
||||
configuration:
|
||||
log-impl:
|
||||
|
||||
#swagger 配置
|
||||
swagger:
|
||||
basic:
|
||||
enable: true #是否开启界面
|
||||
check: false #是否打开验证
|
||||
username: crmeb #访问swagger的账号
|
||||
password: crmeb.com #访问swagger的密码
|
||||
BIN
crmeb/crmeb-admin/src/main/resources/fonts/WenQuanZhengHei.ttf
Normal file
55
crmeb/crmeb-admin/src/main/resources/fonts/license.txt
Normal file
@@ -0,0 +1,55 @@
|
||||
文泉驿是一个开源汉字字体项目
|
||||
|
||||
由旅美学者房骞骞(FangQ)
|
||||
|
||||
于2004年10月创建
|
||||
|
||||
集中力量解决GNU/Linux
|
||||
|
||||
高质量中文字体匮乏的状况
|
||||
|
||||
目前,文泉驿已经开发并发布了
|
||||
|
||||
第一个完整覆盖GB18030汉字
|
||||
|
||||
(包含27000多个汉字)
|
||||
|
||||
的多规格点阵汉字字型文件
|
||||
|
||||
第一个覆盖GBK字符集的
|
||||
|
||||
开源矢量字型文件(文泉驿正黑)
|
||||
|
||||
并提供了目前包含字符数目最多的
|
||||
|
||||
开源字体——GNU Unifont——中
|
||||
|
||||
绝大多数中日韩文相关的符号
|
||||
|
||||
这些字型文件已经逐渐成为
|
||||
|
||||
主流Linux/Unix发行版
|
||||
|
||||
中文桌面的首选中文字体
|
||||
|
||||
目前Ubuntu、Fedora、Slackware
|
||||
|
||||
Magic Linux、CDLinux
|
||||
|
||||
使用文泉驿作为默认中文字体
|
||||
|
||||
Debian、Gentoo、Mandriva
|
||||
|
||||
ArchLinux、Frugalware
|
||||
|
||||
则提供了官方源支持
|
||||
|
||||
而FreeBSD则在其ports中有提供
|
||||
|
||||
所以,今天我们所要分享的就是
|
||||
|
||||
文泉驿正黑体
|
||||
|
||||
可在Linux/UNIX,Windows
|
||||
|
||||
Mac OS和嵌入式操作系统中使用
|
||||
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 93 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 47 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
BIN
crmeb/crmeb-admin/src/main/resources/images/pic-click/bg6.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
crmeb/crmeb-admin/src/main/resources/images/pic-click/bg8.png
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
crmeb/crmeb-admin/src/main/resources/images/pic-click/bg9.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
@@ -0,0 +1,5 @@
|
||||
<?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.zbkj.admin.dao.ScheduleJobLogDao">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?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.zbkj.admin.dao.ScheduleJobDao">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.zbkj.common.acpect;
|
||||
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Pointcut;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
|
||||
/**
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
* 所有的前端controller层的拦截业务,方法的执行时间长度,
|
||||
*/
|
||||
@Aspect
|
||||
@Component
|
||||
public class ControllerAspect {
|
||||
|
||||
Logger logger = LoggerFactory.getLogger(ControllerAspect.class);
|
||||
|
||||
@Pointcut("execution(* com.zbkj.crmeb.system.controller.*.*(..))")
|
||||
private void pointCutMethodController() {
|
||||
|
||||
}
|
||||
|
||||
@Around("pointCutMethodController()")
|
||||
public Object doAroundService(ProceedingJoinPoint pjp) throws Throwable {
|
||||
|
||||
long begin = System.nanoTime();
|
||||
|
||||
Object obj = pjp.proceed();
|
||||
|
||||
long end = System.nanoTime();
|
||||
|
||||
logger.info("Controller method:{},prams:{},cost time:{} ns,cost:{} ms",
|
||||
|
||||
pjp.getSignature().toString(), Arrays.toString(pjp.getArgs()), (end - begin), (end - begin) / 1000000);
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.zbkj.common.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @ClassName CustomResponseAnnotation
|
||||
* @Description 自定义响应结果注解,由此注解表示返回值不经过统一封装返回
|
||||
* @Author HZW
|
||||
* @Date 2023/2/21 17:19
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ElementType.TYPE, ElementType.METHOD}) //作用于方法和类(接口)上
|
||||
@Documented
|
||||
public @interface CustomResponseAnnotation {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.zbkj.common.constants;
|
||||
|
||||
/**
|
||||
* 版权常量
|
||||
*/
|
||||
|
||||
public class CopyrightConstants {
|
||||
|
||||
|
||||
// 备案号
|
||||
public static final String COPYRIGHT_ICP_NUMBER = "copyright_icp_number";
|
||||
// 备案号连接
|
||||
public static final String COPYRIGHT_ICP_NUMBER_URL = "copyright_icp_number_url";
|
||||
// 网安备案
|
||||
public static final String COPYRIGHT_INTERNET_RECORD = "copyright_internet_record";
|
||||
// 网安备案连接
|
||||
public static final String COPYRIGHT_INTERNET_RECORD_URL = "copyright_internet_record_url";
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.zbkj.common.constants;
|
||||
|
||||
/**
|
||||
* Config配置常量类
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
public class DateConstants {
|
||||
|
||||
/** 日期格式:年-月-日 时:分:秒 */
|
||||
public static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
|
||||
|
||||
public static final String DATE_FORMAT_UTC = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";
|
||||
|
||||
/** 日期格式:年-月-日 */
|
||||
public static final String DATE_FORMAT_DATE = "yyyy-MM-dd";
|
||||
/** 日期格式:年 */
|
||||
public static final String DATE_FORMAT_YEAR = "yyyy";
|
||||
/** 日期格式:月日- */
|
||||
public static final String DATE_FORMAT_MONTH_DATE = "MM-dd";
|
||||
/** 日期格式:年-月 */
|
||||
public static final String DATE_FORMAT_MONTH = "yyyy-MM";
|
||||
/** 日期格式:年月日时分秒 */
|
||||
public static final String DATE_TIME_FORMAT_NUM = "yyyyMMddHHmmss";
|
||||
/** 日期格式:年月日 */
|
||||
public static final String DATE_FORMAT_NUM = "yyyyMMdd";
|
||||
/** 日期格式:年月日 开始时间 */
|
||||
public static final String DATE_FORMAT_START = "yyyy-MM-dd 00:00:00";
|
||||
/** 日期格式:年月日 结束时间 */
|
||||
public static final String DATE_FORMAT_END = "yyyy-MM-dd 23:59:59";
|
||||
/** 日期格式:每个月的开始时间 */
|
||||
public static final String DATE_FORMAT_MONTH_START = "yyyy-MM-01 00:00:00";
|
||||
/** 日期格式:每年的开始时间 */
|
||||
public static final String DATE_FORMAT_YEAR_START = "yyyy-01-01 00:00:00";
|
||||
/** 日期格式:每年的结束时间 */
|
||||
public static final String DATE_FORMAT_YEAR_END = "yyyy-12-31 23:59:59";
|
||||
/** 日期格式:时:分:秒 */
|
||||
public static final String DATE_FORMAT_HHMMSS = "HH:mm:ss";
|
||||
/** 每天开始时间 */
|
||||
public static final String DATE_FORMAT_START_PEREND = "00:00:00";
|
||||
/** 每日结束时间 */
|
||||
public static final String DATE_FORMAT_END_PEREND = "23:59:59";
|
||||
/** 日期格式:年-月-日 时:分 */
|
||||
public static final String DATE_FORMAT_HHMM = "yyyy-MM-dd HH:mm";
|
||||
/** 日期格式:时分 */
|
||||
public static final String DATE_FORMAT_TIME_HHMM = "HHmm";
|
||||
/** 日期格式:rfc3339标准格式 2015-05-20T13:29:35.120+08:00 */
|
||||
public static final String DATE_FORMAT_RFC_3339 = "yyyy-MM-dd'T'HH:mm:ssXXX";
|
||||
|
||||
/** 搜索日期-今天 */
|
||||
public static final String SEARCH_DATE_DAY = "today";
|
||||
/** 搜索日期-昨天 */
|
||||
public static final String SEARCH_DATE_YESTERDAY = "yesterday";
|
||||
/** 搜索日期-最近7天 */
|
||||
public static final String SEARCH_DATE_LATELY_7 = "lately7";
|
||||
/** 搜索日期-最近30天 */
|
||||
public static final String SEARCH_DATE_LATELY_30 = "lately30";
|
||||
/** 搜索日期-本周 */
|
||||
public static final String SEARCH_DATE_WEEK = "week";
|
||||
/** 搜索日期-上周 */
|
||||
public static final String SEARCH_DATE_PRE_WEEK = "preWeek";
|
||||
/** 搜索日期-本月 */
|
||||
public static final String SEARCH_DATE_MONTH = "month";
|
||||
/** 搜索日期-上月 */
|
||||
public static final String SEARCH_DATE_PRE_MONTH = "preMonth";
|
||||
/** 搜索日期-年 */
|
||||
public static final String SEARCH_DATE_YEAR = "year";
|
||||
/** 搜索日期-上一年 */
|
||||
public static final String SEARCH_DATE_PRE_YEAR = "preYear";
|
||||
/** 搜索日期-最近90天 */
|
||||
public static final String SEARCH_DATE_LATELY_90 = "lately90";
|
||||
/** 搜索日期-最近180天 */
|
||||
public static final String SEARCH_DATE_LATELY_180 = "lately180";
|
||||
|
||||
// 时间类型开始时间
|
||||
public static String DATE_TIME_TYPE_BEGIN = "begin";
|
||||
// 时间类型结束时间
|
||||
public static String DATE_TIME_TYPE_END = "end";
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.zbkj.common.constants;
|
||||
|
||||
/**
|
||||
* 上传/下载常量类
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
public class UploadConstants {
|
||||
|
||||
/** 文件上传关键字 */
|
||||
public static final String UPLOAD_FILE_KEYWORD = "crmebimage";
|
||||
|
||||
/** 文件导出下载拦截关键字 */
|
||||
public static final String DOWNLOAD_FILE_KEYWORD = "downloadf";
|
||||
|
||||
/** 文件前端上传后下载关键字 */
|
||||
public static final String UPLOAD_AFTER_FILE_KEYWORD = "uploadf";
|
||||
|
||||
/** 文件类型-excel */
|
||||
public static final String UPLOAD_MODEL_PATH_EXCEL = "excel";
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.zbkj.common.constants;
|
||||
|
||||
/**
|
||||
* 用户等级常量类
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
public class UserLevelConstants {
|
||||
|
||||
/**
|
||||
* ---------------------------------------
|
||||
* --------系统用户等级常量------------------
|
||||
* ---------------------------------------
|
||||
*/
|
||||
/** 系统用户等级规则 */
|
||||
public static final String SYSTEM_USER_LEVEL_RULE = "userLevelRule";
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.zbkj.common.enums;
|
||||
|
||||
/**
|
||||
* 方法类型枚举
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
public enum MethodType {
|
||||
|
||||
ADD("add", "增加"),
|
||||
DELETE("delete", "删除"),
|
||||
UPDATE("update", "修改"),
|
||||
EXPORT("export", "导出"),
|
||||
SELECT("query", "查询");
|
||||
|
||||
private final String type;
|
||||
private final String name;
|
||||
|
||||
MethodType(String type, String name) {
|
||||
this.type = type;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public static String getName(String type){
|
||||
for (MethodType modelType : MethodType.values()) {
|
||||
if (modelType.getType().equals(type))
|
||||
return modelType.getName();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getType(String name){
|
||||
for (MethodType modelType : MethodType.values()) {
|
||||
if (modelType.getName().equals(name))
|
||||
return modelType.getType();
|
||||
}
|
||||
return "-1";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
package com.zbkj.common.exception;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
/**
|
||||
* @ClassName Assert
|
||||
* @Description 断言
|
||||
* @Author HZW
|
||||
* @Date 2023/2/22 12:37
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface Assert {
|
||||
|
||||
/**
|
||||
* 创建异常
|
||||
*/
|
||||
CrmebException newException();
|
||||
|
||||
/**
|
||||
* 断言对象不为空
|
||||
*/
|
||||
default <T> T assertNotNull(T obj) {
|
||||
if (ObjectUtil.isEmpty(obj)) {
|
||||
throw newException();
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言对象是空
|
||||
*/
|
||||
default void assertIsNull(Object obj) {
|
||||
if (ObjectUtil.isNotNull(obj)) {
|
||||
throw newException();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言两个对象不相等
|
||||
*/
|
||||
default void assertNotEquals(Object obj, Object obj1) {
|
||||
if (ObjectUtil.equal(obj, obj1)) {
|
||||
throw newException();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 断言字符串不为空
|
||||
*/
|
||||
default void assertNotEmptyStr(String str) {
|
||||
if (StrUtil.isBlank(str)) {
|
||||
throw newException();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言两个对象相等
|
||||
*/
|
||||
default void assertEquals(Object obj, Object obj1) {
|
||||
if (ObjectUtil.notEqual(obj, obj1)) {
|
||||
throw newException();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言true
|
||||
*/
|
||||
default void assertIsTrue(boolean expression) {
|
||||
if (!expression) {
|
||||
throw newException();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言false
|
||||
*/
|
||||
default void assertIsFalse(boolean expression) {
|
||||
if (expression) {
|
||||
throw newException();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言int数组范围
|
||||
*/
|
||||
default int assertBetween(int value, int min, int max) {
|
||||
if (value >= min && value <= max) {
|
||||
return value;
|
||||
}
|
||||
throw newException();
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言long数值范围
|
||||
*/
|
||||
default long assertBetween(long value, long min, long max) {
|
||||
if (value >= min && value <= max) {
|
||||
return value;
|
||||
}
|
||||
throw newException();
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言double数值范围
|
||||
*/
|
||||
default double assertBetween(double value, double min, double max) {
|
||||
if (value >= min && value <= max) {
|
||||
return value;
|
||||
}
|
||||
throw newException();
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言int大于数值范围
|
||||
*/
|
||||
default int assertGreaterThan(int value , int min){
|
||||
if (value <= min){
|
||||
throw newException();
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.zbkj.common.exception;
|
||||
|
||||
import com.zbkj.common.result.IResultEnum;
|
||||
|
||||
/**
|
||||
* @ClassName BusinessException
|
||||
* @Description 业务异常类
|
||||
* @Author HZW
|
||||
* @Date 2023/2/22 12:34
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class BusinessException extends CrmebException {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public BusinessException(IResultEnum iResultEnum) {
|
||||
super(iResultEnum);
|
||||
}
|
||||
|
||||
public BusinessException(IResultEnum iResultEnum, Throwable throwable) {
|
||||
super(iResultEnum, throwable);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.zbkj.common.exception;
|
||||
|
||||
import com.zbkj.common.result.IResultEnum;
|
||||
|
||||
/**
|
||||
* @ClassName BusinessExceptionAssert
|
||||
* @Description 业务异常断言
|
||||
* @Author HZW
|
||||
* @Date 2023/2/22 12:39
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface BusinessExceptionAssert extends IResultEnum, Assert {
|
||||
|
||||
@Override
|
||||
default CrmebException newException() {
|
||||
return new BusinessException(this);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.zbkj.common.model.acticitystyle;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 活动气氛样式,包含活动边框和活动背景
|
||||
* </p>
|
||||
*
|
||||
* @author dazongzi
|
||||
* @since 2023-01-05
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("eb_activity_style")
|
||||
@ApiModel(value="ActivityStyle对象", description="")
|
||||
public class ActivityStyle implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "活动名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "活动类型0=活动边框,1=活动背景")
|
||||
private Boolean type;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private Date starttime;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private Date endtime;
|
||||
|
||||
@ApiModelProperty(value = "活动边框素材地址")
|
||||
private String style;
|
||||
|
||||
@ApiModelProperty(value = "状态 0=关闭1=开启")
|
||||
private Boolean status;
|
||||
|
||||
@ApiModelProperty(value = "商品参与类型 0=全部商品参与,1=指定商品参与,2=指定品牌参与,3=指定商品分类参与,4=指定商户产品")
|
||||
private Integer method;
|
||||
|
||||
@ApiModelProperty(value = "参与活动商品")
|
||||
private String products;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createtime;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updatetime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.zbkj.common.model.exception;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
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 lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 异常信息表
|
||||
* </p>
|
||||
*
|
||||
* @author HZW
|
||||
* @since 2023-02-27
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("eb_exception_log")
|
||||
@ApiModel(value = "ExceptionLog对象", description = "异常信息表")
|
||||
public class ExceptionLog implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("异常日志ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("异常的url")
|
||||
@TableField("exp_url")
|
||||
private String expUrl;
|
||||
|
||||
@ApiModelProperty("异常的参数")
|
||||
@TableField("exp_params")
|
||||
private String expParams;
|
||||
|
||||
@ApiModelProperty("异常的类型")
|
||||
@TableField("exp_type")
|
||||
private String expType;
|
||||
|
||||
@ApiModelProperty("异常的类名")
|
||||
@TableField("exp_controller")
|
||||
private String expController;
|
||||
|
||||
@ApiModelProperty("异常的方法名")
|
||||
@TableField("exp_method")
|
||||
private String expMethod;
|
||||
|
||||
@ApiModelProperty("异常详细信息")
|
||||
@TableField("exp_detail")
|
||||
private String expDetail;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
@TableField("create_time")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.zbkj.common.model.page;
|
||||
|
||||
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 lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 页面链接分类
|
||||
* </p>
|
||||
*
|
||||
* @author dazongzi
|
||||
* @since 2023-05-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("eb_page_category")
|
||||
@ApiModel(value="PageCategory对象", description="页面链接分类")
|
||||
public class PageCategory implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "父类id")
|
||||
private Integer pid;
|
||||
|
||||
@ApiModelProperty(value = "类型:link、special、product、product_category、custom")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "分类名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
private Boolean status;
|
||||
|
||||
@ApiModelProperty(value = "添加时间")
|
||||
private Date addTime;
|
||||
|
||||
@ApiModelProperty(value = "层级 个位数")
|
||||
private Boolean level;
|
||||
|
||||
@ApiModelProperty(value = "是否商户 0平台,商户id")
|
||||
private Integer isMer;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.zbkj.common.model.page;
|
||||
|
||||
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 lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* DIY数据表
|
||||
* </p>
|
||||
*
|
||||
* @author dazongzi
|
||||
* @since 2023-05-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("eb_page_diy")
|
||||
@ApiModel(value="PageDiy对象", description="DIY数据表")
|
||||
public class PageDiy implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "版本号")
|
||||
private String version;
|
||||
|
||||
@ApiModelProperty(value = "页面名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "网站标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "封面图")
|
||||
private String coverImage;
|
||||
|
||||
@ApiModelProperty(value = "模板名称")
|
||||
private String templateName;
|
||||
|
||||
@ApiModelProperty(value = "页面数据")
|
||||
private String value;
|
||||
|
||||
@ApiModelProperty(value = "添加时间")
|
||||
private Date addTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty(value = "是否使用")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "页面类型")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "显示首页")
|
||||
private Integer isShow;
|
||||
|
||||
@ApiModelProperty(value = "颜色是否选中")
|
||||
private Integer isBgColor;
|
||||
|
||||
@ApiModelProperty(value = "背景图是否选中")
|
||||
private Integer isBgPic;
|
||||
|
||||
@ApiModelProperty(value = "是否是diy数据")
|
||||
private Integer isDiy;
|
||||
|
||||
@ApiModelProperty(value = "背景颜色")
|
||||
private String colorPicker;
|
||||
|
||||
@ApiModelProperty(value = "背景图")
|
||||
private String bgPic;
|
||||
|
||||
@ApiModelProperty(value = "背景图图片样式")
|
||||
private Integer bgTabVal;
|
||||
|
||||
@ApiModelProperty(value = "是否删除")
|
||||
private Integer isDel;
|
||||
|
||||
@ApiModelProperty(value = "返回地址")
|
||||
private String returnAddress;
|
||||
|
||||
@ApiModelProperty(value = "标题背景色")
|
||||
private String titleBgColor;
|
||||
|
||||
@ApiModelProperty(value = "标题颜色")
|
||||
private String titleColor;
|
||||
|
||||
@ApiModelProperty(value = "商家样式")
|
||||
private Integer serviceStatus;
|
||||
|
||||
@ApiModelProperty(value = "商户ID")
|
||||
private Integer merId;
|
||||
|
||||
@ApiModelProperty(value = "默认模板(1.平台默认 2.商户默认)")
|
||||
private Integer isDefault;
|
||||
|
||||
@ApiModelProperty(value = "标题文本位置")
|
||||
private Integer textPosition;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.zbkj.common.model.page;
|
||||
|
||||
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 lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 页面链接
|
||||
* </p>
|
||||
*
|
||||
* @author dazongzi
|
||||
* @since 2023-05-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("eb_page_link")
|
||||
@ApiModel(value="PageLink对象", description="页面链接")
|
||||
public class PageLink implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "分类id")
|
||||
private Integer cateId;
|
||||
|
||||
@ApiModelProperty(value = "分组1:基础2:分销3:个人中心")
|
||||
private Boolean type;
|
||||
|
||||
@ApiModelProperty(value = "页面名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "页面链接")
|
||||
private String url;
|
||||
|
||||
@ApiModelProperty(value = "参数")
|
||||
private String param;
|
||||
|
||||
@ApiModelProperty(value = "事例")
|
||||
private String example;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
private Boolean status;
|
||||
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value = "添加时间")
|
||||
private Date addTime;
|
||||
|
||||
@ApiModelProperty(value = "1是商户的链接")
|
||||
private Boolean isMer;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.zbkj.common.model.wechat;
|
||||
|
||||
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 lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 小程序我的模板
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("eb_wechat_program_my_temp")
|
||||
@ApiModel(value="WechatProgramMyTemp对象", description="小程序我的模板")
|
||||
public class WechatProgramMyTemp implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "微信模板id")
|
||||
private Integer tid;
|
||||
|
||||
@ApiModelProperty(value = "模版标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "模板关键字id,多个逗号分割")
|
||||
private String kid;
|
||||
|
||||
@ApiModelProperty(value = "场景描述")
|
||||
private String sceneDesc;
|
||||
|
||||
@ApiModelProperty(value = "微信模板id")
|
||||
private String tempId;
|
||||
|
||||
@ApiModelProperty(value = "扩展字段")
|
||||
private String extra;
|
||||
|
||||
@ApiModelProperty(value = "状态 0,禁用,1启用")
|
||||
private Boolean status;
|
||||
|
||||
@ApiModelProperty(value = "应用场景")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.zbkj.common.model.wechat;
|
||||
|
||||
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 lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* WechatProgramPublicTemp对象"
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("eb_wechat_program_public_temp")
|
||||
@ApiModel(value="WechatProgramPublicTemp对象", description="")
|
||||
public class WechatProgramPublicTemp implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "微信模板id")
|
||||
private Integer tid;
|
||||
|
||||
@ApiModelProperty(value = "模版标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "模版类型,2 为一次性订阅,3 为长期订阅")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "模版所属类目 id")
|
||||
private Integer categoryId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.zbkj.common.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 活动维护对象
|
||||
* @Auther: 大粽子
|
||||
* @Date: 2023/1/5 12:15
|
||||
* @Description: 活动controller request
|
||||
*/
|
||||
@Data
|
||||
public class ActivityStyleRequest {
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "活动名称")
|
||||
@NotEmpty(message = "活动名称不能为空")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "活动类型0=活动边框,1=活动背景")
|
||||
private Boolean type;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
@NotEmpty(message = "开始时间不能为空")
|
||||
private String starttime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
@NotEmpty(message = "结束时间不能为空")
|
||||
private String endtime;
|
||||
|
||||
@ApiModelProperty(value = "活动边框素材地址")
|
||||
@NotEmpty(message = "活动素材 不能为空")
|
||||
private String style;
|
||||
|
||||
@ApiModelProperty(value = "状态 0=关闭1=开启")
|
||||
private Boolean status;
|
||||
|
||||
@ApiModelProperty(value = "商品参与类型 0=全部商品参与,1=指定商品参与,2=指定品牌参与,3=指定商品分类参与")
|
||||
@NotNull(message = "活动参与类型不能为空")
|
||||
@Range(min = 0, max = 4, message = "商品参与类型 0=全部商品参与,1=指定商品参与,2=指定品牌参与,3=指定商品分类参与, 4=指定商户产品")
|
||||
private Integer method;
|
||||
|
||||
@ApiModelProperty(value = "参与活动商品")
|
||||
private String products;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.zbkj.common.request;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* @Auther: 大粽子
|
||||
* @Date: 2023/1/5 12:08
|
||||
* @Description: 活动样式搜索对象
|
||||
*/
|
||||
@Data
|
||||
public class ActivityStyleSearchRequest {
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "活动名称不能为空")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "活动类型0=活动边框,1=活动背景")
|
||||
private Boolean type;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date starttime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endtime;
|
||||
|
||||
@ApiModelProperty(value = "状态 0=关闭1=开启")
|
||||
private Boolean status;
|
||||
|
||||
@ApiModelProperty(value = "状态 -1=已结束,0=未开始,1=进行中")
|
||||
private Integer runningStatus;
|
||||
|
||||
@ApiModelProperty(value = "商品参与类型 0=全部商品参与,1=指定商品参与,2=指定品牌参与,3=指定商品分类参与, 4=指定商户产品")
|
||||
@Range(min = 0, max = 4, message = "商品参与类型 0=全部商品参与,1=指定商品参与,2=指定品牌参与,3=指定商品分类参与, 4=指定商户产品")
|
||||
private Integer method;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createtime;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updatetime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.zbkj.common.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 活动边框 更新状态
|
||||
* @Auther: 大粽子
|
||||
* @Date: 2023/1/5 15:38
|
||||
* @Description: 描述对应的业务场景
|
||||
*/
|
||||
@Data
|
||||
public class ActivityStyleUpdateStatusRequest {
|
||||
@ApiModelProperty(value = "主键")
|
||||
@NotNull(message = "id 不能为空")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "状态 0=关闭1=开启")
|
||||
private Boolean status;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.zbkj.common.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 管理端账号检测请求对象
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="AdminAccountDetectionRequest", description="管理端账号检测请求对象")
|
||||
public class AdminAccountDetectionRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -5291081138040044258L;
|
||||
|
||||
@ApiModelProperty(value = "后台管理员账号", example = "userName")
|
||||
@NotEmpty(message = "账号 不能为空")
|
||||
@Length(max = 32, message = "账号长度不能超过32个字符")
|
||||
private String account;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.zbkj.common.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 登录用户修改密码请求对象
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "LoginAdminUpdatePasswordRequest", description = "登录用户修改密码请求对象")
|
||||
public class LoginAdminUpdatePasswordRequest {
|
||||
|
||||
@ApiModelProperty(value = "后台管理员密码", required = true)
|
||||
@NotBlank(message = "管理员密码不能为空")
|
||||
@Length(min = 6, max = 30, message = "密码长度在6-30个字符")
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty(value = "后台管理员密码", required = true)
|
||||
@NotBlank(message = "管理员确认密码不能为空")
|
||||
@Length(min = 6, max = 30, message = "密码长度在6-30个字符")
|
||||
private String confirmPassword;
|
||||
|
||||
@ApiModelProperty(value = "后台管理员原密码", required = true)
|
||||
@NotBlank(message = "管理员原密码不能为空")
|
||||
@Length(min = 6, max = 30, message = "原密码长度在6-30个字符")
|
||||
private String oldPassword;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.zbkj.common.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
/**
|
||||
* 登录用户修改信息请求对象
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "LoginAdminUpdateRequest", description = "登录用户修改信息请求对象")
|
||||
public class LoginAdminUpdateRequest {
|
||||
|
||||
@ApiModelProperty(value = "后台管理员昵称", required = true)
|
||||
@Size(max = 16, message = "后台管理员昵称长度不能超过16个字符")
|
||||
private String realName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.zbkj.common.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品添加库存对象
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="ProductAddStockRequest对象", description="商品添加库存对象")
|
||||
public class ProductAddStockRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -259657957101524526L;
|
||||
|
||||
@ApiModelProperty(value = "商品ID", required = true)
|
||||
@NotNull(message = "商品ID不能为空")
|
||||
private Integer id;
|
||||
|
||||
@Valid
|
||||
@ApiModelProperty(value = "商品规格属性列表", required = true)
|
||||
@NotEmpty(message = "商品规格属性列表不能为空")
|
||||
private List<ProductAttrValueAddStockRequest> attrValueList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.zbkj.common.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 商品规格属性添加库存对象
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value="ProductAttrValueAddStockRequest对象", description="商品规格属性添加对象")
|
||||
public class ProductAttrValueAddStockRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty(value = "ID", required = true)
|
||||
@NotNull(message = "商品规格属性ID不能为空")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "商品规格属性添加库存", required = true)
|
||||
@NotNull(message = "添加库存不能为空")
|
||||
@Min(value = 0, message = "添加库存不能小于0")
|
||||
private Integer addStock;
|
||||
|
||||
@ApiModelProperty(value = "并发版本控制,前端不传值")
|
||||
private Integer version;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.zbkj.common.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 保存config请求对象
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "SaveConfigRequest对象", description = "保存config请求对象")
|
||||
public class SaveConfigRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "config值", required = true)
|
||||
@NotBlank(message = "config值不能为空")
|
||||
private String value;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.zbkj.common.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 定时任务日志搜索请求参数
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "ScheduleJobLogSearchRequest对象", description = "定时任务日志搜索请求参数")
|
||||
public class ScheduleJobLogSearchRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "任务id")
|
||||
private Integer jobId;
|
||||
|
||||
@ApiModelProperty(value = "spring bean名称")
|
||||
private String beanName;
|
||||
|
||||
@ApiModelProperty(value = "方法名")
|
||||
private String methodName;
|
||||
|
||||
@ApiModelProperty(value = "任务状态 1:成功 0:失败")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.zbkj.common.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 定时任务请求对象
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "ScheduleJobRequest对象", description = "定时任务请求对象")
|
||||
public class ScheduleJobRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -452373239606480650L;
|
||||
|
||||
@ApiModelProperty(value = "任务id,编辑时必传")
|
||||
private Integer jobId;
|
||||
|
||||
@ApiModelProperty(value = "spring bean名称", required = true)
|
||||
@NotBlank(message = "spring bean名称不能为空")
|
||||
private String beanName;
|
||||
|
||||
@ApiModelProperty(value = "方法名", required = true)
|
||||
@NotBlank(message = "方法名不能为空")
|
||||
private String methodName;
|
||||
|
||||
@ApiModelProperty(value = "参数")
|
||||
private String params;
|
||||
|
||||
@ApiModelProperty(value = "cron表达式", required = true)
|
||||
@NotBlank(message = "cron表达式不能为空")
|
||||
private String cronExpression;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.zbkj.common.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 自定义组件上传图片请求对象
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Data
|
||||
public class ShopUploadImgRequest {
|
||||
|
||||
@ApiModelProperty(value = "0:media_id(目前只用于品牌申请品牌和类目),1:返回链接, 2:返回微信支付media_id图片要求")
|
||||
private Integer respType;
|
||||
|
||||
@ApiModelProperty(value = "0:图片流(resp_type=2需指定filename),1:图片url")
|
||||
private Integer uploadType;
|
||||
|
||||
@ApiModelProperty(value = "upload_type=1时必传")
|
||||
private String imgUrl;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.zbkj.common.request;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 商品管理头部统计-搜索条件
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class StoreProductHeaderRequest {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
@ApiModelProperty(value = "分类ID, 多个逗号分隔")
|
||||
private String cateId;
|
||||
|
||||
@ApiModelProperty(value = "关键字搜索, 支持(商品名称, 关键字, 商品条码)")
|
||||
private String keywords;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.zbkj.common.request.onepass;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 一号通用户登录请求对象
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "OnePassLoginRequest对象", description = "一号通用户登录请求对象")
|
||||
public class OnePassLoginRequest {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "access_key一号通后台AccessKey管理获得", required = true)
|
||||
@NotBlank(message = "AccessKey 不能为空")
|
||||
private String accessKey;
|
||||
|
||||
@ApiModelProperty(value = "secret_key一号通后台AccessKey管理获得", required = true)
|
||||
@NotBlank(message = "secretKey 不能为空")
|
||||
private String secretKey;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.zbkj.common.request.onepass;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 一号通账号注册
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "OnePassRegisterRequest对象", description = "一号通账号注册")
|
||||
public class OnePassRegisterRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "账号", required = true)
|
||||
@NotBlank(message = "账号不能为空")
|
||||
private String account;
|
||||
|
||||
@ApiModelProperty(value = "手机号", required = true)
|
||||
@NotNull(message = "手机号不能为空")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "密码", required = true)
|
||||
@NotNull(message = "密码不能为空")
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty(value = "域名", required = true)
|
||||
@NotNull(message = "域名不能为空")
|
||||
private String domain;
|
||||
|
||||
@ApiModelProperty(value = "验证码")
|
||||
@NotNull(message = "验证码不能为空")
|
||||
private String code;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.zbkj.common.request.onepass;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Auther: 大粽子
|
||||
* @Date: 2023/8/28 09:38
|
||||
* @Description: 一号通 商家寄件 回调对象
|
||||
*/
|
||||
@Data
|
||||
public class OnePassShipmentCallBackRequest {
|
||||
|
||||
@ApiModelProperty(value = "回调类型:order_success=下单成功回调|order_take=取件回调|order_cancel=用户主动取消回调|order_fail=下单失败回调|order_receipt=快递签收回调")
|
||||
public String type;
|
||||
|
||||
@ApiModelProperty(value = "回调数据")
|
||||
public String data;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.zbkj.common.request.onepass;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Auther: 大粽子
|
||||
* @Date: 2023/8/26 15:40
|
||||
* @Description: 一号通 取消商家寄件
|
||||
*/
|
||||
@Data
|
||||
public class OnePassShipmentCancelOrderRequest {
|
||||
|
||||
@ApiModelProperty(value = "任务ID,在[创建商家寄件订单]接口中获得", required = true)
|
||||
@NotNull(message = "任务ID 不能为空")
|
||||
public String taskId;
|
||||
|
||||
@ApiModelProperty(value = "订单ID,在[创建商家寄件订单]接口中获得", required = true)
|
||||
@NotNull(message = "订单ID 不能为空")
|
||||
public String orderId;
|
||||
|
||||
@ApiModelProperty(value = "取消理由", required = true)
|
||||
@NotNull(message = "取消理由 不能为空")
|
||||
public String cancelMsg;
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
package com.zbkj.common.request.onepass;
|
||||
|
||||
import com.zbkj.common.constants.Constants;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Auther: 大粽子
|
||||
* @Date: 2023/8/26 15:09
|
||||
* @Description: 一号通 创建商家寄件
|
||||
*/
|
||||
@Data
|
||||
public class OnePassShipmentCreateOrderRequest implements Serializable {
|
||||
|
||||
// 字符串 是 -- 快递公司编码,在[获取商家寄件快递公司]接口中获得
|
||||
@ApiModelProperty(value = "(必填) 快递公司编码,在[获取商家寄件快递公司]接口中获得")
|
||||
// @NotNull(message = "快递公司编码 不能为空")
|
||||
private String kuaidicom;
|
||||
|
||||
// 字符串 是 -- 收件人姓名
|
||||
@ApiModelProperty(value = "(必填) 收件人姓名")
|
||||
// @NotNull(message = "收件人姓名 不能为空")
|
||||
private String manName;
|
||||
|
||||
// 字符串 是 -- 收件人手机号
|
||||
@ApiModelProperty(value = "(必填) 收件人手机号")
|
||||
// @NotNull(message = "收件人手机号 不能为空")
|
||||
private String phone;
|
||||
|
||||
// 字符串 是 -- 收件人所在完整地址
|
||||
@ApiModelProperty(value = "(必填) 收件人所在完整地址")
|
||||
// @NotNull(message = "收件人所在完整地址 不能为空")
|
||||
private String address;
|
||||
|
||||
// 字符串 是 -- 寄件人姓名
|
||||
@ApiModelProperty(value = "(必填) 寄件人姓名")
|
||||
// @NotNull(message = "寄件人姓名 不能为空")
|
||||
private String sendRealName;
|
||||
|
||||
// 字符串 是 -- 寄件人手机号
|
||||
@ApiModelProperty(value = "(必填) 寄件人手机号")
|
||||
// @NotNull(message = "寄件人手机号 不能为空")
|
||||
private String sendPhone;
|
||||
|
||||
// 字符串 是 -- 寄件人所在完整地址
|
||||
@ApiModelProperty(value = "(必填) 寄件人所在完整地址")
|
||||
// @NotNull(message = "寄件人所在完整地址 不能为空")
|
||||
private String sendAddress;
|
||||
|
||||
// 字符串 否 -- 订单信息回调地址
|
||||
@ApiModelProperty(value = "订单信息回调地址")
|
||||
private String callBackUrl;
|
||||
|
||||
// 字符串 否 -- 物品名称,例:文件。当kuaidicom=jd、yuantong时必填
|
||||
@ApiModelProperty(value = "(条件必填) 物品名称,例:文件。当kuaidicom=jd、yuantong时必填")
|
||||
private String cargo;
|
||||
|
||||
// 字符串 否 -- 业务类型,默认为标准快递,各快递公司业务类型对照参考
|
||||
@ApiModelProperty(value = "(必填) 业务类型,默认为标准快递,各快递公司业务类型对照参考")
|
||||
private String serviceType;
|
||||
|
||||
//字符串 否 -- 支付方式,SHIPPER: 寄付(默认)。不支持到付
|
||||
@ApiModelProperty(value = "支付方式,SHIPPER: 寄付(默认)。不支持到付")
|
||||
private String payment;
|
||||
|
||||
// 字符串 否 -- 物品总重量KG,不需带单位,例:1.5
|
||||
@ApiModelProperty(value = "物品总重量KG,不需带单位,例:1.5")
|
||||
private String weight;
|
||||
|
||||
// 字符串 否 -- 备注
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
// 字符串 否 -- 预约日期,例如:0=今天/1=明天/2=后天
|
||||
@ApiModelProperty(value = "预约日期,例如:0=今天/1=明天/2=后天")
|
||||
private String dayType;
|
||||
|
||||
// 字符串 否 -- 预约起始时间(HH:mm),例如:09:00,顺丰必填
|
||||
@ApiModelProperty(value = "预约起始时间(HH:mm),例如:09:00,顺丰必填")
|
||||
private String pickupStartTime;
|
||||
|
||||
// 字符串 否 -- 预约截止时间(HH:mm),例如:10:00,顺丰必填,预约起始时间和预约截止时间间隔需≥1小时
|
||||
@ApiModelProperty(value = "预约截止时间(HH:mm),例如:10:00,顺丰必填,预约起始时间和预约截止时间间隔需≥1小时")
|
||||
private String pickupEndTime;
|
||||
|
||||
// 字符串 否 -- 渠道ID,如有多个同品牌运力,请联系商务提供后传入
|
||||
@ApiModelProperty(value = "渠道ID,如有多个同品牌运力,请联系商务提供后传入")
|
||||
private String channelSw;
|
||||
|
||||
// 字符串 否 -- 保价额度,单位:元
|
||||
@ApiModelProperty(value = "保价额度,单位:元")
|
||||
private String valinsPay;
|
||||
|
||||
// 字符串 否 -- 寄件人实名信息(圆通、极兔支持 )
|
||||
@ApiModelProperty(value = "寄件人实名信息(圆通、极兔支持 )")
|
||||
private String realName;
|
||||
|
||||
// 字符串 否 -- 寄件人证件类型,1:居民身份证 ;2:港澳居民来往内地通行证 ;3:台湾居民来往大陆通行证 ;4:中国公民护照(圆通、极兔支持 )
|
||||
@ApiModelProperty(value = "寄件人证件类型,1:居民身份证 ;2:港澳居民来往内地通行证 ;3:台湾居民来往大陆通行证 ;4:中国公民护照(圆通、极兔支持 )")
|
||||
private String sendIdCardType;
|
||||
|
||||
// 字符串 否 -- 寄件人证件号码 (圆通、极兔支持 )
|
||||
@ApiModelProperty(value = "寄件人证件号码 (圆通、极兔支持 )")
|
||||
private String sendIdCard;
|
||||
|
||||
// 字符串 否 -- 是否口令签收,Y:需要 N: 不需要,默认值为N(德邦快递专属参数)
|
||||
@ApiModelProperty(value = "是否口令签收,Y:需要 N: 不需要,默认值为N(德邦快递专属参数)")
|
||||
private String passwordSigning;
|
||||
|
||||
// 字符串 否 -- 是否开启订阅功能 0:不开启(默认) 1:开启 说明开启订阅功能时:pollCallBackUrl必须填入 此功能只针对有快递单号的单
|
||||
@ApiModelProperty(value = "是否开启订阅功能 0:不开启(默认) 1:开启 说明开启订阅功能时:pollCallBackUrl必须填入 此功能只针对有快递单号的单")
|
||||
private String op;
|
||||
|
||||
// 字符串 是 -- 面单返回类型,默认为空,不返回面单内容。10:设备打印,20:生成图片短链回调。
|
||||
@ApiModelProperty(value = "(必填) 面单返回类型,默认为空,不返回面单内容。10:设备打印,20:生成图片短链回调。")
|
||||
// @NotNull(message = "面单返回类型,默认为空,不返回面单内容。10:设备打印,20:生成图片短链回调。 不能为空")
|
||||
private String returnType;
|
||||
|
||||
// 字符串 是 -- 设备码,returnType为10时必填
|
||||
@ApiModelProperty(value = "(条件必填) 设备码,returnType为10时必填")
|
||||
// @NotNull(message = "设备码,returnType为10时必填 不能为空")
|
||||
private String siid;
|
||||
|
||||
// 字符串 是 -- 模板编码,模板id在[获取商家寄件快递公司]接口中查看
|
||||
@ApiModelProperty(value = "(必填) 模板编码,模板id在[获取商家寄件快递公司]接口中查看")
|
||||
// @NotNull(message = "模板编码,模板id在[获取商家寄件快递公司]接口中查看 不能为空")
|
||||
private String tempid;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.zbkj.common.request.onepass;
|
||||
|
||||
import com.zbkj.common.constants.RegularConstants;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 一号通账号修改
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "OnePassUpdateRequest对象", description = "一号通账号修改")
|
||||
public class OnePassUpdateRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "账号", required = true)
|
||||
@NotNull(message = "账号不能为空")
|
||||
private String account;
|
||||
|
||||
@ApiModelProperty(value = "手机号", required = true)
|
||||
@NotNull(message = "手机号不能为空")
|
||||
@Pattern(regexp = RegularConstants.PHONE_TWO, message = "请填写正确的手机号")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "密码")
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty(value = "验证码", required = true)
|
||||
@NotNull(message = "验证码不能为空")
|
||||
private String code;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.zbkj.common.request.onepass;
|
||||
|
||||
import com.zbkj.common.annotation.StringContains;
|
||||
import com.zbkj.common.constants.Constants;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 一号通用量记录请求对象
|
||||
* +----------------------------------------------------------------------
|
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||
* +----------------------------------------------------------------------
|
||||
* | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
|
||||
* +----------------------------------------------------------------------
|
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||
* +----------------------------------------------------------------------
|
||||
* | Author: CRMEB Team <admin@crmeb.com>
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "OnePassUserRecordRequest对象", description = "一号通用量记录请求对象")
|
||||
public class OnePassUserRecordRequest {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "记录类型:sms,短信;copy,产品复制;expr_query,物流查询;expr_dump,电子面单", required = true)
|
||||
@NotBlank(message = "记录类型不能为空")
|
||||
@StringContains(limitValues = {"sms","copy","expr_query","expr_dump"}, message = "未知的记录类型")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "短信状态(短信类型时必传):0发送中,1成功,2失败,3全部")
|
||||
@Range(min = 0, max = 3, message = "未知的短信状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "页码", example = Constants.DEFAULT_PAGE + "")
|
||||
private int page = Constants.DEFAULT_PAGE;
|
||||
|
||||
@ApiModelProperty(value = "每页数量", example = Constants.DEFAULT_LIMIT + "")
|
||||
private int limit = Constants.DEFAULT_LIMIT;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.zbkj.common.request.page;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Auther: 大粽子
|
||||
* @Date: 2023/5/16 11:44
|
||||
* @Description: 页面配置和diy用到的实体参数
|
||||
*/
|
||||
@Data
|
||||
public class PageCategoryRequest {
|
||||
@ApiModelProperty(value = "id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "父类id")
|
||||
private Integer pid;
|
||||
|
||||
@ApiModelProperty(value = "类型:link、special、product、product_category、custom")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "分类名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
private Boolean status;
|
||||
|
||||
@ApiModelProperty(value = "添加时间")
|
||||
private Date addTime;
|
||||
|
||||
@ApiModelProperty(value = "层级 个位数")
|
||||
private Boolean level;
|
||||
|
||||
@ApiModelProperty(value = "是否商户 0平台,商户id")
|
||||
private Integer isMer;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.zbkj.common.request.page;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* @Auther: 大粽子
|
||||
* @Date: 2023/5/16 11:23
|
||||
* @Description: 页面DIY和设计用到的分类
|
||||
*/
|
||||
@Data
|
||||
public class PageCategorySearchRequest {
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "父类id")
|
||||
private Integer pid;
|
||||
|
||||
@ApiModelProperty(value = "类型:link、special、product、product_category、custom")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "分类名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "层级 个位数")
|
||||
private Boolean level;
|
||||
|
||||
@ApiModelProperty(value = "是否商户 0平台,商户id")
|
||||
private Integer isMer;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.zbkj.common.request.page;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Auther: 大粽子
|
||||
* @Date: 2023/5/16 11:44
|
||||
* @Description: 页面分类和DIY用到的实体参数
|
||||
*/
|
||||
@Data
|
||||
public class PageDiyEditNameRequest {
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
@NotNull(message = "模版id 不能为空")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "页面名称")
|
||||
@NotEmpty(message = "模版名称 不能为空")
|
||||
private String name;
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.zbkj.common.request.page;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Auther: 大粽子
|
||||
* @Date: 2023/5/16 11:44
|
||||
* @Description: 页面分类和DIY用到的实体参数
|
||||
*/
|
||||
@Data
|
||||
public class PageDiyRequest {
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "版本号")
|
||||
private String version;
|
||||
|
||||
@ApiModelProperty(value = "页面名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "网站标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "封面图")
|
||||
private String coverImage;
|
||||
|
||||
@ApiModelProperty(value = "模板名称")
|
||||
private String templateName;
|
||||
|
||||
@ApiModelProperty(value = "页面数据")
|
||||
private JSONObject value;
|
||||
|
||||
@ApiModelProperty(value = "默认数据")
|
||||
private String defaultValue;
|
||||
|
||||
@ApiModelProperty(value = "添加时间")
|
||||
private Date addTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty(value = "是否使用")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "页面类型")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "显示首页")
|
||||
private Integer isShow;
|
||||
|
||||
@ApiModelProperty(value = "颜色是否选中")
|
||||
private Integer isBgColor;
|
||||
|
||||
@ApiModelProperty(value = "背景图是否选中")
|
||||
private Integer isBgPic;
|
||||
|
||||
@ApiModelProperty(value = "是否是diy数据")
|
||||
private Integer isDiy;
|
||||
|
||||
@ApiModelProperty(value = "背景颜色")
|
||||
private String colorPicker;
|
||||
|
||||
@ApiModelProperty(value = "背景图")
|
||||
private String bgPic;
|
||||
|
||||
@ApiModelProperty(value = "背景图图片样式")
|
||||
private Integer bgTabVal;
|
||||
|
||||
@ApiModelProperty(value = "是否删除")
|
||||
private Integer isDel;
|
||||
|
||||
@ApiModelProperty(value = "返回地址")
|
||||
private String returnAddress;
|
||||
|
||||
@ApiModelProperty(value = "标题背景色")
|
||||
private String titleBgColor;
|
||||
|
||||
@ApiModelProperty(value = "标题颜色")
|
||||
private String titleColor;
|
||||
|
||||
@ApiModelProperty(value = "商家样式")
|
||||
private Integer serviceStatus;
|
||||
|
||||
@ApiModelProperty(value = "商户ID")
|
||||
private Integer merId;
|
||||
|
||||
@ApiModelProperty(value = "默认模板(1.平台默认 2.商户默认)")
|
||||
private Integer isDefault;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.zbkj.common.request.page;
|
||||
|
||||
/**
|
||||
* @Auther: 大粽子
|
||||
* @Date: 2023/5/16 11:25
|
||||
* @Description: 页面DIY用到的搜索对象
|
||||
*/
|
||||
public class PageDiySearchRequest {
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.zbkj.common.request.page;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Auther: 大粽子
|
||||
* @Date: 2023/5/16 11:28
|
||||
* @Description: 页面设计和DIY用到的链接查询对象
|
||||
*/
|
||||
@Data
|
||||
public class PageLinkRequest {
|
||||
@ApiModelProperty(value = "id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "分类id")
|
||||
private Integer cateId;
|
||||
|
||||
@ApiModelProperty(value = "分组1:基础2:分销3:个人中心")
|
||||
private Boolean type;
|
||||
|
||||
@ApiModelProperty(value = "页面名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "页面链接")
|
||||
private String url;
|
||||
|
||||
@ApiModelProperty(value = "参数")
|
||||
private String param;
|
||||
|
||||
@ApiModelProperty(value = "事例")
|
||||
private String example;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
private Boolean status;
|
||||
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value = "添加时间")
|
||||
private Date addTime;
|
||||
|
||||
@ApiModelProperty(value = "1是商户的链接")
|
||||
private Boolean isMer;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.zbkj.common.request.page;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Auther: 大粽子
|
||||
* @Date: 2023/5/16 11:26
|
||||
* @Description: 页面配置和DIY用到的页面链接搜索对象
|
||||
*/
|
||||
@Data
|
||||
public class PageLinkSearchRequest {
|
||||
@ApiModelProperty(value = "id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "分类id")
|
||||
private Integer cateId;
|
||||
|
||||
@ApiModelProperty(value = "分组1:基础2:分销3:个人中心")
|
||||
private Boolean type;
|
||||
|
||||
@ApiModelProperty(value = "页面名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "页面链接")
|
||||
private String url;
|
||||
|
||||
@ApiModelProperty(value = "参数")
|
||||
private String param;
|
||||
|
||||
@ApiModelProperty(value = "事例")
|
||||
private String example;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
private Boolean status;
|
||||
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value = "添加时间")
|
||||
private Date addTime;
|
||||
|
||||
@ApiModelProperty(value = "1是商户的链接")
|
||||
private Boolean isMer;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package com.zbkj.common.response;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.zbkj.common.constants.DateConstants;
|
||||
import com.zbkj.common.utils.CrmebDateUtil;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 活动背景 response
|
||||
* @Auther: 大粽子
|
||||
* @Date: 2023/1/9 16:17
|
||||
* @Description: 描述对应的业务场景
|
||||
*/
|
||||
@Data
|
||||
public class ActivityStyleResponse {
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "活动名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "活动类型0=活动边框,1=活动背景")
|
||||
private Boolean type;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private Date starttime;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private Date endtime;
|
||||
|
||||
@ApiModelProperty(value = "活动边框素材地址")
|
||||
private String style;
|
||||
|
||||
@ApiModelProperty(value = "状态 -1=已结束,0=未开始,1=进行中")
|
||||
private Integer runningStatus;
|
||||
|
||||
@ApiModelProperty(value = "状态 0=关闭1=开启")
|
||||
private Boolean status;
|
||||
|
||||
@ApiModelProperty(value = "商品参与类型 0=全部商品参与,1=指定商品参与,2=指定品牌参与,3=指定商品分类参与,4=指定商户产品")
|
||||
private Integer method;
|
||||
|
||||
@ApiModelProperty(value = "参与活动商品")
|
||||
private String products;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createtime;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updatetime;
|
||||
|
||||
/**
|
||||
* -1 已结束 结束时间小于当前时间
|
||||
* 1 进行中 结束时间大于当前时间 && 开始时间小于等于当前时间
|
||||
* 0 未开始 开始时间大于当前时间
|
||||
* @param starttime 开始时间
|
||||
* @param endtime 结束时间
|
||||
*/
|
||||
public void setRunningStatus(Date starttime, Date endtime, Date currenttime) {
|
||||
// isEnd = -1 = 已结束
|
||||
int isEnd = CrmebDateUtil.compareDate(CrmebDateUtil.dateToStr(endtime, DateConstants.DATE_FORMAT),
|
||||
CrmebDateUtil.dateToStr(currenttime, DateConstants.DATE_FORMAT),
|
||||
DateConstants.DATE_FORMAT);
|
||||
// isIng1 = 1 和下面并且链接
|
||||
int isIng1 = CrmebDateUtil.compareDate(CrmebDateUtil.dateToStr(endtime, DateConstants.DATE_FORMAT),
|
||||
CrmebDateUtil.dateToStr(currenttime, DateConstants.DATE_FORMAT),
|
||||
DateConstants.DATE_FORMAT);
|
||||
// isIng2 = -1 和上面并且链接
|
||||
int isIng2 = CrmebDateUtil.compareDate(CrmebDateUtil.dateToStr(starttime, DateConstants.DATE_FORMAT),
|
||||
CrmebDateUtil.dateToStr(currenttime, DateConstants.DATE_FORMAT),
|
||||
DateConstants.DATE_FORMAT);
|
||||
// isPer = 1 = 未开始
|
||||
int isPer = CrmebDateUtil.compareDate(CrmebDateUtil.dateToStr(starttime, DateConstants.DATE_FORMAT),
|
||||
CrmebDateUtil.dateToStr(currenttime, DateConstants.DATE_FORMAT),
|
||||
DateConstants.DATE_FORMAT);
|
||||
Integer tempRunningStatus = null;
|
||||
if(isEnd == -1){
|
||||
tempRunningStatus = -1;
|
||||
}else if(isPer == 1){
|
||||
tempRunningStatus = 0;
|
||||
}else if(isIng1 == 1 && isIng2 == -1){
|
||||
tempRunningStatus = 1;
|
||||
}
|
||||
this.runningStatus = tempRunningStatus;
|
||||
}
|
||||
}
|
||||