| | |
| | | import com.panzhihua.common.model.vos.community.VolunteerCreditsExchangeVO; |
| | | import com.panzhihua.common.model.vos.community.VolunteerMerchantEvaluateVO; |
| | | import com.panzhihua.common.model.vos.community.VolunteerMerchantVO; |
| | | import com.panzhihua.common.model.vos.community.VolunteerMerchantWithdrawVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | |
| | | } |
| | | |
| | | |
| | | /*************************************************************************************************************** |
| | | * |
| | | * 路北社区商家提现 |
| | | * |
| | | ****************************************************************************************************************/ |
| | | |
| | | /** |
| | | * 新增商家提现 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | @PostMapping("/withdraw/insert") |
| | | public R WithdrawInsert(@RequestBody VolunteerMerchantWithdrawVO item) |
| | | { |
| | | return communityService.WithdrawInsert(item); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | 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 VolunteerMerchantWithdrawVO implements Serializable { |
| | | private static final long serialVersionUID = -70884515430727555L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "商家id") |
| | | private String merchantId; |
| | | |
| | | @ApiModelProperty(value = "商家名称") |
| | | private String merchantName; |
| | | |
| | | @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 = "社区id") |
| | | private String communityId; |
| | | |
| | | @ApiModelProperty(value = "提取积分") |
| | | private String withdrawIntegral; |
| | | |
| | | @ApiModelProperty(value = "处理时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date disposeTime; |
| | | |
| | | @ApiModelProperty(value = "处理状态 0 待处理 1已处理") |
| | | private String disposeType; |
| | | |
| | | @ApiModelProperty(value = "0 未删除 1 已删除") |
| | | private String isDelete; |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | /*************************************************************************************************************** |
| | | * |
| | | * 路北社区商家提现 |
| | | * |
| | | ****************************************************************************************************************/ |
| | | |
| | | /** |
| | | * 商家提现列表啊 |
| | | * @param disposeType |
| | | * @return |
| | | */ |
| | | @GetMapping("/VolunteerMerchant/withdraw/getList") |
| | | public R WithdrawGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "disposeType", required = false) String disposeType, |
| | | @RequestParam(value = "merchantName", required = false) String merchantName); |
| | | |
| | | /** |
| | | * 新增商家提现 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | @PostMapping("/VolunteerMerchant/withdraw/insert") |
| | | public R WithdrawInsert(@RequestBody VolunteerMerchantWithdrawVO item); |
| | | |
| | | /** |
| | | * 编辑商家提现 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | @PostMapping("/VolunteerMerchant/withdraw/update") |
| | | public R WithdrawUpdate(@RequestBody VolunteerMerchantWithdrawVO item); |
| | | |
| | | /** |
| | | * 删除商家提现 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/VolunteerMerchant/withdraw/delete") |
| | | public R WithdrawDelete(@RequestParam("id") String id); |
| | | |
| | | /** |
| | | * 处理商家提现 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/VolunteerMerchant/withdraw/dispose") |
| | | public R WithdrawDispose(@RequestParam("id") String id); |
| | | |
| | | |
| | | |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.VolunteerIntegralMerchantVO; |
| | | import com.panzhihua.common.model.vos.community.VolunteerMerchantVO; |
| | | import com.panzhihua.common.model.vos.community.VolunteerMerchantWithdrawVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | return vtService.VolunteerIntegralMerchantDeleteById(id); |
| | | } |
| | | |
| | | |
| | | /*************************************************************************************************************** |
| | | * |
| | | * 路北社区商家提现 |
| | | * |
| | | ****************************************************************************************************************/ |
| | | |
| | | /** |
| | | * 商家提现列表 |
| | | * @param disposeType |
| | | * @return |
| | | */ |
| | | @GetMapping("/withdraw/getList") |
| | | public R WithdrawGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "disposeType", required = false) String disposeType, |
| | | @RequestParam(value = "merchantName", required = false) String merchantName) |
| | | { |
| | | return vtService.WithdrawGetList(pageNum,pageSize,disposeType, merchantName); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 编辑商家提现 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | @PostMapping("/withdraw/update") |
| | | public R WithdrawUpdate(@RequestBody VolunteerMerchantWithdrawVO item) |
| | | { |
| | | return vtService.WithdrawUpdate(item); |
| | | } |
| | | |
| | | /** |
| | | * 删除商家提现 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/withdraw/delete") |
| | | public R WithdrawDelete(@RequestParam("id") String id) |
| | | { |
| | | return vtService.WithdrawDelete(id); |
| | | } |
| | | |
| | | /** |
| | | * 处理商家提现 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/withdraw/dispose") |
| | | public R WithdrawDispose(@RequestParam("id") String id) |
| | | { |
| | | return vtService.WithdrawDispose(id); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.VolunteerMerchantEvaluateVO; |
| | | import com.panzhihua.common.model.vos.community.VolunteerMerchantVO; |
| | | import com.panzhihua.common.model.vos.community.VolunteerMerchantWithdrawVO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.service.VolunteerMerchantEvaluateService; |
| | | import com.panzhihua.service_community.service.VolunteerMerchantService; |
| | | import com.panzhihua.service_community.service.VolunteerMerchantWithdrawService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | } |
| | | |
| | | |
| | | /*************************************************************************************************************** |
| | | * |
| | | * 路北社区商家提现 |
| | | * |
| | | ****************************************************************************************************************/ |
| | | |
| | | @Resource |
| | | private VolunteerMerchantWithdrawService vmwService; |
| | | |
| | | |
| | | /** |
| | | * 商家提现列表啊 |
| | | * @param disposeType |
| | | * @return |
| | | */ |
| | | @GetMapping("/withdraw/getList") |
| | | public R WithdrawGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "disposeType", required = false) String disposeType, |
| | | @RequestParam(value = "merchantName", required = false) String merchantName) |
| | | { |
| | | return vmwService.getList(pageNum,pageSize,disposeType,merchantName); |
| | | } |
| | | |
| | | /** |
| | | * 新增商家提现 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | @PostMapping("/withdraw/insert") |
| | | public R WithdrawInsert(@RequestBody VolunteerMerchantWithdrawVO item) |
| | | { |
| | | return vmwService.insert(item); |
| | | } |
| | | |
| | | /** |
| | | * 编辑商家提现 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | @PostMapping("/withdraw/update") |
| | | public R WithdrawUpdate(@RequestBody VolunteerMerchantWithdrawVO item) |
| | | { |
| | | return vmwService.update(item); |
| | | } |
| | | |
| | | /** |
| | | * 删除商家提现 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/withdraw/delete") |
| | | public R WithdrawDelete(@RequestParam("id") String id) |
| | | { |
| | | return vmwService.delete(id); |
| | | } |
| | | |
| | | /** |
| | | * 处理商家提现 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/withdraw/dispose") |
| | | public R WithdrawDispose(@RequestParam("id") String id) |
| | | { |
| | | return vmwService.dispose(id); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_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.community.VolunteerMerchantWithdrawVO; |
| | | import com.panzhihua.service_community.entity.VolunteerMerchantWithdraw; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | @Mapper |
| | | public interface VolunteerMerchantWithdrawDao extends BaseMapper<VolunteerMerchantWithdraw> |
| | | { |
| | | |
| | | /** |
| | | * 商家提现列表啊 |
| | | * @param page |
| | | * @param disposeType |
| | | * @return |
| | | */ |
| | | IPage<VolunteerMerchantWithdraw> getList(Page page, |
| | | @Param("disposeType") String disposeType, |
| | | @Param("merchantName") String merchantName); |
| | | |
| | | /** |
| | | * 新增商家提现 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | int insert(@Param("item") VolunteerMerchantWithdrawVO item); |
| | | |
| | | /** |
| | | * 编辑商家提现 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | int update(@Param("item") VolunteerMerchantWithdrawVO item); |
| | | |
| | | /** |
| | | * 删除商家提现 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | int delete(@Param("id") String id); |
| | | |
| | | /** |
| | | * 处理商家提现 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | int dispose(@Param("id") String id); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_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 VolunteerMerchantWithdraw implements Serializable { |
| | | private static final long serialVersionUID = -70884515430727555L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "商家id") |
| | | private String merchantId; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "商家名称") |
| | | private String merchantName; |
| | | |
| | | @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 = "社区id") |
| | | private String communityId; |
| | | |
| | | @ApiModelProperty(value = "提取积分") |
| | | private String withdrawIntegral; |
| | | |
| | | @ApiModelProperty(value = "处理时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date disposeTime; |
| | | |
| | | @ApiModelProperty(value = "处理状态 0 待处理 1已处理") |
| | | private String disposeType; |
| | | |
| | | @ApiModelProperty(value = "0 未删除 1 已删除") |
| | | private String isDelete; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.VolunteerMerchantWithdrawVO; |
| | | import com.panzhihua.service_community.entity.VolunteerMerchantWithdraw; |
| | | |
| | | public interface VolunteerMerchantWithdrawService extends IService<VolunteerMerchantWithdraw> |
| | | { |
| | | /** |
| | | * 商家提现列表啊 |
| | | * @param disposeType |
| | | * @return |
| | | */ |
| | | R getList(int pageNum, int pageSize, String disposeType,String merchantName); |
| | | |
| | | /** |
| | | * 新增商家提现 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | R insert(VolunteerMerchantWithdrawVO item); |
| | | |
| | | /** |
| | | * 编辑商家提现 |
| | | * @param item |
| | | * @return |
| | | */ |
| | | R update(VolunteerMerchantWithdrawVO item); |
| | | |
| | | /** |
| | | * 删除商家提现 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R delete(String id); |
| | | |
| | | /** |
| | | * 处理商家提现 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R dispose(String id); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_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.community.VolunteerMerchantWithdrawVO; |
| | | import com.panzhihua.service_community.dao.VolunteerMerchantWithdrawDao; |
| | | import com.panzhihua.service_community.entity.VolunteerMerchantWithdraw; |
| | | import com.panzhihua.service_community.service.VolunteerMerchantWithdrawService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class VolunteerMerchantWithdrawServiceImpl extends ServiceImpl<VolunteerMerchantWithdrawDao, |
| | | VolunteerMerchantWithdraw> implements VolunteerMerchantWithdrawService { |
| | | |
| | | @Override |
| | | public R getList(int pageNum, int pageSize, String disposeType,String merchantName) |
| | | { |
| | | Page<VolunteerMerchantWithdraw> page=new Page(pageNum,pageSize); |
| | | return R.ok(baseMapper.getList(page,disposeType,merchantName)); |
| | | } |
| | | |
| | | @Override |
| | | public R insert(VolunteerMerchantWithdrawVO item) { |
| | | int num= baseMapper.insert(item); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("操作失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R update(VolunteerMerchantWithdrawVO item) { |
| | | int num= baseMapper.update(item); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("操作失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R delete(String id) { |
| | | int num= baseMapper.delete(id); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("操作失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R dispose(String id) { |
| | | int num= baseMapper.dispose(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_community.dao.VolunteerMerchantWithdrawDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.VolunteerMerchantWithdraw" id="MerchantWithdrawMap"> |
| | | <result property="id" column="id" /> |
| | | <result property="merchantId" column="merchant_id" /> |
| | | <result property="creationTime" column="creation_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="communityId" column="community_id" /> |
| | | <result property="withdrawIntegral" column="withdraw_integral" /> |
| | | <result property="disposeTime" column="dispose_time" /> |
| | | <result property="disposeType" column="dispose_type" /> |
| | | <result property="isDelete" column="is_delete" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="base_sql"> |
| | | id, |
| | | merchant_id, |
| | | community_id, |
| | | withdraw_integral, |
| | | creation_time, |
| | | update_time, |
| | | dispose_time, |
| | | dispose_type, |
| | | is_delete |
| | | </sql> |
| | | |
| | | <!-- 分页查询 --> |
| | | <select id="getList" resultMap="MerchantWithdrawMap"> |
| | | select <include refid="base_sql"/> |
| | | from volunteer_merchant_withdraw |
| | | <where> |
| | | where is_delete='0' |
| | | <if test="disposeType !=null "> |
| | | and dispose_type=#{disposeType} |
| | | </if> |
| | | </where> |
| | | order by creation_time desc |
| | | </select> |
| | | |
| | | <insert id="insert"> |
| | | insert into volunteer_merchant_withdraw |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null"> |
| | | id, |
| | | </if> |
| | | <if test="item.merchantId != null"> |
| | | merchant_id, |
| | | </if> |
| | | <if test="item.communityId != null"> |
| | | community_id, |
| | | </if> |
| | | <if test="item.withdrawIntegral != null"> |
| | | withdraw_integral, |
| | | </if> |
| | | <if test="item.disposeTime != null"> |
| | | dispose_time, |
| | | </if> |
| | | <if test="item.disposeType != null"> |
| | | dispose_type, |
| | | </if> |
| | | <if test="item.isDelete != null"> |
| | | is_delete, |
| | | </if> |
| | | creation_time |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null"> |
| | | #{item.id}, |
| | | </if> |
| | | <if test="item.merchantId != null"> |
| | | #{item.merchantId}, |
| | | </if> |
| | | <if test="item.communityId != null"> |
| | | #{item.communityId}, |
| | | </if> |
| | | <if test="item.withdrawIntegral != null"> |
| | | #{item.withdrawIntegral}, |
| | | </if> |
| | | <if test="item.disposeTime != null"> |
| | | #{item.disposeTime}, |
| | | </if> |
| | | <if test="item.disposeType != null"> |
| | | #{item.disposeType}, |
| | | </if> |
| | | <if test="item.isDelete != null"> |
| | | #{item.isDelete}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="update"> |
| | | update volunteer_merchant_withdraw |
| | | <set> |
| | | <if test="item.id != null"> |
| | | id=#{item.id}, |
| | | </if> |
| | | <if test="item.merchantId != null"> |
| | | merchant_id=#{item.merchantId}, |
| | | </if> |
| | | <if test="item.communityId != null"> |
| | | community_id=#{item.communityId}, |
| | | </if> |
| | | <if test="item.withdrawIntegral != null"> |
| | | withdraw_integral=#{item.withdrawIntegral}, |
| | | </if> |
| | | <if test="item.disposeTime != null"> |
| | | dispose_time=#{item.disposeTime}, |
| | | </if> |
| | | <if test="item.disposeType != null"> |
| | | dispose_type=#{item.disposeType}, |
| | | </if> |
| | | <if test="item.isDelete != null"> |
| | | is_delete=#{item.isDelete}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{item.id} |
| | | </update> |
| | | |
| | | <update id="delete" parameterType="String"> |
| | | update volunteer_merchant_withdraw set is_delete=1 where id=#{id} |
| | | </update> |
| | | |
| | | |
| | | <update id="dispose" parameterType="String"> |
| | | update volunteer_merchant_withdraw set dispose_time=sysdate() where id=#{id} |
| | | </update> |
| | | |
| | | </mapper> |