New file |
| | |
| | | package com.panzhihua.common.model.vos.jinhui; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("金汇随手拍分类") |
| | | public class JinhuiSnapshotClassifyVO implements Serializable { |
| | | private static final long serialVersionUID = -70884515430727555L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "分类名称") |
| | | private String classifyName; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date creationTime; |
| | | |
| | | @ApiModelProperty(value = "更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateTime; |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.jinhui; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("金汇随手拍分类") |
| | | public class JinhuiSnapshotVO implements Serializable { |
| | | private static final long serialVersionUID = -70884515430727555L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "分类名称") |
| | | private String classifyName; |
| | | |
| | | @ApiModelProperty(value = "提交人员id") |
| | | private String userId; |
| | | |
| | | @ApiModelProperty(value = "网格员id") |
| | | private String reseauId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "内容") |
| | | private String content; |
| | | |
| | | |
| | | @ApiModelProperty(value = "图片或视频url") |
| | | private String imgUrl; |
| | | |
| | | @ApiModelProperty(value = "地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "纬度") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty(value = "经度") |
| | | private String lon; |
| | | |
| | | @ApiModelProperty(value = "地址备注") |
| | | private String addressRemark; |
| | | |
| | | @ApiModelProperty(value = "分类id") |
| | | private String classifyId; |
| | | |
| | | @ApiModelProperty(value = "是否上报(0 否 1是)") |
| | | private String isApply; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date creationTime; |
| | | |
| | | @ApiModelProperty(value = "更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateTime; |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_jinhui_community.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiSnapshotClassifyVO; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiSnapshotVO; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiSnapshot; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiSnapshotClassify; |
| | | import com.panzhihua.service_jinhui_community.service.JinhuiComActWorkGuideService; |
| | | import com.panzhihua.service_jinhui_community.service.JinhuiSnapshotClassifyService; |
| | | import com.panzhihua.service_jinhui_community.service.JinhuiSnapshotService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 金汇随手拍api |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/JinhuiSnapshot/") |
| | | public class JinhuiSnapshotApi extends BaseController { |
| | | |
| | | |
| | | @Resource |
| | | private JinhuiSnapshotClassifyService classifyService; |
| | | |
| | | @Resource |
| | | private JinhuiSnapshotService snapshotService; |
| | | |
| | | /************************************************************************************************************ |
| | | * |
| | | * |
| | | * 金汇随手拍分类 |
| | | * |
| | | * |
| | | * ********************************************************************************************************/ |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/getClassifyList") |
| | | public R getClassifyList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize) { |
| | | return classifyService.getList(pageNum, pageSize); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/getClassifyDetails") |
| | | public JinhuiSnapshotClassify getClassifyDetails(String id) |
| | | { |
| | | return classifyService.getDetails(id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 新增 |
| | | * |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/addClassifyData") |
| | | public R addClassifyData(@RequestBody JinhuiSnapshotClassifyVO item) |
| | | { |
| | | return classifyService.addData(item); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | @PostMapping("/editClassifyData") |
| | | public R editClassifyData(@RequestBody JinhuiSnapshotClassifyVO item) |
| | | { |
| | | return classifyService.editData(item); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/expurgateClassifyData") |
| | | public R expurgateClassifyData(@RequestParam("pageNum")String id) |
| | | { |
| | | return classifyService.expurgateData(id); |
| | | } |
| | | |
| | | |
| | | /********************************************************************************************************** |
| | | * |
| | | * 金汇随手拍 |
| | | * |
| | | *********************************************************************************************************/ |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | public R getShotList(int pageNum,int pageSize) |
| | | { |
| | | return snapshotService.getList(pageNum,pageSize); |
| | | } |
| | | |
| | | public JinhuiSnapshot getShotDetails(String id) |
| | | { |
| | | return snapshotService.getDetails(id); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | public R addShotData(JinhuiSnapshotVO item) |
| | | { |
| | | return snapshotService.addData(item); |
| | | } |
| | | |
| | | public R editShotData(JinhuiSnapshotVO item) |
| | | { |
| | | return snapshotService.editData(item); |
| | | } |
| | | |
| | | public R expurgateShotData(String id) |
| | | { |
| | | return snapshotService.expurgateData(id); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_jinhui_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiSnapshotClassifyVO; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiSnapshotClassify; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | @Mapper |
| | | public interface JinhuiSnapshotClassifyDao extends BaseMapper<JinhuiSnapshotClassify> |
| | | { |
| | | /** |
| | | * 列表 |
| | | * @param |
| | | * @return |
| | | */ |
| | | IPage<JinhuiSnapshotClassify> getList(Page page); |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | JinhuiSnapshotClassify getDetails(@Param("id") String id); |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | int addData(@Param("item") JinhuiSnapshotClassifyVO item); |
| | | |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | int editData(@Param("item") JinhuiSnapshotClassifyVO item); |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | int expurgateData(@Param("id") String id); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_jinhui_community.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiSnapshotVO; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiSnapshot; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | @Mapper |
| | | public interface JinhuiSnapshotDao extends BaseMapper<JinhuiSnapshot> |
| | | { |
| | | /** |
| | | * 列表 |
| | | * @param |
| | | * @return |
| | | */ |
| | | IPage<JinhuiSnapshot> getList(Page page); |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | JinhuiSnapshot getDetails(@Param("id") String id); |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | int addData(@Param("item") JinhuiSnapshotVO item); |
| | | |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | int editData(@Param("item") JinhuiSnapshotVO item); |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | int expurgateData(@Param("id") String id); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_jinhui_community.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("金汇随手拍分类") |
| | | public class JinhuiSnapshot implements Serializable { |
| | | private static final long serialVersionUID = -70884515430727555L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "分类名称") |
| | | private String classifyName; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "提交人员id") |
| | | private String userId; |
| | | |
| | | @ApiModelProperty(value = "网格员id") |
| | | private String reseauId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "内容") |
| | | private String content; |
| | | |
| | | |
| | | @ApiModelProperty(value = "图片或视频url") |
| | | private String imgUrl; |
| | | |
| | | @ApiModelProperty(value = "地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "纬度") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty(value = "经度") |
| | | private String lon; |
| | | |
| | | @ApiModelProperty(value = "地址备注") |
| | | private String addressRemark; |
| | | |
| | | @ApiModelProperty(value = "分类id") |
| | | private String classifyId; |
| | | |
| | | @ApiModelProperty(value = "是否上报(0 否 1是)") |
| | | private String isApply; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date creationTime; |
| | | |
| | | @ApiModelProperty(value = "更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateTime; |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_jinhui_community.entity; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @Builder |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @ApiModel("金汇随手拍分类") |
| | | public class JinhuiSnapshotClassify implements Serializable { |
| | | private static final long serialVersionUID = -70884515430727555L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "分类名称") |
| | | private String classifyName; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date creationTime; |
| | | |
| | | @ApiModelProperty(value = "更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateTime; |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_jinhui_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiSnapshotClassifyVO; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiSnapshotClassify; |
| | | |
| | | public interface JinhuiSnapshotClassifyService extends IService<JinhuiSnapshotClassify> |
| | | { |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | R getList(int pageNum,int pageSize); |
| | | |
| | | JinhuiSnapshotClassify getDetails(String id); |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | R addData(JinhuiSnapshotClassifyVO item); |
| | | |
| | | R editData(JinhuiSnapshotClassifyVO item); |
| | | |
| | | R expurgateData(String id); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_jinhui_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiSnapshotVO; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiSnapshot; |
| | | |
| | | public interface JinhuiSnapshotService extends IService<JinhuiSnapshot> |
| | | { |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | R getList(int pageNum,int pageSize); |
| | | |
| | | JinhuiSnapshot getDetails(String id); |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | R addData(JinhuiSnapshotVO item); |
| | | |
| | | R editData(JinhuiSnapshotVO item); |
| | | |
| | | R expurgateData(String id); |
| | | } |
| | |
| | | |
| | | // 统计该调查问卷填报题目数量 |
| | | int count = 0; |
| | | List<QuestnaiteSubVO> questnaiteSubVOS = JSON.parseArray(workGuideDTO.getJsonObject(), QuestnaiteSubVO.class); |
| | | if (!questnaiteSubVOS.isEmpty()) { |
| | | List<QuestnaiteSubVO> questnaiteSubVOS =null; |
| | | if(!StringUtils.isEmpty(workGuideDTO.getJsonObject())) |
| | | { |
| | | questnaiteSubVOS= JSON.parseArray(workGuideDTO.getJsonObject(), QuestnaiteSubVO.class); |
| | | if (questnaiteSubVOS!=null) { |
| | | count = questnaiteSubVOS.size(); |
| | | } |
| | | } |
| | | |
| | | comActWorkGuideDO.setCount(count); |
| | | |
| | | // 保存办事指南材料 |
| | |
| | | } |
| | | |
| | | |
| | | if (!questnaiteSubVOS.isEmpty()) { |
| | | if (questnaiteSubVOS!=null) { |
| | | questnaiteSubVOS.forEach(sub -> { |
| | | JinhuiComActQuestnaireSub comActQuestnaireSubDO = new JinhuiComActQuestnaireSub(); |
| | | comActQuestnaireSubDO.setType(sub.getType()+""); |
New file |
| | |
| | | package com.panzhihua.service_jinhui_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiSnapshotClassifyVO; |
| | | import com.panzhihua.service_jinhui_community.dao.JinhuiSnapshotClassifyDao; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiSnapshotClassify; |
| | | import com.panzhihua.service_jinhui_community.service.JinhuiSnapshotClassifyService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class JinhuiSnapshotClassifyServiceImpl extends ServiceImpl<JinhuiSnapshotClassifyDao, |
| | | JinhuiSnapshotClassify> implements JinhuiSnapshotClassifyService |
| | | { |
| | | |
| | | @Override |
| | | public R getList(int pageNum,int pageSize) |
| | | { |
| | | Page page = new Page<JinhuiSnapshotClassify>(pageNum,pageSize); |
| | | return R.ok(baseMapper.getList(page)); |
| | | } |
| | | |
| | | @Override |
| | | public JinhuiSnapshotClassify getDetails(String id) { |
| | | return baseMapper.getDetails(id); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public R addData(JinhuiSnapshotClassifyVO item) |
| | | { |
| | | int num= baseMapper.addData(item); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R editData(JinhuiSnapshotClassifyVO item) { |
| | | int num= baseMapper.editData(item); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R expurgateData(String id) { |
| | | int num= baseMapper.expurgateData(id); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_jinhui_community.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiSnapshotVO; |
| | | import com.panzhihua.service_jinhui_community.dao.JinhuiSnapshotDao; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiSnapshot; |
| | | import com.panzhihua.service_jinhui_community.service.JinhuiSnapshotService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class JinhuiSnapshotServiceImpl extends ServiceImpl<JinhuiSnapshotDao, |
| | | JinhuiSnapshot> implements JinhuiSnapshotService |
| | | { |
| | | |
| | | @Override |
| | | public R getList(int pageNum,int pageSize) |
| | | { |
| | | Page page = new Page<JinhuiSnapshot>(pageNum,pageSize); |
| | | return R.ok(baseMapper.getList(page)); |
| | | } |
| | | |
| | | @Override |
| | | public JinhuiSnapshot getDetails(String id) { |
| | | return baseMapper.getDetails(id); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public R addData(JinhuiSnapshotVO item) |
| | | { |
| | | int num= baseMapper.addData(item); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R editData(JinhuiSnapshotVO item) { |
| | | int num= baseMapper.editData(item); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R expurgateData(String id) { |
| | | int num= baseMapper.expurgateData(id); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | } |
New file |
| | |
| | | <?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="com.panzhihua.service_jinhui_community.dao.JinhuiSnapshotClassifyDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_jinhui_community.entity.JinhuiSnapshotClassify" id="itemMap"> |
| | | <result property="id" column="id" /> |
| | | <result property="classifyName" column="classify_name" /> |
| | | <result property="creationTime" column="creation_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 分页查询 --> |
| | | <select id="getList" resultMap="itemMap"> |
| | | select |
| | | id, |
| | | classify_name, |
| | | creation_time, |
| | | update_time |
| | | from jinhui_snapshot_classify |
| | | order by creation_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="getDetails" resultMap="itemMap"> |
| | | select |
| | | id, |
| | | classify_name, |
| | | creation_time, |
| | | update_time |
| | | from jinhui_snapshot_classify |
| | | where |
| | | id=#{id} |
| | | </select> |
| | | |
| | | <insert id="addData"> |
| | | insert into jinhui_snapshot_classify |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null and item.id != '' "> |
| | | id, |
| | | </if> |
| | | <if test="item.classifyName != null and item.classifyName != '' "> |
| | | classify_name, |
| | | </if> |
| | | creation_time |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null and item.id != '' "> |
| | | #{item.id}, |
| | | </if> |
| | | <if test="item.classifyName != null and item.classifyName != '' "> |
| | | #{item.classifyName}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="editData"> |
| | | update jinhui_snapshot_classify |
| | | <set> |
| | | <if test="jinhui_snapshot_classify.id != null and item.id != '' "> |
| | | id=#{item.id}, |
| | | </if> |
| | | <if test="item.classifyName != null and item.classifyName != '' "> |
| | | classify_name=#{item.classifyName}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{item.id} |
| | | </update> |
| | | |
| | | <delete id="expurgateData" parameterType="String"> |
| | | delete from jinhui_snapshot_classify where id=#{id} |
| | | </delete> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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="com.panzhihua.service_jinhui_community.dao.JinhuiSnapshotDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_jinhui_community.entity.JinhuiSnapshot" id="itemMap"> |
| | | <result property="id" column="id" /> |
| | | <result property="userId" column="user_id" /> |
| | | <result property="reseauId" column="reseau_id" /> |
| | | <result property="content" column="content" /> |
| | | <result property="imgUrl" column="img_url" /> |
| | | <result property="address" column="address" /> |
| | | <result property="lat" column="lat" /> |
| | | <result property="lon" column="lon" /> |
| | | <result property="addressRemark" column="address_remark" /> |
| | | <result property="classifyId" column="classify_id" /> |
| | | <result property="isApply" column="is_apply" /> |
| | | <result property="creationTime" column="creation_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | <!-- 分页查询 --> |
| | | <select id="getList" resultMap="itemMap"> |
| | | select |
| | | id, |
| | | user_id, |
| | | reseau_id, |
| | | content, |
| | | img_url, |
| | | address, |
| | | lat, |
| | | lon, |
| | | address_remark, |
| | | classify_id, |
| | | (select classify_name from jinhui_snapshot_classify where jinhui_snapshot_classify.id=jinhui_snapshot.classify_id) as classifyName, |
| | | creation_time, |
| | | update_time, |
| | | is_apply |
| | | from jinhui_snapshot |
| | | order by creation_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="getDetails" resultMap="itemMap"> |
| | | select |
| | | id, |
| | | user_id, |
| | | reseau_id, |
| | | content, |
| | | img_url, |
| | | address, |
| | | lat, |
| | | lon, |
| | | address_remark, |
| | | classify_id, |
| | | (select classify_name from jinhui_snapshot_classify where jinhui_snapshot_classify.id=jinhui_snapshot.classify_id) as classifyName, |
| | | creation_time, |
| | | update_time, |
| | | is_apply |
| | | from jinhui_snapshot |
| | | where |
| | | id=#{id} |
| | | </select> |
| | | |
| | | <insert id="addData"> |
| | | insert into jinhui_snapshot |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null and item.id != '' "> |
| | | id, |
| | | </if> |
| | | <if test="item.userId != null and item.userId != '' "> |
| | | user_id, |
| | | </if> |
| | | <if test="item.reseauId != null and item.reseauId != '' "> |
| | | reseau_id, |
| | | </if> |
| | | <if test="item.content != null and item.content != '' "> |
| | | content, |
| | | </if> |
| | | <if test="item.imgUrl != null and item.imgUrl != '' "> |
| | | img_url, |
| | | </if> |
| | | <if test="item.address != null and item.address != '' "> |
| | | address, |
| | | </if> |
| | | <if test="item.lat != null and item.lat != '' "> |
| | | lat, |
| | | </if> |
| | | <if test="item.lon != null and item.lon != '' "> |
| | | lon, |
| | | </if> |
| | | <if test="item.addressRemark != null and item.addressRemark != '' "> |
| | | address_remark, |
| | | </if> |
| | | <if test="item.classifyId != null and item.classifyId != '' "> |
| | | classify_id, |
| | | </if> |
| | | <if test="item.isApply != null and item.isApply != '' "> |
| | | is_apply, |
| | | </if> |
| | | creation_time |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null and item.id != '' "> |
| | | #{item.id}, |
| | | </if> |
| | | <if test="item.userId != null and item.userId != '' "> |
| | | #{item.userId}, |
| | | </if> |
| | | <if test="item.reseauId != null and item.reseauId != '' "> |
| | | #{item.reseauId}, |
| | | </if> |
| | | <if test="item.content != null and item.content != '' "> |
| | | #{item.content}, |
| | | </if> |
| | | <if test="item.imgUrl != null and item.imgUrl != '' "> |
| | | #{item.imgUrl}, |
| | | </if> |
| | | <if test="item.address != null and item.address != '' "> |
| | | #{item.address}, |
| | | </if> |
| | | <if test="item.lat != null and item.lat != '' "> |
| | | #{item.lat}, |
| | | </if> |
| | | <if test="item.lon != null and item.lon != '' "> |
| | | #{item.lon}, |
| | | </if> |
| | | <if test="item.addressRemark != null and item.addressRemark != '' "> |
| | | #{item.addressRemark}, |
| | | </if> |
| | | <if test="item.classifyId != null and item.classifyId != '' "> |
| | | #{item.classifyId}, |
| | | </if> |
| | | <if test="item.isApply != null and item.isApply != '' "> |
| | | #{item.isApply}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="editData"> |
| | | update jinhui_snapshot |
| | | <set> |
| | | <if test="jinhui_snapshot_classify.id != null and item.id != '' "> |
| | | id=#{item.id}, |
| | | </if> |
| | | <if test="item.userId != null and item.userId != '' "> |
| | | user_id=#{item.userId}, |
| | | </if> |
| | | <if test="item.reseauId != null and item.reseauId != '' "> |
| | | reseau_id=#{item.reseauId}, |
| | | </if> |
| | | <if test="item.content != null and item.content != '' "> |
| | | content=#{item.content}, |
| | | </if> |
| | | <if test="item.imgUrl != null and item.imgUrl != '' "> |
| | | img_url=#{item.imgUrl}, |
| | | </if> |
| | | <if test="item.address != null and item.address != '' "> |
| | | address=#{item.address}, |
| | | </if> |
| | | <if test="item.lat != null and item.lat != '' "> |
| | | lat=#{item.lat}, |
| | | </if> |
| | | <if test="item.lon != null and item.lon != '' "> |
| | | lon=#{item.lon}, |
| | | </if> |
| | | <if test="item.addressRemark != null and item.addressRemark != '' "> |
| | | address_remark=#{item.addressRemark}, |
| | | </if> |
| | | <if test="item.classifyId != null and item.classifyId != '' "> |
| | | classify_id=#{item.classifyId}, |
| | | </if> |
| | | <if test="item.isApply != null and item.isApply != '' "> |
| | | is_apply=#{item.isApply}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{item.id} |
| | | </update> |
| | | |
| | | <delete id="expurgateData" parameterType="String"> |
| | | delete from jinhui_snapshot where id=#{id} |
| | | </delete> |
| | | |
| | | </mapper> |