New file |
| | |
| | | package com.panzhihua.common.model.vos.jinhui; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * 商家分类表 |
| | | */ |
| | | |
| | | @Data |
| | | public class JinhuiComConvenientServiceCategoriesVO implements Serializable |
| | | { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "分类名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "分类图标") |
| | | private String icon; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "排序 默认1") |
| | | private String weight; |
| | | |
| | | @ApiModelProperty(value = "是否删除(0未删除 1已删除 )") |
| | | private String isDel; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | private String createdAt; |
| | | |
| | | @ApiModelProperty(value = "创建人") |
| | | private String createdBy; |
| | | |
| | | @ApiModelProperty(value = "更新时间") |
| | | private String updatedAt; |
| | | |
| | | @ApiModelProperty(value = "父级id") |
| | | private String parentId; |
| | | |
| | | |
| | | } |
| | |
| | | @DeleteMapping("/jinhuiConfig/configExpurgateData") |
| | | public R configExpurgateData(@RequestParam("communityId") String communityId); |
| | | |
| | | |
| | | |
| | | /************************************************************************************************************* |
| | | * |
| | | * |
| | | * 商家分类 |
| | | * |
| | | * |
| | | **************************************************************************************************************/ |
| | | |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/jinhuiMerchant/getDetailsCategories") |
| | | public R getDetailsCategories(@RequestParam("id") String id); |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/jinhuiMerchant/addDataCategories") |
| | | public R addDataCategories(@RequestBody JinhuiComConvenientServiceCategoriesVO item); |
| | | |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | @PostMapping("/jinhuiMerchant/editDataCategories") |
| | | public R editDataCategories(@RequestBody JinhuiComConvenientServiceCategoriesVO item); |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/jinhuiMerchant/expurgateDataCategories") |
| | | public R expurgateDataCategories(@RequestParam("id") String id); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | return jinhuiCommunityService.merchantEditData(vo); |
| | | } |
| | | |
| | | |
| | | /************************************************************************************************************* |
| | | * |
| | | * |
| | | * 商家分类 |
| | | * |
| | | * |
| | | **************************************************************************************************************/ |
| | | /** |
| | | * 分页查询 商家类别 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "商家类别列表", response = JinhuiComConvenientServiceCategoriesVO.class) |
| | | @GetMapping("/jinhuiMerchant/getCategories") |
| | | public R getListCategories(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize) |
| | | { |
| | | return jinhuiCommunityService.getListCategories(pageNum,pageSize); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "商家类别详情", response = JinhuiComConvenientServiceCategoriesVO.class) |
| | | @GetMapping("/getDetailsCategories") |
| | | public R getDetailsCategories(@RequestParam("id") String id) |
| | | { |
| | | return jinhuiCommunityService.getDetailsCategories(id); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "商家类别新增") |
| | | @PostMapping("/addDataCategories") |
| | | public R addDataCategories(@RequestBody JinhuiComConvenientServiceCategoriesVO item) |
| | | { |
| | | return jinhuiCommunityService.addDataCategories(item); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "商家类别编辑") |
| | | @PostMapping("/editDataCategories") |
| | | public R editDataCategories(@RequestBody JinhuiComConvenientServiceCategoriesVO item) |
| | | { |
| | | return jinhuiCommunityService.editDataCategories(item); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "商家类别删除") |
| | | @GetMapping("/expurgateDataCategories") |
| | | public R expurgateDataCategories(@RequestParam("id") String id) |
| | | { |
| | | return jinhuiCommunityService.expurgateDataCategories(id); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.convenient.PageConvenientMerchantDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.convenient.JinhuiConvenientMerchantVO; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiComConvenientServiceCategoriesVO; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiComConvenientServiceCategories; |
| | | import com.panzhihua.service_jinhui_community.service.JinhuiComConvenientServiceCategoriesService; |
| | | import com.panzhihua.service_jinhui_community.service.JinhuiConvenientMerchantService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | return jinhuiConvenientMerchantService.getMerchant(merchantId); |
| | | } |
| | | |
| | | |
| | | /************************************************************************************************************* |
| | | * |
| | | * |
| | | * 商家分类 |
| | | * |
| | | * |
| | | **************************************************************************************************************/ |
| | | /** |
| | | * 分页查询 商家类别 |
| | | * @param |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/getDetailsCategories") |
| | | public R getDetailsCategories(@RequestParam("id") String id) |
| | | { |
| | | return R.ok(categoriesService.getDetails(id)); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/addDataCategories") |
| | | public R addDataCategories(@RequestBody JinhuiComConvenientServiceCategoriesVO item) |
| | | { |
| | | return categoriesService.addData(item); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | @PostMapping("/editDataCategories") |
| | | public R editDataCategories(@RequestBody JinhuiComConvenientServiceCategoriesVO item) |
| | | { |
| | | return categoriesService.editData(item); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/expurgateDataCategories") |
| | | public R expurgateDataCategories(@RequestParam("id") String id) |
| | | { |
| | | return categoriesService.expurgateData(id); |
| | | } |
| | | |
| | | } |
| | |
| | | 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.JinhuiComConvenientServiceCategoriesVO; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiGoldCoinRecordVO; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiShoppingVO; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiComConvenientServiceCategories; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiGoldCoinRecord; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiShopping; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | */ |
| | | IPage<JinhuiComConvenientServiceCategories> getList(Page page); |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | JinhuiComConvenientServiceCategories getDetails(@Param("id") String id); |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | int addData(@Param("item") JinhuiComConvenientServiceCategoriesVO item); |
| | | |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | int editData(@Param("item") JinhuiComConvenientServiceCategoriesVO item); |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | int expurgateData(@Param("id") String id); |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "权重,默认1") |
| | | @ApiModelProperty(value = "排序 默认1") |
| | | private String weight; |
| | | |
| | | @ApiModelProperty(value = "是否删除") |
| | | @ApiModelProperty(value = "是否删除(0未删除 1已删除 )") |
| | | private String isDel; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | |
| | | @ApiModelProperty(value = "更新时间") |
| | | private String updatedAt; |
| | | |
| | | @ApiModelProperty(value = "更新人") |
| | | private String updatedBy; |
| | | @ApiModelProperty(value = "父级id") |
| | | private String parentId; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiComConvenientServiceCategoriesVO; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiGoldCoinRecordVO; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiComConvenientServiceCategories; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiGoldCoinRecord; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | public interface JinhuiComConvenientServiceCategoriesService extends IService<JinhuiComConvenientServiceCategories> |
| | | { |
| | |
| | | */ |
| | | R getList(int pageNum,int pageSize); |
| | | |
| | | |
| | | /** |
| | | * 详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | JinhuiComConvenientServiceCategories getDetails(String id); |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | R addData(JinhuiComConvenientServiceCategoriesVO item); |
| | | |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | R editData(JinhuiComConvenientServiceCategoriesVO item); |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R expurgateData(String id); |
| | | |
| | | } |
| | |
| | | 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.JinhuiComConvenientServiceCategoriesVO; |
| | | import com.panzhihua.service_jinhui_community.dao.JinhuiComConvenientServiceCategoriesDao; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiComConvenientServiceCategories; |
| | | import com.panzhihua.service_jinhui_community.service.JinhuiComConvenientServiceCategoriesService; |
| | |
| | | return R.ok(baseMapper.getList(page)); |
| | | } |
| | | |
| | | // @Override |
| | | // public JinhuiCoinGeneralTable getDetails(String userId) { |
| | | // return baseMapper.getDetails(userId); |
| | | // } |
| | | // |
| | | // |
| | | // @Override |
| | | // public R addData(JinhuiCoinGeneralTableVO volunteerTypeVO) |
| | | // { |
| | | // int num= baseMapper.addData(volunteerTypeVO); |
| | | // if(num>0) |
| | | // { |
| | | // return R.ok(); |
| | | // } |
| | | // return R.fail("添加失败"); |
| | | // } |
| | | // |
| | | // @Override |
| | | // public R editData(JinhuiCoinGeneralTableVO volunteerTypeVO) { |
| | | // int num= baseMapper.editData(volunteerTypeVO); |
| | | // 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("添加失败"); |
| | | // } |
| | | @Override |
| | | public JinhuiComConvenientServiceCategories getDetails(String userId) { |
| | | return baseMapper.getDetails(userId); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public R addData(JinhuiComConvenientServiceCategoriesVO volunteerTypeVO) |
| | | { |
| | | int num= baseMapper.addData(volunteerTypeVO); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R editData(JinhuiComConvenientServiceCategoriesVO volunteerTypeVO) { |
| | | int num= baseMapper.editData(volunteerTypeVO); |
| | | 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("添加失败"); |
| | | } |
| | | } |
| | |
| | | <id column="created_at" property="createdAt" /> |
| | | <id column="created_by" property="createdBy" /> |
| | | <id column="updated_at" property="updatedAt" /> |
| | | <id column="updated_by" property="updatedBy" /> |
| | | <id column="parent_id" property="parentId" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id,`name`,icon,remark,weight,is_del,created_at,created_by,updated_at,updated_by |
| | | id, |
| | | name, |
| | | icon, |
| | | remark, |
| | | weight, |
| | | is_del, |
| | | created_at, |
| | | created_by, |
| | | updated_at, |
| | | parent_id |
| | | |
| | | </sql> |
| | | |
| | | <!-- 分页查询 --> |
| | |
| | | created_at, |
| | | created_by, |
| | | updated_at, |
| | | updated_by, |
| | | parent_id, |
| | | area_code |
| | | parent_id |
| | | from jinhui_com_convenient_service_categories |
| | | order by created_at desc |
| | | where is_del='0' |
| | | order by weight desc,created_at desc |
| | | </select> |
| | | |
| | | |
| | | <select id="getDetails" resultMap="BaseResultMap"> |
| | | select |
| | | id, |
| | | name, |
| | | icon, |
| | | remark, |
| | | weight, |
| | | is_del, |
| | | created_at, |
| | | created_by, |
| | | updated_at, |
| | | parent_id |
| | | from jinhui_com_convenient_service_categories |
| | | where |
| | | id=#{id} |
| | | </select> |
| | | |
| | | |
| | | |
| | | <insert id="addData"> |
| | | insert into jinhui_com_convenient_service_categories |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null and item.id != '' "> |
| | | id, |
| | | </if> |
| | | <if test="item.name != null and item.name != '' "> |
| | | `name`, |
| | | </if> |
| | | <if test="item.icon != null and item.icon != '' "> |
| | | icon, |
| | | </if> |
| | | <if test="item.remark != null and item.remark != '' "> |
| | | remark, |
| | | </if> |
| | | <if test="item.weight != null and item.weight != '' "> |
| | | weight, |
| | | </if> |
| | | <if test="item.isDel != null and item.isDel != '' "> |
| | | is_del, |
| | | </if> |
| | | <if test="item.createdBy != null and item.createdBy != '' "> |
| | | created_by, |
| | | </if> |
| | | <if test="item.parentId != null and item.parentId != '' "> |
| | | parent_id, |
| | | </if> |
| | | created_at |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null and item.id != '' "> |
| | | #{item.id}, |
| | | </if> |
| | | <if test="item.name != null and item.name != '' "> |
| | | #{item.name}, |
| | | </if> |
| | | <if test="item.icon != null and item.icon != '' "> |
| | | #{item.icon}, |
| | | </if> |
| | | <if test="item.remark != null and item.remark != '' "> |
| | | #{item.remark}, |
| | | </if> |
| | | <if test="item.weight != null and item.weight != '' "> |
| | | #{item.weight}, |
| | | </if> |
| | | <if test="item.isDel != null and item.isDel != '' "> |
| | | #{item.isDel}, |
| | | </if> |
| | | <if test="item.createdBy != null and item.createdBy != '' "> |
| | | #{item.createdBy}, |
| | | </if> |
| | | <if test="item.parentId != null and item.parentId != '' "> |
| | | #{item.parentId}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="editData"> |
| | | update jinhui_com_convenient_service_categories |
| | | <set> |
| | | <if test="item.id != null and item.id != '' "> |
| | | id=#{item.id}, |
| | | </if> |
| | | <if test="item.name != null and item.name != '' "> |
| | | `name`=#{item.name}, |
| | | </if> |
| | | <if test="item.icon != null and item.icon != '' "> |
| | | icon=#{item.icon}, |
| | | </if> |
| | | <if test="item.remark != null and item.remark != '' "> |
| | | remark=#{item.remark}, |
| | | </if> |
| | | <if test="item.weight != null and item.weight != '' "> |
| | | weight=#{item.weight}, |
| | | </if> |
| | | <if test="item.isDel != null and item.isDel != '' "> |
| | | is_del=#{item.isDel}, |
| | | </if> |
| | | <if test="item.createdBy != null and item.createdBy != '' "> |
| | | created_by=#{item.createdBy}, |
| | | </if> |
| | | <if test="item.parentId != null and item.parentId != '' "> |
| | | parent_id=#{item.parentId}, |
| | | </if> |
| | | updated_at=sysdate() |
| | | </set> |
| | | where id = #{item.id} |
| | | </update> |
| | | |
| | | <update id="expurgateData" parameterType="String"> |
| | | update jinhui_com_convenient_service_categories |
| | | set is_del='1' |
| | | where id=#{id} |
| | | </update> |
| | | |
| | | |
| | | </mapper> |