| | |
| | | |
| | | String DA_JIN_DIAN= "打金店"; |
| | | |
| | | String USED_MOBILE_PHONES= "二手手机"; |
| | | String USED_MOBILE_PHONES= "二手手机维修"; |
| | | |
| | | String USED_CAR= "二手汽车"; |
| | | String USED_CAR= "二手车交易"; |
| | | |
| | | String BAIL_PENDING_TRIAL= "取保候审"; |
| | | |
| | |
| | | */ |
| | | package org.springblade.modules.notice.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.notice.entity.NoticeLikeEntity; |
| | | import org.springblade.modules.notice.service.INoticeLikeService; |
| | | import org.springblade.modules.notice.vo.NoticeLikeVO; |
| | | import org.springblade.modules.notice.wrapper.NoticeLikeWrapper; |
| | | import org.springblade.modules.notice.service.INoticeLikeService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | /** |
| | | * 通知点赞表 控制器 |
| | |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入noticeLike") |
| | | public R save(@Valid @RequestBody NoticeLikeEntity noticeLike) { |
| | | return R.status(noticeLikeService.save(noticeLike)); |
| | | UpdateWrapper<NoticeLikeEntity> objectUpdateWrapper = new UpdateWrapper<>(); |
| | | objectUpdateWrapper.eq("notice_user_id", noticeLike.getNoticeUserId()); |
| | | objectUpdateWrapper.eq("notice_id", noticeLike.getNoticeId()); |
| | | noticeLike.setDeleteFlag(0); |
| | | return R.status(noticeLikeService.saveOrUpdate(noticeLike, objectUpdateWrapper)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | package org.springblade.modules.notice.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 通知公告表浏览数量加一 |
| | | */ |
| | | @PostMapping("/addNumber") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "添加浏览数量", notes = "传入notice") |
| | | public R addNumber(@Valid @RequestBody NoticeEntity notice) { |
| | | UpdateWrapper<NoticeEntity> objectUpdateWrapper = new UpdateWrapper<>(); |
| | | objectUpdateWrapper.setSql("view_number = view_number + 1"); |
| | | objectUpdateWrapper.eq("id",notice.getId()); |
| | | return R.status(noticeService.update(null ,objectUpdateWrapper)); |
| | | } |
| | | |
| | | /** |
| | | * 通知公告表 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | |
| | | */ |
| | | package org.springblade.modules.notice.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty("创建时间") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("是删除") |
| | | private Integer deleteFlag; |
| | | |
| | | } |
| | |
| | | <mapper namespace="org.springblade.modules.notice.mapper.NoticesMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="noticeResultMap" type="org.springblade.modules.notice.entity.NoticeEntity"> |
| | | <resultMap id="noticeResultMap" type="org.springblade.modules.notice.vo.NoticeVO"> |
| | | <result column="id" property="id"/> |
| | | <result column="title" property="title"/> |
| | | <result column="type" property="type"/> |
| | |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | |
| | | <!-- <collection property="lickFlag" javaType="int"--> |
| | | <!-- column="id" select="selectStlLick">--> |
| | | <!-- </collection>--> |
| | | |
| | | <collection property="countNumber" column="id" javaType="int" select="selectStlCount"> |
| | | </collection> |
| | | |
| | | </resultMap> |
| | | |
| | | <!-- <select id="selectStlLick" parameterType="Long" resultType="int">--> |
| | | <!-- select IFNULL(jnl.id, 0) lickFlag--> |
| | | <!-- FROM jczz_notice jn--> |
| | | <!-- LEFT JOIN jczz_notice_like jnl ON jn.id = jnl.notice_id--> |
| | | <!-- WHERE jnl.notice_user_id = #{notice.userId}--> |
| | | <!-- and jn.is_deleted = 0--> |
| | | <!-- and jn.id = #{id}--> |
| | | <!-- </select>--> |
| | | |
| | | <select id="selectStlCount" resultType="int"> |
| | | select count(1) countNumber |
| | | FROM jczz_notice jn |
| | | LEFT JOIN jczz_notice_like jnl ON jn.id = jnl.notice_id |
| | | where jn.is_deleted = 0 |
| | | and jnl.delete_flag = 0 |
| | | and jn.id = #{id} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectNoticePage" resultMap="noticeResultMap"> |
| | | select * from jczz_notice where is_deleted = 0 |
| | | select id, |
| | | title, |
| | | type, |
| | | url, |
| | | video_url, |
| | | source_id, |
| | | source_name, |
| | | article_type, |
| | | recommend, |
| | | publish, |
| | | iscomment, |
| | | view_number, |
| | | create_time, |
| | | update_time, |
| | | update_user, |
| | | create_user, |
| | | is_deleted |
| | | from jczz_notice |
| | | where is_deleted = 0 |
| | | and publish = 1 |
| | | </select> |
| | | |
| | | |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 通知公告表 服务实现类 |
| | | * |
| | |
| | | |
| | | @Override |
| | | public IPage<NoticeVO> selectNoticePage(IPage<NoticeVO> page, NoticeVO notice) { |
| | | return page.setRecords(baseMapper.selectNoticePage(page, notice)); |
| | | IPage<NoticeVO> noticeVOIPage = page.setRecords(baseMapper.selectNoticePage(page, notice)); |
| | | return noticeVOIPage; |
| | | } |
| | | |
| | | |
| | |
| | | public class NoticeVO extends NoticeEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 点赞标记 |
| | | */ |
| | | private Integer lickFlag; |
| | | |
| | | private Integer countNumber; |
| | | |
| | | private Long userId; |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | @GetMapping("/countTypeNumber") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "统计类型数量") |
| | | public R countTypeNumber() { |
| | | return R.data(taskService.countTypeNumber()); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | * @param taskBailReportingEvent |
| | | * @return |
| | | */ |
| | | List<TaskBailReportingEventVO> selectTaskBailReportingEventPage(IPage page, @Param("vo") TaskBailReportingEventVO taskBailReportingEvent); |
| | | List<TaskBailReportingEventVO> selectTaskBailReportingEventPage(IPage page, TaskBailReportingEventVO taskBailReportingEvent); |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | <select id="selectTaskBailReportingEventPage" resultMap="taskBailReportingEventResultMap"> |
| | | select * from jczz_task_bail_reporting_event where is_deleted = 0 |
| | | <if test="vo.checkUserId != null and vo.checkUserId != ''"> |
| | | AND check_user_id = #{vo.checkUserId} |
| | | <if test="taskBailReportingEvent.checkUserId != null and taskBailReportingEvent.checkUserId != ''"> |
| | | AND check_user_id = #{taskBailReportingEvent.checkUserId} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.task.entity.TaskHotelReportingEntity; |
| | | import org.springblade.modules.task.vo.TaskHotelReportingVO; |
| | | |
| | |
| | | * @param taskHotelReporting |
| | | * @return |
| | | */ |
| | | List<TaskHotelReportingVO> selectTaskHotelReportingPage(IPage page, @Param("vo") TaskHotelReportingVO taskHotelReporting); |
| | | List<TaskHotelReportingVO> selectTaskHotelReportingPage(IPage page, TaskHotelReportingVO taskHotelReporting); |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | <select id="selectTaskHotelReportingPage" resultMap="taskHotelReportingResultMap"> |
| | | select * from jczz_task_hotel_reporting where is_deleted = 0 |
| | | <if test="vo.checkUserId != null and vo.checkUserId != ''"> |
| | | AND check_user_id = #{vo.checkUserId} |
| | | <if test="taskHotelReporting.checkUserId != null and taskHotelReporting.checkUserId != ''"> |
| | | AND check_user_id = #{taskHotelReporting.checkUserId} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | * @param taskLabelReportingEvent |
| | | * @return |
| | | */ |
| | | List<TaskLabelReportingEventVO> selectTaskLabelReportingEventPage(IPage page, @Param("vo") TaskLabelReportingEventVO taskLabelReportingEvent); |
| | | List<TaskLabelReportingEventVO> selectTaskLabelReportingEventPage(IPage page,TaskLabelReportingEventVO taskLabelReportingEvent); |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | <select id="selectTaskLabelReportingEventPage" resultMap="taskLabelReportingEventResultMap"> |
| | | select * from jczz_task_label_reporting_event where is_deleted = 0 |
| | | <if test="vo.userId != null and vo.userId != ''"> |
| | | AND user_id = #{vo.checkUserId} |
| | | <if test="taskLabelReportingEvent.userId != null and taskLabelReportingEvent.userId != ''"> |
| | | AND user_id = #{taskLabelReportingEvent.userId} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | */ |
| | | package org.springblade.modules.task.mapper; |
| | | |
| | | import org.springblade.modules.task.entity.TaskEntity; |
| | | import org.springblade.modules.task.vo.TaskVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.task.entity.TaskEntity; |
| | | import org.springblade.modules.task.vo.TaskVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @param task |
| | | * @return |
| | | */ |
| | | List<TaskVO> selectTaskPage(IPage page, TaskVO task); |
| | | List<TaskVO> selectTaskPage(IPage page,TaskVO task); |
| | | |
| | | |
| | | } |
| | |
| | | <mapper namespace="org.springblade.modules.task.mapper.TaskMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="taskResultMap" type="org.springblade.modules.task.entity.TaskEntity"> |
| | | <resultMap id="taskResultMap" type="org.springblade.modules.task.vo.TaskVO"> |
| | | <result column="id" property="id"/> |
| | | <result column="name" property="name"/> |
| | | <result column="type" property="type"/> |
| | |
| | | |
| | | |
| | | <select id="selectTaskPage" resultMap="taskResultMap"> |
| | | select * from jczz_task where is_deleted = 0 |
| | | SELECT |
| | | jt.`status`, |
| | | jt.`id`, |
| | | jt.`name`, |
| | | jt.frequency, |
| | | jda.address_name, |
| | | jt.create_time |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_grid_range jgr ON jg.id = jgr.grid_id |
| | | LEFT JOIN jczz_task jt ON jgr.house_code = jt.house_code |
| | | LEFT JOIN jczz_doorplate_address jda on jda.address_code=jt.house_code |
| | | WHERE |
| | | jg.user_id = #{task.userId} |
| | | <if test="task.status != null"> |
| | | and jt.status = #{task.status} |
| | | </if> |
| | | <if test="task.name != null and task.name != ''"> |
| | | and jt.name like concat('%', #{task.name}, '%') |
| | | </if> |
| | | order by jt.create_time desc |
| | | |
| | | </select> |
| | | |
| | | |
| | |
| | | public Long updateTask(Integer type, String name, Integer frequency, String remark, Long updateUser, Long id, Integer status); |
| | | |
| | | Object countNumber(String houseCode, Integer status); |
| | | |
| | | Object countTypeNumber(); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public Boolean updateBailReporting(TaskBailReportingEventEntity taskBailReportingEvent) { |
| | | Long aLong = taskService.updateTask(null, null, null, "", AuthUtil.getUserId(), taskBailReportingEvent.getTaskId(), taskBailReportingEvent.getStatus()); |
| | | Long aLong = taskService.updateTask(null, null, null, "", AuthUtil.getUserId(), taskBailReportingEvent.getTaskId(), Integer.valueOf(taskBailReportingEvent.getConfirmFlag())); |
| | | if (aLong > 0) { |
| | | return baseMapper.updateById(taskBailReportingEvent) > 0 ? true : false; |
| | | } |
| | |
| | | if (aLong > 0) { |
| | | taskLabelReportingEvent.setTaskId(aLong); |
| | | taskLabelReportingEvent.setUserId(AuthUtil.getUserId()); |
| | | taskLabelReportingEvent.setLabelName(name); |
| | | return baseMapper.insert(taskLabelReportingEvent) > 0 ? true : false; |
| | | } |
| | | return false; |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import org.apache.xmlbeans.impl.xb.xsdschema.Public; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.task.entity.TaskEntity; |
| | |
| | | |
| | | @Override |
| | | public IPage<TaskVO> selectTaskPage(IPage<TaskVO> page, TaskVO task) { |
| | | task.setUserId(AuthUtil.getUserId()); |
| | | return page.setRecords(baseMapper.selectTaskPage(page, task)); |
| | | } |
| | | |
| | |
| | | objectObjectHashMap.put("processed", processed); |
| | | return objectObjectHashMap; |
| | | } |
| | | |
| | | @Override |
| | | public Object countTypeNumber() { |
| | | Map<String, Object> objectObjectHashMap = new HashMap<>(); |
| | | // 已处理 |
| | | Long comprehensiveTask = baseMapper.selectCount(Wrappers.<TaskEntity>lambdaQuery().eq(TaskEntity::getType, 1) |
| | | .eq(TaskEntity::getStatus, 1)); |
| | | Long residentialTask = baseMapper.selectCount(Wrappers.<TaskEntity>lambdaQuery().eq(TaskEntity::getType, 2) |
| | | .eq(TaskEntity::getStatus, 1)); |
| | | Long publicTask = baseMapper.selectCount(Wrappers.<TaskEntity>lambdaQuery().eq(TaskEntity::getType, 3) |
| | | .eq(TaskEntity::getStatus, 1)); |
| | | objectObjectHashMap.put("comprehensiveTask", comprehensiveTask); |
| | | objectObjectHashMap.put("residentialTask", residentialTask); |
| | | objectObjectHashMap.put("publicTask", publicTask); |
| | | return objectObjectHashMap; |
| | | } |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.task.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springblade.modules.task.entity.TaskEntity; |
| | | import org.springblade.core.tool.node.INode; |
| | | import lombok.Data; |
| | |
| | | public class TaskVO extends TaskEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "用户id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "地址") |
| | | private String addressName; |
| | | |
| | | } |