Commit 78d56093 authored by 冷玲鹏's avatar 冷玲鹏

修改:活动管理、公告管理、banner管理

parent 8943719e
......@@ -62,11 +62,11 @@ public class CmsActivity extends CyIdIncreEntity<CmsActivity> {
/**
* @desc 报名人数
* @column participants
* @column participant_count
* @default
*/
@Excel(name = "报名人数")
private String participants;
private String participantCount;
/**
* @desc 是否需要报名
......
......@@ -13,35 +13,35 @@ import java.util.List;
public interface CmsActivityService {
/**
* 保存 新闻资讯
* 保存 活动
* @param cmsActivity
* @return
*/
CyPersistModel persist(CmsActivity cmsActivity);
/**
* 删除 新闻资讯
* 删除 活动
* @param cmsActivity
* @return
*/
CyPersistModel remove(CmsActivity cmsActivity);
/**
* 修改 新闻资讯
* 修改 活动
* @param cmsActivity
* @return
*/
CyPersistModel merge(CmsActivity cmsActivity);
/**
* 根据id查询 新闻资讯
* 根据id查询 活动
* @param id
* @return
*/
CmsActivity findById(Integer id);
/**
* 分页查询 新闻资讯
* 分页查询 活动
* @param cmsActivity
* @return
*/
......@@ -50,7 +50,7 @@ public interface CmsActivityService {
/**
* 查询list 新闻资讯
* 查询list 活动
* @param cmsActivity
* @return
*/
......@@ -58,7 +58,7 @@ public interface CmsActivityService {
/**
* 导出新闻资讯
* 导出活动
* @return
*/
List<CmsActivity> export(CmsActivity cmsActivity);
......
......@@ -34,7 +34,7 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C
/**
* 保存 新闻资讯
* 保存 活动
*
* @return
*/
......@@ -53,13 +53,13 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C
} else {
int line = baseMapper.insert(cmsActivity);
log.debug(CyUserUtil.getAuthenUsername() + "新增了ID为" +
cmsActivity.getBusinessId() + "的新闻资讯信息");
cmsActivity.getBusinessId() + "的活动信息");
return new CyPersistModel(line);
}
}
/**
* 删除 新闻资讯
* 删除 活动
*
* @param cmsActivity
* @return
......@@ -69,12 +69,12 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C
public CyPersistModel remove(CmsActivity cmsActivity) {
int line = baseMapper.deleteCmsActivity(cmsActivity.getBusinessId());
log.debug(CyUserUtil.getAuthenUsername() + "删除了ID为" +
cmsActivity.getBusinessId() + "的新闻资讯信息");
cmsActivity.getBusinessId() + "的活动信息");
return new CyPersistModel(line);
}
/**
* 修改 新闻资讯
* 修改 活动
*
* @param cmsActivity
* @return
......@@ -90,28 +90,28 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C
throw new CyServiceException(500, "权重已存在");
} else {
int line = baseMapper.updateById(cmsActivity);
log.debug(CyUserUtil.getAuthenUsername() + "修改了ID为" + cmsActivity.getBusinessId() + "的新闻资讯信息");
log.debug(CyUserUtil.getAuthenUsername() + "修改了ID为" + cmsActivity.getBusinessId() + "的活动信息");
return new CyPersistModel(line);
}
}
/**
* 根据id查询 新闻资讯
* 根据id查询 活动
*
* @param id
* @return
*/
@Override
public CmsActivity findById(Integer id) {
CmsActivity newsInformation = baseMapper.selectById(id);
if (newsInformation.getPath() != null) {
newsInformation.setPath(global.getBase_Discovery() + newsInformation.getPath());
CmsActivity cmsActivity = baseMapper.selectById(id);
if (cmsActivity.getPath() != null) {
cmsActivity.setPath(global.getBase_Discovery() + cmsActivity.getPath());
}
return newsInformation;
return cmsActivity;
}
/**
* 分页查询 新闻资讯
* 分页查询 活动
*
* @param cmsActivity
* @return
......@@ -132,7 +132,7 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C
}
/**
* 查询list 新闻资讯
* 查询list 活动
*
* @param cmsActivity
* @return
......@@ -144,7 +144,7 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C
}
/**
* 导出新闻资讯
* 导出活动
*
* @return
*/
......@@ -157,7 +157,7 @@ public class CmsActivityServiceImpl extends ServiceImpl<CmsActivityRepository, C
@Override
public CyPersistModel updateStatus(CmsActivity cmsActivity) {
int line = baseMapper.updateStatus(cmsActivity);
log.debug(CyUserUtil.getAuthenUsername() + "修改了ID为" + cmsActivity.getBusinessId() + "的新闻资讯信息状态");
log.debug(CyUserUtil.getAuthenUsername() + "修改了ID为" + cmsActivity.getBusinessId() + "的活动信息状态");
return new CyPersistModel(line);
}
......
package org.rcisoft.business.cmsApplication.controller;
/*固定导入*/
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.rcisoft.business.cmsApplication.entity.CmsApplication;
import org.rcisoft.business.cmsApplication.service.CmsApplicationService;
import org.rcisoft.core.anno.CyOpeLogAnno;
import org.rcisoft.core.constant.CyMessCons;
import org.rcisoft.core.controller.CyPaginationController;
import org.rcisoft.core.model.CyGridModel;
import org.rcisoft.core.model.CyPersistModel;
import org.rcisoft.core.operlog.enums.CyLogTypeEnum;
import org.rcisoft.core.result.CyResult;
import org.rcisoft.core.util.CyEpExcelUtil;
import org.rcisoft.core.util.CyResultGenUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.List;
/**
* @author cy
* @date 2024年3月25日 下午1:42:40
*/
@RestController
@RequestMapping("/cmsApplication")
public class CmsApplicationController extends CyPaginationController<CmsApplication> {
@Autowired
private CmsApplicationService cmsApplicationServiceImpl;
@PreAuthorize("@cyPerm.hasPerm('cms:application:singleSearch')")
@CyOpeLogAnno(title = "system-报名管理-查询报名", businessType = CyLogTypeEnum.QUERY)
@ApiOperation(value = "查询单一报名", notes = "查询单一报名")
@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = true, dataType = "varchar")})
@GetMapping("/detail/{businessId:\\w+}")
public CyResult detail(@PathVariable Integer businessId) {
return CyResultGenUtil.builder(new CyPersistModel(1),
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
cmsApplicationServiceImpl.findById(businessId));
}
@PreAuthorize("@cyPerm.hasPerm('sys:application:list')")
@CyOpeLogAnno(title = "system-报名管理-查询报名管理", businessType = CyLogTypeEnum.QUERY)
@ApiOperation(value = "查询报名集合", notes = "查询报名集合")
@GetMapping(value = "/queryCmsApplication")
public CyResult queryCmsApplication(CmsApplication cmsApplication) {
return CyResultGenUtil.builder(new CyPersistModel(1),
CyMessCons.MESSAGE_ALERT_SUCCESS,
CyMessCons.MESSAGE_ALERT_ERROR,
cmsApplicationServiceImpl.findAll(cmsApplication));
}
@PreAuthorize("@cyPerm.hasPerm('cms:application:pageSearch')")
@CyOpeLogAnno(title = "system-报名管理-查询报名", businessType = CyLogTypeEnum.QUERY)
@ApiOperation(value = "分页查询报名集合", notes = "分页查询报名集合")
@GetMapping(value = "/queryCmsApplicationByPagination")
public CyGridModel listByPagination(@RequestParam(required = false) Integer activityId, CmsApplication cmsApplication) {
// 如果传入了 activityId,设置到 cmsApplication 对象中
if (activityId != null) {
cmsApplication.setActivityId(activityId);
}
// 调用分页查询的方法
cmsApplicationServiceImpl.findAllByPagination(getPaginationUtility(), cmsApplication);
// 返回分页结果
return getGridModelResponse();
}
}
package org.rcisoft.business.cmsApplication.dao;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.rcisoft.business.cmsActivity.entity.CmsActivity;
import org.rcisoft.business.cmsApplication.entity.CmsApplication;
import org.rcisoft.core.mapper.CyBaseMapper;
import org.rcisoft.core.model.CyPageInfo;
import java.util.List;
/**
* Created with cy on 2024年3月25日 下午1:42:40.
* @author wangFeilong
*/
public interface CmsApplicationRepository extends CyBaseMapper<CmsApplication> {
CmsApplication findByBusinessId(@Param("businessId") Integer businessId);
List<CmsApplication> queryCmsApplication(@Param("entity") CmsApplication cmsApplication);
IPage<CmsApplication> queryCmsApplicationPaged(CyPageInfo cyPageInfo, @Param("entity") CmsApplication cmsApplication);
}
package org.rcisoft.business.cmsApplication.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import org.apache.poi.hpsf.Decimal;
import org.rcisoft.core.entity.CyIdIncreEntity;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
/**
* Created with cy on 2024年3月25日 下午1:42:40.
*
* @author llp
*/
@Data
@TableName("cms_application")
public class CmsApplication extends CyIdIncreEntity<CmsApplication> {
/**
* @desc 创建人
* @column create_by
* @default
*/
@Excel(name = "创建人")
@TableField("create_by")
private String createBy;
/**
* @desc 创建时间
* @column create_date
* @default
*/
@Excel(name = "创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@TableField("create_date")
private Date createDate;
/**
* @desc 更新人
* @column update_by
* @default
*/
@Excel(name = "更新人")
@TableField("update_by")
private String updateBy;
/**
* @desc 更新时间
* @column update_date
* @default
*/
@Excel(name = "更新时间")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@TableField("update_date")
private Date updateDate;
/**
* @desc 启动状态(0禁用、1启动)
* @column flag
* @default
*/
@Excel(name = "启动状态(0禁用、1启动)")
@TableField("flag")
private String flag;
/**
* @desc 删除标志(0删除,1已删除)
* @column del_flag
* @default
*/
@Excel(name = "删除标志(0删除,1已删除)")
@TableField("del_flag")
private String delFlag;
/**
* @desc 用户id
* @column user_id
* @default
*/
@Excel(name = "用户id")
@TableField("user_id")
private Integer userId;
/**
* @desc 活动id
* @column activity_id
* @default
*/
@Excel(name = "活动id")
@TableField("activity_id")
private Integer activityId;
/**
* @desc 用户姓名
* @column name
* @default
*/
@Excel(name = "用户姓名")
@TableField("name")
private String name;
/**
* @desc 用户手机号码
* @column phone
* @default
*/
@Excel(name = "用户手机号码")
@TableField("phone")
private String phone;
/**
* @desc 报名状态(1报名、2取消报名、3已退费)
* @column status
* @default
*/
@Excel(name = "报名状态(1报名、2取消报名、3已退费)")
@TableField("status")
private String status;
/**
* @desc 用户所交费用
* @column application_fee
* @default
*/
@Excel(name = "用户所交费用")
@TableField("application_fee")
private BigDecimal applicationFee;
/**
* @desc 备注
* @column remarks
* @default
*/
@JsonIgnore
@Excel(name = "备注")
@TableField("remarks")
private String remarks;
}
package org.rcisoft.business.cmsApplication.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.rcisoft.business.cmsApplication.entity.CmsApplication;
import org.rcisoft.core.model.CyPageInfo;
import java.util.List;
/**
* Created by cy on 2024年3月25日 下午1:42:40.
*/
public interface CmsApplicationService {
/**
* 根据id查询 报名表
* @param id
* @return
*/
CmsApplication findById(Integer id);
/**
* 分页查询 报名表
* @param cmsApplication
* @return
*/
IPage<CmsApplication> findAllByPagination(CyPageInfo<CmsApplication> paginationUtility,
CmsApplication cmsApplication);
/**
* 查询list 报名表
* @param cmsApplication
* @return
*/
List<CmsApplication> findAll(CmsApplication cmsApplication);
}
package org.rcisoft.business.cmsApplication.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.rcisoft.business.cmsApplication.dao.CmsApplicationRepository;
import org.rcisoft.business.cmsApplication.entity.CmsApplication;
import org.rcisoft.business.cmsApplication.service.CmsApplicationService;
import org.rcisoft.common.component.Global;
import org.rcisoft.core.model.CyPageInfo;
import org.rcisoft.core.model.CyPersistModel;
import org.rcisoft.core.util.CyUserUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* @author cy
* @date 2024年3月25日 下午1:42:40
*/
@Service
@Transactional(readOnly = true, propagation = Propagation.NOT_SUPPORTED)
@Slf4j
public class CmsApplicationServiceImpl extends ServiceImpl<CmsApplicationRepository, CmsApplication> implements CmsApplicationService {
@Autowired
private Global global;
/**
* 根据id查询 报名表
*
* @param id
* @return
*/
@Override
public CmsApplication findById(Integer id) {
CmsApplication cmsApplication = baseMapper.selectById(id);
return cmsApplication;
}
/**
* 分页查询 报名表
*
* @param cmsApplication
* @return
*/
@Override
public IPage<CmsApplication> findAllByPagination(CyPageInfo<CmsApplication> paginationUtility, CmsApplication cmsApplication) {
IPage<CmsApplication> cmsApplicationIPage = baseMapper.queryCmsApplicationPaged(paginationUtility, cmsApplication);
return cmsApplicationIPage;
}
/**
* 查询list 报名表
*
* @param cmsApplication
* @return
*/
@Override
public List<CmsApplication> findAll(CmsApplication cmsApplication) {
return baseMapper.queryCmsApplication(cmsApplication);
}
}
......@@ -47,14 +47,6 @@ public class CmsBanner extends CyIdIncreEntity<CmsBanner> {
@Excel(name = "排序号", orderNum = "3", width = 20)
private Integer weight;
/**
* @desc 链接地址
* @column link_url
* @default
*/
@Excel(name = "链接地址", orderNum = "4", width = 20)
private String linkUrl;
/**
* 图片地址
*/
......
......@@ -22,11 +22,11 @@ public interface CmsNoticeRepository extends CyBaseMapper<CmsNotice> {
* 分页查询 cmsActivity
*
*/
IPage<CmsNotice> queryCmsNoticePaged(CyPageInfo cyPageInfo, @Param("entity") CmsNotice cmsActivity);
IPage<CmsNotice> queryCmsNoticePaged(CyPageInfo cyPageInfo, @Param("entity") CmsNotice cmsNotice);
//根据id逻辑删除
int deleteCmsNotice(@Param("businessId")Integer businessId);
//修改状态
int updateStatus(@Param("entity") CmsNotice cmsActivity);
int updateStatus(@Param("entity") CmsNotice cmsNotice);
CmsNotice selectById(@Param("businessId")Integer businessId);
//权重验重
CmsNotice checkWeight(@Param("weight")Integer weight);
......
......@@ -13,35 +13,35 @@ import java.util.List;
public interface CmsNoticeService {
/**
* 保存 新闻资讯
* 保存 公告
* @param cmsNotice
* @return
*/
CyPersistModel persist(CmsNotice cmsNotice);
/**
* 删除 新闻资讯
* 删除 公告
* @param cmsNotice
* @return
*/
CyPersistModel remove(CmsNotice cmsNotice);
/**
* 修改 新闻资讯
* 修改 公告
* @param cmsNotice
* @return
*/
CyPersistModel merge(CmsNotice cmsNotice);
/**
* 根据id查询 新闻资讯
* 根据id查询 公告
* @param id
* @return
*/
CmsNotice findById(Integer id);
/**
* 分页查询 新闻资讯
* 分页查询 公告
* @param cmsNotice
* @return
*/
......@@ -50,7 +50,7 @@ public interface CmsNoticeService {
/**
* 查询list 新闻资讯
* 查询list 公告
* @param cmsNotice
* @return
*/
......@@ -58,7 +58,7 @@ public interface CmsNoticeService {
/**
* 导出新闻资讯
* 导出公告
* @return
*/
List<CmsNotice> export(CmsNotice cmsNotice);
......
......@@ -34,7 +34,7 @@ public class CmsNoticeServiceImpl extends ServiceImpl<CmsNoticeRepository, CmsNo
/**
* 保存 新闻资讯
* 保存 公告
*
* @return
*/
......@@ -53,13 +53,13 @@ public class CmsNoticeServiceImpl extends ServiceImpl<CmsNoticeRepository, CmsNo
} else {
int line = baseMapper.insert(cmsNotice);
log.debug(CyUserUtil.getAuthenUsername() + "新增了ID为" +
cmsNotice.getBusinessId() + "的新闻资讯信息");
cmsNotice.getBusinessId() + "的公告信息");
return new CyPersistModel(line);
}
}
/**
* 删除 新闻资讯
* 删除 公告
*
* @param cmsNotice
* @return
......@@ -69,12 +69,12 @@ public class CmsNoticeServiceImpl extends ServiceImpl<CmsNoticeRepository, CmsNo
public CyPersistModel remove(CmsNotice cmsNotice) {
int line = baseMapper.deleteCmsNotice(cmsNotice.getBusinessId());
log.debug(CyUserUtil.getAuthenUsername() + "删除了ID为" +
cmsNotice.getBusinessId() + "的新闻资讯信息");
cmsNotice.getBusinessId() + "的公告信息");
return new CyPersistModel(line);
}
/**
* 修改 新闻资讯
* 修改 公告
*
* @param cmsNotice
* @return
......@@ -90,28 +90,28 @@ public class CmsNoticeServiceImpl extends ServiceImpl<CmsNoticeRepository, CmsNo
throw new CyServiceException(500, "权重已存在");
} else {
int line = baseMapper.updateById(cmsNotice);
log.debug(CyUserUtil.getAuthenUsername() + "修改了ID为" + cmsNotice.getBusinessId() + "的新闻资讯信息");
log.debug(CyUserUtil.getAuthenUsername() + "修改了ID为" + cmsNotice.getBusinessId() + "的公告信息");
return new CyPersistModel(line);
}
}
/**
* 根据id查询 新闻资讯
* 根据id查询 公告
*
* @param id
* @return
*/
@Override
public CmsNotice findById(Integer id) {
CmsNotice newsInformation = baseMapper.selectById(id);
if (newsInformation.getPath() != null) {
newsInformation.setPath(global.getBase_Discovery() + newsInformation.getPath());
CmsNotice cmsNotice = baseMapper.selectById(id);
if (cmsNotice.getPath() != null) {
cmsNotice.setPath(global.getBase_Discovery() + cmsNotice.getPath());
}
return newsInformation;
return cmsNotice;
}
/**
* 分页查询 新闻资讯
* 分页查询 公告
*
* @param cmsNotice
* @return
......@@ -132,7 +132,7 @@ public class CmsNoticeServiceImpl extends ServiceImpl<CmsNoticeRepository, CmsNo
}
/**
* 查询list 新闻资讯
* 查询list 公告
*
* @param cmsNotice
* @return
......@@ -144,7 +144,7 @@ public class CmsNoticeServiceImpl extends ServiceImpl<CmsNoticeRepository, CmsNo
}
/**
* 导出新闻资讯
* 导出公告
*
* @return
*/
......@@ -157,7 +157,7 @@ public class CmsNoticeServiceImpl extends ServiceImpl<CmsNoticeRepository, CmsNo
@Override
public CyPersistModel updateStatus(CmsNotice cmsNotice) {
int line = baseMapper.updateStatus(cmsNotice);
log.debug(CyUserUtil.getAuthenUsername() + "修改了ID为" + cmsNotice.getBusinessId() + "的新闻资讯信息状态");
log.debug(CyUserUtil.getAuthenUsername() + "修改了ID为" + cmsNotice.getBusinessId() + "的公告信息状态");
return new CyPersistModel(line);
}
......
......@@ -18,7 +18,7 @@
<result column="is_recommended" jdbcType="INTEGER" property="isRecommended"/>
<result column="is_top" jdbcType="INTEGER" property="isTop"/>
<result column="participants" jdbcType="VARCHAR" property="participants"/>
<result column="participant_count" jdbcType="VARCHAR" property="participantCount"/>
<result column="is_registration" jdbcType="INTEGER" property="isRegistration"/>
<result column="is_real_name_authentication" jdbcType="INTEGER" property="isRealNameAuthentication"/>
<result column="registration_fee" jdbcType="FLOAT" property="registrationFee"/>
......@@ -58,10 +58,6 @@
<if test="entity.details !=null and entity.details != '' ">
and details like concat('%',#{entity.details},'%')
</if>
<if test="entity.participants !=null and entity.participants != '' ">
and participants like concat('%',#{entity.participants},'%')
</if>
<if test="entity.registrationFee !=null and entity.registrationFee != '' ">
and registration_fee like concat('%',#{entity.registrationFee},'%')
</if>
......@@ -87,7 +83,7 @@
ca.weight,
ca.picture_id,
ca.is_recommended,
ca.participants,
applicationList.participant_count,
ca.is_top,
ca.is_registration,
ca.is_real_name_authentication,
......@@ -95,6 +91,11 @@
su.nick_name as nickName,
oi.path
FROM cms_activity ca
LEFT JOIN
(SELECT activity_id, COUNT(*) AS participant_count
FROM cms_application
GROUP BY activity_id) AS applicationList
ON ca.business_id = applicationList.activity_id
LEFT JOIN oss_info oi on oi.business_id = ca.picture_id
LEFT JOIN sys_user su on su.business_id = ca.create_by
where ca.del_flag='0'
......@@ -123,9 +124,6 @@
<if test="entity.title !=null and entity.title != '' ">
and title like concat('%',#{entity.title},'%')
</if>
<if test="entity.participants !=null and entity.participants != '' ">
and participants like concat('%',#{entity.participants},'%')
</if>
<if test="entity.registrationFee !=null and entity.registrationFee != '' ">
and registration_fee = #{entity.registrationFee}
</if>
......
<?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="org.rcisoft.business.cmsApplication.dao.CmsApplicationRepository">
<resultMap id="BaseResultMap" type="org.rcisoft.business.cmsApplication.entity.CmsApplication">
<id column="business_id" jdbcType="INTEGER" property="businessId"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="create_date" jdbcType="DATE" property="createDate"/>
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
<result column="update_date" jdbcType="DATE" property="updateDate"/>
<result column="flag" jdbcType="VARCHAR" property="flag"/>
<result column="del_flag" jdbcType="VARCHAR" property="delFlag"/>
<result column="user_id" jdbcType="INTEGER" property="userId"/>
<result column="activity_id" jdbcType="INTEGER" property="activityId"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="phone" jdbcType="VARCHAR" property="phone"/>
<result column="status" jdbcType="VARCHAR" property="status"/>
<result column="applicationFee" jdbcType="DECIMAL" property="applicationFee"/>
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
<select id="queryCmsApplication" resultMap="BaseResultMap">
select * from cms_application
where 1=1
<if test="entity.createBy !=null and entity.createBy != '' ">
and create_by like concat('%',#{entity.createBy},'%')
</if>
<if test="entity.createDate !=null and entity.createDate != '' ">
and create_date &gt;= #{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 &lt;= #{entity.updateDate}
</if>
<if test="entity.flag !=null and entity.flag != '' ">
and flag &lt;= #{entity.flag}
</if>
<if test="entity.delFlag !=null and entity.delFlag != '' ">
and del_flag &lt;= #{entity.delFlag}
</if>
<if test="entity.userId !=null and entity.userId != '' ">
and user_id &lt;= #{entity.userId}
</if>
<if test="entity.activityId !=null and entity.activityId != '' ">
and activity_id &lt;= #{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 test="entity.status !=null and entity.status != '' ">
and status &lt;= #{entity.status}
</if>
<if test="entity.applicationFee != null">
and application_fee &lt;= #{entity.applicationFee}
</if>
<if test="entity.remarks !=null and entity.remarks != '' ">
and remarks like concat('%',#{entity.remarks},'%')
</if>
ORDER BY business_id DESC
</select>
<!-- 根据 businessId 查询报名信息 -->
<select id="findByBusinessId" resultMap="BaseResultMap">
SELECT * FROM cms_application
WHERE activity_id = #{businessId}
</select>
<select id="queryCmsApplicationPaged" resultMap="BaseResultMap">
SELECT ca2.business_id,
ca2.create_by,
ca2.create_date,
ca2.update_by,
ca2.update_date,
ca2.flag,
ca2.del_flag,
ca2.user_id,
ca2.activity_id,
ca2.name,
ca2.phone,
ca2.status,
ca2.application_fee,
ca2.remarks
FROM cms_application ca2
LEFT JOIN cms_activity ca1 on ca1.business_id = ca2.activity_id
LEFT JOIN sys_user su on su.business_id = ca2.create_by
<if test="entity.createBy !=null and entity.createBy != '' ">
and create_by like concat('%',#{entity.createBy},'%')
</if>
<if test="entity.createDate != null and entity.createDate != '' ">
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 &lt;= #{entity.updateDate}
</if>
<if test="entity.flag !=null and entity.flag != '' ">
and flag &lt;= #{entity.flag}
</if>
<if test="entity.delFlag !=null and entity.delFlag != '' ">
and del_flag &lt;= #{entity.delFlag}
</if>
<if test="entity.userId !=null and entity.userId != '' ">
and user_id &lt;= #{entity.userId}
</if>
<if test="entity.activityId !=null and entity.activityId != '' ">
and activity_id &lt;= #{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 test="entity.status !=null and entity.status != '' ">
and status &lt;= #{entity.status}
</if>
<if test="entity.applicationFee != null">
and application_fee &lt;= #{entity.applicationFee}
</if>
<if test="entity.remarks !=null and entity.remarks != '' ">
and remarks like concat('%',#{entity.remarks},'%')
</if>
ORDER BY business_id DESC
</select>
</mapper>
......@@ -15,7 +15,6 @@
<result column="del_flag" jdbcType="VARCHAR" property="delFlag"/>
<result column="flag" jdbcType="VARCHAR" property="flag"/>
<result column="remarks" jdbcType="VARCHAR" property="remarks"/>
<result column="link_url" jdbcType="VARCHAR" property="linkUrl"/>
<result column="url" jdbcType="VARCHAR" property="url"/>
</resultMap>
......@@ -39,9 +38,6 @@
<if test="entity.weight !=null and entity.weight != '' ">
and weight = #{entity.weight}
</if>
<if test="entity.linkUrl !=null and entity.linkUrl != '' ">
and link_url like concat('%',#{entity.linkUrl},'%')
</if>
ORDER BY business_id DESC
</select>
......@@ -65,9 +61,6 @@
<if test="entity.weight !=null and entity.weight != '' ">
and smb.weight = #{entity.weight}
</if>
<if test="entity.linkUrl !=null and entity.linkUrl != '' ">
and smb.link_url like concat('%',#{entity.linkUrl},'%')
</if>
ORDER BY smb.weight DESC
</select>
<select id="selectByIdWithUrl" resultType="org.rcisoft.business.cmsBanner.entity.CmsBanner">
......
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