| | |
| | | @ApiOperation(value = "商家评论列添加") |
| | | @PostMapping("/merchantEvaluate/addData") |
| | | public R merchantEvaluateAddData(@RequestBody JinghuiMerchantEvaluateVO item) { |
| | | item.setUserId(getUserId()+""); |
| | | return jinhuiCommunityService.merchantEvaluateAddData(item); |
| | | } |
| | | |
| | |
| | | return jinhuiCommunityService.orderEditData(vo); |
| | | } |
| | | |
| | | |
| | | /****************************************************************************************************** |
| | | * |
| | | * 金汇文章 |
| | | * |
| | | *******************************************************************************************************/ |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "金汇文章列表", response = JinhuiArticleManagementVO.class) |
| | | @GetMapping("/articleGetList") |
| | | public R articleGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize) |
| | | { |
| | | return jinhuiCommunityService.articleGetList(pageNum,pageSize,"1"); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "金汇文章详情", response = JinhuiArticleManagementVO.class) |
| | | @GetMapping("/articleGetDetails") |
| | | public R articleGetDetails(@RequestParam("id") String id) |
| | | { |
| | | return jinhuiCommunityService.articleGetDetails(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 JinhuiArticleManagementVO implements Serializable { |
| | | private static final long serialVersionUID = -70884515430727555L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "标题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty(value = "封面") |
| | | private String coverUrl; |
| | | |
| | | @ApiModelProperty(value = "状态 0下架 1上架") |
| | | private String articleType; |
| | | |
| | | @ApiModelProperty(value = "详情内容") |
| | | private String content; |
| | | |
| | | @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.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 JinhuiExperienceActivityVO implements Serializable { |
| | | private static final long serialVersionUID = -70884515430727555L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "活动标题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty(value = "活动地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "纬度") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty(value = "经度") |
| | | private String lon; |
| | | |
| | | @ApiModelProperty(value = "报名开始时间") |
| | | private String applyStartTime; |
| | | |
| | | @ApiModelProperty(value = "报名结束时间") |
| | | private String applyEndTime; |
| | | |
| | | @ApiModelProperty(value = "活动开始时间") |
| | | private String activityStartTime; |
| | | |
| | | @ApiModelProperty(value = "活动结束时间") |
| | | private String activityEndTime; |
| | | |
| | | @ApiModelProperty(value = "参加人数 (不限传-1)") |
| | | private String peopleNumber; |
| | | |
| | | @ApiModelProperty(value = "负责人电话") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "奖励") |
| | | private String award; |
| | | |
| | | @ApiModelProperty(value = "活动状态") |
| | | private String activityType; |
| | | |
| | | @ApiModelProperty(value = "封面") |
| | | private String coverImgUrl; |
| | | |
| | | |
| | | @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; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | public R expurgateDataCategories(@RequestParam("id") String id); |
| | | |
| | | |
| | | /********************************************************************************************************* |
| | | * |
| | | * |
| | | * 金汇体验活动 |
| | | * |
| | | * |
| | | **********************************************************************************************************/ |
| | | |
| | | /** |
| | | * 单个详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/JinhuiExperience/experienceGetDetails") |
| | | public R experienceGetDetails(@RequestParam("id") String id); |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/JinhuiExperience/experienceAddData") |
| | | public R experienceAddData(@RequestBody JinhuiExperienceActivityVO item); |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | @PostMapping("/JinhuiExperience/experienceEditData") |
| | | public R experienceEditData(@RequestBody JinhuiExperienceActivityVO item); |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/JinhuiExperience/experienceExpurgateData") |
| | | public R experienceExpurgateData(@RequestParam("id") String id); |
| | | |
| | | |
| | | /****************************************************************************************************** |
| | | * |
| | | * 金汇文章 |
| | | * |
| | | *******************************************************************************************************/ |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/JinhuiArticle/articleGetDetails") |
| | | public R articleGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam("articleType") String articleType); |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/JinhuiArticle/articleGetDetails") |
| | | public R articleGetDetails(@RequestParam("id") String id); |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/JinhuiArticle/articleAddData") |
| | | public R articleAddData(@RequestBody JinhuiArticleManagementVO item); |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | @PostMapping("/JinhuiArticle/articleEditData") |
| | | public R articleEditData(@RequestBody JinhuiArticleManagementVO item); |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/JinhuiArticle/articleExpurgateData") |
| | | public R articleExpurgateData(@RequestParam("id") String id); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | return jinhuiCommunityService.expurgateDataCategories(id); |
| | | } |
| | | |
| | | /****************************************************************************************************** |
| | | * |
| | | * 金汇文章 |
| | | * |
| | | *******************************************************************************************************/ |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "金汇文章列表", response = JinhuiArticleManagementVO.class) |
| | | @GetMapping("/articleGetList") |
| | | public R articleGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize) |
| | | { |
| | | return jinhuiCommunityService.articleGetList(pageNum,pageSize,null); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "金汇文章详情", response = JinhuiArticleManagementVO.class) |
| | | @GetMapping("/articleGetDetails") |
| | | public R articleGetDetails(@RequestParam("id") String id) |
| | | { |
| | | return jinhuiCommunityService.articleGetDetails(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "金汇文章新增") |
| | | @PostMapping("/articleAddData") |
| | | public R articleAddData(@RequestBody JinhuiArticleManagementVO item) |
| | | { |
| | | item.setArticleType("1"); |
| | | return jinhuiCommunityService.articleAddData(item); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "金汇文章编辑") |
| | | @PostMapping("/articleEditData") |
| | | public R articleEditData(@RequestBody JinhuiArticleManagementVO item) |
| | | { |
| | | return jinhuiCommunityService.articleEditData(item); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "金汇文章上下架") |
| | | @GetMapping("/article/unmount") |
| | | public R articleUnmount(@RequestParam("id") String id, |
| | | @RequestParam("articleType") String articleType) |
| | | { |
| | | if(StringUtils.isEmpty(id)) |
| | | { |
| | | return R.fail("id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(articleType)) |
| | | { |
| | | return R.fail("上下架状态不能为空"); |
| | | } |
| | | |
| | | JinhuiArticleManagementVO item=new JinhuiArticleManagementVO(); |
| | | item.setId(id); |
| | | item.setArticleType(articleType); |
| | | return jinhuiCommunityService.articleEditData(item); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "金汇文章删除") |
| | | @GetMapping("/articleExpurgateData") |
| | | public R articleExpurgateData(@RequestParam("id") String id) |
| | | { |
| | | return jinhuiCommunityService.articleExpurgateData(id); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_jinhui_community.api; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiArticleManagementVO; |
| | | import com.panzhihua.service_jinhui_community.service.JinhuiArticleManagementService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | |
| | | /** |
| | | * 金汇文章 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/JinhuiArticle") |
| | | public class JinhuiArticleManagementApi |
| | | { |
| | | @Resource |
| | | private JinhuiArticleManagementService managementService; |
| | | |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/articleGetDetails") |
| | | public R articleGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam("articleType") String articleType) |
| | | { |
| | | return managementService.getList(pageNum,pageSize,articleType); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/articleGetDetails") |
| | | public R articleGetDetails(@RequestParam("id") String id) |
| | | { |
| | | return R.ok(managementService.getDetails(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/articleAddData") |
| | | public R articleAddData(@RequestBody JinhuiArticleManagementVO item) |
| | | { |
| | | return managementService.addData(item); |
| | | } |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | @PostMapping("/articleEditData") |
| | | public R articleEditData(@RequestBody JinhuiArticleManagementVO item) |
| | | { |
| | | return managementService.editData(item); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/articleExpurgateData") |
| | | public R articleExpurgateData(@RequestParam("id") String id) |
| | | { |
| | | return managementService.expurgateData(id); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_jinhui_community.api; |
| | | |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiExperienceActivityVO; |
| | | import com.panzhihua.service_jinhui_community.service.JinhuiExperienceActivityService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * 体验活动 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/JinhuiExperience") |
| | | public class JinhuiExperienceActivityApi |
| | | { |
| | | @Resource |
| | | private JinhuiExperienceActivityService activityService; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | // R getList(int pageNum, int pageSize, |
| | | // String goodName, String goodType, String id); |
| | | |
| | | |
| | | @GetMapping("/experienceGetDetails") |
| | | public R experienceGetDetails(@RequestParam("id") String id) |
| | | { |
| | | return R.ok(activityService.getDetails(id)); |
| | | } |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/experienceAddData") |
| | | public R experienceAddData(@RequestBody JinhuiExperienceActivityVO item) |
| | | { |
| | | return activityService.addData(item); |
| | | } |
| | | |
| | | @PostMapping("/experienceEditData") |
| | | public R experienceEditData(@RequestBody JinhuiExperienceActivityVO item) |
| | | { |
| | | return activityService.editData(item); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/experienceExpurgateData") |
| | | public R experienceExpurgateData(@RequestParam("id") String id) |
| | | { |
| | | return activityService.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.JinhuiArticleManagementVO; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiArticleManagement; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | @Mapper |
| | | public interface JinhuiArticleManagementDao extends BaseMapper<JinhuiArticleManagement> |
| | | { |
| | | /** |
| | | * 列表 |
| | | * @param |
| | | * @return |
| | | */ |
| | | IPage<JinhuiArticleManagement> getList(Page page,@Param("articleType") String articleType); |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | JinhuiArticleManagement getDetails(@Param("id") String id); |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | int addData(@Param("item") JinhuiArticleManagementVO item); |
| | | |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | int editData(@Param("item") JinhuiArticleManagementVO 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.JinhuiExperienceActivityVO; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiExperienceActivity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | @Mapper |
| | | public interface JinhuiExperienceActivityDao extends BaseMapper<JinhuiExperienceActivity> |
| | | { |
| | | /** |
| | | * 列表 |
| | | * @param |
| | | * @return |
| | | */ |
| | | IPage<JinhuiExperienceActivity> getList(Page page, |
| | | @Param("goodName") String goodName, |
| | | @Param("goodType") String goodType, |
| | | @Param("id") String id); |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | JinhuiExperienceActivity getDetails(@Param("id") String id); |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | int addData(@Param("item") JinhuiExperienceActivityVO item); |
| | | |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | int editData(@Param("item") JinhuiExperienceActivityVO item); |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | 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 JinhuiArticleManagement implements Serializable { |
| | | private static final long serialVersionUID = -70884515430727555L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "标题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty(value = "封面") |
| | | private String coverUrl; |
| | | |
| | | @ApiModelProperty(value = "状态 0下架 1上架") |
| | | private String articleType; |
| | | |
| | | @ApiModelProperty(value = "详情内容") |
| | | private String content; |
| | | |
| | | @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 JinhuiExperienceActivity implements Serializable { |
| | | private static final long serialVersionUID = -70884515430727555L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "活动标题") |
| | | private String title; |
| | | |
| | | @ApiModelProperty(value = "活动地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "纬度") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty(value = "经度") |
| | | private String lon; |
| | | |
| | | @ApiModelProperty(value = "报名开始时间") |
| | | private String applyStartTime; |
| | | |
| | | @ApiModelProperty(value = "报名结束时间") |
| | | private String applyEndTime; |
| | | |
| | | @ApiModelProperty(value = "活动开始时间") |
| | | private String activityStartTime; |
| | | |
| | | @ApiModelProperty(value = "活动结束时间") |
| | | private String activityEndTime; |
| | | |
| | | @ApiModelProperty(value = "参加人数 (不限传-1)") |
| | | private String peopleNumber; |
| | | |
| | | @ApiModelProperty(value = "负责人电话") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "奖励") |
| | | private String award; |
| | | |
| | | @ApiModelProperty(value = "活动状态") |
| | | private String activityType; |
| | | |
| | | @ApiModelProperty(value = "封面") |
| | | private String coverImgUrl; |
| | | |
| | | |
| | | @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.JinhuiArticleManagementVO; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiArticleManagement; |
| | | |
| | | public interface JinhuiArticleManagementService extends IService<JinhuiArticleManagement> |
| | | { |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | R getList(int pageNum,int pageSize,String articleType); |
| | | |
| | | JinhuiArticleManagement getDetails(String id); |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | R addData(JinhuiArticleManagementVO item); |
| | | |
| | | R editData(JinhuiArticleManagementVO 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.JinhuiExperienceActivityVO; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiShoppingVO; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiExperienceActivity; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiShopping; |
| | | |
| | | public interface JinhuiExperienceActivityService extends IService<JinhuiExperienceActivity> |
| | | { |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | R getList(int pageNum,int pageSize, |
| | | String goodName, String goodType, String id); |
| | | |
| | | JinhuiExperienceActivity getDetails(String id); |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | R addData(JinhuiExperienceActivityVO item); |
| | | |
| | | R editData(JinhuiExperienceActivityVO 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.JinhuiArticleManagementVO; |
| | | import com.panzhihua.service_jinhui_community.dao.JinhuiArticleManagementDao; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiArticleManagement; |
| | | import com.panzhihua.service_jinhui_community.service.JinhuiArticleManagementService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class JinhuiArticleManagementServiceImpl extends ServiceImpl<JinhuiArticleManagementDao, |
| | | JinhuiArticleManagement> implements JinhuiArticleManagementService |
| | | { |
| | | |
| | | @Override |
| | | public R getList(int pageNum,int pageSize,String articleType) |
| | | { |
| | | Page page = new Page<JinhuiArticleManagement>(pageNum,pageSize); |
| | | return R.ok(baseMapper.getList(page,articleType)); |
| | | } |
| | | |
| | | @Override |
| | | public JinhuiArticleManagement getDetails(String id) { |
| | | return baseMapper.getDetails(id); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public R addData(JinhuiArticleManagementVO item) |
| | | { |
| | | int num= baseMapper.addData(item); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R editData(JinhuiArticleManagementVO 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.JinhuiExperienceActivityVO; |
| | | import com.panzhihua.service_jinhui_community.dao.JinhuiExperienceActivityDao; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiExperienceActivity; |
| | | import com.panzhihua.service_jinhui_community.service.JinhuiExperienceActivityService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class JinhuiExperienceActivityServiceImpl extends ServiceImpl<JinhuiExperienceActivityDao, |
| | | JinhuiExperienceActivity> implements JinhuiExperienceActivityService |
| | | { |
| | | |
| | | @Override |
| | | public R getList(int pageNum,int pageSize,String goodName, String goodType, String id) |
| | | { |
| | | Page page = new Page<JinhuiExperienceActivity>(pageNum,pageSize); |
| | | return R.ok(baseMapper.getList(page,goodName,goodType,id)); |
| | | } |
| | | |
| | | @Override |
| | | public JinhuiExperienceActivity getDetails(String id) { |
| | | return baseMapper.getDetails(id); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public R addData(JinhuiExperienceActivityVO item) |
| | | { |
| | | int num= baseMapper.addData(item); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R editData(JinhuiExperienceActivityVO 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.JinhuiArticleManagementDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_jinhui_community.entity.JinhuiArticleManagement" id="itemMap"> |
| | | <result property="id" column="id" /> |
| | | <result property="content" column="content" /> |
| | | <result property="title" column="title" /> |
| | | <result property="coverUrl" column="cover_url" /> |
| | | <result property="articleType" column="article_type" /> |
| | | <result property="creationTime" column="creation_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | <!-- 分页查询 --> |
| | | <select id="getList" resultMap="itemMap"> |
| | | select |
| | | id, |
| | | title, |
| | | cover_url, |
| | | creation_time, |
| | | update_time, |
| | | content, |
| | | article_type |
| | | from jinhui_article_management |
| | | <where> |
| | | 1=1 |
| | | <if test="articleType !=null and articleType!='' "> |
| | | and article_type=#{articleType} |
| | | </if> |
| | | </where> |
| | | order by creation_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="getDetails" resultMap="itemMap"> |
| | | select |
| | | id, |
| | | title, |
| | | cover_url, |
| | | creation_time, |
| | | update_time, |
| | | content, |
| | | article_type |
| | | from jinhui_article_management |
| | | where |
| | | id=#{id} |
| | | </select> |
| | | |
| | | <insert id="addData"> |
| | | insert into jinhui_article_management |
| | | <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.coverUrl != null and item.coverUrl != '' "> |
| | | cover_url, |
| | | </if> |
| | | <if test="item.articleType != null and item.articleType != '' "> |
| | | article_type, |
| | | </if> |
| | | <if test="item.content != null and item.content != '' "> |
| | | content, |
| | | </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.coverUrl != null and item.coverUrl != '' "> |
| | | #{item.coverUrl}, |
| | | </if> |
| | | <if test="item.articleType != null and item.articleType != '' "> |
| | | #{item.articleType}, |
| | | </if> |
| | | <if test="item.content != null and item.content != '' "> |
| | | #{item.conten}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="editData"> |
| | | update jinhui_article_management |
| | | <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.coverUrl != null and item.coverUrl != '' "> |
| | | cover_url=#{item.coverUrl}, |
| | | </if> |
| | | <if test="item.articleType != null and item.articleType != '' "> |
| | | article_type=#{item.articleType}, |
| | | </if> |
| | | <if test="item.content != null and item.content != '' "> |
| | | content=#{item.conten}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{item.id} |
| | | </update> |
| | | |
| | | <delete id="expurgateData" parameterType="String"> |
| | | delete from jinhui_article_management 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.JinhuiExperienceActivityDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_jinhui_community.entity.JinhuiExperienceActivity" id="itemMap"> |
| | | <result property="id" column="id" /> |
| | | <result property="title" column="title" /> |
| | | <result property="address" column="address" /> |
| | | <result property="lat" column="lat" /> |
| | | <result property="lon" column="lon" /> |
| | | <result property="applyStartTime" column="apply_start_time" /> |
| | | <result property="applyEndTime" column="apply_end_time" /> |
| | | <result property="activityStartTime" column="activity_start_time" /> |
| | | <result property="activityEndTime" column="activity_end_time" /> |
| | | <result property="peopleNumber" column="people_number" /> |
| | | <result property="phone" column="phone" /> |
| | | <result property="award" column="award" /> |
| | | <result property="coverImgUrl" column="cover_img_url" /> |
| | | <result property="creationTime" column="creation_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="activityType" column="activity_type" /> |
| | | </resultMap> |
| | | |
| | | <!-- 分页查询 --> |
| | | <select id="getList" resultMap="itemMap"> |
| | | select |
| | | id, |
| | | title, |
| | | address, |
| | | lat, |
| | | lon, |
| | | apply_start_time, |
| | | apply_end_time, |
| | | activity_start_time, |
| | | activity_end_time, |
| | | people_number, |
| | | phone, |
| | | award, |
| | | cover_img_url, |
| | | creation_time, |
| | | update_time, |
| | | activity_type |
| | | from jinhui_experience_activity |
| | | <where> |
| | | 1=1 |
| | | <if test="goodName !=null and goodName !='' "> |
| | | and good_name LIKE CONCAT('%', #{goodName}, '%') |
| | | </if> |
| | | <if test="goodType !=null and goodType !='' "> |
| | | and good_type=#{goodType} |
| | | </if> |
| | | <if test="id !=null and id !='' "> |
| | | and id=#{id} |
| | | </if> |
| | | </where> |
| | | order by creation_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="getDetails" resultMap="itemMap"> |
| | | select |
| | | id, |
| | | title, |
| | | address, |
| | | lat, |
| | | lon, |
| | | apply_start_time, |
| | | apply_end_time, |
| | | activity_start_time, |
| | | activity_end_time, |
| | | people_number, |
| | | phone, |
| | | award, |
| | | cover_img_url, |
| | | creation_time, |
| | | update_time, |
| | | activity_type |
| | | from jinhui_experience_activity |
| | | where |
| | | id=#{id} |
| | | </select> |
| | | |
| | | <insert id="addData"> |
| | | insert into jinhui_experience_activity |
| | | <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.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.applyStartTime != null"> |
| | | apply_start_time, |
| | | </if> |
| | | <if test="item.applyEndTime != null "> |
| | | apply_end_time, |
| | | </if> |
| | | <if test="item.activityStartTime != null "> |
| | | activity_start_time, |
| | | </if> |
| | | <if test="item.activityEndTime != null "> |
| | | activity_end_time, |
| | | </if> |
| | | <if test="item.peopleNumber != null and item.peopleNumber != '' "> |
| | | people_number, |
| | | </if> |
| | | <if test="item.phone != null and item.phone != '' "> |
| | | phone, |
| | | </if> |
| | | <if test="item.award != null and item.award != '' "> |
| | | award, |
| | | </if> |
| | | <if test="item.coverImgUrl != null and item.coverImgUrl != '' "> |
| | | cover_img_url, |
| | | </if> |
| | | <if test="item.activityType != null and item.activityType != '' "> |
| | | activity_type, |
| | | </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.address != null and item.address != '' "> |
| | | #{item.address}, |
| | | </if> |
| | | <if test="item.lat != null and item.lat != '' "> |
| | | lat=#{item.lat}, |
| | | </if> |
| | | <if test="item.lon != null and item.lon != '' "> |
| | | #{item.lon}, |
| | | </if> |
| | | <if test="item.applyStartTime != null"> |
| | | #{item.applyStartTime}, |
| | | </if> |
| | | <if test="item.applyEndTime != null "> |
| | | #{item.applyEndTime}, |
| | | </if> |
| | | <if test="item.activityStartTime != null "> |
| | | #{item.activityStartTime}, |
| | | </if> |
| | | <if test="item.activityEndTime != null "> |
| | | #{item.activityEndTime}, |
| | | </if> |
| | | <if test="item.peopleNumber != null and item.peopleNumber != '' "> |
| | | #{item.peopleNumber}, |
| | | </if> |
| | | <if test="item.phone != null and item.phone != '' "> |
| | | #{item.phone}, |
| | | </if> |
| | | <if test="item.award != null and item.award != '' "> |
| | | #{item.award}, |
| | | </if> |
| | | <if test="item.coverImgUrl != null and item.coverImgUrl != '' "> |
| | | #{item.coverImgUrl}, |
| | | </if> |
| | | <if test="item.activityType != null and item.activityType != '' "> |
| | | #{item.activityType}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="editData"> |
| | | update jinhui_experience_activity |
| | | <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.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.applyStartTime != null"> |
| | | apply_start_time=#{item.applyStartTime}, |
| | | </if> |
| | | <if test="item.applyEndTime != null "> |
| | | apply_end_time=#{item.applyEndTime}, |
| | | </if> |
| | | <if test="item.activityStartTime != null "> |
| | | activity_start_time=#{item.activityStartTime}, |
| | | </if> |
| | | <if test="item.activityEndTime != null "> |
| | | activity_end_time=#{item.activityEndTime}, |
| | | </if> |
| | | <if test="item.peopleNumber != null and item.peopleNumber != '' "> |
| | | people_number=#{item.peopleNumber}, |
| | | </if> |
| | | <if test="item.phone != null and item.phone != '' "> |
| | | phone=#{item.phone}, |
| | | </if> |
| | | <if test="item.award != null and item.award != '' "> |
| | | award=#{item.award}, |
| | | </if> |
| | | <if test="item.coverImgUrl != null and item.coverImgUrl != '' "> |
| | | cover_img_url=#{item.coverImgUrl}, |
| | | </if> |
| | | <if test="item.activityType != null and item.activityType != '' "> |
| | | activity_type=#{item.activityType}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{item.id} |
| | | </update> |
| | | |
| | | <delete id="expurgateData" parameterType="String"> |
| | | delete from jinhui_experience_activity where id=#{id} |
| | | </delete> |
| | | |
| | | </mapper> |