| | |
| | | import com.panzhihua.common.model.vos.jinhui.JinghuiMerchantEvaluateVO; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiCoinGeneralTableVO; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiGoldCoinRecordVO; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiInterspaceVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserNoticeVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.jinhui.JinhuiCommunityService; |
| | |
| | | return jinhuiCommunityService.pageWorkGuide(pageActWorkGuideDTO); |
| | | } |
| | | |
| | | |
| | | /************************************************************************************************ |
| | | * |
| | | * |
| | | * 金汇预约空间模块 |
| | | * |
| | | * |
| | | **********************************************************************************************/ |
| | | /** |
| | | * 金汇空间预约模块分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "金汇空间预约模块分页查询", response = JinhuiInterspaceVO.class) |
| | | @GetMapping("/interspaceGetList") |
| | | public R interspaceGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "intendantType",required = false) String intendantType) |
| | | { |
| | | return jinhuiCommunityService.interspaceGetList(pageNum,pageSize,intendantType); |
| | | } |
| | | |
| | | /** |
| | | * 金汇空间预约模块单个详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "金汇空间详情", response = JinhuiInterspaceVO.class) |
| | | @GetMapping("/interspaceGetDetails") |
| | | public R interspaceGetDetails(@RequestParam("id") String id) |
| | | { |
| | | return jinhuiCommunityService.interspaceGetDetails(id); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
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 JinhuiInterspaceVO implements Serializable { |
| | | private static final long serialVersionUID = -70884515430727555L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "空间名称") |
| | | private String title; |
| | | |
| | | @ApiModelProperty(value = "管理员") |
| | | private String intendant; |
| | | |
| | | @ApiModelProperty(value = "管理员电话") |
| | | private String intendantPhone; |
| | | |
| | | @ApiModelProperty(value = "空间分类") |
| | | private String intendantType; |
| | | |
| | | @ApiModelProperty(value = "空间介绍") |
| | | private String content; |
| | | |
| | | @ApiModelProperty(value = "空间地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "经度") |
| | | private String lon; |
| | | |
| | | @ApiModelProperty(value = "纬度") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty(value = "空间图片") |
| | | private String imgUrl; |
| | | |
| | | |
| | | @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; |
| | | |
| | | @ApiModelProperty(value = "费用") |
| | | private String price; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.jinhui.JinghuiMerchantEvaluateVO; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiCoinGeneralTableVO; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiGoldCoinRecordVO; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiInterspaceVO; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | public R merchantEvaluateExpurgateData(@RequestParam("id") String id); |
| | | |
| | | |
| | | /********************************************************************************************************* |
| | | * |
| | | * |
| | | * 金汇预约空间 |
| | | * |
| | | * |
| | | *********************************************************************************************************/ |
| | | /** |
| | | * 金汇空间预约模块分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/JinhuiInterspace/interspaceGetList") |
| | | public R interspaceGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "intendantType",required = false) String intendantType); |
| | | |
| | | /** |
| | | * 金汇空间预约模块单个详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/JinhuiInterspace/interspaceGetList") |
| | | public R interspaceGetDetails(@RequestParam("id") String id); |
| | | |
| | | /** |
| | | * 金汇空间预约模块新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/JinhuiInterspace/interspaceAddData") |
| | | public R interspaceAddData(@RequestBody JinhuiInterspaceVO item); |
| | | |
| | | |
| | | /** |
| | | * 金汇空间预约模块编辑 |
| | | * @return |
| | | */ |
| | | @PostMapping("/JinhuiInterspace/interspaceEditData") |
| | | public R interspaceEditData(@RequestBody JinhuiInterspaceVO item); |
| | | |
| | | |
| | | /** |
| | | * 金汇空间预约模块删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/JinhuiInterspace/interspaceExpurgateData") |
| | | public R interspaceExpurgateData(@RequestParam("id") String id); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideClassifyVO; |
| | | import com.panzhihua.common.model.vos.community.ComActWorkGuideVO; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiInterspaceVO; |
| | | import com.panzhihua.common.service.jinhui.JinhuiCommunityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | { |
| | | return jinhuiCommunityService.listWorkGuideByClassifyId(classifyId); |
| | | } |
| | | |
| | | |
| | | /********************************************************************************************* |
| | | * |
| | | * |
| | | * 金汇预约空间 |
| | | * |
| | | * |
| | | **********************************************************************************************/ |
| | | /** |
| | | * 金汇空间预约模块分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "金汇空间预约模块分页查询", response = JinhuiInterspaceVO.class) |
| | | @GetMapping("/interspaceGetList") |
| | | public R interspaceGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "intendantType",required = false) String intendantType) |
| | | { |
| | | return jinhuiCommunityService.interspaceGetList(pageNum,pageSize,intendantType); |
| | | } |
| | | |
| | | /** |
| | | * 金汇空间预约模块单个详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "金汇空间详情", response = JinhuiInterspaceVO.class) |
| | | @GetMapping("/interspaceGetDetails") |
| | | public R interspaceGetDetails(@RequestParam("id") String id) |
| | | { |
| | | return jinhuiCommunityService.interspaceGetDetails(id); |
| | | } |
| | | |
| | | /** |
| | | * 金汇空间预约模块新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "金汇空间新增") |
| | | @PostMapping("/interspaceAddData") |
| | | public R interspaceAddData(@RequestBody JinhuiInterspaceVO item) |
| | | { |
| | | return jinhuiCommunityService.interspaceAddData(item); |
| | | } |
| | | |
| | | /** |
| | | * 金汇空间预约模块编辑 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "金汇空间编辑") |
| | | @PostMapping("/interspaceEditData") |
| | | public R interspaceEditData(@RequestBody JinhuiInterspaceVO item) |
| | | { |
| | | return jinhuiCommunityService.interspaceEditData(item); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 金汇空间预约模块删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "金汇空间删除") |
| | | @GetMapping("/interspaceExpurgateData") |
| | | public R interspaceExpurgateData(@RequestParam("id") String id) |
| | | { |
| | | return jinhuiCommunityService.interspaceExpurgateData(id); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_jinhui_community.api; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiInterspaceVO; |
| | | import com.panzhihua.service_jinhui_community.service.JinhuiInterspaceService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 金汇空间预约模块 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/JinhuiInterspace/") |
| | | public class JinhuiInterspaceApi |
| | | { |
| | | |
| | | @Resource |
| | | private JinhuiInterspaceService jinhuiInterspaceService; |
| | | |
| | | /** |
| | | * 金汇空间预约模块分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/interspaceGetList") |
| | | public R interspaceGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "intendantType",required = false) String intendantType) |
| | | { |
| | | return jinhuiInterspaceService.getList(pageNum,pageSize,intendantType); |
| | | } |
| | | |
| | | /** |
| | | * 金汇空间预约模块单个详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/interspaceGetDetails") |
| | | public R interspaceGetDetails(@RequestParam("id") String id) |
| | | { |
| | | return R.ok(jinhuiInterspaceService.getDetails(id)); |
| | | } |
| | | |
| | | /** |
| | | * 金汇空间预约模块新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/interspaceAddData") |
| | | public R interspaceAddData(@RequestBody JinhuiInterspaceVO item) |
| | | { |
| | | return jinhuiInterspaceService.addData(item); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 金汇空间预约模块编辑 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/interspaceEditData") |
| | | public R interspaceEditData(@RequestBody JinhuiInterspaceVO item) |
| | | { |
| | | return jinhuiInterspaceService.editData(item); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 金汇空间预约模块删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/interspaceExpurgateData") |
| | | public R interspaceExpurgateData(@RequestParam("id") String id) |
| | | { |
| | | return jinhuiInterspaceService.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.JinhuiGoldCoinRecordVO; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiInterspaceVO; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiGoldCoinRecord; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiInterspace; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | @Mapper |
| | | public interface JinhuiInterspaceDao extends BaseMapper<JinhuiInterspace> |
| | | { |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | IPage<JinhuiInterspace> getList(Page page,@Param("intendantType") String intendantType); |
| | | |
| | | |
| | | |
| | | JinhuiInterspace getDetails(@Param("id") String id); |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | int addData(@Param("item") JinhuiInterspaceVO item); |
| | | |
| | | |
| | | int editData(@Param("item") JinhuiInterspaceVO item); |
| | | |
| | | |
| | | 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.JinhuiInterspaceVO; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiInterspace; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiInterspaceType; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | @Mapper |
| | | public interface JinhuiInterspaceTypeDao extends BaseMapper<JinhuiInterspaceType> |
| | | { |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | IPage<JinhuiInterspaceType> getList(Page page, @Param("intendantType") String intendantType); |
| | | |
| | | |
| | | |
| | | JinhuiInterspaceType getDetails(@Param("id") String id); |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | int addData(@Param("item") JinhuiInterspaceVO item); |
| | | |
| | | |
| | | int editData(@Param("item") JinhuiInterspaceVO item); |
| | | |
| | | |
| | | int expurgateData(@Param("id") String id); |
| | | |
| | | |
| | | } |
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 JinhuiInterspace implements Serializable { |
| | | private static final long serialVersionUID = -70884515430727555L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "空间名称") |
| | | private String title; |
| | | |
| | | @ApiModelProperty(value = "管理员") |
| | | private String intendant; |
| | | |
| | | @ApiModelProperty(value = "管理员电话") |
| | | private String intendantPhone; |
| | | |
| | | @ApiModelProperty(value = "空间分类") |
| | | private String intendantType; |
| | | |
| | | @ApiModelProperty(value = "空间介绍") |
| | | private String content; |
| | | |
| | | @ApiModelProperty(value = "空间地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "经度") |
| | | private String lon; |
| | | |
| | | @ApiModelProperty(value = "纬度") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty(value = "空间图片") |
| | | private String imgUrl; |
| | | |
| | | |
| | | @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; |
| | | |
| | | @ApiModelProperty(value = "费用") |
| | | private String price; |
| | | |
| | | |
| | | |
| | | } |
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 JinhuiInterspaceType implements Serializable { |
| | | private static final long serialVersionUID = -70884515430727555L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "空间名称") |
| | | private String title; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "空间分类") |
| | | private String intendantName; |
| | | |
| | | |
| | | @ApiModelProperty(value = "创建人id") |
| | | private String userId; |
| | | |
| | | |
| | | @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.JinhuiInterspaceVO; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiInterspace; |
| | | |
| | | public interface JinhuiInterspaceService extends IService<JinhuiInterspace> |
| | | { |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | R getList(int pageNum,int pageSize,String intendantType); |
| | | |
| | | JinhuiInterspace getDetails(String id); |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | R addData(JinhuiInterspaceVO item); |
| | | |
| | | R editData(JinhuiInterspaceVO item); |
| | | |
| | | R expurgateData(String id); |
| | | } |
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.JinhuiInterspaceVO; |
| | | import com.panzhihua.service_jinhui_community.dao.JinhuiInterspaceDao; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiInterspace; |
| | | import com.panzhihua.service_jinhui_community.service.JinhuiInterspaceService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class JinhuiInterspaceServiceImpl extends ServiceImpl<JinhuiInterspaceDao, |
| | | JinhuiInterspace> implements JinhuiInterspaceService |
| | | { |
| | | |
| | | @Override |
| | | public R getList(int pageNum,int pageSize,String intendantType) |
| | | { |
| | | Page page = new Page<JinhuiInterspace>(pageNum,pageSize); |
| | | return R.ok(baseMapper.getList(page,intendantType)); |
| | | } |
| | | |
| | | @Override |
| | | public JinhuiInterspace getDetails(String id) { |
| | | return baseMapper.getDetails(id); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public R addData(JinhuiInterspaceVO item) |
| | | { |
| | | int num= baseMapper.addData(item); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R editData(JinhuiInterspaceVO 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("添加失败"); |
| | | } |
| | | } |
| | |
| | | where classify = #{classifyId} |
| | | order by create_at desc |
| | | <if test="pageSize != null"> |
| | | limit #{pageSize} |
| | | limit ${pageSize} |
| | | </if> |
| | | </select> |
| | | |
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.JinhuiInterspaceDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_jinhui_community.entity.JinhuiInterspace" id="itemMap"> |
| | | <result property="id" column="id" /> |
| | | <result property="title" column="title" /> |
| | | <result property="intendant" column="intendant" /> |
| | | <result property="intendantPhone" column="intendant_phone" /> |
| | | <result property="intendantType" column="intendant_type" /> |
| | | <result property="content" column="content" /> |
| | | <result property="address" column="address" /> |
| | | <result property="lon" column="lon" /> |
| | | <result property="lat" column="lat" /> |
| | | <result property="imgUrl" column="img_url" /> |
| | | <result property="creationTime" column="creation_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="price" column="price" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <!-- 分页查询 --> |
| | | <select id="getList" resultMap="itemMap"> |
| | | select |
| | | id, |
| | | title, |
| | | intendant, |
| | | intendant_phone, |
| | | intendant_type, |
| | | content, |
| | | address, |
| | | lon, |
| | | lat, |
| | | img_url, |
| | | created_time, |
| | | updata_time, |
| | | price |
| | | from jinhui_interspace |
| | | <where> |
| | | <if test="intendantType !=null and intendantType !='' "> |
| | | intendant_type=#{intendantType} |
| | | </if> |
| | | </where> |
| | | order by creation_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="getDetails" resultMap="itemMap"> |
| | | select |
| | | id, |
| | | title, |
| | | intendant, |
| | | intendant_phone, |
| | | intendant_type, |
| | | content, |
| | | address, |
| | | lon, |
| | | lat, |
| | | img_url, |
| | | created_time, |
| | | updata_time, |
| | | price |
| | | from jinhui_interspace |
| | | where |
| | | id=#{id} |
| | | </select> |
| | | |
| | | <insert id="addData"> |
| | | insert into jinhui_interspace |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null and item.id != '' "> |
| | | id, |
| | | </if> |
| | | <if test="item.title != null and item.title != '' "> |
| | | title, |
| | | </if> |
| | | <if test="item.intendant != null and item.intendant != '' "> |
| | | intendant, |
| | | </if> |
| | | <if test="item.intendantPhone != null and item.intendantPhone != '' "> |
| | | intendant_phone, |
| | | </if> |
| | | <if test="item.intendantType != null and item.intendantType != '' "> |
| | | intendant_type, |
| | | </if> |
| | | <if test="item.content != null and item.content != '' "> |
| | | content, |
| | | </if> |
| | | <if test="item.address != null and item.address != '' "> |
| | | address, |
| | | </if> |
| | | <if test="item.lon != null and item.lon != '' "> |
| | | lon, |
| | | </if> |
| | | <if test="item.lat != null and item.lat != '' "> |
| | | lat, |
| | | </if> |
| | | <if test="item.imgUrl != null and item.imgUrl != '' "> |
| | | img_url, |
| | | </if> |
| | | <if test="item.price != null and item.price != '' "> |
| | | price, |
| | | </if> |
| | | creation_time |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null and item.id != '' "> |
| | | #{item.id}, |
| | | </if> |
| | | <if test="item.title != null and item.title != '' "> |
| | | #{item.title}, |
| | | </if> |
| | | <if test="item.intendant != null and item.intendant != '' "> |
| | | #{item.intendant}, |
| | | </if> |
| | | <if test="item.intendantPhone != null and item.intendantPhone != '' "> |
| | | #{item.intendantPhone}, |
| | | </if> |
| | | <if test="item.intendantType != null and item.intendantType != '' "> |
| | | #{item.intendantType}, |
| | | </if> |
| | | <if test="item.content != null and item.content != '' "> |
| | | #{item.content}, |
| | | </if> |
| | | <if test="item.address != null and item.address != '' "> |
| | | #{item.address}, |
| | | </if> |
| | | <if test="item.lon != null and item.lon != '' "> |
| | | #{item.lon}, |
| | | </if> |
| | | <if test="item.lat != null and item.lat != '' "> |
| | | #{item.lat}, |
| | | </if> |
| | | <if test="item.imgUrl != null and item.imgUrl != '' "> |
| | | #{item.imgUrl}, |
| | | </if> |
| | | <if test="item.price != null and item.price != '' "> |
| | | #{item.price}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="editData"> |
| | | update jinhui_interspace |
| | | <set> |
| | | <if test="item.id != null and item.id != '' "> |
| | | id=#{item.id}, |
| | | </if> |
| | | <if test="item.title != null and item.title != '' "> |
| | | title=#{item.title}, |
| | | </if> |
| | | <if test="item.intendant != null and item.intendant != '' "> |
| | | intendant=#{item.intendant}, |
| | | </if> |
| | | <if test="item.intendantPhone != null and item.intendantPhone != '' "> |
| | | intendant_phone=#{item.intendantPhone}, |
| | | </if> |
| | | <if test="item.intendantType != null and item.intendantType != '' "> |
| | | intendant_type=#{item.intendantType}, |
| | | </if> |
| | | <if test="item.content != null and item.content != '' "> |
| | | content=#{item.content}, |
| | | </if> |
| | | <if test="item.address != null and item.address != '' "> |
| | | address=#{item.address}, |
| | | </if> |
| | | <if test="item.lon != null and item.lon != '' "> |
| | | lon=#{item.lon}, |
| | | </if> |
| | | <if test="item.lat != null and item.lat != '' "> |
| | | lat=#{item.lat}, |
| | | </if> |
| | | <if test="item.imgUrl != null and item.imgUrl != '' "> |
| | | img_url=#{item.imgUrl}, |
| | | </if> |
| | | <if test="item.price != null and item.price != '' "> |
| | | price=#{item.price}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{item.id} |
| | | </update> |
| | | |
| | | <delete id="expurgateData" parameterType="String"> |
| | | delete from jinhui_interspace 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.JinhuiInterspaceTypeDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_jinhui_community.entity.JinhuiInterspaceType" id="itemMap"> |
| | | <result property="id" column="id" /> |
| | | <result property="intendantName" column="intendant_name" /> |
| | | <result property="userId" column="user_id" /> |
| | | <result property="creationTime" column="creation_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <!-- 分页查询 --> |
| | | <select id="getList" resultMap="itemMap"> |
| | | select |
| | | id, |
| | | intendant_name, |
| | | user_id, |
| | | created_time, |
| | | updata_time |
| | | from jinhui_intendant_type |
| | | order by creation_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="getDetails" resultMap="itemMap"> |
| | | select |
| | | id, |
| | | intendant_name, |
| | | user_id, |
| | | created_time, |
| | | updata_time |
| | | from jinhui_intendant_type |
| | | where |
| | | id=#{id} |
| | | </select> |
| | | |
| | | <insert id="addData"> |
| | | insert into jinhui_intendant_type |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null and item.id != '' "> |
| | | id, |
| | | </if> |
| | | <if test="item.intendantName != null and item.intendantName != '' "> |
| | | intendant_name, |
| | | </if> |
| | | <if test="item.userId != null and item.userId != '' "> |
| | | user_id, |
| | | </if> |
| | | creation_time |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null and item.id != '' "> |
| | | #{item.id}, |
| | | </if> |
| | | <if test="item.intendantName != null and item.intendantName != '' "> |
| | | #{item.intendantName}, |
| | | </if> |
| | | <if test="item.userId != null and item.userId != '' "> |
| | | #{item.userId}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="editData"> |
| | | update jinhui_intendant_type |
| | | <set> |
| | | <if test="item.id != null and item.id != '' "> |
| | | id=#{item.id}, |
| | | </if> |
| | | <if test="item.intendantName != null and item.intendantName != '' "> |
| | | intendant_name=#{item.intendantName}, |
| | | </if> |
| | | <if test="item.userId != null and item.userId != '' "> |
| | | user_id=#{item.userId}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{item.id} |
| | | </update> |
| | | |
| | | <delete id="expurgateData" parameterType="String"> |
| | | delete from jinhui_intendant_type where id=#{id} |
| | | </delete> |
| | | |
| | | </mapper> |