投诉建议 评价 列表
This commit is contained in:
parent
eb9b202035
commit
1e31b64f41
|
|
@ -1,5 +1,8 @@
|
|||
package com.bonus.canteen.common.utils;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.Random;
|
||||
|
||||
public class StringUtil {
|
||||
|
||||
/**
|
||||
|
|
@ -14,4 +17,26 @@ public class StringUtil {
|
|||
// 组合时间戳和随机数
|
||||
return timestamp + String.format("%04d", randomPart);
|
||||
}
|
||||
|
||||
/**
|
||||
* 升成 18位的随机数
|
||||
* @param numDigits
|
||||
* @return
|
||||
*/
|
||||
public static long generateRandomLong(int numDigits) {
|
||||
Random random = new Random();
|
||||
long number = 0;
|
||||
|
||||
// 确保生成的数字是 18 位
|
||||
for (int i = 0; i < numDigits; i++) {
|
||||
number = number * 10 + random.nextInt(10);
|
||||
}
|
||||
|
||||
// 确保生成的数字不会超过 long 的最大值
|
||||
if (number > Long.MAX_VALUE) {
|
||||
number = Long.MAX_VALUE;
|
||||
}
|
||||
|
||||
return number;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,103 @@
|
|||
package com.bonus.canteen.consumer.controller;
|
||||
|
||||
import com.bonus.canteen.consumer.model.BasicsCanteenEvaluate;
|
||||
import com.bonus.canteen.consumer.service.BasicsCanteenEvaluateService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 食堂评价表(BasicsCanteenEvaluate)表控制层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2025-01-16 14:06:57
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("basicsCanteenEvaluate")
|
||||
public class BasicsCanteenEvaluateController {
|
||||
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private BasicsCanteenEvaluateService basicsCanteenEvaluateService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param basicsCanteenEvaluate 筛选条件
|
||||
* @param
|
||||
* @return 查询结果
|
||||
*/
|
||||
@GetMapping
|
||||
public ResponseEntity<Page<BasicsCanteenEvaluate>> queryByPage(
|
||||
BasicsCanteenEvaluate basicsCanteenEvaluate,
|
||||
@RequestParam(defaultValue = "0") int page,
|
||||
@RequestParam(defaultValue = "10") int size,
|
||||
@RequestParam(required = false) String sortField,
|
||||
@RequestParam(required = false) String sortDirection) {
|
||||
|
||||
Sort sort;
|
||||
if (sortField != null && sortDirection != null) {
|
||||
Sort.Direction direction = "desc".equalsIgnoreCase(sortDirection) ? Sort.Direction.DESC : Sort.Direction.ASC;
|
||||
sort = Sort.by(direction, sortField);
|
||||
} else {
|
||||
sort = Sort.unsorted(); // 创建一个空的 Sort 对象
|
||||
}
|
||||
|
||||
PageRequest pageRequest = PageRequest.of(page, size, sort);
|
||||
return ResponseEntity.ok(this.basicsCanteenEvaluateService.queryByPage(basicsCanteenEvaluate, pageRequest));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseEntity<BasicsCanteenEvaluate> queryById(@PathVariable("id") Long id) {
|
||||
return ResponseEntity.ok(this.basicsCanteenEvaluateService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param basicsCanteenEvaluate 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseEntity<BasicsCanteenEvaluate> add(@Valid @RequestBody BasicsCanteenEvaluate basicsCanteenEvaluate) {
|
||||
return ResponseEntity.ok(this.basicsCanteenEvaluateService.insert(basicsCanteenEvaluate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param basicsCanteenEvaluate 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseEntity<BasicsCanteenEvaluate> edit(BasicsCanteenEvaluate basicsCanteenEvaluate) {
|
||||
return ResponseEntity.ok(this.basicsCanteenEvaluateService.update(basicsCanteenEvaluate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Boolean> deleteById(Long id) {
|
||||
return ResponseEntity.ok(this.basicsCanteenEvaluateService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
package com.bonus.canteen.consumer.controller;
|
||||
|
||||
import com.bonus.canteen.common.utils.StringUtils;
|
||||
import com.bonus.canteen.consumer.model.BasicsCanteenEvaluate;
|
||||
import com.bonus.canteen.consumer.model.BasicsComplaint;
|
||||
import com.bonus.canteen.consumer.service.BasicsComplaintService;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.system.api.domain.SysUser;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
import static com.bonus.common.core.utils.PageUtils.startPage;
|
||||
|
||||
/**
|
||||
* 投诉建议 (BasicsComplaint)表控制层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2025-01-16 16:34:53
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("basicsComplaint")
|
||||
public class BasicsComplaintController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private BasicsComplaintService basicsComplaintService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param
|
||||
* @param
|
||||
* @return 查询结果
|
||||
*/
|
||||
@GetMapping
|
||||
public TableDataInfo queryByPage(BasicsComplaint basicsCanteenEvaluate){
|
||||
startPage();
|
||||
List<BasicsComplaint> basicsComplaints = basicsComplaintService.queryByPage(basicsCanteenEvaluate);
|
||||
return getDataTable(basicsComplaints);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseEntity<BasicsComplaint> queryById(@PathVariable("id") Long id) {
|
||||
return ResponseEntity.ok(this.basicsComplaintService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param basicsComplaint 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public AjaxResult add(@Valid @RequestBody BasicsComplaint basicsComplaint) {
|
||||
BasicsComplaint insert = this.basicsComplaintService.insert(basicsComplaint);
|
||||
if (StringUtils.isNull(insert)){
|
||||
return AjaxResult.error("未登录,请先登录");
|
||||
}
|
||||
return AjaxResult.success(insert);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param basicsComplaint 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseEntity<BasicsComplaint> edit(BasicsComplaint basicsComplaint) {
|
||||
return ResponseEntity.ok(this.basicsComplaintService.update(basicsComplaint));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping
|
||||
public ResponseEntity<Boolean> deleteById(Long id) {
|
||||
return ResponseEntity.ok(this.basicsComplaintService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
package com.bonus.canteen.consumer.dto;
|
||||
|
||||
import cn.hutool.db.Page;
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel("投诉建议实体类")
|
||||
@Data
|
||||
public class BasicsComplaintDTO extends Page {
|
||||
private static final long serialVersionUID = 992652020559243518L;
|
||||
@ApiModelProperty("主键自增")
|
||||
private Long id;
|
||||
@ApiModelProperty("投诉建议id")
|
||||
private Long complaintId;
|
||||
@ApiModelProperty("人员id ")
|
||||
private Long custId;
|
||||
@ApiModelProperty("餐厅id")
|
||||
private Long canteenId;
|
||||
@ApiModelProperty("投诉内容")
|
||||
private String content;
|
||||
@ApiModelProperty("投诉图片")
|
||||
private String complaintPicture;
|
||||
@ApiModelProperty("来源")
|
||||
private Integer sourceType;
|
||||
@ApiModelProperty("联系方式")
|
||||
private String mobile;
|
||||
@ApiModelProperty("回复内容")
|
||||
private String replyContent;
|
||||
@ApiModelProperty("乐观锁")
|
||||
private Integer revision;
|
||||
@ApiModelProperty("创建人")
|
||||
private String crby;
|
||||
@ApiModelProperty("创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date crtime;
|
||||
@ApiModelProperty("更新人")
|
||||
private String upby;
|
||||
@ApiModelProperty("修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date uptime;
|
||||
@ApiModelProperty("回复状态")
|
||||
private Integer replyState;
|
||||
|
||||
public Long getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public Long getComplaintId() {
|
||||
return this.complaintId;
|
||||
}
|
||||
|
||||
public Long getCustId() {
|
||||
return this.custId;
|
||||
}
|
||||
|
||||
public Long getCanteenId() {
|
||||
return this.canteenId;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return this.content;
|
||||
}
|
||||
|
||||
public String getComplaintPicture() {
|
||||
return this.complaintPicture;
|
||||
}
|
||||
|
||||
public Integer getSourceType() {
|
||||
return this.sourceType;
|
||||
}
|
||||
|
||||
public String getMobile() {
|
||||
return this.mobile;
|
||||
}
|
||||
|
||||
public String getReplyContent() {
|
||||
return this.replyContent;
|
||||
}
|
||||
|
||||
public Integer getRevision() {
|
||||
return this.revision;
|
||||
}
|
||||
|
||||
public String getCrby() {
|
||||
return this.crby;
|
||||
}
|
||||
|
||||
|
||||
public String getUpby() {
|
||||
return this.upby;
|
||||
}
|
||||
|
||||
|
||||
public Integer getReplyState() {
|
||||
return this.replyState;
|
||||
}
|
||||
|
||||
public void setId(final Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void setComplaintId(final Long complaintId) {
|
||||
this.complaintId = complaintId;
|
||||
}
|
||||
|
||||
public void setCustId(final Long custId) {
|
||||
this.custId = custId;
|
||||
}
|
||||
|
||||
public void setCanteenId(final Long canteenId) {
|
||||
this.canteenId = canteenId;
|
||||
}
|
||||
|
||||
public void setContent(final String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public void setComplaintPicture(final String complaintPicture) {
|
||||
this.complaintPicture = complaintPicture;
|
||||
}
|
||||
|
||||
public void setSourceType(final Integer sourceType) {
|
||||
this.sourceType = sourceType;
|
||||
}
|
||||
|
||||
public void setMobile(final String mobile) {
|
||||
this.mobile = mobile;
|
||||
}
|
||||
|
||||
public void setReplyContent(final String replyContent) {
|
||||
this.replyContent = replyContent;
|
||||
}
|
||||
|
||||
public void setRevision(final Integer revision) {
|
||||
this.revision = revision;
|
||||
}
|
||||
|
||||
public void setCrby(final String crby) {
|
||||
this.crby = crby;
|
||||
}
|
||||
|
||||
public void setCrtime(final Date crtime) {
|
||||
this.crtime = crtime;
|
||||
}
|
||||
|
||||
public void setUpby(final String upby) {
|
||||
this.upby = upby;
|
||||
}
|
||||
|
||||
public void setUptime(final Date uptime) {
|
||||
this.uptime = uptime;
|
||||
}
|
||||
|
||||
public void setReplyState(final Integer replyState) {
|
||||
this.replyState = replyState;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
package com.bonus.canteen.consumer.mapper;
|
||||
|
||||
import com.bonus.canteen.consumer.model.BasicsCanteenEvaluate;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 食堂评价表(BasicsCanteenEvaluate)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2025-01-16 14:02:52
|
||||
*/
|
||||
@Mapper
|
||||
public interface BasicsCanteenEvaluateMapper {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
BasicsCanteenEvaluate queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询指定行数据
|
||||
*
|
||||
* @param basicsCanteenEvaluate 查询条件
|
||||
* @param pageable 分页对象
|
||||
* @return 对象列表
|
||||
*/
|
||||
List<BasicsCanteenEvaluate> queryAllByLimit(BasicsCanteenEvaluate basicsCanteenEvaluate, @Param("pageable") Pageable pageable);
|
||||
|
||||
/**
|
||||
* 统计总行数
|
||||
*
|
||||
* @param basicsCanteenEvaluate 查询条件
|
||||
* @return 总行数
|
||||
*/
|
||||
long count(BasicsCanteenEvaluate basicsCanteenEvaluate);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param basicsCanteenEvaluate 实例对象
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insert(BasicsCanteenEvaluate basicsCanteenEvaluate);
|
||||
|
||||
/**
|
||||
* 批量新增数据(MyBatis原生foreach方法)
|
||||
*
|
||||
* @param entities List<BasicsCanteenEvaluate> 实例对象列表
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insertBatch(@Param("entities") List<BasicsCanteenEvaluate> entities);
|
||||
|
||||
/**
|
||||
* 批量新增或按主键更新数据(MyBatis原生foreach方法)
|
||||
*
|
||||
* @param entities List<BasicsCanteenEvaluate> 实例对象列表
|
||||
* @return 影响行数
|
||||
* @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
|
||||
*/
|
||||
int insertOrUpdateBatch(@Param("entities") List<BasicsCanteenEvaluate> entities);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param basicsCanteenEvaluate 实例对象
|
||||
* @return 影响行数
|
||||
*/
|
||||
int update(BasicsCanteenEvaluate basicsCanteenEvaluate);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteById(Long id);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
package com.bonus.canteen.consumer.mapper;
|
||||
|
||||
import com.bonus.canteen.consumer.model.BasicsComplaint;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 投诉建议 (BasicsComplaint)表数据库访问层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2025-01-16 16:34:53
|
||||
*/
|
||||
@Mapper
|
||||
public interface BasicsComplaintMapper {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
BasicsComplaint queryById(Long id);
|
||||
|
||||
/**
|
||||
* 查询指定行数据
|
||||
*
|
||||
* @param basicsComplaint 查询条件
|
||||
* @param
|
||||
* @return 对象列表
|
||||
*/
|
||||
List<BasicsComplaint> queryAllByLimit(BasicsComplaint basicsComplaint
|
||||
);
|
||||
|
||||
/**
|
||||
* 统计总行数
|
||||
*
|
||||
* @param basicsComplaint 查询条件
|
||||
* @return 总行数
|
||||
*/
|
||||
long count(BasicsComplaint basicsComplaint);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param basicsComplaint 实例对象
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insert(BasicsComplaint basicsComplaint);
|
||||
|
||||
/**
|
||||
* 批量新增数据(MyBatis原生foreach方法)
|
||||
*
|
||||
* @param entities List<BasicsComplaint> 实例对象列表
|
||||
* @return 影响行数
|
||||
*/
|
||||
int insertBatch(@Param("entities") List<BasicsComplaint> entities);
|
||||
|
||||
/**
|
||||
* 批量新增或按主键更新数据(MyBatis原生foreach方法)
|
||||
*
|
||||
* @param entities List<BasicsComplaint> 实例对象列表
|
||||
* @return 影响行数
|
||||
* @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
|
||||
*/
|
||||
int insertOrUpdateBatch(@Param("entities") List<BasicsComplaint> entities);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param basicsComplaint 实例对象
|
||||
* @return 影响行数
|
||||
*/
|
||||
int update(BasicsComplaint basicsComplaint);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 影响行数
|
||||
*/
|
||||
int deleteById(Long id);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,317 @@
|
|||
package com.bonus.canteen.consumer.model;
|
||||
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 食堂评价表(BasicsCanteenEvaluate)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2025-01-16 14:02:54
|
||||
*/
|
||||
@Data
|
||||
public class BasicsCanteenEvaluate extends BaseEntity {
|
||||
private static final long serialVersionUID = 992652020559243518L;
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 评价ID
|
||||
*/
|
||||
private Long evaluateId;
|
||||
/**
|
||||
* 人员ID
|
||||
*/
|
||||
private Long custId;
|
||||
/**
|
||||
* 食堂ID
|
||||
*/
|
||||
private Long canteenId;
|
||||
/**
|
||||
* 档口ID
|
||||
*/
|
||||
private Long shopstallId;
|
||||
/**
|
||||
* 评价日期
|
||||
*/
|
||||
@ApiModelProperty(value = "评价日期 yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date evaluateDate;
|
||||
/**
|
||||
* 仪容仪表评分
|
||||
*/
|
||||
private Double appearance;
|
||||
/**
|
||||
* 员工服务态度评分
|
||||
*/
|
||||
private Double attitude;
|
||||
/**
|
||||
* 菜品口味评分
|
||||
*/
|
||||
private Double taste;
|
||||
/**
|
||||
* 菜肴花色品种评分
|
||||
*/
|
||||
private Double varieties;
|
||||
/**
|
||||
* 菜肴食品卫生评分
|
||||
*/
|
||||
private Double hygiene;
|
||||
/**
|
||||
* 饭菜价格评分
|
||||
*/
|
||||
private Double price;
|
||||
/**
|
||||
* 饭菜份量评分
|
||||
*/
|
||||
private Double weight;
|
||||
/**
|
||||
* 自定义评分1
|
||||
*/
|
||||
private Double customize1;
|
||||
/**
|
||||
* 自定义评分2
|
||||
*/
|
||||
private Double customize2;
|
||||
/**
|
||||
* 自定义评分3
|
||||
*/
|
||||
private Double customize3;
|
||||
/**
|
||||
* 自定义文本1
|
||||
*/
|
||||
private String customizeText1;
|
||||
/**
|
||||
* 自定义文本2
|
||||
*/
|
||||
private String customizeText2;
|
||||
/**
|
||||
* 意见和建议
|
||||
*/
|
||||
private String proposal;
|
||||
/**
|
||||
* 乐观锁
|
||||
*/
|
||||
private Integer revision;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String crby;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间 yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date crtime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String upby;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间 yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date uptime;
|
||||
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getEvaluateId() {
|
||||
return evaluateId;
|
||||
}
|
||||
|
||||
public void setEvaluateId(Long evaluateId) {
|
||||
this.evaluateId = evaluateId;
|
||||
}
|
||||
|
||||
public Long getCustId() {
|
||||
return custId;
|
||||
}
|
||||
|
||||
public void setCustId(Long custId) {
|
||||
this.custId = custId;
|
||||
}
|
||||
|
||||
public Long getCanteenId() {
|
||||
return canteenId;
|
||||
}
|
||||
|
||||
public void setCanteenId(Long canteenId) {
|
||||
this.canteenId = canteenId;
|
||||
}
|
||||
|
||||
public Long getShopstallId() {
|
||||
return shopstallId;
|
||||
}
|
||||
|
||||
public void setShopstallId(Long shopstallId) {
|
||||
this.shopstallId = shopstallId;
|
||||
}
|
||||
|
||||
public Date getEvaluateDate() {
|
||||
return evaluateDate;
|
||||
}
|
||||
|
||||
public void setEvaluateDate(Date evaluateDate) {
|
||||
this.evaluateDate = evaluateDate;
|
||||
}
|
||||
|
||||
public Double getAppearance() {
|
||||
return appearance;
|
||||
}
|
||||
|
||||
public void setAppearance(Double appearance) {
|
||||
this.appearance = appearance;
|
||||
}
|
||||
|
||||
public Double getAttitude() {
|
||||
return attitude;
|
||||
}
|
||||
|
||||
public void setAttitude(Double attitude) {
|
||||
this.attitude = attitude;
|
||||
}
|
||||
|
||||
public Double getTaste() {
|
||||
return taste;
|
||||
}
|
||||
|
||||
public void setTaste(Double taste) {
|
||||
this.taste = taste;
|
||||
}
|
||||
|
||||
public Double getVarieties() {
|
||||
return varieties;
|
||||
}
|
||||
|
||||
public void setVarieties(Double varieties) {
|
||||
this.varieties = varieties;
|
||||
}
|
||||
|
||||
public Double getHygiene() {
|
||||
return hygiene;
|
||||
}
|
||||
|
||||
public void setHygiene(Double hygiene) {
|
||||
this.hygiene = hygiene;
|
||||
}
|
||||
|
||||
public Double getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(Double price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public Double getWeight() {
|
||||
return weight;
|
||||
}
|
||||
|
||||
public void setWeight(Double weight) {
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
public Double getCustomize1() {
|
||||
return customize1;
|
||||
}
|
||||
|
||||
public void setCustomize1(Double customize1) {
|
||||
this.customize1 = customize1;
|
||||
}
|
||||
|
||||
public Double getCustomize2() {
|
||||
return customize2;
|
||||
}
|
||||
|
||||
public void setCustomize2(Double customize2) {
|
||||
this.customize2 = customize2;
|
||||
}
|
||||
|
||||
public Double getCustomize3() {
|
||||
return customize3;
|
||||
}
|
||||
|
||||
public void setCustomize3(Double customize3) {
|
||||
this.customize3 = customize3;
|
||||
}
|
||||
|
||||
public String getCustomizeText1() {
|
||||
return customizeText1;
|
||||
}
|
||||
|
||||
public void setCustomizeText1(String customizeText1) {
|
||||
this.customizeText1 = customizeText1;
|
||||
}
|
||||
|
||||
public String getCustomizeText2() {
|
||||
return customizeText2;
|
||||
}
|
||||
|
||||
public void setCustomizeText2(String customizeText2) {
|
||||
this.customizeText2 = customizeText2;
|
||||
}
|
||||
|
||||
public String getProposal() {
|
||||
return proposal;
|
||||
}
|
||||
|
||||
public void setProposal(String proposal) {
|
||||
this.proposal = proposal;
|
||||
}
|
||||
|
||||
public Integer getRevision() {
|
||||
return revision;
|
||||
}
|
||||
|
||||
public void setRevision(Integer revision) {
|
||||
this.revision = revision;
|
||||
}
|
||||
|
||||
public String getCrby() {
|
||||
return crby;
|
||||
}
|
||||
|
||||
public void setCrby(String crby) {
|
||||
this.crby = crby;
|
||||
}
|
||||
|
||||
public Date getCrtime() {
|
||||
return crtime;
|
||||
}
|
||||
|
||||
public void setCrtime(Date crtime) {
|
||||
this.crtime = crtime;
|
||||
}
|
||||
|
||||
public String getUpby() {
|
||||
return upby;
|
||||
}
|
||||
|
||||
public void setUpby(String upby) {
|
||||
this.upby = upby;
|
||||
}
|
||||
|
||||
public Date getUptime() {
|
||||
return uptime;
|
||||
}
|
||||
|
||||
public void setUptime(Date uptime) {
|
||||
this.uptime = uptime;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
package com.bonus.canteen.consumer.model;
|
||||
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel("投诉建议实体类")
|
||||
@Data
|
||||
public class BasicsComplaint extends BaseEntity {
|
||||
private static final long serialVersionUID = 992652020559243518L;
|
||||
@ApiModelProperty("主键自增")
|
||||
private Long id;
|
||||
@ApiModelProperty("投诉建议id")
|
||||
private Long complaintId;
|
||||
@ApiModelProperty("人员id ")
|
||||
private Long custId;
|
||||
@ApiModelProperty("餐厅id")
|
||||
private Long canteenId;
|
||||
@ApiModelProperty("投诉内容")
|
||||
private String content;
|
||||
@ApiModelProperty("投诉图片")
|
||||
private String complaintPicture;
|
||||
@ApiModelProperty("来源")
|
||||
private Integer sourceType;
|
||||
@ApiModelProperty("联系方式")
|
||||
private String mobile;
|
||||
@ApiModelProperty("回复内容")
|
||||
private String replyContent;
|
||||
@ApiModelProperty("乐观锁")
|
||||
private Integer revision;
|
||||
@ApiModelProperty("创建人")
|
||||
private String crby;
|
||||
@ApiModelProperty("创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date crtime;
|
||||
@ApiModelProperty("更新人")
|
||||
private String upby;
|
||||
@ApiModelProperty("修改时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date uptime;
|
||||
@ApiModelProperty("回复状态")
|
||||
private Integer replyState;
|
||||
|
||||
public Long getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public Long getComplaintId() {
|
||||
return this.complaintId;
|
||||
}
|
||||
|
||||
public Long getCustId() {
|
||||
return this.custId;
|
||||
}
|
||||
|
||||
public Long getCanteenId() {
|
||||
return this.canteenId;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return this.content;
|
||||
}
|
||||
|
||||
public String getComplaintPicture() {
|
||||
return this.complaintPicture;
|
||||
}
|
||||
|
||||
public Integer getSourceType() {
|
||||
return this.sourceType;
|
||||
}
|
||||
|
||||
public String getMobile() {
|
||||
return this.mobile;
|
||||
}
|
||||
|
||||
public String getReplyContent() {
|
||||
return this.replyContent;
|
||||
}
|
||||
|
||||
public Integer getRevision() {
|
||||
return this.revision;
|
||||
}
|
||||
|
||||
public String getCrby() {
|
||||
return this.crby;
|
||||
}
|
||||
|
||||
|
||||
public String getUpby() {
|
||||
return this.upby;
|
||||
}
|
||||
|
||||
|
||||
public Integer getReplyState() {
|
||||
return this.replyState;
|
||||
}
|
||||
|
||||
public void setId(final Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void setComplaintId(final Long complaintId) {
|
||||
this.complaintId = complaintId;
|
||||
}
|
||||
|
||||
public void setCustId(final Long custId) {
|
||||
this.custId = custId;
|
||||
}
|
||||
|
||||
public void setCanteenId(final Long canteenId) {
|
||||
this.canteenId = canteenId;
|
||||
}
|
||||
|
||||
public void setContent(final String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public void setComplaintPicture(final String complaintPicture) {
|
||||
this.complaintPicture = complaintPicture;
|
||||
}
|
||||
|
||||
public void setSourceType(final Integer sourceType) {
|
||||
this.sourceType = sourceType;
|
||||
}
|
||||
|
||||
public void setMobile(final String mobile) {
|
||||
this.mobile = mobile;
|
||||
}
|
||||
|
||||
public void setReplyContent(final String replyContent) {
|
||||
this.replyContent = replyContent;
|
||||
}
|
||||
|
||||
public void setRevision(final Integer revision) {
|
||||
this.revision = revision;
|
||||
}
|
||||
|
||||
public void setCrby(final String crby) {
|
||||
this.crby = crby;
|
||||
}
|
||||
|
||||
public void setCrtime(final Date crtime) {
|
||||
this.crtime = crtime;
|
||||
}
|
||||
|
||||
public void setUpby(final String upby) {
|
||||
this.upby = upby;
|
||||
}
|
||||
|
||||
public void setUptime(final Date uptime) {
|
||||
this.uptime = uptime;
|
||||
}
|
||||
|
||||
public void setReplyState(final Integer replyState) {
|
||||
this.replyState = replyState;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package com.bonus.canteen.consumer.service;
|
||||
|
||||
import com.bonus.canteen.consumer.model.BasicsCanteenEvaluate;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
|
||||
/**
|
||||
* 食堂评价表(BasicsCanteenEvaluate)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2025-01-16 14:03:00
|
||||
*/
|
||||
public interface BasicsCanteenEvaluateService {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
BasicsCanteenEvaluate queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param basicsCanteenEvaluate 筛选条件
|
||||
* @param pageRequest 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
Page<BasicsCanteenEvaluate> queryByPage(BasicsCanteenEvaluate basicsCanteenEvaluate, PageRequest pageRequest);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param basicsCanteenEvaluate 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
BasicsCanteenEvaluate insert(BasicsCanteenEvaluate basicsCanteenEvaluate);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param basicsCanteenEvaluate 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
BasicsCanteenEvaluate update(BasicsCanteenEvaluate basicsCanteenEvaluate);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean deleteById(Long id);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package com.bonus.canteen.consumer.service;
|
||||
|
||||
import com.bonus.canteen.consumer.model.BasicsComplaint;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 投诉建议 (BasicsComplaint)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2025-01-16 16:34:57
|
||||
*/
|
||||
public interface BasicsComplaintService {
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
BasicsComplaint queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param basicsComplaint 筛选条件
|
||||
* @param
|
||||
* @return 查询结果
|
||||
*/
|
||||
List<BasicsComplaint> queryByPage(BasicsComplaint basicsComplaint);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param basicsComplaint 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
BasicsComplaint insert(BasicsComplaint basicsComplaint);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param basicsComplaint 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
BasicsComplaint update(BasicsComplaint basicsComplaint);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean deleteById(Long id);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
package com.bonus.canteen.consumer.service.impl;
|
||||
|
||||
|
||||
import com.bonus.canteen.common.utils.StringUtil;
|
||||
import com.bonus.canteen.common.utils.StringUtils;
|
||||
import com.bonus.canteen.consumer.mapper.BasicsCanteenEvaluateMapper;
|
||||
import com.bonus.canteen.consumer.model.BasicsCanteenEvaluate;
|
||||
import com.bonus.canteen.consumer.service.BasicsCanteenEvaluateService;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageImpl;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.security.Security;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 食堂评价表(BasicsCanteenEvaluate)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2025-01-16 14:03:02
|
||||
*/
|
||||
@Service("basicsCanteenEvaluateService")
|
||||
@Slf4j
|
||||
public class BasicsCanteenEvaluateServiceImpl implements BasicsCanteenEvaluateService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private BasicsCanteenEvaluateMapper basicsCanteenEvaluateDao;
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public BasicsCanteenEvaluate queryById(Long id) {
|
||||
return this.basicsCanteenEvaluateDao.queryById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param basicsCanteenEvaluate 筛选条件
|
||||
* @param pageRequest 分页对象
|
||||
* @return 查询结果
|
||||
*/
|
||||
@Override
|
||||
public Page<BasicsCanteenEvaluate> queryByPage(BasicsCanteenEvaluate basicsCanteenEvaluate, PageRequest pageRequest) {
|
||||
long total = this.basicsCanteenEvaluateDao.count(basicsCanteenEvaluate);
|
||||
return new PageImpl<>(this.basicsCanteenEvaluateDao.queryAllByLimit(basicsCanteenEvaluate, pageRequest), pageRequest, total);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param basicsCanteenEvaluate 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public BasicsCanteenEvaluate insert(BasicsCanteenEvaluate basicsCanteenEvaluate) {
|
||||
basicsCanteenEvaluate.setCrtime(new Date());
|
||||
basicsCanteenEvaluate.setUptime(new Date());
|
||||
//创建人
|
||||
Long userid = SecurityUtils.getLoginUser().getUserid();
|
||||
if (StringUtils.isNull(userid)){
|
||||
return null;
|
||||
}
|
||||
|
||||
basicsCanteenEvaluate.setCrby(userid.toString());
|
||||
basicsCanteenEvaluate.setUpby(userid.toString());
|
||||
basicsCanteenEvaluate.setEvaluateId(StringUtil.generateRandomLong(18));
|
||||
basicsCanteenEvaluate.setEvaluateDate(new Date());
|
||||
this.basicsCanteenEvaluateDao.insert(basicsCanteenEvaluate);
|
||||
return basicsCanteenEvaluate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param basicsCanteenEvaluate 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public BasicsCanteenEvaluate update(BasicsCanteenEvaluate basicsCanteenEvaluate) {
|
||||
this.basicsCanteenEvaluateDao.update(basicsCanteenEvaluate);
|
||||
return this.queryById(basicsCanteenEvaluate.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteById(Long id) {
|
||||
return this.basicsCanteenEvaluateDao.deleteById(id) > 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
package com.bonus.canteen.consumer.service.impl;
|
||||
|
||||
import com.bonus.canteen.common.utils.StringUtil;
|
||||
import com.bonus.canteen.common.utils.StringUtils;
|
||||
import com.bonus.canteen.consumer.model.BasicsComplaint;
|
||||
import com.bonus.canteen.consumer.mapper.BasicsComplaintMapper;
|
||||
import com.bonus.canteen.consumer.service.BasicsComplaintService;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageImpl;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 投诉建议 (BasicsComplaint)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2025-01-16 16:34:57
|
||||
*/
|
||||
@Service("basicsComplaintService")
|
||||
public class BasicsComplaintServiceImpl implements BasicsComplaintService {
|
||||
@Resource
|
||||
private BasicsComplaintMapper basicsComplaintDao;
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public BasicsComplaint queryById(Long id) {
|
||||
return this.basicsComplaintDao.queryById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param basicsComplaint 筛选条件
|
||||
* @param
|
||||
* @return 查询结果queryByPage
|
||||
*/
|
||||
@Override
|
||||
public List<BasicsComplaint> queryByPage(BasicsComplaint basicsComplaint) {
|
||||
return this.basicsComplaintDao.queryAllByLimit(basicsComplaint);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param basicsComplaint 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public BasicsComplaint insert(BasicsComplaint basicsComplaint) {
|
||||
basicsComplaint.setComplaintId(StringUtil.generateRandomLong(18));
|
||||
Long userid = SecurityUtils.getLoginUser().getUserid();
|
||||
if (StringUtils.isNull(userid)){
|
||||
return null;
|
||||
}
|
||||
basicsComplaint.setUptime(new Date());
|
||||
basicsComplaint.setCrtime(new Date());
|
||||
this.basicsComplaintDao.insert(basicsComplaint);
|
||||
return basicsComplaint;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param basicsComplaint 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public BasicsComplaint update(BasicsComplaint basicsComplaint) {
|
||||
this.basicsComplaintDao.update(basicsComplaint);
|
||||
return this.queryById(basicsComplaint.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteById(Long id) {
|
||||
return this.basicsComplaintDao.deleteById(id) > 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,331 @@
|
|||
<?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.bonus.canteen.consumer.mapper.BasicsCanteenEvaluateMapper">
|
||||
|
||||
<resultMap type="com.bonus.canteen.consumer.model.BasicsCanteenEvaluate" id="BasicsCanteenEvaluateMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="evaluateId" column="evaluate_id" jdbcType="INTEGER"/>
|
||||
<result property="custId" column="cust_id" jdbcType="INTEGER"/>
|
||||
<result property="canteenId" column="canteen_id" jdbcType="INTEGER"/>
|
||||
<result property="shopstallId" column="shopstall_id" jdbcType="INTEGER"/>
|
||||
<result property="evaluateDate" column="evaluate_date" jdbcType="TIMESTAMP"/>
|
||||
<result property="appearance" column="appearance" jdbcType="NUMERIC"/>
|
||||
<result property="attitude" column="attitude" jdbcType="NUMERIC"/>
|
||||
<result property="taste" column="taste" jdbcType="NUMERIC"/>
|
||||
<result property="varieties" column="varieties" jdbcType="NUMERIC"/>
|
||||
<result property="hygiene" column="hygiene" jdbcType="NUMERIC"/>
|
||||
<result property="price" column="price" jdbcType="NUMERIC"/>
|
||||
<result property="weight" column="weight" jdbcType="NUMERIC"/>
|
||||
<result property="customize1" column="customize1" jdbcType="NUMERIC"/>
|
||||
<result property="customize2" column="customize2" jdbcType="NUMERIC"/>
|
||||
<result property="customize3" column="customize3" jdbcType="NUMERIC"/>
|
||||
<result property="customizeText1" column="customize_text1" jdbcType="VARCHAR"/>
|
||||
<result property="customizeText2" column="customize_text2" jdbcType="VARCHAR"/>
|
||||
<result property="proposal" column="proposal" jdbcType="VARCHAR"/>
|
||||
<result property="revision" column="revision" jdbcType="INTEGER"/>
|
||||
<result property="crby" column="crby" jdbcType="VARCHAR"/>
|
||||
<result property="crtime" column="crtime" jdbcType="TIMESTAMP"/>
|
||||
<result property="upby" column="upby" jdbcType="VARCHAR"/>
|
||||
<result property="uptime" column="uptime" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="BasicsCanteenEvaluateMap">
|
||||
select
|
||||
id, evaluate_id, cust_id, canteen_id, shopstall_id, evaluate_date, appearance, attitude, taste, varieties, hygiene, price, weight, customize1, customize2, customize3, customize_text1, customize_text2, proposal, revision, crby, crtime, upby, uptime
|
||||
from basics_canteen_evaluate
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAllByLimit" resultMap="BasicsCanteenEvaluateMap">
|
||||
select
|
||||
id, evaluate_id, cust_id, canteen_id, shopstall_id, evaluate_date, appearance, attitude, taste, varieties, hygiene, price, weight, customize1, customize2, customize3, customize_text1, customize_text2, proposal, revision, crby, crtime, upby, uptime
|
||||
from basics_canteen_evaluate
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="evaluateId != null">
|
||||
and evaluate_id = #{evaluateId}
|
||||
</if>
|
||||
<if test="custId != null">
|
||||
and cust_id = #{custId}
|
||||
</if>
|
||||
<if test="canteenId != null">
|
||||
and canteen_id = #{canteenId}
|
||||
</if>
|
||||
<if test="shopstallId != null">
|
||||
and shopstall_id = #{shopstallId}
|
||||
</if>
|
||||
<if test="evaluateDate != null">
|
||||
and evaluate_date = #{evaluateDate}
|
||||
</if>
|
||||
<if test="appearance != null">
|
||||
and appearance = #{appearance}
|
||||
</if>
|
||||
<if test="attitude != null">
|
||||
and attitude = #{attitude}
|
||||
</if>
|
||||
<if test="taste != null">
|
||||
and taste = #{taste}
|
||||
</if>
|
||||
<if test="varieties != null">
|
||||
and varieties = #{varieties}
|
||||
</if>
|
||||
<if test="hygiene != null">
|
||||
and hygiene = #{hygiene}
|
||||
</if>
|
||||
<if test="price != null">
|
||||
and price = #{price}
|
||||
</if>
|
||||
<if test="weight != null">
|
||||
and weight = #{weight}
|
||||
</if>
|
||||
<if test="customize1 != null">
|
||||
and customize1 = #{customize1}
|
||||
</if>
|
||||
<if test="customize2 != null">
|
||||
and customize2 = #{customize2}
|
||||
</if>
|
||||
<if test="customize3 != null">
|
||||
and customize3 = #{customize3}
|
||||
</if>
|
||||
<if test="customizeText1 != null and customizeText1 != ''">
|
||||
and customize_text1 = #{customizeText1}
|
||||
</if>
|
||||
<if test="customizeText2 != null and customizeText2 != ''">
|
||||
and customize_text2 = #{customizeText2}
|
||||
</if>
|
||||
<if test="proposal != null and proposal != ''">
|
||||
and proposal = #{proposal}
|
||||
</if>
|
||||
<if test="revision != null">
|
||||
and revision = #{revision}
|
||||
</if>
|
||||
<if test="crby != null and crby != ''">
|
||||
and crby = #{crby}
|
||||
</if>
|
||||
<if test="crtime != null">
|
||||
and crtime = #{crtime}
|
||||
</if>
|
||||
<if test="upby != null and upby != ''">
|
||||
and upby = #{upby}
|
||||
</if>
|
||||
<if test="uptime != null">
|
||||
and uptime = #{uptime}
|
||||
</if>
|
||||
</where>
|
||||
limit #{pageable.offset}, #{pageable.pageSize}
|
||||
</select>
|
||||
|
||||
<!--统计总行数-->
|
||||
<select id="count" resultType="java.lang.Long">
|
||||
select count(1)
|
||||
from basics_canteen_evaluate
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="evaluateId != null">
|
||||
and evaluate_id = #{evaluateId}
|
||||
</if>
|
||||
<if test="custId != null">
|
||||
and cust_id = #{custId}
|
||||
</if>
|
||||
<if test="canteenId != null">
|
||||
and canteen_id = #{canteenId}
|
||||
</if>
|
||||
<if test="shopstallId != null">
|
||||
and shopstall_id = #{shopstallId}
|
||||
</if>
|
||||
<if test="evaluateDate != null">
|
||||
and evaluate_date = #{evaluateDate}
|
||||
</if>
|
||||
<if test="appearance != null">
|
||||
and appearance = #{appearance}
|
||||
</if>
|
||||
<if test="attitude != null">
|
||||
and attitude = #{attitude}
|
||||
</if>
|
||||
<if test="taste != null">
|
||||
and taste = #{taste}
|
||||
</if>
|
||||
<if test="varieties != null">
|
||||
and varieties = #{varieties}
|
||||
</if>
|
||||
<if test="hygiene != null">
|
||||
and hygiene = #{hygiene}
|
||||
</if>
|
||||
<if test="price != null">
|
||||
and price = #{price}
|
||||
</if>
|
||||
<if test="weight != null">
|
||||
and weight = #{weight}
|
||||
</if>
|
||||
<if test="customize1 != null">
|
||||
and customize1 = #{customize1}
|
||||
</if>
|
||||
<if test="customize2 != null">
|
||||
and customize2 = #{customize2}
|
||||
</if>
|
||||
<if test="customize3 != null">
|
||||
and customize3 = #{customize3}
|
||||
</if>
|
||||
<if test="customizeText1 != null and customizeText1 != ''">
|
||||
and customize_text1 = #{customizeText1}
|
||||
</if>
|
||||
<if test="customizeText2 != null and customizeText2 != ''">
|
||||
and customize_text2 = #{customizeText2}
|
||||
</if>
|
||||
<if test="proposal != null and proposal != ''">
|
||||
and proposal = #{proposal}
|
||||
</if>
|
||||
<if test="revision != null">
|
||||
and revision = #{revision}
|
||||
</if>
|
||||
<if test="crby != null and crby != ''">
|
||||
and crby = #{crby}
|
||||
</if>
|
||||
<if test="crtime != null">
|
||||
and crtime = #{crtime}
|
||||
</if>
|
||||
<if test="upby != null and upby != ''">
|
||||
and upby = #{upby}
|
||||
</if>
|
||||
<if test="uptime != null">
|
||||
and uptime = #{uptime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into basics_canteen_evaluate(evaluate_id, cust_id, canteen_id, shopstall_id, evaluate_date, appearance, attitude, taste, varieties, hygiene, price, weight, customize1, customize2, customize3, customize_text1, customize_text2, proposal, revision, crby, crtime, upby, uptime)
|
||||
values (#{evaluateId}, #{custId}, #{canteenId}, #{shopstallId}, #{evaluateDate}, #{appearance}, #{attitude}, #{taste}, #{varieties}, #{hygiene}, #{price}, #{weight}, #{customize1}, #{customize2}, #{customize3}, #{customizeText1}, #{customizeText2}, #{proposal}, #{revision}, #{crby}, #{crtime}, #{upby}, #{uptime})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into basics_canteen_evaluate(evaluate_id, cust_id, canteen_id, shopstall_id, evaluate_date, appearance, attitude, taste, varieties, hygiene, price, weight, customize1, customize2, customize3, customize_text1, customize_text2, proposal, revision, crby, crtime, upby, uptime)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.evaluateId}, #{entity.custId}, #{entity.canteenId}, #{entity.shopstallId}, #{entity.evaluateDate}, #{entity.appearance}, #{entity.attitude}, #{entity.taste}, #{entity.varieties}, #{entity.hygiene}, #{entity.price}, #{entity.weight}, #{entity.customize1}, #{entity.customize2}, #{entity.customize3}, #{entity.customizeText1}, #{entity.customizeText2}, #{entity.proposal}, #{entity.revision}, #{entity.crby}, #{entity.crtime}, #{entity.upby}, #{entity.uptime})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into basics_canteen_evaluate(evaluate_id, cust_id, canteen_id, shopstall_id, evaluate_date, appearance, attitude, taste, varieties, hygiene, price, weight, customize1, customize2, customize3, customize_text1, customize_text2, proposal, revision, crby, crtime, upby, uptime)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.evaluateId}, #{entity.custId}, #{entity.canteenId}, #{entity.shopstallId}, #{entity.evaluateDate}, #{entity.appearance}, #{entity.attitude}, #{entity.taste}, #{entity.varieties}, #{entity.hygiene}, #{entity.price}, #{entity.weight}, #{entity.customize1}, #{entity.customize2}, #{entity.customize3}, #{entity.customizeText1}, #{entity.customizeText2}, #{entity.proposal}, #{entity.revision}, #{entity.crby}, #{entity.crtime}, #{entity.upby}, #{entity.uptime})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
evaluate_id = values(evaluate_id),
|
||||
cust_id = values(cust_id),
|
||||
canteen_id = values(canteen_id),
|
||||
shopstall_id = values(shopstall_id),
|
||||
evaluate_date = values(evaluate_date),
|
||||
appearance = values(appearance),
|
||||
attitude = values(attitude),
|
||||
taste = values(taste),
|
||||
varieties = values(varieties),
|
||||
hygiene = values(hygiene),
|
||||
price = values(price),
|
||||
weight = values(weight),
|
||||
customize1 = values(customize1),
|
||||
customize2 = values(customize2),
|
||||
customize3 = values(customize3),
|
||||
customize_text1 = values(customize_text1),
|
||||
customize_text2 = values(customize_text2),
|
||||
proposal = values(proposal),
|
||||
revision = values(revision),
|
||||
crby = values(crby),
|
||||
crtime = values(crtime),
|
||||
upby = values(upby),
|
||||
uptime = values(uptime)
|
||||
</insert>
|
||||
|
||||
<!--通过主键修改数据-->
|
||||
<update id="update">
|
||||
update basics_canteen_evaluate
|
||||
<set>
|
||||
<if test="evaluateId != null">
|
||||
evaluate_id = #{evaluateId},
|
||||
</if>
|
||||
<if test="custId != null">
|
||||
cust_id = #{custId},
|
||||
</if>
|
||||
<if test="canteenId != null">
|
||||
canteen_id = #{canteenId},
|
||||
</if>
|
||||
<if test="shopstallId != null">
|
||||
shopstall_id = #{shopstallId},
|
||||
</if>
|
||||
<if test="evaluateDate != null">
|
||||
evaluate_date = #{evaluateDate},
|
||||
</if>
|
||||
<if test="appearance != null">
|
||||
appearance = #{appearance},
|
||||
</if>
|
||||
<if test="attitude != null">
|
||||
attitude = #{attitude},
|
||||
</if>
|
||||
<if test="taste != null">
|
||||
taste = #{taste},
|
||||
</if>
|
||||
<if test="varieties != null">
|
||||
varieties = #{varieties},
|
||||
</if>
|
||||
<if test="hygiene != null">
|
||||
hygiene = #{hygiene},
|
||||
</if>
|
||||
<if test="price != null">
|
||||
price = #{price},
|
||||
</if>
|
||||
<if test="weight != null">
|
||||
weight = #{weight},
|
||||
</if>
|
||||
<if test="customize1 != null">
|
||||
customize1 = #{customize1},
|
||||
</if>
|
||||
<if test="customize2 != null">
|
||||
customize2 = #{customize2},
|
||||
</if>
|
||||
<if test="customize3 != null">
|
||||
customize3 = #{customize3},
|
||||
</if>
|
||||
<if test="customizeText1 != null and customizeText1 != ''">
|
||||
customize_text1 = #{customizeText1},
|
||||
</if>
|
||||
<if test="customizeText2 != null and customizeText2 != ''">
|
||||
customize_text2 = #{customizeText2},
|
||||
</if>
|
||||
<if test="proposal != null and proposal != ''">
|
||||
proposal = #{proposal},
|
||||
</if>
|
||||
<if test="revision != null">
|
||||
revision = #{revision},
|
||||
</if>
|
||||
<if test="crby != null and crby != ''">
|
||||
crby = #{crby},
|
||||
</if>
|
||||
<if test="crtime != null">
|
||||
crtime = #{crtime},
|
||||
</if>
|
||||
<if test="upby != null and upby != ''">
|
||||
upby = #{upby},
|
||||
</if>
|
||||
<if test="uptime != null">
|
||||
uptime = #{uptime},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!--通过主键删除-->
|
||||
<delete id="deleteById">
|
||||
delete from basics_canteen_evaluate where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
|
@ -0,0 +1,233 @@
|
|||
<?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.bonus.canteen.consumer.mapper.BasicsComplaintMapper">
|
||||
|
||||
<resultMap type="com.bonus.canteen.consumer.model.BasicsComplaint" id="BasicsComplaintMap">
|
||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="complaintId" column="complaint_id" jdbcType="INTEGER"/>
|
||||
<result property="custId" column="cust_id" jdbcType="INTEGER"/>
|
||||
<result property="content" column="content" jdbcType="VARCHAR"/>
|
||||
<result property="canteenId" column="canteen_id" jdbcType="INTEGER"/>
|
||||
<result property="complaintPicture" column="complaint_picture" jdbcType="VARCHAR"/>
|
||||
<result property="sourceType" column="source_type" jdbcType="INTEGER"/>
|
||||
<result property="mobile" column="mobile" jdbcType="VARCHAR"/>
|
||||
<result property="replyContent" column="reply_content" jdbcType="VARCHAR"/>
|
||||
<result property="revision" column="revision" jdbcType="INTEGER"/>
|
||||
<result property="crby" column="crby" jdbcType="VARCHAR"/>
|
||||
<result property="crtime" column="crtime" jdbcType="TIMESTAMP"/>
|
||||
<result property="upby" column="upby" jdbcType="VARCHAR"/>
|
||||
<result property="uptime" column="uptime" jdbcType="TIMESTAMP"/>
|
||||
<result property="replyState" column="reply_state" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
|
||||
<!--查询单个-->
|
||||
<select id="queryById" resultMap="BasicsComplaintMap">
|
||||
select
|
||||
id, complaint_id, cust_id, content, canteen_id, complaint_picture, source_type, mobile, reply_content, revision, crby, crtime, upby, uptime, reply_state
|
||||
from basics_complaint
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<!--查询指定行数据-->
|
||||
<select id="queryAllByLimit" resultMap="BasicsComplaintMap">
|
||||
select
|
||||
id, complaint_id, cust_id, content, canteen_id,
|
||||
complaint_picture, source_type, mobile, reply_content, revision, crby, crtime, upby, uptime, reply_state
|
||||
from basics_complaint
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="complaintId != null">
|
||||
and complaint_id = #{complaintId}
|
||||
</if>
|
||||
<if test="custId != null">
|
||||
and cust_id = #{custId}
|
||||
</if>
|
||||
<if test="content != null and content != ''">
|
||||
and content = #{content}
|
||||
</if>
|
||||
<if test="canteenId != null">
|
||||
and canteen_id = #{canteenId}
|
||||
</if>
|
||||
<if test="complaintPicture != null and complaintPicture != ''">
|
||||
and complaint_picture = #{complaintPicture}
|
||||
</if>
|
||||
<if test="sourceType != null">
|
||||
and source_type = #{sourceType}
|
||||
</if>
|
||||
<if test="mobile != null and mobile != ''">
|
||||
and mobile = #{mobile}
|
||||
</if>
|
||||
<if test="replyContent != null and replyContent != ''">
|
||||
and reply_content = #{replyContent}
|
||||
</if>
|
||||
<if test="revision != null">
|
||||
and revision = #{revision}
|
||||
</if>
|
||||
<if test="crby != null and crby != ''">
|
||||
and crby = #{crby}
|
||||
</if>
|
||||
<if test="crtime != null">
|
||||
and crtime = #{crtime}
|
||||
</if>
|
||||
<if test="upby != null and upby != ''">
|
||||
and upby = #{upby}
|
||||
</if>
|
||||
<if test="uptime != null">
|
||||
and uptime = #{uptime}
|
||||
</if>
|
||||
<if test="replyState != null">
|
||||
and reply_state = #{replyState}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
<!--统计总行数-->
|
||||
<select id="count" resultType="java.lang.Long">
|
||||
select count(1)
|
||||
from basics_complaint
|
||||
<where>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="complaintId != null">
|
||||
and complaint_id = #{complaintId}
|
||||
</if>
|
||||
<if test="custId != null">
|
||||
and cust_id = #{custId}
|
||||
</if>
|
||||
<if test="content != null and content != ''">
|
||||
and content = #{content}
|
||||
</if>
|
||||
<if test="canteenId != null">
|
||||
and canteen_id = #{canteenId}
|
||||
</if>
|
||||
<if test="complaintPicture != null and complaintPicture != ''">
|
||||
and complaint_picture = #{complaintPicture}
|
||||
</if>
|
||||
<if test="sourceType != null">
|
||||
and source_type = #{sourceType}
|
||||
</if>
|
||||
<if test="mobile != null and mobile != ''">
|
||||
and mobile = #{mobile}
|
||||
</if>
|
||||
<if test="replyContent != null and replyContent != ''">
|
||||
and reply_content = #{replyContent}
|
||||
</if>
|
||||
<if test="revision != null">
|
||||
and revision = #{revision}
|
||||
</if>
|
||||
<if test="crby != null and crby != ''">
|
||||
and crby = #{crby}
|
||||
</if>
|
||||
<if test="crtime != null">
|
||||
and crtime = #{crtime}
|
||||
</if>
|
||||
<if test="upby != null and upby != ''">
|
||||
and upby = #{upby}
|
||||
</if>
|
||||
<if test="uptime != null">
|
||||
and uptime = #{uptime}
|
||||
</if>
|
||||
<if test="replyState != null">
|
||||
and reply_state = #{replyState}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!--新增所有列-->
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into basics_complaint(complaint_id, cust_id, content, canteen_id, complaint_picture, source_type, mobile, reply_content, revision, crby, crtime, upby, uptime, reply_state)
|
||||
values (#{complaintId}, #{custId}, #{content}, #{canteenId}, #{complaintPicture}, #{sourceType}, #{mobile}, #{replyContent}, #{revision}, #{crby}, #{crtime}, #{upby}, #{uptime}, #{replyState})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into basics_complaint(complaint_id, cust_id, content, canteen_id, complaint_picture, source_type, mobile, reply_content, revision, crby, crtime, upby, uptime, reply_state)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.complaintId}, #{entity.custId}, #{entity.content}, #{entity.canteenId}, #{entity.complaintPicture}, #{entity.sourceType}, #{entity.mobile}, #{entity.replyContent}, #{entity.revision}, #{entity.crby}, #{entity.crtime}, #{entity.upby}, #{entity.uptime}, #{entity.replyState})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into basics_complaint(complaint_id, cust_id, content, canteen_id, complaint_picture, source_type, mobile, reply_content, revision, crby, crtime, upby, uptime, reply_state)
|
||||
values
|
||||
<foreach collection="entities" item="entity" separator=",">
|
||||
(#{entity.complaintId}, #{entity.custId}, #{entity.content}, #{entity.canteenId}, #{entity.complaintPicture}, #{entity.sourceType}, #{entity.mobile}, #{entity.replyContent}, #{entity.revision}, #{entity.crby}, #{entity.crtime}, #{entity.upby}, #{entity.uptime}, #{entity.replyState})
|
||||
</foreach>
|
||||
on duplicate key update
|
||||
complaint_id = values(complaint_id),
|
||||
cust_id = values(cust_id),
|
||||
content = values(content),
|
||||
canteen_id = values(canteen_id),
|
||||
complaint_picture = values(complaint_picture),
|
||||
source_type = values(source_type),
|
||||
mobile = values(mobile),
|
||||
reply_content = values(reply_content),
|
||||
revision = values(revision),
|
||||
crby = values(crby),
|
||||
crtime = values(crtime),
|
||||
upby = values(upby),
|
||||
uptime = values(uptime),
|
||||
reply_state = values(reply_state)
|
||||
</insert>
|
||||
|
||||
<!--通过主键修改数据-->
|
||||
<update id="update">
|
||||
update basics_complaint
|
||||
<set>
|
||||
<if test="complaintId != null">
|
||||
complaint_id = #{complaintId},
|
||||
</if>
|
||||
<if test="custId != null">
|
||||
cust_id = #{custId},
|
||||
</if>
|
||||
<if test="content != null and content != ''">
|
||||
content = #{content},
|
||||
</if>
|
||||
<if test="canteenId != null">
|
||||
canteen_id = #{canteenId},
|
||||
</if>
|
||||
<if test="complaintPicture != null and complaintPicture != ''">
|
||||
complaint_picture = #{complaintPicture},
|
||||
</if>
|
||||
<if test="sourceType != null">
|
||||
source_type = #{sourceType},
|
||||
</if>
|
||||
<if test="mobile != null and mobile != ''">
|
||||
mobile = #{mobile},
|
||||
</if>
|
||||
<if test="replyContent != null and replyContent != ''">
|
||||
reply_content = #{replyContent},
|
||||
</if>
|
||||
<if test="revision != null">
|
||||
revision = #{revision},
|
||||
</if>
|
||||
<if test="crby != null and crby != ''">
|
||||
crby = #{crby},
|
||||
</if>
|
||||
<if test="crtime != null">
|
||||
crtime = #{crtime},
|
||||
</if>
|
||||
<if test="upby != null and upby != ''">
|
||||
upby = #{upby},
|
||||
</if>
|
||||
<if test="uptime != null">
|
||||
uptime = #{uptime},
|
||||
</if>
|
||||
<if test="replyState != null">
|
||||
reply_state = #{replyState},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!--通过主键删除-->
|
||||
<delete id="deleteById">
|
||||
delete from basics_complaint where id = #{id}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue