New file |
| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComPropertyVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"物业公司"}) |
| | | @RestController |
| | | @RequestMapping("/comProperty") |
| | | public class ComPropertyApi extends BaseController { |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | | * |
| | | * @param commonPage 查询实体 |
| | | * @return 所有数据 |
| | | */ |
| | | @ApiOperation(value = "物业公司列表",response = ComPropertyVO.class) |
| | | @PostMapping("queryAll") |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | commonPage.setParamId(this.getCommunityId()); |
| | | return this.communityService.comPropertySelectAll(commonPage); |
| | | } |
| | | |
| | | @ApiOperation(value = "物业公司详情", response = ComPropertyVO.class) |
| | | @ApiImplicitParam(name = "id", value = "物业公司id", required = true) |
| | | @GetMapping("detail") |
| | | public R detailProperty(@RequestParam("id") Long id) { |
| | | return this.communityService.detailProperty(id); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.applets_backstage.api; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActDynVO; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.community.AddComActDynTypeDTO; |
| | | import com.panzhihua.common.model.dtos.community.EditComActDynTypeDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComActDynTypeDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActDynTypeVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | @Slf4j |
| | | @Api(tags = {"花城资讯模块"}) |
| | | @RestController |
| | | @RequestMapping("/dyn") |
| | | public class ActDynTypeApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | @ApiOperation(value = "分页查询花城资讯分类列表", response = ComActDynTypeVO.class) |
| | | @PostMapping("/type/page") |
| | | public R page(@RequestBody PageComActDynTypeDTO comActDynTypeDTO) { |
| | | comActDynTypeDTO.setCommunityId(0L); |
| | | return communityService.pageDynTypeByAdmin(comActDynTypeDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询花城资讯分类列表", response = ComActDynTypeVO.class) |
| | | @PostMapping("/type/list") |
| | | public R list(@RequestBody PageComActDynTypeDTO comActDynTypeDTO) { |
| | | comActDynTypeDTO.setCommunityId(0L); |
| | | return communityService.getDynTypeListByAdmin(comActDynTypeDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增花城资讯分类") |
| | | @PostMapping("/type/add") |
| | | public R add(@Validated @RequestBody AddComActDynTypeDTO comActDynTypeDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | comActDynTypeDTO.setCommunityId(0L); |
| | | comActDynTypeDTO.setUserId(loginUserInfo.getUserId()); |
| | | return communityService.addDynTypeByAdmin(comActDynTypeDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑花城资讯分类") |
| | | @PostMapping("/type/edit") |
| | | public R add(@Validated @RequestBody EditComActDynTypeDTO comActDynTypeDTO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | comActDynTypeDTO.setUserId(loginUserInfo.getUserId()); |
| | | return communityService.editDynTypeByAdmin(comActDynTypeDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除花城资讯分类") |
| | | @PostMapping("/type/delete") |
| | | public R delete(@RequestBody List<Long> ids) { |
| | | if (ids == null || ids.size() <= 0) { |
| | | return R.fail("参数错误"); |
| | | } |
| | | return communityService.deleteDynTypeByAdmin(ids); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询花城资讯", response = ComActDynVO.class) |
| | | @PostMapping("/pagedynamic") |
| | | public R pageDynamic(@RequestBody ComActDynVO comActDynVO) { |
| | | comActDynVO.setCommunityId(0L); |
| | | return communityService.pageDynamicByAdmin(comActDynVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "花城资讯详情", response = ComActDynVO.class) |
| | | @GetMapping("/detaildynamic") |
| | | @ApiImplicitParam(name = "id", value = "花城资讯主键", required = true) |
| | | public R detailDynamic(@RequestParam("id") Long id) { |
| | | return communityService.detailDynamic(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除花城资讯") |
| | | @DeleteMapping("/dynamic") |
| | | public R deleteDynamic(@RequestBody ComActDynVO comActDynVO) { |
| | | Long id = comActDynVO.getId(); |
| | | if (ObjectUtils.isEmpty(id)) { |
| | | return R.fail("花城资讯主键不能为空"); |
| | | } |
| | | return communityService.deleteDynamic(comActDynVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑花城资讯、取消置顶、设置置顶") |
| | | @PutMapping("/dynamic") |
| | | public R putDynamic(@RequestBody ComActDynVO comActDynVO) { |
| | | Long id = comActDynVO.getId(); |
| | | if (ObjectUtils.isEmpty(id)) { |
| | | return R.fail("花城资讯主键不能为空"); |
| | | } |
| | | comActDynVO.setCommunityId(0L); |
| | | return communityService.putDynamic(comActDynVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增花城资讯") |
| | | @PostMapping("/dynamic") |
| | | public R addDynamic(@RequestBody ComActDynVO comActDynVO) { |
| | | comActDynVO.setCommunityId(0L); |
| | | Date publishAt = comActDynVO.getPublishAt(); |
| | | if (null == publishAt) { |
| | | publishAt = new Date(); |
| | | comActDynVO.setPublishAt(publishAt); |
| | | } |
| | | long time = publishAt.getTime(); |
| | | long l = System.currentTimeMillis(); |
| | | if (l >= time) { |
| | | comActDynVO.setStatus(1); |
| | | } |
| | | return communityService.addDynamic(comActDynVO); |
| | | } |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "操作人员id", hidden = true) |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty("类型(1.社区动态 2.党务公开 3.花城资讯)") |
| | | private Integer category; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "社区id") |
| | | private Long communityId; |
| | | |
| | | @ApiModelProperty("类型(1.社区动态 2.党务公开 3.花城资讯)") |
| | | private Integer category; |
| | | |
| | | } |
| | |
| | | private Integer jumpType; |
| | | |
| | | private String areaCode; |
| | | |
| | | @ApiModelProperty("类型(1.社区动态 2.党务公开 3.花城资讯)") |
| | | private Integer category; |
| | | } |
| | |
| | | |
| | | @GetMapping("/comAreaTownCommunity/areaTownCommunity") |
| | | R areaTownCommunity(@RequestParam("name")String name); |
| | | |
| | | /** |
| | | * 物业公司详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/comProperty/detail") |
| | | R detailProperty(@RequestParam("id") Long id); |
| | | } |
| | |
| | | public R delete(@RequestParam("id") Long id) { |
| | | return this.comPropertyService.delete(id); |
| | | } |
| | | |
| | | /** |
| | | * 物业公司详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/detail") |
| | | public R detailProperty(@RequestParam("id") Long id) { |
| | | return comPropertyService.detailProperty(id); |
| | | } |
| | | } |
| | |
| | | **/ |
| | | @Mapper |
| | | public interface ComActDynDAO extends BaseMapper<ComActDynDO> { |
| | | @Select("<script> " + "SELECT " + "d.id, " + "d.title, " + "IFNULL(u.readNum,0) readNum, " + "d.`status`, " |
| | | + "d.`content`, " + "d.`cover`, " + "d.`type`, " + "d.`cover_mode`, d.jump_url,d.jump_type, " + "d.is_topping, " + "d.publish_at, " |
| | | + "d.create_at, " + "cadt.`name` as typeName, " + "cadt.color as typeColor, " + "ca.name as communityName " |
| | | + "FROM " + "com_act_dyn d " + "LEFT JOIN ( select dyn_id,count(id) as readNum from com_act_dyn_user GROUP BY dyn_id ) u ON d.id = u.dyn_id " |
| | | + "LEFT JOIN com_act_dyn_type as cadt ON cadt.id = d.type " |
| | | + "LEFT JOIN com_act ca ON d.community_id = ca.community_id " + "WHERE 1=1 " |
| | | + "<if test='comActDynVO.choice == 0 '>" + "and d.community_id = ${comActDynVO.communityId} " + " </if> " |
| | | + "<if test='comActDynVO.areaCode !=null '>" + "and ca.area_code = ${comActDynVO.areaCode} " + " </if> " |
| | | + "<if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'>" |
| | | + "AND d.title like concat(#{comActDynVO.title},'%') " + " </if> " |
| | | + "<if test='comActDynVO.isTopping != null '>" + "AND d.is_topping = #{comActDynVO.isTopping} " + " </if> " |
| | | + "<if test='comActDynVO.status != null '>" + "AND d.`status` = #{comActDynVO.status} " + " </if> " |
| | | + "<if test='comActDynVO.publishAtBegin != null '>" + "AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} " |
| | | + "AND #{comActDynVO.publishAtEnd}" + " </if> " + " group by d.id " |
| | | + " order by d.is_topping desc, d.create_at desc " + "</script>") |
| | | // @Select("<script> " + "SELECT " + "d.id, " + "d.title, " + "IFNULL(u.readNum,0) readNum, " + "d.`status`, " |
| | | // + "d.`content`, " + "d.`cover`, " + "d.`type`, " + "d.`cover_mode`, d.jump_url,d.jump_type, " + "d.is_topping, " + "d.publish_at, " |
| | | // + "d.create_at, " + "cadt.`name` as typeName, " + "cadt.color as typeColor, " + "ca.name as communityName " |
| | | // + "FROM " + "com_act_dyn d " + "LEFT JOIN ( select dyn_id,count(id) as readNum from com_act_dyn_user GROUP BY dyn_id ) u ON d.id = u.dyn_id " |
| | | // + "LEFT JOIN com_act_dyn_type as cadt ON cadt.id = d.type " |
| | | // + "LEFT JOIN com_act ca ON d.community_id = ca.community_id " + "WHERE 1=1 " |
| | | // + "<if test='comActDynVO.category != null '>" + "and d.category = #{comActDynVO.category} " + " </if> " |
| | | // + "<if test='comActDynVO.choice == 0 '>" + "and d.community_id = ${comActDynVO.communityId} " + " </if> " |
| | | // + "<if test='comActDynVO.areaCode !=null '>" + "and ca.area_code = ${comActDynVO.areaCode} " + " </if> " |
| | | // + "<if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'>" |
| | | // + "AND d.title like concat(#{comActDynVO.title},'%') " + " </if> " |
| | | // + "<if test='comActDynVO.isTopping != null '>" + "AND d.is_topping = #{comActDynVO.isTopping} " + " </if> " |
| | | // + "<if test='comActDynVO.status != null '>" + "AND d.`status` = #{comActDynVO.status} " + " </if> " |
| | | // + "<if test='comActDynVO.publishAtBegin != null '>" + "AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} " |
| | | // + "AND #{comActDynVO.publishAtEnd}" + " </if> " + " group by d.id " |
| | | // + " order by d.is_topping desc, d.create_at desc " + "</script>") |
| | | IPage<ComActDynVO> pageDynamic(Page page, @Param("comActDynVO") ComActDynVO comActDynVO); |
| | | |
| | | @Update("update com_act_dyn set `status`=1 WHERE `status`=0 and TIMESTAMPDIFF(MINUTE, SYSDATE(), publish_at)<=0 ") |
| | | int timedTaskDynStatus(); |
| | | |
| | | @Select("<script> " + "SELECT " + "d.id, " + "d.title, " + "COUNT(u.id)readNum, " + "d.`status`, " |
| | | + "d.`content`, " + "d.`cover`, " + "d.`type`, " + "d.`cover_mode`, " + "d.is_topping, " + "d.publish_at, " |
| | | + "d.create_at, " + "cadt.`name` as typeName, " + "ca.name as communityName " + "FROM " + "com_act_dyn d " |
| | | + "LEFT JOIN com_act_dyn_user u ON d.id = u.dyn_id " |
| | | + "LEFT JOIN com_act_dyn_type as cadt ON cadt.id = d.type " |
| | | + "LEFT JOIN com_act ca ON d.community_id = ca.community_id " + "WHERE " |
| | | + "d.community_id = ${comActDynVO.communityId} " |
| | | + "<if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'>" |
| | | + "AND d.title like concat(#{comActDynVO.title},'%') " + " </if> " |
| | | + "<if test='comActDynVO.isTopping != null '>" + "AND d.is_topping = #{comActDynVO.isTopping} " + " </if> " |
| | | + "<if test='comActDynVO.status != null '>" + "AND d.`status` = #{comActDynVO.status} " + " </if> " |
| | | + "<if test='comActDynVO.type != null '>" + "AND d.type = #{comActDynVO.type} " + " </if> " |
| | | + "<if test='comActDynVO.publishAtBegin != null '>" + "AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} " |
| | | + "AND #{comActDynVO.publishAtEnd}" + " </if> " + " group by d.id " |
| | | + " order by d.is_topping desc, d.create_at desc " + "</script>") |
| | | // @Select("<script> " + "SELECT " + "d.id, " + "d.title, " + "COUNT(u.id)readNum, " + "d.`status`, " |
| | | // + "d.`content`, " + "d.`cover`, " + "d.`type`, " + "d.`cover_mode`, " + "d.is_topping, " + "d.publish_at, " |
| | | // + "d.create_at, " + "cadt.`name` as typeName, " + "ca.name as communityName " + "FROM " + "com_act_dyn d " |
| | | // + "LEFT JOIN com_act_dyn_user u ON d.id = u.dyn_id " |
| | | // + "LEFT JOIN com_act_dyn_type as cadt ON cadt.id = d.type " |
| | | // + "LEFT JOIN com_act ca ON d.community_id = ca.community_id " + "WHERE " |
| | | // + "d.community_id = ${comActDynVO.communityId} " |
| | | // + "<if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'>" |
| | | // + "AND d.title like concat(#{comActDynVO.title},'%') " + " </if> " |
| | | // + "<if test='comActDynVO.isTopping != null '>" + "AND d.is_topping = #{comActDynVO.isTopping} " + " </if> " |
| | | // + "<if test='comActDynVO.status != null '>" + "AND d.`status` = #{comActDynVO.status} " + " </if> " |
| | | // + "<if test='comActDynVO.type != null '>" + "AND d.type = #{comActDynVO.type} " + " </if> " |
| | | // + "<if test='comActDynVO.publishAtBegin != null '>" + "AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} " |
| | | // + "AND #{comActDynVO.publishAtEnd}" + " </if> " + " group by d.id " |
| | | // + " order by d.is_topping desc, d.create_at desc " + "</script>") |
| | | IPage<ComActDynVO> pageDynamicByAdmin(Page page, @Param("comActDynVO") ComActDynVO comActDynVO); |
| | | |
| | | @Select("SELECT " + " count( cad.id ) AS dynTotal, " |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | |
| | | * 跳转状态 |
| | | */ |
| | | private Integer jumpType; |
| | | |
| | | /** |
| | | * 类型(1.社区动态 2.党务公开 3.花城资讯) |
| | | */ |
| | | private Integer category; |
| | | } |
| | |
| | | */ |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 类型(1.社区动态 2.党务公开 3.花城资讯) |
| | | */ |
| | | private Integer category; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "ComActDynTypeDO{" + "id=" + id + ", name=" + name + ", color=" + color + ", isDel=" + isDel |
| | |
| | | * @return |
| | | */ |
| | | R delete(Long id); |
| | | |
| | | /** |
| | | * 物业公司详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R detailProperty(Long id); |
| | | } |
| | |
| | | ComActDynTypeDO dynTypeDO = this.baseMapper.selectOne(new QueryWrapper<ComActDynTypeDO>().lambda() |
| | | .eq(ComActDynTypeDO::getCommunityId, comActDynTypeDTO.getCommunityId()) |
| | | .eq(ComActDynTypeDO::getName, comActDynTypeDTO.getName()) |
| | | .eq(ComActDynTypeDO::getCategory, comActDynTypeDTO.getCategory()) |
| | | .eq(ComActDynTypeDO::getIsDel, ComActDynTypeDO.isDel.no)); |
| | | if (dynTypeDO != null) { |
| | | return R.fail("该分类名称已存在!"); |
| | |
| | | Integer count = this.baseMapper.selectCount( |
| | | new QueryWrapper<ComActDynTypeDO>().lambda().eq(ComActDynTypeDO::getCommunityId, dynTypeDO.getCommunityId()) |
| | | .eq(ComActDynTypeDO::getName, comActDynTypeDTO.getName()) |
| | | .eq(ComActDynTypeDO::getCategory, dynTypeDO.getCategory()) |
| | | .eq(ComActDynTypeDO::getIsDel, ComActDynTypeDO.isDel.no) |
| | | .ne(ComActDynTypeDO::getId, comActDynTypeDTO.getId())); |
| | | |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | |
| | | /** |
| | | * (ComProperty)表服务实现类 |
| | | * |
| | |
| | | } |
| | | return R.fail("用户账号错误"); |
| | | } |
| | | |
| | | /** |
| | | * 物业公司详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R detailProperty(Long id) { |
| | | ComProperty comProperty = comPropertyDao.selectById(id); |
| | | if (isNull(comProperty)) { |
| | | return R.fail("资源不存在"); |
| | | } |
| | | ComPropertyVO comPropertyVO = new ComPropertyVO(); |
| | | BeanUtils.copyProperties(comProperty, comPropertyVO); |
| | | comPropertyVO.setPassword(null); |
| | | return R.ok(comPropertyVO); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.service_community.util; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import org.jsoup.Jsoup; |
| | | import org.jsoup.nodes.Document; |
| | | import org.jsoup.nodes.Element; |
| | | import org.jsoup.select.Elements; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.security.MessageDigest; |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneOffset; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | import org.springframework.http.HttpEntity; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.HttpMethod; |
| | |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.security.MessageDigest; |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneOffset; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | |
| | | /** |
| | | * @author zzj |
| | |
| | | <result column="cover_mode" property="coverMode" /> |
| | | <result column="jump_url" property="jumpUrl" /> |
| | | <result column="jump_type" property="jumpType" /> |
| | | <result column="category" property="category" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | |
| | | resultType="com.panzhihua.common.model.vos.community.ComSwPatrolRecordVO"> |
| | | SELECT id,person_name,patrol_type,patrol_time FROM com_sw_patrol_record WHERE community_id = #{communityId} LIMIT #{pageSize} |
| | | </select> |
| | | <select id="pageDynamic" resultType="com.panzhihua.common.model.vos.community.ComActDynVO"> |
| | | SELECT d.id, d.title, IFNULL(u.readNum,0) readNum, d.`status`, d.`content`, d.`cover`, d.`type`, d.`cover_mode`, |
| | | d.jump_url,d.jump_type, d.is_topping, d.publish_at, d.create_at, cadt.`name` as typeName, cadt.color as |
| | | typeColor, ca.name as communityName |
| | | FROM com_act_dyn d |
| | | LEFT JOIN ( select dyn_id,count(id) as readNum from |
| | | com_act_dyn_user GROUP BY dyn_id ) u ON d.id = u.dyn_id |
| | | LEFT JOIN com_act_dyn_type as cadt ON cadt.id = d.type |
| | | LEFT JOIN com_act ca ON d.community_id = ca.community_id |
| | | WHERE 1=1 |
| | | <if test='comActDynVO.category != null '> |
| | | <if test="comActDynVO.category != 3"> |
| | | <if test='comActDynVO.choice == 0 '> |
| | | and d.community_id = ${comActDynVO.communityId} |
| | | </if> |
| | | </if> |
| | | and d.category = #{comActDynVO.category} |
| | | </if> |
| | | <if test='comActDynVO.areaCode !=null '> |
| | | and ca.area_code = ${comActDynVO.areaCode} |
| | | </if> |
| | | <if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'> |
| | | AND d.title like |
| | | concat(#{comActDynVO.title},'%') |
| | | </if> |
| | | <if test='comActDynVO.isTopping != null '> |
| | | AND d.is_topping = #{comActDynVO.isTopping} |
| | | </if> |
| | | <if test='comActDynVO.status != null '> |
| | | AND d.`status` = #{comActDynVO.status} |
| | | </if> |
| | | <if test='comActDynVO.publishAtBegin != null '> |
| | | AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} AND #{comActDynVO.publishAtEnd} |
| | | </if> |
| | | group by d.id order by d.is_topping desc, d.create_at desc |
| | | </select> |
| | | <select id="pageDynamicByAdmin" resultType="com.panzhihua.common.model.vos.community.ComActDynVO"> |
| | | SELECT d.id, d.title, COUNT(u.id)readNum, d.`status`, d.`content`, d.`cover`, d.`type`, d.`cover_mode`, |
| | | d.is_topping, d.publish_at, d.create_at, cadt.`name` as typeName, ca.name as communityName |
| | | FROM com_act_dyn d |
| | | LEFT JOIN com_act_dyn_user u ON d.id = u.dyn_id |
| | | LEFT JOIN com_act_dyn_type as cadt ON cadt.id = d.type |
| | | LEFT JOIN com_act ca ON d.community_id = ca.community_id |
| | | WHERE 1=1 |
| | | <if test='comActDynVO.category != null '> |
| | | <if test="comActDynVO.category != 3"> |
| | | AND d.community_id = ${comActDynVO.communityId} |
| | | </if> |
| | | and d.category = #{comActDynVO.category} |
| | | </if> |
| | | <if test='comActDynVO.title != null and comActDynVO.title.trim() != ""'> |
| | | AND d.title like concat(#{comActDynVO.title},'%') |
| | | </if> |
| | | <if test='comActDynVO.isTopping != null '> |
| | | AND d.is_topping = #{comActDynVO.isTopping} |
| | | </if> |
| | | <if test='comActDynVO.status != null '> |
| | | AND d.`status` = #{comActDynVO.status} |
| | | </if> |
| | | <if test='comActDynVO.type != null '> |
| | | AND d.type = #{comActDynVO.type} |
| | | </if> |
| | | <if test='comActDynVO.publishAtBegin != null '> |
| | | AND d.publish_at BETWEEN #{comActDynVO.publishAtBegin} AND #{comActDynVO.publishAtEnd} |
| | | </if> |
| | | group by d.id order by d.is_topping desc, d.create_at desc |
| | | </select> |
| | | </mapper> |
| | |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="update_at" property="updateAt" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="category" property="category" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | |
| | | LEFT JOIN sys_user AS su ON su.user_id = cadt.create_by |
| | | LEFT JOIN sys_user AS su1 ON su1.user_id = cadt.update_by |
| | | where cadt.community_id = 0 and cadt.is_del = 2 |
| | | <if test="comActDynTypeDTO.category != null"> |
| | | <if test="comActDynTypeDTO.category == 3"> |
| | | AND 1=2 |
| | | </if> |
| | | AND cadt.category = #{comActDynTypeDTO.category} |
| | | </if> |
| | | <if test="comActDynTypeDTO.keyWord != null and comActDynTypeDTO.keyWord != """> |
| | | and (cadt.id = #{comActDynTypeDTO.keyWord} or cadt.`name` like concat (#{comActDynTypeDTO.keyWord},'%')) |
| | | </if> |
| | |
| | | LEFT JOIN sys_user AS su ON su.user_id = cadt.create_by |
| | | LEFT JOIN sys_user AS su1 ON su1.user_id = cadt.update_by |
| | | where cadt.is_del = 2 |
| | | <if test="comActDynTypeDTO.communityId != null"> |
| | | and cadt.community_id = ${comActDynTypeDTO.communityId} |
| | | <if test='comActDynTypeDTO.category != null '> |
| | | <if test="comActDynTypeDTO.category != 3"> |
| | | <if test="comActDynTypeDTO.communityId != null"> |
| | | and cadt.community_id = ${comActDynTypeDTO.communityId} |
| | | </if> |
| | | </if> |
| | | AND cadt.category = #{comActDynTypeDTO.category} |
| | | </if> |
| | | <if test="comActDynTypeDTO.keyWord != null and comActDynTypeDTO.keyWord != """> |
| | | and (cadt.id = #{comActDynTypeDTO.keyWord} or cadt.`name` like concat (#{comActDynTypeDTO.keyWord},'%')) |
| | |
| | | LEFT JOIN sys_user AS su ON su.user_id = cadt.create_by |
| | | LEFT JOIN sys_user AS su1 ON su1.user_id = cadt.update_by |
| | | where cadt.community_id = 0 and cadt.is_del = 2 |
| | | <if test="comActDynTypeDTO.category != null"> |
| | | AND cadt.category = #{comActDynTypeDTO.category} |
| | | </if> |
| | | <if test="comActDynTypeDTO.keyWord != null and comActDynTypeDTO.keyWord != """> |
| | | and (cadt.id = #{comActDynTypeDTO.keyWord} or cadt.`name` like concat (#{comActDynTypeDTO.keyWord},'%')) |
| | | </if> |
| | |
| | | LEFT JOIN sys_user AS su ON su.user_id = cadt.create_by |
| | | LEFT JOIN sys_user AS su1 ON su1.user_id = cadt.update_by |
| | | where cadt.is_del = 2 |
| | | <if test="comActDynTypeDTO.communityId != null"> |
| | | and cadt.community_id = ${comActDynTypeDTO.communityId} |
| | | <if test='comActDynTypeDTO.category != null '> |
| | | <if test="comActDynTypeDTO.category != 3"> |
| | | <if test="comActDynTypeDTO.communityId != null"> |
| | | and cadt.community_id = ${comActDynTypeDTO.communityId} |
| | | </if> |
| | | </if> |
| | | AND cadt.category = #{comActDynTypeDTO.category} |
| | | </if> |
| | | <if test="comActDynTypeDTO.keyWord != null and comActDynTypeDTO.keyWord != """> |
| | | and (cadt.id = #{comActDynTypeDTO.keyWord} or cadt.`name` like concat (#{comActDynTypeDTO.keyWord},'%')) |
| | |
| | | package com.panzhihua.service_user.service.impl; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Comparator; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | BeanUtils.copyProperties(sysMenuDO2,sysMenuVO2); |
| | | sysMenuVOList.add(sysMenuVO2); |
| | | }); |
| | | sysMenuVO1.setSysMenuVOList(sysMenuVOList); |
| | | sysMenuVO1.setSysMenuVOList(sysMenuVOList.stream().sorted(Comparator.comparing(SysMenuVO::getOrderNum)).collect(Collectors.toList())); |
| | | menuVOS.add(sysMenuVO1); |
| | | }); |
| | | sysMenuVO.setSysMenuVOList(menuVOS); |
| | | sysMenuVO.setSysMenuVOList(menuVOS.stream().sorted(Comparator.comparing(SysMenuVO::getOrderNum)).collect(Collectors.toList())); |
| | | sysMenuVOS.add(sysMenuVO); |
| | | }); |
| | | return R.ok(sysMenuVOS); |
| | | return R.ok(sysMenuVOS.stream().sorted(Comparator.comparing(SysMenuVO::getOrderNum)).collect(Collectors.toList())); |
| | | } |
| | | |
| | | /** |
| | |
| | | private final RouteLocator routeLocator; |
| | | |
| | | private String[] ids = |
| | | new String[] {"appletsbackstage", "applets", "communitybackstage", "shopbackstage", "gridbackstage", "gridapp"}; |
| | | new String[] {"huacheng-appletsbackstage", "huacheng-applets", "huacheng-communitybackstage", "huacheng-shopbackstage", "huacheng-gridbackstage", "huacheng-gridapp"}; |
| | | |
| | | public SwaggerConfig(RouteLocator routeLocator) { |
| | | this.routeLocator = routeLocator; |