| | |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | 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.service.community.CommunityService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /**************************************************************************************************************** |
| | | * |
| | | * 商家评论 |
| | | * |
| | | ***************************************************************************************************************/ |
| | | |
| | | /** |
| | | * 商家评论分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/evaluate/getList") |
| | | public R volunteerMerchantGetList(@RequestParam("userId") int pageNum, |
| | | @RequestParam("userId") int pageSize, |
| | | @RequestParam("communityId") String communityId, |
| | | @RequestParam("merchantId") String merchantId) |
| | | { |
| | | return communityService.volunteerMerchantGetList(pageNum,pageSize,communityId,merchantId); |
| | | } |
| | | |
| | | /** |
| | | * 商家评论获取详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/evaluate/getData") |
| | | public R volunteerMerchantGetData(@RequestParam("id") String id) |
| | | { |
| | | return communityService.volunteerMerchantGetData(id); |
| | | } |
| | | |
| | | /** |
| | | * 商家评论新增评价 |
| | | * @return |
| | | */ |
| | | @PostMapping("/evaluate/insert") |
| | | public R volunteerMerchantInsert(@RequestBody VolunteerMerchantEvaluateVO item) |
| | | { |
| | | return communityService.volunteerMerchantInsert(item); |
| | | } |
| | | |
| | | /** |
| | | * 商家评论更新评价 |
| | | * @return |
| | | */ |
| | | @PostMapping("/evaluate/update") |
| | | public R volunteerMerchantUpdate(@RequestBody VolunteerMerchantEvaluateVO item) |
| | | { |
| | | return communityService.volunteerMerchantUpdate(item); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 商家评论删除评价 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/evaluate/delete") |
| | | public R volunteerMerchantDelete(@RequestParam("id") String id) |
| | | { |
| | | return communityService.volunteerMerchantDelete(id); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | |
| | | 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 VolunteerMerchantEvaluateVO implements Serializable { |
| | | private static final long serialVersionUID = -70884515430727555L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @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; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private String communityId; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "商家id") |
| | | private String merchantId; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "评论人用户id") |
| | | private String userId; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "评价内容") |
| | | private String evaluateContent; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "评价图片") |
| | | private String evaluateUrl; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "商品id") |
| | | private String goodId; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "评价分数") |
| | | private String evaluateGrade; |
| | | |
| | | |
| | | @ApiModelProperty(value = "商家名称") |
| | | private String merchantName; |
| | | |
| | | @ApiModelProperty(value = "用户名称") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value = "用户头像") |
| | | private String userUrl; |
| | | } |
| | |
| | | @GetMapping("/VolunteerIntegralMerchant/order/communityCancellation") |
| | | public R communityCancellation(@RequestParam("id") String id); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /**************************************************************************************************************** |
| | | * |
| | | * 商家评论 |
| | | * |
| | | ***************************************************************************************************************/ |
| | | |
| | | /** |
| | | * 商家评论分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/VolunteerMerchant/evaluate/getList") |
| | | public R volunteerMerchantGetList(@RequestParam("userId") int pageNum, |
| | | @RequestParam("userId") int pageSize, |
| | | @RequestParam("communityId") String communityId, |
| | | @RequestParam("merchantId") String merchantId); |
| | | |
| | | /** |
| | | * 商家评论获取详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/VolunteerMerchant/evaluate/getData") |
| | | public R volunteerMerchantGetData(@RequestParam("id") String id); |
| | | |
| | | /** |
| | | * 商家评论新增评价 |
| | | * @return |
| | | */ |
| | | @PostMapping("/VolunteerMerchant/evaluate/insert") |
| | | public R volunteerMerchantInsert(@RequestBody VolunteerMerchantEvaluateVO item); |
| | | |
| | | /** |
| | | * 商家评论更新评价 |
| | | * @return |
| | | */ |
| | | @PostMapping("/VolunteerMerchant/evaluate/update") |
| | | public R volunteerMerchantUpdate(@RequestBody VolunteerMerchantEvaluateVO item); |
| | | |
| | | |
| | | /** |
| | | * 商家评论删除评价 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/VolunteerMerchant/evaluate/delete") |
| | | public R volunteerMerchantDelete(@RequestParam("id") String id); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | 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.utlis.StringUtils; |
| | | import com.panzhihua.service_community.service.VolunteerMerchantEvaluateService; |
| | | import com.panzhihua.service_community.service.VolunteerMerchantService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | return vtService.isMerchant(userId); |
| | | } |
| | | |
| | | /**************************************************************************************************************** |
| | | * |
| | | * 商家评论 |
| | | * |
| | | ***************************************************************************************************************/ |
| | | @Resource |
| | | private VolunteerMerchantEvaluateService vmeService; |
| | | |
| | | |
| | | /** |
| | | * 商家评论分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/evaluate/getList") |
| | | public R volunteerMerchantGetList(@RequestParam("userId") int pageNum, |
| | | @RequestParam("userId") int pageSize, |
| | | @RequestParam("communityId") String communityId, |
| | | @RequestParam("merchantId") String merchantId) |
| | | { |
| | | return vmeService.getList(pageNum,pageSize,communityId,merchantId); |
| | | } |
| | | |
| | | /** |
| | | * 商家评论获取详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/evaluate/getData") |
| | | public R volunteerMerchantGetData(@RequestParam("id") String id) |
| | | { |
| | | return vmeService.getData(id); |
| | | } |
| | | |
| | | /** |
| | | * 商家评论新增评价 |
| | | * @return |
| | | */ |
| | | @PostMapping("/evaluate/insert") |
| | | public R volunteerMerchantInsert(@RequestBody VolunteerMerchantEvaluateVO item) |
| | | { |
| | | return vmeService.insert(item); |
| | | } |
| | | |
| | | /** |
| | | * 商家评论更新评价 |
| | | * @return |
| | | */ |
| | | @PostMapping("/evaluate/update") |
| | | public R volunteerMerchantUpdate(@RequestBody VolunteerMerchantEvaluateVO item) |
| | | { |
| | | return vmeService.update(item); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 商家评论删除评价 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/evaluate/delete") |
| | | public R volunteerMerchantDelete(@RequestParam("id") String id) |
| | | { |
| | | return vmeService.delete(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.VolunteerMerchantEvaluateVO; |
| | | import com.panzhihua.service_community.entity.VolunteerMerchantEvaluate; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | @Mapper |
| | | public interface VolunteerMerchantEvaluateDao extends BaseMapper<VolunteerMerchantEvaluate> |
| | | { |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | IPage<VolunteerMerchantEvaluate> getList(Page page, |
| | | @Param("id") String communityId, |
| | | @Param("id") String merchantId); |
| | | |
| | | /** |
| | | * 获取详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | VolunteerMerchantEvaluate getData(@Param("id") String id); |
| | | |
| | | /** |
| | | * 新增评价 |
| | | * @return |
| | | */ |
| | | int insert(@Param("item") VolunteerMerchantEvaluateVO item); |
| | | |
| | | /** |
| | | * 更新评价 |
| | | * @return |
| | | */ |
| | | int update(@Param("item") VolunteerMerchantEvaluateVO item); |
| | | |
| | | |
| | | /** |
| | | * 删除评价 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | int delete(@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 VolunteerMerchantEvaluate implements Serializable { |
| | | private static final long serialVersionUID = -70884515430727555L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @ApiModelProperty(value = "主键") |
| | | private String id; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @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; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private String communityId; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "商家id") |
| | | private String merchantId; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "评论人用户id") |
| | | private String userId; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "评价内容") |
| | | private String evaluateContent; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "评价图片") |
| | | private String evaluateUrl; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "商品id") |
| | | private String goodId; |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "评价分数") |
| | | private String evaluateGrade; |
| | | |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "商家名称") |
| | | private String merchantName; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "用户名称") |
| | | private String userName; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "用户头像") |
| | | private String userUrl; |
| | | } |
| | |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date creationTime; |
| | | |
| | | /** |
New file |
| | |
| | | package com.panzhihua.service_community.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.VolunteerMerchantEvaluateVO; |
| | | import com.panzhihua.service_community.entity.VolunteerMerchantEvaluate; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | public interface VolunteerMerchantEvaluateService extends IService<VolunteerMerchantEvaluate> |
| | | { |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | R getList(int pageNum,int pageSize,String communityId, String merchantId); |
| | | |
| | | /** |
| | | * 获取详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R getData(String id); |
| | | |
| | | /** |
| | | * 新增评价 |
| | | * @return |
| | | */ |
| | | R insert(VolunteerMerchantEvaluateVO item); |
| | | |
| | | /** |
| | | * 更新评价 |
| | | * @return |
| | | */ |
| | | R update(VolunteerMerchantEvaluateVO item); |
| | | |
| | | |
| | | /** |
| | | * 删除评价 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R delete(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.VolunteerMerchantEvaluateVO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.VolunteerMerchantEvaluateDao; |
| | | import com.panzhihua.service_community.entity.VolunteerMerchantEvaluate; |
| | | import com.panzhihua.service_community.service.VolunteerMerchantEvaluateService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class VolunteerMerchantEvaluateImpl extends ServiceImpl<VolunteerMerchantEvaluateDao, |
| | | VolunteerMerchantEvaluate> implements VolunteerMerchantEvaluateService |
| | | { |
| | | |
| | | @Override |
| | | public R getList(int pageNum, int pageSize,String communityId,String merchantId) |
| | | { |
| | | Page<VolunteerMerchantEvaluate> page=new Page(pageNum,pageSize); |
| | | return R.ok(baseMapper.getList(page,communityId,merchantId)); |
| | | } |
| | | |
| | | @Override |
| | | public R getData(String id) |
| | | { |
| | | if(StringUtils.isEmpty(id)) |
| | | { |
| | | return R.fail("id不能为空"); |
| | | } |
| | | return R.ok(baseMapper.getData(id)); |
| | | } |
| | | |
| | | @Override |
| | | public R insert(VolunteerMerchantEvaluateVO item) { |
| | | int num= baseMapper.insert(item); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("添加失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R update(VolunteerMerchantEvaluateVO 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("添加失败"); |
| | | } |
| | | } |
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.VolunteerMerchantEvaluateDao"> |
| | | |
| | | <resultMap type="com.panzhihua.service_community.entity.VolunteerMerchantEvaluate" id="VolunteerMerchantEvaluateMap"> |
| | | <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="userId" column="user_id" /> |
| | | <result property="evaluateContent" column="evaluate_content" /> |
| | | <result property="evaluateUrl" column="evaluate_url" /> |
| | | <result property="goodId" column="good_id" /> |
| | | <result property="evaluateGrade" column="evaluate_grade" /> |
| | | </resultMap> |
| | | |
| | | <!-- 分页查询 --> |
| | | <select id="getList" resultMap="VolunteerMerchantEvaluateMap"> |
| | | select |
| | | vme.id, |
| | | vme.merchant_id, |
| | | vme.user_id, |
| | | vme.community_id, |
| | | (select vm.name from volunteer_merchant as vm where vm.id=vme.merchant_id) as merchantName, |
| | | (select su.name from sys_user as su where su.user_id =vme.user_id) as userName, |
| | | (select su.image_url from sys_user as su where su.user_id =vme.user_id) as userUrl, |
| | | vme.evaluate_content, |
| | | vme.evaluate_url, |
| | | vme.good_id, |
| | | vme.evaluate_grade, |
| | | vme.creation_time, |
| | | vme.update_time |
| | | from volunteer_merchant_evaluate as vme |
| | | <where> |
| | | 1=1 |
| | | <if test="communityId!=null"> |
| | | and vme.community_id=#{communityId} |
| | | </if> |
| | | <if test="merchantId!=null"> |
| | | and vme.merchant_id=#{merchantId} |
| | | </if> |
| | | </where> |
| | | order by vme.creation_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="getData" resultMap="VolunteerMerchantEvaluateMap"> |
| | | select |
| | | vme.id, |
| | | vme.merchant_id, |
| | | vme.user_id, |
| | | vme.community_id, |
| | | (select vm.name from volunteer_merchant as vm where vm.id=vme.merchant_id) as merchantName, |
| | | (select su.name from sys_user as su where su.user_id =vme.user_id) as userName, |
| | | (select su.image_url from sys_user as su where su.user_id =vme.user_id) as userUrl, |
| | | vme.evaluate_content, |
| | | vme.evaluate_url, |
| | | vme.good_id, |
| | | vme.evaluate_grade, |
| | | vme.creation_time, |
| | | vme.update_time |
| | | from volunteer_merchant_evaluate as vme |
| | | where vme.id=#{id} |
| | | </select> |
| | | |
| | | <insert id="insert"> |
| | | insert into volunteer_merchant_evaluate |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null"> |
| | | id, |
| | | </if> |
| | | <if test="item.merchantId != null"> |
| | | merchant_id, |
| | | </if> |
| | | <if test="item.userId != null"> |
| | | user_id, |
| | | </if> |
| | | <if test="item.evaluateContent != null"> |
| | | evaluate_content, |
| | | </if> |
| | | <if test="item.evaluateUrl != null"> |
| | | evaluate_url, |
| | | </if> |
| | | <if test="item.goodId != null"> |
| | | good_id, |
| | | </if> |
| | | <if test="item.evaluateGrade != null"> |
| | | evaluate_grade, |
| | | </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.userId != null"> |
| | | #{item.userId}, |
| | | </if> |
| | | <if test="item.evaluateContent != null"> |
| | | #{item.evaluateContent}, |
| | | </if> |
| | | <if test="item.evaluateUrl != null"> |
| | | #{item.evaluateUrl}, |
| | | </if> |
| | | <if test="item.goodId != null"> |
| | | #{item.goodId}, |
| | | </if> |
| | | <if test="item.evaluateGrade != null"> |
| | | #{item.evaluateGrade}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="update"> |
| | | update volunteer_merchant_evaluate |
| | | <set> |
| | | <if test="item.id != null"> |
| | | id=#{item.id}, |
| | | </if> |
| | | <if test="item.merchantId != null"> |
| | | merchant_id=#{item.merchantId}, |
| | | </if> |
| | | <if test="item.userId != null"> |
| | | user_id=#{item.userId}, |
| | | </if> |
| | | <if test="item.evaluateContent != null"> |
| | | evaluate_content=#{item.evaluateContent}, |
| | | </if> |
| | | <if test="item.evaluateUrl != null"> |
| | | evaluate_url=#{item.evaluateUrl}, |
| | | </if> |
| | | <if test="item.goodId != null"> |
| | | good_id=#{item.goodId}, |
| | | </if> |
| | | <if test="item.evaluateGrade != null"> |
| | | evaluate_grade=#{item.evaluateGrade}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{volunteerTypeVO.id} |
| | | </update> |
| | | |
| | | <delete id="delete" parameterType="String"> |
| | | delete from volunteer_merchant_evaluate where id=#{id} |
| | | </delete> |
| | | |
| | | </mapper> |