活动功能优化;新增擅长领域修改
This commit is contained in:
parent
171937b29d
commit
54410bf98d
|
@ -1,26 +1,27 @@
|
|||
package org.dromara.scale.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.scale.domain.vo.ActivityEnterVo;
|
||||
import org.dromara.scale.domain.bo.ActivityEnterBo;
|
||||
import org.dromara.scale.service.IActivityEnterService;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.scale.domain.bo.ActivityEnterBo;
|
||||
import org.dromara.scale.domain.vo.ActivityEnterVo;
|
||||
import org.dromara.scale.service.IActivityEnterService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 活动报名
|
||||
|
@ -39,7 +40,7 @@ public class ActivityEnterController extends BaseController {
|
|||
/**
|
||||
* 查询活动报名列表
|
||||
*/
|
||||
@SaCheckPermission("scale:activityEnter:list")
|
||||
@SaCheckPermission("activity:enter:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<ActivityEnterVo> list(ActivityEnterBo bo, PageQuery pageQuery) {
|
||||
return activityEnterService.queryPageList(bo, pageQuery);
|
||||
|
@ -48,7 +49,7 @@ public class ActivityEnterController extends BaseController {
|
|||
/**
|
||||
* 导出活动报名列表
|
||||
*/
|
||||
@SaCheckPermission("scale:activityEnter:export")
|
||||
@SaCheckPermission("activity:enter:export")
|
||||
@Log(title = "活动报名", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(ActivityEnterBo bo, HttpServletResponse response) {
|
||||
|
@ -61,7 +62,7 @@ public class ActivityEnterController extends BaseController {
|
|||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("scale:activityEnter:query")
|
||||
@SaCheckPermission("activity:enter:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<ActivityEnterVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
|
@ -71,7 +72,7 @@ public class ActivityEnterController extends BaseController {
|
|||
/**
|
||||
* 新增活动报名
|
||||
*/
|
||||
@SaCheckPermission("scale:activityEnter:add")
|
||||
@SaCheckPermission("activity:enter:add")
|
||||
@Log(title = "活动报名", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
|
@ -82,7 +83,7 @@ public class ActivityEnterController extends BaseController {
|
|||
/**
|
||||
* 修改活动报名
|
||||
*/
|
||||
@SaCheckPermission("scale:activityEnter:edit")
|
||||
@SaCheckPermission("activity:enter:edit")
|
||||
@Log(title = "活动报名", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
|
@ -95,7 +96,7 @@ public class ActivityEnterController extends BaseController {
|
|||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("scale:activityEnter:remove")
|
||||
@SaCheckPermission("activity:enter:remove")
|
||||
@Log(title = "活动报名", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
package org.dromara.scale.controller.wx;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>TODO<p>
|
||||
*
|
||||
* @author cjw
|
||||
* @version V1.0.0
|
||||
* @date 2024/8/20 16:27
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/wx/activity")
|
||||
public class WxActivityController {
|
||||
|
||||
}
|
|
@ -148,4 +148,18 @@ public class WxCounselorController extends BaseController {
|
|||
return toAjax(counselorService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改擅长领域
|
||||
*/
|
||||
@Log(title = "修改擅长领域", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/speciality")
|
||||
public R<Void> editSpeciality(List<String> specialityField) {
|
||||
Long userId = LoginHelper.getUserId();
|
||||
CounselorBo bo = new CounselorBo();
|
||||
bo.setId(userId);
|
||||
bo.setSpecialityField(specialityField);
|
||||
return toAjax(counselorService.updateByBo(bo));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package org.dromara.scale.controller.wx;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
|
@ -27,16 +26,15 @@ import org.springframework.web.bind.annotation.*;
|
|||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/wx/scale/order")
|
||||
public class WxScaleOrderController extends BaseController {
|
||||
@RequestMapping("/wx/order/")
|
||||
public class WxOrderController extends BaseController {
|
||||
|
||||
private final ISysScaleOrderService sysScaleOrderService;
|
||||
|
||||
/**
|
||||
* 查询量表订单列表
|
||||
*/
|
||||
@SaCheckPermission("scale:scaleOrder:list")
|
||||
@GetMapping("/list")
|
||||
@GetMapping("/scale/pageList")
|
||||
public TableDataInfo<SysScaleOrderVo> list(SysScaleOrderBo bo, PageQuery pageQuery) {
|
||||
return sysScaleOrderService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
@ -46,7 +44,7 @@ public class WxScaleOrderController extends BaseController {
|
|||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
@GetMapping("/scale/{id}")
|
||||
public R<SysScaleOrderVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(sysScaleOrderService.queryById(id));
|
||||
|
@ -57,7 +55,7 @@ public class WxScaleOrderController extends BaseController {
|
|||
*/
|
||||
@Log(title = "量表订单", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
@PostMapping("/scale")
|
||||
public R<T> add(@Validated(AddGroup.class) @RequestBody SysScaleOrderBo bo) throws Exception {
|
||||
return R.ok(sysScaleOrderService.insertByBo(bo));
|
||||
}
|
|
@ -26,8 +26,15 @@ public class WxPayController {
|
|||
|
||||
private final WxPayService payService;
|
||||
|
||||
@PostMapping("/notify/order")
|
||||
public String parseOrderNotifyResult(@RequestBody String xmlData) throws WxPayException {
|
||||
@PostMapping("/notify/order/scale")
|
||||
public String parseScaleNotifyResult(@RequestBody String xmlData) throws WxPayException {
|
||||
final WxPayOrderNotifyResult notifyResult = this.payService.parseOrderNotifyResult(xmlData);
|
||||
// TODO 根据自己业务场景需要构造返回对象
|
||||
return WxPayNotifyResponse.success("成功");
|
||||
}
|
||||
|
||||
@PostMapping("/notify/order/reservation")
|
||||
public String parseReservationNotifyResult(@RequestBody String xmlData) throws WxPayException {
|
||||
final WxPayOrderNotifyResult notifyResult = this.payService.parseOrderNotifyResult(xmlData);
|
||||
// TODO 根据自己业务场景需要构造返回对象
|
||||
return WxPayNotifyResponse.success("成功");
|
||||
|
|
|
@ -22,7 +22,7 @@ public class ActivityEnter extends BaseEntity {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
@ -32,5 +32,10 @@ public class ActivityEnter extends BaseEntity {
|
|||
*/
|
||||
private Long activityId;
|
||||
|
||||
/**
|
||||
* 活动状态,0已报名,1已签到
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -21,16 +21,21 @@ import jakarta.validation.constraints.*;
|
|||
public class ActivityEnterBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@NotNull(message = "不能为空", groups = { EditGroup.class })
|
||||
@NotNull(message = "不能为空", groups = {EditGroup.class})
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 活动id
|
||||
*/
|
||||
@NotNull(message = "活动id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
@NotNull(message = "活动id不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||
private Long activityId;
|
||||
|
||||
/**
|
||||
* 活动状态,0已报名,1已签到
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,16 +1,13 @@
|
|||
package org.dromara.scale.domain.vo;
|
||||
|
||||
import org.dromara.scale.domain.ActivityEnter;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.scale.domain.ActivityEnter;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
|
@ -29,7 +26,7 @@ public class ActivityEnterVo implements Serializable {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
@ExcelProperty(value = "")
|
||||
private Long id;
|
||||
|
@ -40,5 +37,10 @@ public class ActivityEnterVo implements Serializable {
|
|||
@ExcelProperty(value = "活动id")
|
||||
private Long activityId;
|
||||
|
||||
/**
|
||||
* 活动状态,0已报名,1已签到
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.dromara.scale.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.dromara.scale.domain.SysScaleOrder;
|
||||
import org.dromara.scale.domain.vo.SysScaleOrderVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
@ -10,6 +11,7 @@ import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
|||
* @author cjw
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Mapper
|
||||
public interface SysScaleOrderMapper extends BaseMapperPlus<SysScaleOrder, SysScaleOrderVo> {
|
||||
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ public class CounselorExperienceServiceImpl implements ICounselorExperienceServi
|
|||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<CounselorExperience> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getCounselorId() != null, CounselorExperience::getCounselorId, bo.getCounselorId());
|
||||
lqw.orderByAsc(CounselorExperience::getStartTime);
|
||||
lqw.orderByDesc(CounselorExperience::getStartTime);
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue