Commit 062ef9c3 authored by liwei's avatar liwei

修改了活动的报名人数查询

parent ba92dd84
...@@ -103,15 +103,9 @@ public class CmsApplicationController extends CyPaginationController<CmsApplicat ...@@ -103,15 +103,9 @@ public class CmsApplicationController extends CyPaginationController<CmsApplicat
@CyOpeLogAnno(title = "system-报名管理-查询报名", businessType = CyLogTypeEnum.QUERY) @CyOpeLogAnno(title = "system-报名管理-查询报名", businessType = CyLogTypeEnum.QUERY)
@Operation(summary = "分页查询报名集合", description = "分页查询报名集合") @Operation(summary = "分页查询报名集合", description = "分页查询报名集合")
@GetMapping(value = "/queryCmsApplicationByPagination") @GetMapping(value = "/queryCmsApplicationByPagination")
public CyGridModel listByPagination(@RequestParam(required = false) Integer activityId, CmsApplication cmsApplication) { public CyGridModel listByPagination(CmsApplication cmsApplication) {
// 如果传入了 activityId,设置到 cmsApplication 对象中
if (activityId != null) {
cmsApplication.setActivityId(activityId);
}
// 调用分页查询的方法 // 调用分页查询的方法
cmsApplicationServiceImpl.findAllByPagination(getPaginationUtility(), cmsApplication); cmsApplicationServiceImpl.findAllByPagination(getPaginationUtility(), cmsApplication);
// 返回分页结果 // 返回分页结果
return getGridModelResponse(); return getGridModelResponse();
} }
......
...@@ -86,6 +86,17 @@ public class CmsApplication extends CyIdIncreEntity<CmsApplication> { ...@@ -86,6 +86,17 @@ public class CmsApplication extends CyIdIncreEntity<CmsApplication> {
@TableField("order_id") @TableField("order_id")
private Long orderId; private Long orderId;
/**
* 用户昵称
*/
@TableField(exist = false)
private String memNickName;
/**
* 会员id
*/
@TableField(exist = false)
private Integer memberId;
} }
...@@ -3,6 +3,7 @@ package org.rcisoft.business.cmsApplication.service.impl; ...@@ -3,6 +3,7 @@ package org.rcisoft.business.cmsApplication.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.rcisoft.business.cmsApplication.entity.CmsApplication; import org.rcisoft.business.cmsApplication.entity.CmsApplication;
import org.rcisoft.business.cmsApplication.dao.CmsApplicationRepository; import org.rcisoft.business.cmsApplication.dao.CmsApplicationRepository;
import org.rcisoft.business.cmsApplication.service.CmsApplicationService; import org.rcisoft.business.cmsApplication.service.CmsApplicationService;
......
...@@ -69,63 +69,27 @@ ...@@ -69,63 +69,27 @@
SELECT * FROM cms_application SELECT * FROM cms_application
WHERE activity_id = #{businessId} WHERE activity_id = #{businessId}
</select> </select>
<select id="queryCmsApplicationPaged" resultMap="BaseResultMap"> <select id="queryCmsApplicationPaged" resultType="org.rcisoft.business.cmsApplication.entity.CmsApplication">
SELECT ca2.business_id, SELECT ca2.business_id,
ca2.create_by, ca2.create_by,
ca2.create_date, ca2.create_date,
ca2.update_by,
ca2.update_date,
ca2.flag,
ca2.del_flag,
ca2.user_id, ca2.user_id,
ca2.activity_id, ca2.activity_id,
ca2.name,
ca2.phone,
ca2.status, ca2.status,
ca2.application_fee, ca2.application_fee,
ca2.remarks mi.business_id as memberId,
mi.mem_nick_name
FROM cms_application ca2 FROM cms_application ca2
LEFT JOIN cms_activity ca1 on ca1.business_id = ca2.activity_id LEFT JOIN cms_activity ca1 on ca1.business_id = ca2.activity_id
LEFT JOIN sys_user su on su.business_id = ca2.create_by Left join mem_info mi on mi.user_id = ca2.user_id
<if test="entity.createBy !=null and entity.createBy != '' "> Where 1=1
and create_by like concat('%',#{entity.createBy},'%') and ca2.del_flag = '0'
</if> <if test="entity.memNickName !=null and entity.memNickName != '' ">
<if test="entity.createDate != null and entity.createDate != '' "> and mi.mem_nick_name like concat('%',#{entity.memNickName},'%')
and create_date = #{entity.createDate}
</if>
<if test="entity.updateBy !=null and entity.updateBy != '' ">
and update_by like concat('%',#{entity.updateBy},'%')
</if>
<if test="entity.updateDate !=null and entity.updateDate != '' ">
and update_date = #{entity.updateDate}
</if>
<if test="entity.flag !=null and entity.flag != '' ">
and flag = #{entity.flag}
</if>
<if test="entity.delFlag !=null and entity.delFlag != '' ">
and del_flag = #{entity.delFlag}
</if>
<if test="entity.userId !=null and entity.userId != '' ">
and user_id = #{entity.userId}
</if>
<if test="entity.activityId !=null and entity.activityId != '' ">
and activity_id = #{entity.activityId}
</if>
<if test="entity.name !=null and entity.name != '' ">
and name like concat('%',#{entity.name},'%')
</if>
<if test="entity.phone !=null and entity.phone != '' ">
and phone like concat('%',#{entity.phone},'%')
</if> </if>
<if test="entity.status !=null and entity.status != '' "> <if test="entity.status !=null and entity.status != '' ">
and status = #{entity.status} and status = #{entity.status}
</if> </if>
<if test="entity.applicationFee != null">
and application_fee = #{entity.applicationFee}
</if>
<if test="entity.remarks !=null and entity.remarks != '' ">
and remarks like concat('%',#{entity.remarks},'%')
</if>
ORDER BY business_id DESC ORDER BY business_id DESC
</select> </select>
<select id="selectByOrderId" resultType="org.rcisoft.business.cmsApplication.entity.CmsApplication"> <select id="selectByOrderId" resultType="org.rcisoft.business.cmsApplication.entity.CmsApplication">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment