forked from sd_delivery/delivery
27 changed files with 5844 additions and 32 deletions
@ -0,0 +1,46 @@ |
|||
package com.ccsens.delivery.api; |
|||
|
|||
import cn.hutool.core.lang.Snowflake; |
|||
import com.ccsens.delivery.bean.po.SysArea; |
|||
import com.ccsens.delivery.bean.po.SysUser; |
|||
import com.ccsens.delivery.persist.mapper.SysAreaMapper; |
|||
import com.ccsens.util.JsonResponse; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiImplicitParams; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestMethod; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.annotation.Resource; |
|||
import javax.servlet.http.HttpServletRequest; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: whj |
|||
* @time: 2022/3/8 8:42 |
|||
*/ |
|||
@Api(tags = "DEBUG" , description = "DebugController | ") |
|||
@RestController |
|||
@RequestMapping("/debug") |
|||
@Slf4j |
|||
public class DebugController { |
|||
|
|||
@Resource |
|||
private SysAreaMapper sysAreaMapper; |
|||
@Resource |
|||
private Snowflake snowflake; |
|||
|
|||
@ApiOperation(value = "/测试",notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value="",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse debug(HttpServletRequest request) throws Exception { |
|||
|
|||
return JsonResponse.newInstance().ok("hello world!"); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,158 @@ |
|||
package com.ccsens.delivery.api; |
|||
|
|||
import com.ccsens.delivery.annotation.MustLogin; |
|||
import com.ccsens.delivery.bean.dto.StudentDto; |
|||
import com.ccsens.delivery.bean.dto.UserDto; |
|||
import com.ccsens.delivery.bean.vo.StudentVo; |
|||
import com.ccsens.delivery.bean.vo.UserVo; |
|||
import com.ccsens.delivery.service.IStudentService; |
|||
import com.ccsens.util.JsonResponse; |
|||
import com.ccsens.util.bean.dto.QueryDto; |
|||
import com.github.pagehelper.PageHelper; |
|||
import com.github.pagehelper.PageInfo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiImplicitParams; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import io.swagger.annotations.ApiParam; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestMethod; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Api(tags = "stu" , description = "学生订单相关接口") |
|||
@RestController |
|||
@RequestMapping("/stu") |
|||
@Slf4j |
|||
public class StudentController { |
|||
|
|||
@Resource |
|||
private IStudentService studentService; |
|||
|
|||
@MustLogin |
|||
@ApiOperation(value = "/查询当前用户提交的订单信息", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/query", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<List<StudentVo.StudentOrder>> queryStuOrder(@ApiParam @RequestBody @Validated QueryDto<StudentDto.QueryStuList> params) throws Exception { |
|||
log.info("查询当前用户提交的订单信息,{}",params); |
|||
List<StudentVo.StudentOrder> studentOrder = studentService.queryStuOrder(params.getUserId(), params.getParam()); |
|||
log.info("返回当前用户提交的订单信息"); |
|||
return JsonResponse.newInstance().ok(studentOrder); |
|||
} |
|||
|
|||
@MustLogin |
|||
@ApiOperation(value = "/查询当前用户最新的一条数据", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/queryNew", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<StudentVo.StudentOrder> queryStuOrderNew(@ApiParam @RequestBody @Validated QueryDto params) throws Exception { |
|||
log.info("查询当前用户最新的一条数据,{}",params); |
|||
StudentVo.StudentOrder studentOrder = studentService.queryStuOrderNew(params.getUserId()); |
|||
log.info("返回当前用户提交的最后一条订单信息"); |
|||
return JsonResponse.newInstance().ok(studentOrder); |
|||
} |
|||
|
|||
@MustLogin |
|||
@ApiOperation(value = "/根据id查看订单信息", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/orderById", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<StudentVo.StudentOrder> queryStuOrderById(@ApiParam @RequestBody @Validated QueryDto<StudentDto.OrderId> params) throws Exception { |
|||
log.info("根据id查看订单信息,{}",params); |
|||
StudentVo.StudentOrder studentOrder = studentService.queryStuOrderById(params.getUserId(),params.getParam()); |
|||
log.info("返回订单信息"); |
|||
return JsonResponse.newInstance().ok(studentOrder); |
|||
} |
|||
|
|||
@MustLogin |
|||
@ApiOperation(value = "/分页查找当前用户提交的订单列表", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/pageOrder", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<PageInfo<StudentVo.PageQueryOrder>> pageQueryStuOrder(@ApiParam @RequestBody @Validated QueryDto<StudentDto.PageQueryStuList> params) throws Exception { |
|||
log.info("查询当前用户提交的订单信息,{}",params); |
|||
PageInfo<StudentVo.PageQueryOrder> studentOrder = studentService.pageQueryStuOrder(params.getUserId(), params.getParam()); |
|||
log.info("返回当前用户提交的订单信息"); |
|||
return JsonResponse.newInstance().ok(studentOrder); |
|||
} |
|||
|
|||
@ApiOperation(value = "/查询学院或宿舍", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/area", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<List<StudentVo.AreaInfo>> queryArea(@ApiParam @RequestBody @Validated QueryDto<StudentDto.QueryArea> params) throws Exception { |
|||
log.info("查询学院或宿舍,{}",params); |
|||
List<StudentVo.AreaInfo> areaInfo = studentService.queryArea(params.getUserId(), params.getParam()); |
|||
log.info("返回学院或宿舍信息"); |
|||
return JsonResponse.newInstance().ok(areaInfo); |
|||
} |
|||
|
|||
@MustLogin |
|||
@ApiOperation(value = "/提交订单", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/submit", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse submitOrder(@ApiParam @RequestBody @Validated QueryDto<StudentDto.SubmitOrder> params) throws Exception { |
|||
log.info("提交订单,{}",params); |
|||
studentService.submitOrder(params.getUserId(), params.getParam()); |
|||
log.info("提交订单成功"); |
|||
return JsonResponse.newInstance().ok(); |
|||
} |
|||
|
|||
@MustLogin |
|||
@ApiOperation(value = "/后台分页查找订单信息", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/back/query", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<PageInfo<StudentVo.StudentOrder>> backQueryStuOrder(@ApiParam @RequestBody @Validated QueryDto<StudentDto.BackQueryOrder> params) throws Exception { |
|||
log.info("后台分页查找订单信息,{}",params); |
|||
PageInfo<StudentVo.StudentOrder> studentOrderList = studentService.backQueryStuOrder(params.getUserId(), params.getParam()); |
|||
log.info("分页返回订单信息"); |
|||
return JsonResponse.newInstance().ok(studentOrderList); |
|||
} |
|||
|
|||
@MustLogin |
|||
@ApiOperation(value = "/修改订单完成状态", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/status", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse updateOrderStatus(@ApiParam @RequestBody @Validated QueryDto<StudentDto.UpdateOrderStatus> params) throws Exception { |
|||
log.info("修改订单完成状态,{}",params); |
|||
studentService.updateOrderStatus(params.getUserId(), params.getParam()); |
|||
log.info("修改订单完成状态成功"); |
|||
return JsonResponse.newInstance().ok(); |
|||
} |
|||
|
|||
@MustLogin |
|||
@ApiOperation(value = "/用户撤回订单", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/revocation", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse revocationOrder(@ApiParam @RequestBody @Validated QueryDto<StudentDto.OrderId> params) throws Exception { |
|||
log.info("用户撤回订单,{}",params); |
|||
studentService.revocationOrder(params.getUserId(), params.getParam()); |
|||
log.info("撤回订单成功"); |
|||
return JsonResponse.newInstance().ok(); |
|||
} |
|||
|
|||
|
|||
@MustLogin |
|||
@ApiOperation(value = "将订单信息导出Excel表格", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/export", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<String> exportExcel(@ApiParam @RequestBody @Validated QueryDto<StudentDto.BackQueryOrder> params) throws Exception { |
|||
log.info("将订单信息导出Excel表格,{}",params); |
|||
String path = studentService.exportExcel(params.getUserId(), params.getParam()); |
|||
log.info("返回表格的访问路径:{}",path); |
|||
return JsonResponse.newInstance().ok(path); |
|||
} |
|||
} |
@ -0,0 +1,156 @@ |
|||
package com.ccsens.delivery.bean.dto; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.*; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Data |
|||
public class StudentDto { |
|||
|
|||
@Data |
|||
@ApiModel("请求-修改订单状态") |
|||
public static class UpdateOrderStatus{ |
|||
@ApiModelProperty("订单id") |
|||
private List<Long> orderIdList; |
|||
@NotNull(message = "请选择配送状态") |
|||
@ApiModelProperty("配送状态 0未配送 1已完成 2无药 3撤回") |
|||
private Byte status; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("请求-查询学生提价的订单列表") |
|||
public static class QueryStuList{ |
|||
@ApiModelProperty("配送状态 0未配送 1已完成 2无药 3撤回") |
|||
private Byte status; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("请求-分页查询自己提价的订单列表") |
|||
public static class PageQueryStuList{ |
|||
@ApiModelProperty("配送状态 0未配送 1已完成 2无药 3撤回") |
|||
private Byte status; |
|||
@ApiModelProperty("第几页") |
|||
@Min(value = 1) |
|||
private int pageNum = 1; |
|||
@ApiModelProperty("每页多少条") |
|||
@Min(value = 1) |
|||
@Max(value=100) |
|||
private int pageSize = 10; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("请求-订单id") |
|||
public static class OrderId{ |
|||
@NotNull(message = "请传入订单id") |
|||
@ApiModelProperty("订单Id") |
|||
private Long id; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("请求-查询学院或宿舍") |
|||
public static class QueryArea{ |
|||
@ApiModelProperty("名称 为空则查询全部") |
|||
private String name; |
|||
@ApiModelProperty("类型 0学院 1宿舍") |
|||
private byte type; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("请求-提价订单") |
|||
public static class SubmitOrder{ |
|||
@NotBlank(message = "请输入姓名") |
|||
@ApiModelProperty("姓名") |
|||
private String name; |
|||
@NotBlank(message = "请输入学号") |
|||
@ApiModelProperty("学号") |
|||
private String stuNum; |
|||
@NotEmpty(message = "请输入正确的手机号") |
|||
@Pattern(regexp="^[1]([3-9])[0-9]{9}$",message="请输入正确的手机号") |
|||
@ApiModelProperty("联系电话") |
|||
private String phone; |
|||
@ApiModelProperty("身份证号") |
|||
private String idCard; |
|||
@ApiModelProperty("所在学院Id") |
|||
private Long collegeId; |
|||
@ApiModelProperty("所在学院名称") |
|||
private Long collegeName; |
|||
@ApiModelProperty("所在宿舍Id") |
|||
private Long dormitoryId; |
|||
@ApiModelProperty("所在宿舍名称") |
|||
private Long dormitoryName; |
|||
@NotBlank(message = "请填写详细地址") |
|||
@ApiModelProperty("详细地址") |
|||
private String address; |
|||
@NotBlank(message = "请填写症状描述") |
|||
@ApiModelProperty("症状描述") |
|||
private String symptom; |
|||
@ApiModelProperty("是否断药 0否 1是") |
|||
private byte broken; |
|||
@ApiModelProperty("备注") |
|||
private String remark; |
|||
@NotNull(message = "请选择配送时间") |
|||
@ApiModelProperty("希望配送时间") |
|||
private Long planTime; |
|||
@ApiModelProperty("药品信息") |
|||
private List<SubmitOrderItem> orderItemList; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("请求-订单项信息") |
|||
public static class SubmitOrderItem{ |
|||
@NotBlank(message = "请填写药品名称") |
|||
@ApiModelProperty("药品名称") |
|||
private String name; |
|||
@NotBlank(message = "请填写药品规格") |
|||
@ApiModelProperty("药品规格") |
|||
private String specification; |
|||
@Min(value = 1,message = "请填写正确的药品数量") |
|||
@Max(value = 99,message = "请填写正确的药品数量") |
|||
@ApiModelProperty("数量") |
|||
private int num; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("请求-后台分页查找订单信息") |
|||
public static class BackQueryOrder{ |
|||
@ApiModelProperty("学生姓名") |
|||
private String name; |
|||
@ApiModelProperty("学号") |
|||
private String stuNum; |
|||
@ApiModelProperty("手机号") |
|||
private String phone; |
|||
@ApiModelProperty("身份证号") |
|||
private String idCard; |
|||
@ApiModelProperty("所在学院Id") |
|||
private Long collegeId; |
|||
@ApiModelProperty("所在宿舍Id") |
|||
private List<Long> dormitoryId; |
|||
@ApiModelProperty("详细地址") |
|||
private String address; |
|||
@ApiModelProperty("症状描述") |
|||
private String symptom; |
|||
@ApiModelProperty("药品名称") |
|||
private String drugName; |
|||
@ApiModelProperty("是否断药 0否 1是") |
|||
private Byte broken; |
|||
@ApiModelProperty("配送状态 0未配送 1已完成 2无药 3撤回") |
|||
private Byte status; |
|||
@ApiModelProperty("开始时间") |
|||
private Long startTime; |
|||
@ApiModelProperty("结束时间") |
|||
private Long endTime; |
|||
@ApiModelProperty("第几页") |
|||
@Min(value = 1) |
|||
private int pageNum = 1; |
|||
@ApiModelProperty("每页多少条") |
|||
@Min(value = 1) |
|||
@Max(value=100) |
|||
private int pageSize = 10; |
|||
} |
|||
} |
@ -0,0 +1,249 @@ |
|||
package com.ccsens.delivery.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
public class StuOrder implements Serializable { |
|||
private Long id; |
|||
|
|||
private Long userId; |
|||
|
|||
private String name; |
|||
|
|||
private String stuNum; |
|||
|
|||
private String phone; |
|||
|
|||
private String idCard; |
|||
|
|||
private Long collegeId; |
|||
|
|||
private Long dormitoryId; |
|||
|
|||
private String address; |
|||
|
|||
private String symptom; |
|||
|
|||
private Byte broken; |
|||
|
|||
private String remark; |
|||
|
|||
private Long planTime; |
|||
|
|||
private Long realTime; |
|||
|
|||
private Byte status; |
|||
|
|||
private Long operator; |
|||
|
|||
private Date createdAt; |
|||
|
|||
private Date updatedAt; |
|||
|
|||
private Byte recStatus; |
|||
|
|||
private String collegeName; |
|||
|
|||
private String dormitoryName; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
public Long getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(Long id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public Long getUserId() { |
|||
return userId; |
|||
} |
|||
|
|||
public void setUserId(Long userId) { |
|||
this.userId = userId; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name == null ? null : name.trim(); |
|||
} |
|||
|
|||
public String getStuNum() { |
|||
return stuNum; |
|||
} |
|||
|
|||
public void setStuNum(String stuNum) { |
|||
this.stuNum = stuNum == null ? null : stuNum.trim(); |
|||
} |
|||
|
|||
public String getPhone() { |
|||
return phone; |
|||
} |
|||
|
|||
public void setPhone(String phone) { |
|||
this.phone = phone == null ? null : phone.trim(); |
|||
} |
|||
|
|||
public String getIdCard() { |
|||
return idCard; |
|||
} |
|||
|
|||
public void setIdCard(String idCard) { |
|||
this.idCard = idCard == null ? null : idCard.trim(); |
|||
} |
|||
|
|||
public Long getCollegeId() { |
|||
return collegeId; |
|||
} |
|||
|
|||
public void setCollegeId(Long collegeId) { |
|||
this.collegeId = collegeId; |
|||
} |
|||
|
|||
public Long getDormitoryId() { |
|||
return dormitoryId; |
|||
} |
|||
|
|||
public void setDormitoryId(Long dormitoryId) { |
|||
this.dormitoryId = dormitoryId; |
|||
} |
|||
|
|||
public String getAddress() { |
|||
return address; |
|||
} |
|||
|
|||
public void setAddress(String address) { |
|||
this.address = address == null ? null : address.trim(); |
|||
} |
|||
|
|||
public String getSymptom() { |
|||
return symptom; |
|||
} |
|||
|
|||
public void setSymptom(String symptom) { |
|||
this.symptom = symptom == null ? null : symptom.trim(); |
|||
} |
|||
|
|||
public Byte getBroken() { |
|||
return broken; |
|||
} |
|||
|
|||
public void setBroken(Byte broken) { |
|||
this.broken = broken; |
|||
} |
|||
|
|||
public String getRemark() { |
|||
return remark; |
|||
} |
|||
|
|||
public void setRemark(String remark) { |
|||
this.remark = remark == null ? null : remark.trim(); |
|||
} |
|||
|
|||
public Long getPlanTime() { |
|||
return planTime; |
|||
} |
|||
|
|||
public void setPlanTime(Long planTime) { |
|||
this.planTime = planTime; |
|||
} |
|||
|
|||
public Long getRealTime() { |
|||
return realTime; |
|||
} |
|||
|
|||
public void setRealTime(Long realTime) { |
|||
this.realTime = realTime; |
|||
} |
|||
|
|||
public Byte getStatus() { |
|||
return status; |
|||
} |
|||
|
|||
public void setStatus(Byte status) { |
|||
this.status = status; |
|||
} |
|||
|
|||
public Long getOperator() { |
|||
return operator; |
|||
} |
|||
|
|||
public void setOperator(Long operator) { |
|||
this.operator = operator; |
|||
} |
|||
|
|||
public Date getCreatedAt() { |
|||
return createdAt; |
|||
} |
|||
|
|||
public void setCreatedAt(Date createdAt) { |
|||
this.createdAt = createdAt; |
|||
} |
|||
|
|||
public Date getUpdatedAt() { |
|||
return updatedAt; |
|||
} |
|||
|
|||
public void setUpdatedAt(Date updatedAt) { |
|||
this.updatedAt = updatedAt; |
|||
} |
|||
|
|||
public Byte getRecStatus() { |
|||
return recStatus; |
|||
} |
|||
|
|||
public void setRecStatus(Byte recStatus) { |
|||
this.recStatus = recStatus; |
|||
} |
|||
|
|||
public String getCollegeName() { |
|||
return collegeName; |
|||
} |
|||
|
|||
public void setCollegeName(String collegeName) { |
|||
this.collegeName = collegeName == null ? null : collegeName.trim(); |
|||
} |
|||
|
|||
public String getDormitoryName() { |
|||
return dormitoryName; |
|||
} |
|||
|
|||
public void setDormitoryName(String dormitoryName) { |
|||
this.dormitoryName = dormitoryName == null ? null : dormitoryName.trim(); |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
StringBuilder sb = new StringBuilder(); |
|||
sb.append(getClass().getSimpleName()); |
|||
sb.append(" ["); |
|||
sb.append("Hash = ").append(hashCode()); |
|||
sb.append(", id=").append(id); |
|||
sb.append(", userId=").append(userId); |
|||
sb.append(", name=").append(name); |
|||
sb.append(", stuNum=").append(stuNum); |
|||
sb.append(", phone=").append(phone); |
|||
sb.append(", idCard=").append(idCard); |
|||
sb.append(", collegeId=").append(collegeId); |
|||
sb.append(", dormitoryId=").append(dormitoryId); |
|||
sb.append(", address=").append(address); |
|||
sb.append(", symptom=").append(symptom); |
|||
sb.append(", broken=").append(broken); |
|||
sb.append(", remark=").append(remark); |
|||
sb.append(", planTime=").append(planTime); |
|||
sb.append(", realTime=").append(realTime); |
|||
sb.append(", status=").append(status); |
|||
sb.append(", operator=").append(operator); |
|||
sb.append(", createdAt=").append(createdAt); |
|||
sb.append(", updatedAt=").append(updatedAt); |
|||
sb.append(", recStatus=").append(recStatus); |
|||
sb.append(", collegeName=").append(collegeName); |
|||
sb.append(", dormitoryName=").append(dormitoryName); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -0,0 +1,117 @@ |
|||
package com.ccsens.delivery.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
public class StuOrderItem implements Serializable { |
|||
private Long id; |
|||
|
|||
private Long orderId; |
|||
|
|||
private String name; |
|||
|
|||
private String specification; |
|||
|
|||
private Integer num; |
|||
|
|||
private Long operator; |
|||
|
|||
private Date createdAt; |
|||
|
|||
private Date updatedAt; |
|||
|
|||
private Byte recStatus; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
public Long getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(Long id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public Long getOrderId() { |
|||
return orderId; |
|||
} |
|||
|
|||
public void setOrderId(Long orderId) { |
|||
this.orderId = orderId; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name == null ? null : name.trim(); |
|||
} |
|||
|
|||
public String getSpecification() { |
|||
return specification; |
|||
} |
|||
|
|||
public void setSpecification(String specification) { |
|||
this.specification = specification == null ? null : specification.trim(); |
|||
} |
|||
|
|||
public Integer getNum() { |
|||
return num; |
|||
} |
|||
|
|||
public void setNum(Integer num) { |
|||
this.num = num; |
|||
} |
|||
|
|||
public Long getOperator() { |
|||
return operator; |
|||
} |
|||
|
|||
public void setOperator(Long operator) { |
|||
this.operator = operator; |
|||
} |
|||
|
|||
public Date getCreatedAt() { |
|||
return createdAt; |
|||
} |
|||
|
|||
public void setCreatedAt(Date createdAt) { |
|||
this.createdAt = createdAt; |
|||
} |
|||
|
|||
public Date getUpdatedAt() { |
|||
return updatedAt; |
|||
} |
|||
|
|||
public void setUpdatedAt(Date updatedAt) { |
|||
this.updatedAt = updatedAt; |
|||
} |
|||
|
|||
public Byte getRecStatus() { |
|||
return recStatus; |
|||
} |
|||
|
|||
public void setRecStatus(Byte recStatus) { |
|||
this.recStatus = recStatus; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
StringBuilder sb = new StringBuilder(); |
|||
sb.append(getClass().getSimpleName()); |
|||
sb.append(" ["); |
|||
sb.append("Hash = ").append(hashCode()); |
|||
sb.append(", id=").append(id); |
|||
sb.append(", orderId=").append(orderId); |
|||
sb.append(", name=").append(name); |
|||
sb.append(", specification=").append(specification); |
|||
sb.append(", num=").append(num); |
|||
sb.append(", operator=").append(operator); |
|||
sb.append(", createdAt=").append(createdAt); |
|||
sb.append(", updatedAt=").append(updatedAt); |
|||
sb.append(", recStatus=").append(recStatus); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
@ -0,0 +1,761 @@ |
|||
package com.ccsens.delivery.bean.po; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
public class StuOrderItemExample { |
|||
protected String orderByClause; |
|||
|
|||
protected boolean distinct; |
|||
|
|||
protected List<Criteria> oredCriteria; |
|||
|
|||
public StuOrderItemExample() { |
|||
oredCriteria = new ArrayList<Criteria>(); |
|||
} |
|||
|
|||
public void setOrderByClause(String orderByClause) { |
|||
this.orderByClause = orderByClause; |
|||
} |
|||
|
|||
public String getOrderByClause() { |
|||
return orderByClause; |
|||
} |
|||
|
|||
public void setDistinct(boolean distinct) { |
|||
this.distinct = distinct; |
|||
} |
|||
|
|||
public boolean isDistinct() { |
|||
return distinct; |
|||
} |
|||
|
|||
public List<Criteria> getOredCriteria() { |
|||
return oredCriteria; |
|||
} |
|||
|
|||
public void or(Criteria criteria) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
|
|||
public Criteria or() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
oredCriteria.add(criteria); |
|||
return criteria; |
|||
} |
|||
|
|||
public Criteria createCriteria() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
if (oredCriteria.size() == 0) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
return criteria; |
|||
} |
|||
|
|||
protected Criteria createCriteriaInternal() { |
|||
Criteria criteria = new Criteria(); |
|||
return criteria; |
|||
} |
|||
|
|||
public void clear() { |
|||
oredCriteria.clear(); |
|||
orderByClause = null; |
|||
distinct = false; |
|||
} |
|||
|
|||
protected abstract static class GeneratedCriteria { |
|||
protected List<Criterion> criteria; |
|||
|
|||
protected GeneratedCriteria() { |
|||
super(); |
|||
criteria = new ArrayList<Criterion>(); |
|||
} |
|||
|
|||
public boolean isValid() { |
|||
return criteria.size() > 0; |
|||
} |
|||
|
|||
public List<Criterion> getAllCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
public List<Criterion> getCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
protected void addCriterion(String condition) { |
|||
if (condition == null) { |
|||
throw new RuntimeException("Value for condition cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition)); |
|||
} |
|||
|
|||
protected void addCriterion(String condition, Object value, String property) { |
|||
if (value == null) { |
|||
throw new RuntimeException("Value for " + property + " cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition, value)); |
|||
} |
|||
|
|||
protected void addCriterion(String condition, Object value1, Object value2, String property) { |
|||
if (value1 == null || value2 == null) { |
|||
throw new RuntimeException("Between values for " + property + " cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition, value1, value2)); |
|||
} |
|||
|
|||
public Criteria andIdIsNull() { |
|||
addCriterion("id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdIsNotNull() { |
|||
addCriterion("id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdEqualTo(Long value) { |
|||
addCriterion("id =", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotEqualTo(Long value) { |
|||
addCriterion("id <>", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdGreaterThan(Long value) { |
|||
addCriterion("id >", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("id >=", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdLessThan(Long value) { |
|||
addCriterion("id <", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("id <=", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdIn(List<Long> values) { |
|||
addCriterion("id in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotIn(List<Long> values) { |
|||
addCriterion("id not in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdBetween(Long value1, Long value2) { |
|||
addCriterion("id between", value1, value2, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("id not between", value1, value2, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOrderIdIsNull() { |
|||
addCriterion("order_id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOrderIdIsNotNull() { |
|||
addCriterion("order_id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOrderIdEqualTo(Long value) { |
|||
addCriterion("order_id =", value, "orderId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOrderIdNotEqualTo(Long value) { |
|||
addCriterion("order_id <>", value, "orderId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOrderIdGreaterThan(Long value) { |
|||
addCriterion("order_id >", value, "orderId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOrderIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("order_id >=", value, "orderId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOrderIdLessThan(Long value) { |
|||
addCriterion("order_id <", value, "orderId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOrderIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("order_id <=", value, "orderId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOrderIdIn(List<Long> values) { |
|||
addCriterion("order_id in", values, "orderId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOrderIdNotIn(List<Long> values) { |
|||
addCriterion("order_id not in", values, "orderId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOrderIdBetween(Long value1, Long value2) { |
|||
addCriterion("order_id between", value1, value2, "orderId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOrderIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("order_id not between", value1, value2, "orderId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameIsNull() { |
|||
addCriterion("name is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameIsNotNull() { |
|||
addCriterion("name is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameEqualTo(String value) { |
|||
addCriterion("name =", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameNotEqualTo(String value) { |
|||
addCriterion("name <>", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameGreaterThan(String value) { |
|||
addCriterion("name >", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameGreaterThanOrEqualTo(String value) { |
|||
addCriterion("name >=", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameLessThan(String value) { |
|||
addCriterion("name <", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameLessThanOrEqualTo(String value) { |
|||
addCriterion("name <=", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameLike(String value) { |
|||
addCriterion("name like", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameNotLike(String value) { |
|||
addCriterion("name not like", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameIn(List<String> values) { |
|||
addCriterion("name in", values, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameNotIn(List<String> values) { |
|||
addCriterion("name not in", values, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameBetween(String value1, String value2) { |
|||
addCriterion("name between", value1, value2, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameNotBetween(String value1, String value2) { |
|||
addCriterion("name not between", value1, value2, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSpecificationIsNull() { |
|||
addCriterion("specification is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSpecificationIsNotNull() { |
|||
addCriterion("specification is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSpecificationEqualTo(String value) { |
|||
addCriterion("specification =", value, "specification"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSpecificationNotEqualTo(String value) { |
|||
addCriterion("specification <>", value, "specification"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSpecificationGreaterThan(String value) { |
|||
addCriterion("specification >", value, "specification"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSpecificationGreaterThanOrEqualTo(String value) { |
|||
addCriterion("specification >=", value, "specification"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSpecificationLessThan(String value) { |
|||
addCriterion("specification <", value, "specification"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSpecificationLessThanOrEqualTo(String value) { |
|||
addCriterion("specification <=", value, "specification"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSpecificationLike(String value) { |
|||
addCriterion("specification like", value, "specification"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSpecificationNotLike(String value) { |
|||
addCriterion("specification not like", value, "specification"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSpecificationIn(List<String> values) { |
|||
addCriterion("specification in", values, "specification"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSpecificationNotIn(List<String> values) { |
|||
addCriterion("specification not in", values, "specification"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSpecificationBetween(String value1, String value2) { |
|||
addCriterion("specification between", value1, value2, "specification"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSpecificationNotBetween(String value1, String value2) { |
|||
addCriterion("specification not between", value1, value2, "specification"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNumIsNull() { |
|||
addCriterion("num is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNumIsNotNull() { |
|||
addCriterion("num is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNumEqualTo(Integer value) { |
|||
addCriterion("num =", value, "num"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNumNotEqualTo(Integer value) { |
|||
addCriterion("num <>", value, "num"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNumGreaterThan(Integer value) { |
|||
addCriterion("num >", value, "num"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNumGreaterThanOrEqualTo(Integer value) { |
|||
addCriterion("num >=", value, "num"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNumLessThan(Integer value) { |
|||
addCriterion("num <", value, "num"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNumLessThanOrEqualTo(Integer value) { |
|||
addCriterion("num <=", value, "num"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNumIn(List<Integer> values) { |
|||
addCriterion("num in", values, "num"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNumNotIn(List<Integer> values) { |
|||
addCriterion("num not in", values, "num"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNumBetween(Integer value1, Integer value2) { |
|||
addCriterion("num between", value1, value2, "num"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNumNotBetween(Integer value1, Integer value2) { |
|||
addCriterion("num not between", value1, value2, "num"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorIsNull() { |
|||
addCriterion("operator is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorIsNotNull() { |
|||
addCriterion("operator is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorEqualTo(Long value) { |
|||
addCriterion("operator =", value, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorNotEqualTo(Long value) { |
|||
addCriterion("operator <>", value, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorGreaterThan(Long value) { |
|||
addCriterion("operator >", value, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("operator >=", value, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorLessThan(Long value) { |
|||
addCriterion("operator <", value, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorLessThanOrEqualTo(Long value) { |
|||
addCriterion("operator <=", value, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorIn(List<Long> values) { |
|||
addCriterion("operator in", values, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorNotIn(List<Long> values) { |
|||
addCriterion("operator not in", values, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorBetween(Long value1, Long value2) { |
|||
addCriterion("operator between", value1, value2, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorNotBetween(Long value1, Long value2) { |
|||
addCriterion("operator not between", value1, value2, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtIsNull() { |
|||
addCriterion("created_at is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtIsNotNull() { |
|||
addCriterion("created_at is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtEqualTo(Date value) { |
|||
addCriterion("created_at =", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotEqualTo(Date value) { |
|||
addCriterion("created_at <>", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtGreaterThan(Date value) { |
|||
addCriterion("created_at >", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { |
|||
addCriterion("created_at >=", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtLessThan(Date value) { |
|||
addCriterion("created_at <", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtLessThanOrEqualTo(Date value) { |
|||
addCriterion("created_at <=", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtIn(List<Date> values) { |
|||
addCriterion("created_at in", values, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotIn(List<Date> values) { |
|||
addCriterion("created_at not in", values, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtBetween(Date value1, Date value2) { |
|||
addCriterion("created_at between", value1, value2, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotBetween(Date value1, Date value2) { |
|||
addCriterion("created_at not between", value1, value2, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtIsNull() { |
|||
addCriterion("updated_at is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtIsNotNull() { |
|||
addCriterion("updated_at is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtEqualTo(Date value) { |
|||
addCriterion("updated_at =", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotEqualTo(Date value) { |
|||
addCriterion("updated_at <>", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtGreaterThan(Date value) { |
|||
addCriterion("updated_at >", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { |
|||
addCriterion("updated_at >=", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtLessThan(Date value) { |
|||
addCriterion("updated_at <", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { |
|||
addCriterion("updated_at <=", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtIn(List<Date> values) { |
|||
addCriterion("updated_at in", values, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotIn(List<Date> values) { |
|||
addCriterion("updated_at not in", values, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtBetween(Date value1, Date value2) { |
|||
addCriterion("updated_at between", value1, value2, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { |
|||
addCriterion("updated_at not between", value1, value2, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusIsNull() { |
|||
addCriterion("rec_status is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusIsNotNull() { |
|||
addCriterion("rec_status is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusEqualTo(Byte value) { |
|||
addCriterion("rec_status =", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotEqualTo(Byte value) { |
|||
addCriterion("rec_status <>", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusGreaterThan(Byte value) { |
|||
addCriterion("rec_status >", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { |
|||
addCriterion("rec_status >=", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusLessThan(Byte value) { |
|||
addCriterion("rec_status <", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusLessThanOrEqualTo(Byte value) { |
|||
addCriterion("rec_status <=", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusIn(List<Byte> values) { |
|||
addCriterion("rec_status in", values, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotIn(List<Byte> values) { |
|||
addCriterion("rec_status not in", values, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusBetween(Byte value1, Byte value2) { |
|||
addCriterion("rec_status between", value1, value2, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { |
|||
addCriterion("rec_status not between", value1, value2, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
} |
|||
|
|||
public static class Criteria extends GeneratedCriteria { |
|||
|
|||
protected Criteria() { |
|||
super(); |
|||
} |
|||
} |
|||
|
|||
public static class Criterion { |
|||
private String condition; |
|||
|
|||
private Object value; |
|||
|
|||
private Object secondValue; |
|||
|
|||
private boolean noValue; |
|||
|
|||
private boolean singleValue; |
|||
|
|||
private boolean betweenValue; |
|||
|
|||
private boolean listValue; |
|||
|
|||
private String typeHandler; |
|||
|
|||
public String getCondition() { |
|||
return condition; |
|||
} |
|||
|
|||
public Object getValue() { |
|||
return value; |
|||
} |
|||
|
|||
public Object getSecondValue() { |
|||
return secondValue; |
|||
} |
|||
|
|||
public boolean isNoValue() { |
|||
return noValue; |
|||
} |
|||
|
|||
public boolean isSingleValue() { |
|||
return singleValue; |
|||
} |
|||
|
|||
public boolean isBetweenValue() { |
|||
return betweenValue; |
|||
} |
|||
|
|||
public boolean isListValue() { |
|||
return listValue; |
|||
} |
|||
|
|||
public String getTypeHandler() { |
|||
return typeHandler; |
|||
} |
|||
|
|||
protected Criterion(String condition) { |
|||
super(); |
|||
this.condition = condition; |
|||
this.typeHandler = null; |
|||
this.noValue = true; |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value, String typeHandler) { |
|||
super(); |
|||
this.condition = condition; |
|||
this.value = value; |
|||
this.typeHandler = typeHandler; |
|||
if (value instanceof List<?>) { |
|||
this.listValue = true; |
|||
} else { |
|||
this.singleValue = true; |
|||
} |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value) { |
|||
this(condition, value, null); |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { |
|||
super(); |
|||
this.condition = condition; |
|||
this.value = value; |
|||
this.secondValue = secondValue; |
|||
this.typeHandler = typeHandler; |
|||
this.betweenValue = true; |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value, Object secondValue) { |
|||
this(condition, value, secondValue, null); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,95 @@ |
|||
package com.ccsens.delivery.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
public class SysArea implements Serializable { |
|||
private Long id; |
|||
|
|||
private String name; |
|||
|
|||
private Byte type; |
|||
|
|||
private Long operator; |
|||
|
|||
private Date createdAt; |
|||
|
|||
private Date updatedAt; |
|||
|
|||
private Byte recStatus; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
public Long getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(Long id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name == null ? null : name.trim(); |
|||
} |
|||
|
|||
public Byte getType() { |
|||
return type; |
|||
} |
|||
|
|||
public void setType(Byte type) { |
|||
this.type = type; |
|||
} |
|||
|
|||
public Long getOperator() { |
|||
return operator; |
|||
} |
|||
|
|||
public void setOperator(Long operator) { |
|||
this.operator = operator; |
|||
} |
|||
|
|||
public Date getCreatedAt() { |
|||
return createdAt; |
|||
} |
|||
|
|||
public void setCreatedAt(Date createdAt) { |
|||
this.createdAt = createdAt; |
|||
} |
|||
|
|||
public Date getUpdatedAt() { |
|||
return updatedAt; |
|||
} |
|||
|
|||
public void setUpdatedAt(Date updatedAt) { |
|||
this.updatedAt = updatedAt; |
|||
} |
|||
|
|||
public Byte getRecStatus() { |
|||
return recStatus; |
|||
} |
|||
|
|||
public void setRecStatus(Byte recStatus) { |
|||
this.recStatus = recStatus; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
StringBuilder sb = new StringBuilder(); |
|||
sb.append(getClass().getSimpleName()); |
|||
sb.append(" ["); |
|||
sb.append("Hash = ").append(hashCode()); |
|||
sb.append(", id=").append(id); |
|||
sb.append(", name=").append(name); |
|||
sb.append(", type=").append(type); |
|||
sb.append(", operator=").append(operator); |
|||
sb.append(", createdAt=").append(createdAt); |
|||
sb.append(", updatedAt=").append(updatedAt); |
|||
sb.append(", recStatus=").append(recStatus); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
@ -0,0 +1,631 @@ |
|||
package com.ccsens.delivery.bean.po; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
public class SysAreaExample { |
|||
protected String orderByClause; |
|||
|
|||
protected boolean distinct; |
|||
|
|||
protected List<Criteria> oredCriteria; |
|||
|
|||
public SysAreaExample() { |
|||
oredCriteria = new ArrayList<Criteria>(); |
|||
} |
|||
|
|||
public void setOrderByClause(String orderByClause) { |
|||
this.orderByClause = orderByClause; |
|||
} |
|||
|
|||
public String getOrderByClause() { |
|||
return orderByClause; |
|||
} |
|||
|
|||
public void setDistinct(boolean distinct) { |
|||
this.distinct = distinct; |
|||
} |
|||
|
|||
public boolean isDistinct() { |
|||
return distinct; |
|||
} |
|||
|
|||
public List<Criteria> getOredCriteria() { |
|||
return oredCriteria; |
|||
} |
|||
|
|||
public void or(Criteria criteria) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
|
|||
public Criteria or() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
oredCriteria.add(criteria); |
|||
return criteria; |
|||
} |
|||
|
|||
public Criteria createCriteria() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
if (oredCriteria.size() == 0) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
return criteria; |
|||
} |
|||
|
|||
protected Criteria createCriteriaInternal() { |
|||
Criteria criteria = new Criteria(); |
|||
return criteria; |
|||
} |
|||
|
|||
public void clear() { |
|||
oredCriteria.clear(); |
|||
orderByClause = null; |
|||
distinct = false; |
|||
} |
|||
|
|||
protected abstract static class GeneratedCriteria { |
|||
protected List<Criterion> criteria; |
|||
|
|||
protected GeneratedCriteria() { |
|||
super(); |
|||
criteria = new ArrayList<Criterion>(); |
|||
} |
|||
|
|||
public boolean isValid() { |
|||
return criteria.size() > 0; |
|||
} |
|||
|
|||
public List<Criterion> getAllCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
public List<Criterion> getCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
protected void addCriterion(String condition) { |
|||
if (condition == null) { |
|||
throw new RuntimeException("Value for condition cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition)); |
|||
} |
|||
|
|||
protected void addCriterion(String condition, Object value, String property) { |
|||
if (value == null) { |
|||
throw new RuntimeException("Value for " + property + " cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition, value)); |
|||
} |
|||
|
|||
protected void addCriterion(String condition, Object value1, Object value2, String property) { |
|||
if (value1 == null || value2 == null) { |
|||
throw new RuntimeException("Between values for " + property + " cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition, value1, value2)); |
|||
} |
|||
|
|||
public Criteria andIdIsNull() { |
|||
addCriterion("id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdIsNotNull() { |
|||
addCriterion("id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdEqualTo(Long value) { |
|||
addCriterion("id =", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotEqualTo(Long value) { |
|||
addCriterion("id <>", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdGreaterThan(Long value) { |
|||
addCriterion("id >", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("id >=", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdLessThan(Long value) { |
|||
addCriterion("id <", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("id <=", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdIn(List<Long> values) { |
|||
addCriterion("id in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotIn(List<Long> values) { |
|||
addCriterion("id not in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdBetween(Long value1, Long value2) { |
|||
addCriterion("id between", value1, value2, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("id not between", value1, value2, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameIsNull() { |
|||
addCriterion("name is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameIsNotNull() { |
|||
addCriterion("name is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameEqualTo(String value) { |
|||
addCriterion("name =", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameNotEqualTo(String value) { |
|||
addCriterion("name <>", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameGreaterThan(String value) { |
|||
addCriterion("name >", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameGreaterThanOrEqualTo(String value) { |
|||
addCriterion("name >=", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameLessThan(String value) { |
|||
addCriterion("name <", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameLessThanOrEqualTo(String value) { |
|||
addCriterion("name <=", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameLike(String value) { |
|||
addCriterion("name like", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameNotLike(String value) { |
|||
addCriterion("name not like", value, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameIn(List<String> values) { |
|||
addCriterion("name in", values, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameNotIn(List<String> values) { |
|||
addCriterion("name not in", values, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameBetween(String value1, String value2) { |
|||
addCriterion("name between", value1, value2, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andNameNotBetween(String value1, String value2) { |
|||
addCriterion("name not between", value1, value2, "name"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeIsNull() { |
|||
addCriterion("type is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeIsNotNull() { |
|||
addCriterion("type is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeEqualTo(Byte value) { |
|||
addCriterion("type =", value, "type"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeNotEqualTo(Byte value) { |
|||
addCriterion("type <>", value, "type"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeGreaterThan(Byte value) { |
|||
addCriterion("type >", value, "type"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeGreaterThanOrEqualTo(Byte value) { |
|||
addCriterion("type >=", value, "type"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeLessThan(Byte value) { |
|||
addCriterion("type <", value, "type"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeLessThanOrEqualTo(Byte value) { |
|||
addCriterion("type <=", value, "type"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeIn(List<Byte> values) { |
|||
addCriterion("type in", values, "type"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeNotIn(List<Byte> values) { |
|||
addCriterion("type not in", values, "type"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeBetween(Byte value1, Byte value2) { |
|||
addCriterion("type between", value1, value2, "type"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTypeNotBetween(Byte value1, Byte value2) { |
|||
addCriterion("type not between", value1, value2, "type"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorIsNull() { |
|||
addCriterion("operator is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorIsNotNull() { |
|||
addCriterion("operator is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorEqualTo(Long value) { |
|||
addCriterion("operator =", value, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorNotEqualTo(Long value) { |
|||
addCriterion("operator <>", value, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorGreaterThan(Long value) { |
|||
addCriterion("operator >", value, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("operator >=", value, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorLessThan(Long value) { |
|||
addCriterion("operator <", value, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorLessThanOrEqualTo(Long value) { |
|||
addCriterion("operator <=", value, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorIn(List<Long> values) { |
|||
addCriterion("operator in", values, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorNotIn(List<Long> values) { |
|||
addCriterion("operator not in", values, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorBetween(Long value1, Long value2) { |
|||
addCriterion("operator between", value1, value2, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andOperatorNotBetween(Long value1, Long value2) { |
|||
addCriterion("operator not between", value1, value2, "operator"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtIsNull() { |
|||
addCriterion("created_at is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtIsNotNull() { |
|||
addCriterion("created_at is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtEqualTo(Date value) { |
|||
addCriterion("created_at =", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotEqualTo(Date value) { |
|||
addCriterion("created_at <>", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtGreaterThan(Date value) { |
|||
addCriterion("created_at >", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { |
|||
addCriterion("created_at >=", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtLessThan(Date value) { |
|||
addCriterion("created_at <", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtLessThanOrEqualTo(Date value) { |
|||
addCriterion("created_at <=", value, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtIn(List<Date> values) { |
|||
addCriterion("created_at in", values, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotIn(List<Date> values) { |
|||
addCriterion("created_at not in", values, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtBetween(Date value1, Date value2) { |
|||
addCriterion("created_at between", value1, value2, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andCreatedAtNotBetween(Date value1, Date value2) { |
|||
addCriterion("created_at not between", value1, value2, "createdAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtIsNull() { |
|||
addCriterion("updated_at is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtIsNotNull() { |
|||
addCriterion("updated_at is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtEqualTo(Date value) { |
|||
addCriterion("updated_at =", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotEqualTo(Date value) { |
|||
addCriterion("updated_at <>", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtGreaterThan(Date value) { |
|||
addCriterion("updated_at >", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { |
|||
addCriterion("updated_at >=", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtLessThan(Date value) { |
|||
addCriterion("updated_at <", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { |
|||
addCriterion("updated_at <=", value, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtIn(List<Date> values) { |
|||
addCriterion("updated_at in", values, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotIn(List<Date> values) { |
|||
addCriterion("updated_at not in", values, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtBetween(Date value1, Date value2) { |
|||
addCriterion("updated_at between", value1, value2, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { |
|||
addCriterion("updated_at not between", value1, value2, "updatedAt"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusIsNull() { |
|||
addCriterion("rec_status is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusIsNotNull() { |
|||
addCriterion("rec_status is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusEqualTo(Byte value) { |
|||
addCriterion("rec_status =", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotEqualTo(Byte value) { |
|||
addCriterion("rec_status <>", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusGreaterThan(Byte value) { |
|||
addCriterion("rec_status >", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { |
|||
addCriterion("rec_status >=", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusLessThan(Byte value) { |
|||
addCriterion("rec_status <", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusLessThanOrEqualTo(Byte value) { |
|||
addCriterion("rec_status <=", value, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusIn(List<Byte> values) { |
|||
addCriterion("rec_status in", values, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotIn(List<Byte> values) { |
|||
addCriterion("rec_status not in", values, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusBetween(Byte value1, Byte value2) { |
|||
addCriterion("rec_status between", value1, value2, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { |
|||
addCriterion("rec_status not between", value1, value2, "recStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
} |
|||
|
|||
public static class Criteria extends GeneratedCriteria { |
|||
|
|||
protected Criteria() { |
|||
super(); |
|||
} |
|||
} |
|||
|
|||
public static class Criterion { |
|||
private String condition; |
|||
|
|||
private Object value; |
|||
|
|||
private Object secondValue; |
|||
|
|||
private boolean noValue; |
|||
|
|||
private boolean singleValue; |
|||
|
|||
private boolean betweenValue; |
|||
|
|||
private boolean listValue; |
|||
|
|||
private String typeHandler; |
|||
|
|||
public String getCondition() { |
|||
return condition; |
|||
} |
|||
|
|||
public Object getValue() { |
|||
return value; |
|||
} |
|||
|
|||
public Object getSecondValue() { |
|||
return secondValue; |
|||
} |
|||
|
|||
public boolean isNoValue() { |
|||
return noValue; |
|||
} |
|||
|
|||
public boolean isSingleValue() { |
|||
return singleValue; |
|||
} |
|||
|
|||
public boolean isBetweenValue() { |
|||
return betweenValue; |
|||
} |
|||
|
|||
public boolean isListValue() { |
|||
return listValue; |
|||
} |
|||
|
|||
public String getTypeHandler() { |
|||
return typeHandler; |
|||
} |
|||
|
|||
protected Criterion(String condition) { |
|||
super(); |
|||
this.condition = condition; |
|||
this.typeHandler = null; |
|||
this.noValue = true; |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value, String typeHandler) { |
|||
super(); |
|||
this.condition = condition; |
|||
this.value = value; |
|||
this.typeHandler = typeHandler; |
|||
if (value instanceof List<?>) { |
|||
this.listValue = true; |
|||
} else { |
|||
this.singleValue = true; |
|||
} |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value) { |
|||
this(condition, value, null); |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { |
|||
super(); |
|||
this.condition = condition; |
|||
this.value = value; |
|||
this.secondValue = secondValue; |
|||
this.typeHandler = typeHandler; |
|||
this.betweenValue = true; |
|||
} |
|||
|
|||
protected Criterion(String condition, Object value, Object secondValue) { |
|||
this(condition, value, secondValue, null); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,126 @@ |
|||
package com.ccsens.delivery.bean.vo; |
|||
|
|||
import cn.hutool.core.util.StrUtil; |
|||
import com.ccsens.delivery.util.DeliveryConstant; |
|||
import com.ccsens.util.DesensitizedUtils; |
|||
import com.ccsens.util.SymmetricCryptoUtil; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Data |
|||
public class StudentVo { |
|||
|
|||
@Data |
|||
@ApiModel("返回-学生提价的订单信息") |
|||
public static class StudentOrder{ |
|||
@ApiModelProperty("订单id") |
|||
private Long id; |
|||
@ApiModelProperty("姓名") |
|||
private String name; |
|||
@ApiModelProperty("学号") |
|||
private String stuNum; |
|||
@ApiModelProperty("联系电话") |
|||
private String phone; |
|||
@ApiModelProperty("身份证号") |
|||
private String idCard; |
|||
@ApiModelProperty("所在学院Id") |
|||
private Long collegeId; |
|||
@ApiModelProperty("所在学院名称") |
|||
private String collegeName; |
|||
@ApiModelProperty("所在宿舍Id") |
|||
private Long dormitoryId; |
|||
@ApiModelProperty("所在宿舍名称") |
|||
private String dormitoryName; |
|||
@ApiModelProperty("详细地址") |
|||
private String address; |
|||
@ApiModelProperty("症状描述") |
|||
private String symptom; |
|||
@ApiModelProperty("是否断药 0否 1是") |
|||
private byte broken; |
|||
@ApiModelProperty("备注") |
|||
private String remark; |
|||
@ApiModelProperty("希望配送时间") |
|||
private Long planTime; |
|||
@ApiModelProperty("实际配送时间") |
|||
private Long realTime; |
|||
@ApiModelProperty("配送状态 0未配送 1已完成 2无药 3撤回") |
|||
private byte status; |
|||
@ApiModelProperty("提交时间") |
|||
private Long submitTime; |
|||
@ApiModelProperty("药品信息") |
|||
private List<StudentOrderItem> orderItemList; |
|||
|
|||
public String getStuNum() { |
|||
if(StrUtil.isNotBlank(stuNum)){ |
|||
String decode = SymmetricCryptoUtil.decode(DeliveryConstant.ENCRYPT_KEY, stuNum); |
|||
if(StrUtil.isNotBlank(decode)){ |
|||
stuNum = decode; |
|||
} |
|||
} |
|||
return stuNum; |
|||
} |
|||
|
|||
public String getPhone() { |
|||
if(StrUtil.isNotBlank(phone)){ |
|||
String decode = SymmetricCryptoUtil.decode(DeliveryConstant.ENCRYPT_KEY, phone); |
|||
if(StrUtil.isNotBlank(decode)){ |
|||
phone = decode; |
|||
} |
|||
} |
|||
return phone; |
|||
} |
|||
|
|||
public String getIdCard() { |
|||
if(StrUtil.isNotBlank(idCard)){ |
|||
String decode = SymmetricCryptoUtil.decode(DeliveryConstant.ENCRYPT_KEY, idCard); |
|||
if(StrUtil.isNotBlank(decode)){ |
|||
idCard = decode; |
|||
} |
|||
} |
|||
return idCard; |
|||
} |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("返回-订单项信息") |
|||
public static class StudentOrderItem{ |
|||
@ApiModelProperty("订单项id") |
|||
private Long id; |
|||
@ApiModelProperty("药品名称") |
|||
private String name; |
|||
@ApiModelProperty("药品规格") |
|||
private String specification; |
|||
@ApiModelProperty("数量") |
|||
private int num; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("返回-学院或宿舍信息") |
|||
public static class AreaInfo{ |
|||
@ApiModelProperty("id") |
|||
private Long id; |
|||
@ApiModelProperty("名称") |
|||
private String name; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("返回-分页查找订单列表") |
|||
public static class PageQueryOrder{ |
|||
@ApiModelProperty("订单id") |
|||
private Long id; |
|||
@ApiModelProperty("药品名称") |
|||
private String itemName; |
|||
@ApiModelProperty("药品种类数量") |
|||
private int num; |
|||
@ApiModelProperty("配送状态 0未配送 1已完成 2无药 3撤回") |
|||
private byte status; |
|||
@ApiModelProperty("提交时间") |
|||
private Long submitTime; |
|||
} |
|||
} |
@ -0,0 +1,86 @@ |
|||
package com.ccsens.delivery.persist.dao; |
|||
|
|||
import com.ccsens.delivery.bean.dto.StudentDto; |
|||
import com.ccsens.delivery.bean.vo.StudentVo; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.springframework.stereotype.Repository; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Repository |
|||
public interface StudentDao { |
|||
|
|||
/** |
|||
* 查询学院或宿舍信息 |
|||
*/ |
|||
List<StudentVo.AreaInfo> queryArea(@Param("name") String name, @Param("type") byte type); |
|||
|
|||
/** |
|||
* 查询学生自己提交的订单 |
|||
* @param userId userId |
|||
* @param status 订单状态 |
|||
* @return 返回订单信息 |
|||
*/ |
|||
List<StudentVo.StudentOrder> queryStuOrder(@Param("userId") Long userId, @Param("status") Byte status); |
|||
|
|||
/** |
|||
* 分页查找所有的订单信息 |
|||
* @param param 筛选条件 |
|||
* @return 订单信息 |
|||
*/ |
|||
List<StudentVo.StudentOrder> backQueryStuOrder(@Param("param") StudentDto.BackQueryOrder param); |
|||
|
|||
/** |
|||
* 通过订单id查找订单项信息 |
|||
* @param orderId 订单id |
|||
* @return 返回订单项信息 |
|||
*/ |
|||
List<StudentVo.StudentOrderItem> queryItemByOrderId(@Param("orderId")Long orderId); |
|||
|
|||
/** |
|||
* 批量修改订单的状态 |
|||
* @param orderIdList 订单id |
|||
* @param status 状态 |
|||
*/ |
|||
void updateStatusById(@Param("orderIdList")List<Long> orderIdList, @Param("status") Byte status); |
|||
|
|||
/** |
|||
* 导出excel表格时根据条件查询订单信息 |
|||
* @param param 筛选条件 |
|||
* @return 返回订单信息 |
|||
*/ |
|||
List<StudentVo.StudentOrder> queryExportOrder(@Param("param")StudentDto.BackQueryOrder param); |
|||
|
|||
/** |
|||
* 查找当前用户最后一条订单 |
|||
* @param userId userId |
|||
* @return 返回订单信息 |
|||
*/ |
|||
StudentVo.StudentOrder queryStuOrderNew(@Param("userId")Long userId); |
|||
|
|||
/** |
|||
* 根据id查找订单信息 |
|||
* @param userId userId |
|||
* @param orderId 订单id |
|||
* @return 返回订单信息 |
|||
*/ |
|||
StudentVo.StudentOrder queryStuOrderById(@Param("userId")Long userId,@Param("orderId") Long orderId); |
|||
|
|||
/** |
|||
* 分页查找用户提交的订单列表(简要信息) |
|||
* @param userId useId |
|||
* @param status 订单状态 |
|||
* @return 返回 |
|||
*/ |
|||
List<StudentVo.PageQueryOrder> pageQueryStuOrder(@Param("userId")Long userId,@Param("status") Byte status); |
|||
|
|||
/** |
|||
* 查找用户最新的一条记录 |
|||
* @param userId userID |
|||
* @return 返回订单id |
|||
*/ |
|||
Long getNewOrderByUserId(@Param("userId")Long userId); |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.ccsens.delivery.persist.mapper; |
|||
|
|||
import com.ccsens.delivery.bean.po.StuOrderItem; |
|||
import com.ccsens.delivery.bean.po.StuOrderItemExample; |
|||
import java.util.List; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
public interface StuOrderItemMapper { |
|||
long countByExample(StuOrderItemExample example); |
|||
|
|||
int deleteByExample(StuOrderItemExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(StuOrderItem record); |
|||
|
|||
int insertSelective(StuOrderItem record); |
|||
|
|||
List<StuOrderItem> selectByExample(StuOrderItemExample example); |
|||
|
|||
StuOrderItem selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") StuOrderItem record, @Param("example") StuOrderItemExample example); |
|||
|
|||
int updateByExample(@Param("record") StuOrderItem record, @Param("example") StuOrderItemExample example); |
|||
|
|||
int updateByPrimaryKeySelective(StuOrderItem record); |
|||
|
|||
int updateByPrimaryKey(StuOrderItem record); |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.ccsens.delivery.persist.mapper; |
|||
|
|||
import com.ccsens.delivery.bean.po.StuOrder; |
|||
import com.ccsens.delivery.bean.po.StuOrderExample; |
|||
import java.util.List; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
public interface StuOrderMapper { |
|||
long countByExample(StuOrderExample example); |
|||
|
|||
int deleteByExample(StuOrderExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(StuOrder record); |
|||
|
|||
int insertSelective(StuOrder record); |
|||
|
|||
List<StuOrder> selectByExample(StuOrderExample example); |
|||
|
|||
StuOrder selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") StuOrder record, @Param("example") StuOrderExample example); |
|||
|
|||
int updateByExample(@Param("record") StuOrder record, @Param("example") StuOrderExample example); |
|||
|
|||
int updateByPrimaryKeySelective(StuOrder record); |
|||
|
|||
int updateByPrimaryKey(StuOrder record); |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.ccsens.delivery.persist.mapper; |
|||
|
|||
import com.ccsens.delivery.bean.po.SysArea; |
|||
import com.ccsens.delivery.bean.po.SysAreaExample; |
|||
import java.util.List; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
public interface SysAreaMapper { |
|||
long countByExample(SysAreaExample example); |
|||
|
|||
int deleteByExample(SysAreaExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(SysArea record); |
|||
|
|||
int insertSelective(SysArea record); |
|||
|
|||
List<SysArea> selectByExample(SysAreaExample example); |
|||
|
|||
SysArea selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") SysArea record, @Param("example") SysAreaExample example); |
|||
|
|||
int updateByExample(@Param("record") SysArea record, @Param("example") SysAreaExample example); |
|||
|
|||
int updateByPrimaryKeySelective(SysArea record); |
|||
|
|||
int updateByPrimaryKey(SysArea record); |
|||
} |
@ -0,0 +1,90 @@ |
|||
package com.ccsens.delivery.service; |
|||
|
|||
import com.ccsens.delivery.bean.dto.StudentDto; |
|||
import com.ccsens.delivery.bean.vo.StudentVo; |
|||
import com.github.pagehelper.PageInfo; |
|||
|
|||
import java.io.FileNotFoundException; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
public interface IStudentService { |
|||
|
|||
/** |
|||
* 查询当前用户提交的订单信息 |
|||
* @param userId userId |
|||
* @param param 订单状态 |
|||
* @return 订单信息 |
|||
*/ |
|||
List<StudentVo.StudentOrder> queryStuOrder(Long userId, StudentDto.QueryStuList param); |
|||
|
|||
/** |
|||
* 查询学院或宿舍信息 |
|||
* @param userId userId |
|||
* @param param 筛选条件 |
|||
* @return 返回宿舍或学院列表 |
|||
*/ |
|||
List<StudentVo.AreaInfo> queryArea(Long userId, StudentDto.QueryArea param); |
|||
|
|||
/** |
|||
* 提交订单 |
|||
* @param userId userId |
|||
* @param param 订单信息 |
|||
*/ |
|||
void submitOrder(Long userId, StudentDto.SubmitOrder param); |
|||
|
|||
/** |
|||
* 后台分页查找 |
|||
* @param userId userId |
|||
* @param param 筛选条件和分页信息 |
|||
* @return 返回订单信息 |
|||
*/ |
|||
PageInfo<StudentVo.StudentOrder> backQueryStuOrder(Long userId, StudentDto.BackQueryOrder param); |
|||
|
|||
/** |
|||
* 修改订单状态 |
|||
* @param userId userId |
|||
* @param param 订单id和状态 |
|||
*/ |
|||
void updateOrderStatus(Long userId, StudentDto.UpdateOrderStatus param); |
|||
|
|||
/** |
|||
* 导出excel表格 |
|||
* @param userId userId |
|||
* @param param 筛选条件 |
|||
* @return 返回表格路径 |
|||
*/ |
|||
String exportExcel(Long userId, StudentDto.BackQueryOrder param) throws Exception; |
|||
|
|||
/** |
|||
* 查找当前用户最新一条订单信息 |
|||
* @param userId userId |
|||
* @return 最新的订单信息 |
|||
*/ |
|||
StudentVo.StudentOrder queryStuOrderNew(Long userId); |
|||
|
|||
/** |
|||
* 根据id查找订单信息 |
|||
* @param userId userID |
|||
* @param param 订单id |
|||
* @return 返回订单信息 |
|||
*/ |
|||
StudentVo.StudentOrder queryStuOrderById(Long userId, StudentDto.OrderId param); |
|||
|
|||
/** |
|||
* 分页查找用户提交的订单列表(简要信息) |
|||
* @param userId useId |
|||
* @param param 分页信息 |
|||
* @return 返回 |
|||
*/ |
|||
PageInfo<StudentVo.PageQueryOrder> pageQueryStuOrder(Long userId, StudentDto.PageQueryStuList param); |
|||
|
|||
/** |
|||
* 用户撤回订单 |
|||
* @param userId userId |
|||
* @param param 订单id |
|||
*/ |
|||
void revocationOrder(Long userId, StudentDto.OrderId param); |
|||
} |
@ -0,0 +1,304 @@ |
|||
package com.ccsens.delivery.service; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import cn.hutool.core.collection.CollectionUtil; |
|||
import cn.hutool.core.date.DateUtil; |
|||
import cn.hutool.core.lang.Snowflake; |
|||
import cn.hutool.core.util.ObjectUtil; |
|||
import com.alibaba.fastjson.JSONObject; |
|||
import com.ccsens.delivery.bean.dto.StudentDto; |
|||
import com.ccsens.delivery.bean.po.StuOrder; |
|||
import com.ccsens.delivery.bean.po.StuOrderItem; |
|||
import com.ccsens.delivery.bean.po.SysArea; |
|||
import com.ccsens.delivery.bean.vo.StudentVo; |
|||
import com.ccsens.delivery.persist.dao.StudentDao; |
|||
import com.ccsens.delivery.persist.mapper.StuOrderItemMapper; |
|||
import com.ccsens.delivery.persist.mapper.StuOrderMapper; |
|||
import com.ccsens.delivery.persist.mapper.SysAreaMapper; |
|||
import com.ccsens.delivery.util.DeliveryCodeError; |
|||
import com.ccsens.delivery.util.DeliveryConstant; |
|||
import com.ccsens.util.*; |
|||
import com.ccsens.util.exception.BaseException; |
|||
import com.github.pagehelper.PageHelper; |
|||
import com.github.pagehelper.PageInfo; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Propagation; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.io.File; |
|||
import java.io.FileNotFoundException; |
|||
import java.io.FileOutputStream; |
|||
import java.io.OutputStream; |
|||
import java.text.SimpleDateFormat; |
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) |
|||
public class StudentService implements IStudentService { |
|||
|
|||
@Resource |
|||
private StudentDao studentDao; |
|||
@Resource |
|||
private SysAreaMapper sysAreaMapper; |
|||
@Resource |
|||
private Snowflake snowflake; |
|||
@Resource |
|||
private StuOrderMapper stuOrderMapper; |
|||
@Resource |
|||
private StuOrderItemMapper stuOrderItemMapper; |
|||
@Resource |
|||
private RedisUtil redisUtil; |
|||
|
|||
@Override |
|||
public List<StudentVo.StudentOrder> queryStuOrder(Long userId, StudentDto.QueryStuList param) { |
|||
return studentDao.queryStuOrder(userId,param.getStatus()); |
|||
} |
|||
|
|||
@Override |
|||
public StudentVo.StudentOrder queryStuOrderNew(Long userId) { |
|||
//查找最新的一条记录
|
|||
Long orderId = studentDao.getNewOrderByUserId(userId); |
|||
return studentDao.queryStuOrderById(userId,orderId); |
|||
} |
|||
|
|||
@Override |
|||
public StudentVo.StudentOrder queryStuOrderById(Long userId, StudentDto.OrderId param) { |
|||
return studentDao.queryStuOrderById(userId,param.getId()); |
|||
} |
|||
|
|||
@Override |
|||
public PageInfo<StudentVo.PageQueryOrder> pageQueryStuOrder(Long userId, StudentDto.PageQueryStuList param) { |
|||
PageHelper.startPage(param.getPageNum(),param.getPageSize()); |
|||
List<StudentVo.PageQueryOrder> pageQueryOrders = studentDao.pageQueryStuOrder(userId, param.getStatus()); |
|||
return new PageInfo<>(pageQueryOrders); |
|||
} |
|||
|
|||
@Override |
|||
public List<StudentVo.AreaInfo> queryArea(Long userId, StudentDto.QueryArea param) { |
|||
return studentDao.queryArea(param.getName(),param.getType()); |
|||
} |
|||
|
|||
@Override |
|||
public void submitOrder(Long userId, StudentDto.SubmitOrder param) { |
|||
//TODO 验证学号 身份证
|
|||
|
|||
//获取对象的MD5值
|
|||
String paramMd5 = Md5Util.stringTo(JSONObject.toJSONString(param)); |
|||
synchronized (this){ |
|||
// //检查redis内是否有相同的信息
|
|||
String key = userId + paramMd5; |
|||
Object o = redisUtil.get(key); |
|||
if(ObjectUtil.isNotNull(o)){ |
|||
throw new BaseException(DeliveryCodeError.REPEAT_SUBMIT); |
|||
} |
|||
redisUtil.set(key,JSONObject.toJSONString(param),60 * 30); |
|||
} |
|||
|
|||
//添加订单信息
|
|||
StuOrder stuOrder = new StuOrder(); |
|||
BeanUtil.copyProperties(param,stuOrder); |
|||
stuOrder.setId(snowflake.nextId()); |
|||
stuOrder.setUserId(userId); |
|||
String stuNum = SymmetricCryptoUtil.encrypt(DeliveryConstant.ENCRYPT_KEY,param.getStuNum()); |
|||
stuOrder.setStuNum(stuNum == null ? param.getStuNum() : stuNum); |
|||
String phone = SymmetricCryptoUtil.encrypt(DeliveryConstant.ENCRYPT_KEY,param.getPhone()); |
|||
stuOrder.setPhone(phone == null ? param.getPhone() : phone); |
|||
String idCard = SymmetricCryptoUtil.encrypt(DeliveryConstant.ENCRYPT_KEY,param.getIdCard()); |
|||
stuOrder.setIdCard(idCard == null ? param.getIdCard() : idCard); |
|||
stuOrderMapper.insertSelective(stuOrder); |
|||
//添加订单项信息
|
|||
if(CollectionUtil.isNotEmpty(param.getOrderItemList())){ |
|||
param.getOrderItemList().forEach(orderItem -> { |
|||
StuOrderItem stuOrderItem = new StuOrderItem(); |
|||
BeanUtil.copyProperties(orderItem,stuOrderItem); |
|||
stuOrderItem.setId(snowflake.nextId()); |
|||
stuOrderItem.setOrderId(stuOrder.getId()); |
|||
stuOrderItemMapper.insertSelective(stuOrderItem); |
|||
}); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public PageInfo<StudentVo.StudentOrder> backQueryStuOrder(Long userId, StudentDto.BackQueryOrder param) { |
|||
//根据条件查询所有的订单
|
|||
PageHelper.startPage(param.getPageNum(),param.getPageSize()); |
|||
List<StudentVo.StudentOrder> studentOrderList = studentDao.backQueryStuOrder(param); |
|||
//循环查找每个订单的订单项
|
|||
if(CollectionUtil.isNotEmpty(studentOrderList)){ |
|||
studentOrderList.forEach(studentOrder -> { |
|||
List<StudentVo.StudentOrderItem> orderItemList = studentDao.queryItemByOrderId(studentOrder.getId()); |
|||
if(CollectionUtil.isNotEmpty(orderItemList)){ |
|||
studentOrder.setOrderItemList(orderItemList); |
|||
} |
|||
}); |
|||
} |
|||
return new PageInfo<>(studentOrderList); |
|||
} |
|||
|
|||
@Override |
|||
public void updateOrderStatus(Long userId, StudentDto.UpdateOrderStatus param) { |
|||
//修改订单的完成状态
|
|||
if(ObjectUtil.isNotNull(param) && CollectionUtil.isNotEmpty(param.getOrderIdList())){ |
|||
studentDao.updateStatusById(param.getOrderIdList(),param.getStatus()); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public void revocationOrder(Long userId, StudentDto.OrderId param) { |
|||
//查找订单
|
|||
StuOrder stuOrder = stuOrderMapper.selectByPrimaryKey(param.getId()); |
|||
if(ObjectUtil.isNull(stuOrder)){ |
|||
throw new BaseException(DeliveryCodeError.NOT_ORDER); |
|||
} |
|||
if(!stuOrder.getUserId().equals(userId)){ |
|||
throw new BaseException(DeliveryCodeError.NOT_ORDER_POWER); |
|||
} |
|||
if(stuOrder.getStatus() == 1 || stuOrder.getStatus() == 3){ |
|||
throw new BaseException(DeliveryCodeError.NOT_ORDER_POWER); |
|||
} |
|||
StuOrder order = new StuOrder(); |
|||
order.setId(stuOrder.getId()); |
|||
order.setStatus((byte) 3); |
|||
stuOrderMapper.updateByPrimaryKeySelective(order); |
|||
} |
|||
|
|||
@Override |
|||
public String exportExcel(Long userId, StudentDto.BackQueryOrder param) throws Exception { |
|||
//查找数据
|
|||
List<StudentVo.StudentOrder> studentOrderList = studentDao.queryExportOrder(param); |
|||
//生成导入的数据
|
|||
List<List<PoiUtil.PoiUtilCell>> list = generateCellList(studentOrderList); |
|||
XSSFWorkbook wb = new XSSFWorkbook(); |
|||
PoiUtil.exportWB("学员药品订单表", list, wb); |
|||
log.info("学员药品订单表"); |
|||
//生成文件
|
|||
//山西大学在校学生急需药品登记表_20220409090411
|
|||
String fileName = "exportExcel/" + DateUtil.today() + "/山西大学在校学生急需药品登记表_" + System.currentTimeMillis() + ".xlsx"; |
|||
String path = PropUtil.path + fileName; |
|||
File tmpFile = new File(path); |
|||
if (!tmpFile.getParentFile().exists()) { |
|||
tmpFile.getParentFile().mkdirs(); |
|||
} |
|||
log.info("生成流"); |
|||
OutputStream stream = new FileOutputStream(tmpFile); |
|||
log.info("写入wbs"); |
|||
wb.write(stream); |
|||
stream.close(); |
|||
wb.close(); |
|||
return PropUtil.imgDomain + "/" + fileName; |
|||
} |
|||
|
|||
/** |
|||
* 生成导入数据 |
|||
* @param studentOrderList 查询的订单信息 |
|||
* @return 返回导入表和 |
|||
*/ |
|||
private List<List<PoiUtil.PoiUtilCell>> generateCellList(List<StudentVo.StudentOrder> studentOrderList) { |
|||
List<List<PoiUtil.PoiUtilCell>> list = new ArrayList<>(); |
|||
//添加表头
|
|||
List<PoiUtil.PoiUtilCell> header = new ArrayList<>(); |
|||
header.add(new PoiUtil.PoiUtilCell("序号")); |
|||
header.add(new PoiUtil.PoiUtilCell("姓名")); |
|||
header.add(new PoiUtil.PoiUtilCell("学号")); |
|||
header.add(new PoiUtil.PoiUtilCell("手机号")); |
|||
header.add(new PoiUtil.PoiUtilCell("身份证号")); |
|||
header.add(new PoiUtil.PoiUtilCell("所在学院名")); |
|||
header.add(new PoiUtil.PoiUtilCell("所在宿舍名")); |
|||
header.add(new PoiUtil.PoiUtilCell("详细地址")); |
|||
header.add(new PoiUtil.PoiUtilCell("症状描述")); |
|||
header.add(new PoiUtil.PoiUtilCell("是否断药")); |
|||
header.add(new PoiUtil.PoiUtilCell("备注")); |
|||
header.add(new PoiUtil.PoiUtilCell("希望配送时间")); |
|||
header.add(new PoiUtil.PoiUtilCell("配送状态")); |
|||
header.add(new PoiUtil.PoiUtilCell("实际配送时间")); |
|||
header.add(new PoiUtil.PoiUtilCell("药品名称")); |
|||
header.add(new PoiUtil.PoiUtilCell("药品规格")); |
|||
header.add(new PoiUtil.PoiUtilCell("数量")); |
|||
header.add(new PoiUtil.PoiUtilCell("订单提交时间")); |
|||
list.add(header); |
|||
//时间格式
|
|||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
|||
//序号
|
|||
int sort = 1; |
|||
if(CollectionUtil.isNotEmpty(studentOrderList)){ |
|||
for (StudentVo.StudentOrder studentOrder : studentOrderList) { |
|||
if (CollectionUtil.isNotEmpty(studentOrder.getOrderItemList())) { |
|||
int size = studentOrder.getOrderItemList().size(); |
|||
for (int j = 0; j < size; j++) { |
|||
List<PoiUtil.PoiUtilCell> order = new ArrayList<>(); |
|||
StudentVo.StudentOrderItem studentOrderItem = studentOrder.getOrderItemList().get(j); |
|||
if (j == 0) { |
|||
order.add(new PoiUtil.PoiUtilCell((sort++) + "", 1, size)); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrder.getName(), 1, size)); |
|||
order.add(new PoiUtil.PoiUtilCell("'" + studentOrder.getStuNum(), 1, size)); |
|||
order.add(new PoiUtil.PoiUtilCell("'" + studentOrder.getPhone(), 1, size)); |
|||
order.add(new PoiUtil.PoiUtilCell("'" + studentOrder.getIdCard(), 1, size)); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrder.getCollegeName(), 1, size)); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrder.getDormitoryName(), 1, size)); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrder.getAddress(), 1, size)); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrder.getSymptom(), 1, size)); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrder.getBroken() == 0 ? "否" : "是", 1, size)); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrder.getRemark(), 1, size)); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrder.getPlanTime() == null || studentOrder.getPlanTime() == 0 ? "" : sdf.format(new Date(studentOrder.getPlanTime())), 1, size)); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrder.getStatus() == 0 ? "未配送" : (studentOrder.getStatus() == 1 ? "已送达" : "无药 "), 1, size)); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrder.getRealTime() == null || studentOrder.getRealTime() == 0 ? "" : sdf.format(new Date(studentOrder.getRealTime())), 1, size)); |
|||
} else { |
|||
order.add(new PoiUtil.PoiUtilCell()); |
|||
order.add(new PoiUtil.PoiUtilCell()); |
|||
order.add(new PoiUtil.PoiUtilCell()); |
|||
order.add(new PoiUtil.PoiUtilCell()); |
|||
order.add(new PoiUtil.PoiUtilCell()); |
|||
order.add(new PoiUtil.PoiUtilCell()); |
|||
order.add(new PoiUtil.PoiUtilCell()); |
|||
order.add(new PoiUtil.PoiUtilCell()); |
|||
order.add(new PoiUtil.PoiUtilCell()); |
|||
order.add(new PoiUtil.PoiUtilCell()); |
|||
order.add(new PoiUtil.PoiUtilCell()); |
|||
order.add(new PoiUtil.PoiUtilCell()); |
|||
order.add(new PoiUtil.PoiUtilCell()); |
|||
order.add(new PoiUtil.PoiUtilCell()); |
|||
} |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrderItem.getName())); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrderItem.getSpecification())); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrderItem.getNum() + "")); |
|||
if (j == 0) { |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrder.getSubmitTime() == null || studentOrder.getSubmitTime() == 0 ? "" : sdf.format(new Date(studentOrder.getSubmitTime())), 1, size)); |
|||
}else { |
|||
order.add(new PoiUtil.PoiUtilCell()); |
|||
} |
|||
list.add(order); |
|||
} |
|||
} else { |
|||
//如果没有药品信息,直接添加一行学生信息
|
|||
List<PoiUtil.PoiUtilCell> order = new ArrayList<>(); |
|||
order.add(new PoiUtil.PoiUtilCell((sort++) + "")); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrder.getName())); |
|||
order.add(new PoiUtil.PoiUtilCell("'" + studentOrder.getStuNum())); |
|||
order.add(new PoiUtil.PoiUtilCell("'" + studentOrder.getPhone())); |
|||
order.add(new PoiUtil.PoiUtilCell("'" + studentOrder.getIdCard())); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrder.getCollegeName())); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrder.getDormitoryName())); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrder.getAddress())); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrder.getSymptom())); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrder.getBroken() == 0 ? "否" : "是")); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrder.getRemark())); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrder.getPlanTime() == null || studentOrder.getPlanTime() == 0 ? "" : sdf.format(new Date(studentOrder.getPlanTime())))); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrder.getStatus() == 0 ? "未配送" : (studentOrder.getStatus() == 1 ? "已送达" : "无药 "))); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrder.getRealTime() == null || studentOrder.getRealTime() == 0 ? "" : sdf.format(new Date(studentOrder.getRealTime())))); |
|||
order.add(new PoiUtil.PoiUtilCell(studentOrder.getSubmitTime() == null || studentOrder.getSubmitTime() == 0 ? "" : sdf.format(new Date(studentOrder.getSubmitTime())))); |
|||
list.add(order); |
|||
} |
|||
} |
|||
} |
|||
return list; |
|||
} |
|||
} |
@ -0,0 +1,352 @@ |
|||
<?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.ccsens.delivery.persist.dao.StudentDao"> |
|||
<update id="updateStatusById"> |
|||
UPDATE |
|||
t_stu_order |
|||
set |
|||
`status` = #{status} |
|||
WHERE |
|||
rec_status = 0 |
|||
and `status` != 1 |
|||
and `status` != 3 |
|||
and id in |
|||
<foreach collection="orderIdList" item="item" open="(" separator="," close=")"> |
|||
#{item} |
|||
</foreach> |
|||
</update> |
|||
|
|||
|
|||
<select id="queryArea" resultType="com.ccsens.delivery.bean.vo.StudentVo$AreaInfo"> |
|||
SELECT |
|||
id, |
|||
`name` |
|||
FROM |
|||
t_sys_area |
|||
WHERE |
|||
type = #{type} |
|||
and rec_status = 0 |
|||
<if test="name != null and name != '' "> |
|||
and `name` LIKE CONCAT('%',#{name},'%') |
|||
</if> |
|||
</select> |
|||
|
|||
<resultMap id="stuOrder" type="com.ccsens.delivery.bean.vo.StudentVo$StudentOrder"> |
|||
<id column="id" property="id"/> |
|||
<result column="name" property="name"/> |
|||
<result column="stu_num" property="stuNum"/> |
|||
<result column="phone" property="phone"/> |
|||
<result column="id_card" property="idCard"/> |
|||
<result column="college_id" property="collegeId"/> |
|||
<result column="collegeName" property="collegeName"/> |
|||
<result column="dormitory_id" property="dormitoryId"/> |
|||
<result column="dormitoryName" property="dormitoryName"/> |
|||
<result column="address" property="address"/> |
|||
<result column="symptom" property="symptom"/> |
|||
<result column="broken" property="broken"/> |
|||
<result column="remark" property="remark"/> |
|||
<result column="plan_time" property="planTime"/> |
|||
<result column="real_time" property="realTime"/> |
|||
<result column="status" property="status"/> |
|||
<result column="submitTime" property="submitTime"/> |
|||
<collection property="orderItemList" ofType="com.ccsens.delivery.bean.vo.StudentVo$StudentOrderItem"> |
|||
<id column="itemId" property="id"/> |
|||
<result column="itemName" property="name"/> |
|||
<result column="specification" property="specification"/> |
|||
<result column="num" property="num"/> |
|||
</collection> |
|||
</resultMap> |
|||
|
|||
<select id="queryStuOrder" resultMap="stuOrder"> |
|||
SELECT |
|||
o.id, |
|||
o.`name`, |
|||
o.stu_num, |
|||
o.phone, |
|||
o.id_card, |
|||
o.college_id, |
|||
if(a1.`name` is null, o.college_name, a1.`name`) as collegeName, |
|||
o.dormitory_id, |
|||
if(a2.`name` is null, o.dormitory_name, a2.`name`) as dormitoryName, |
|||
o.address, |
|||
o.symptom, |
|||
o.broken, |
|||
o.remark, |
|||
o.plan_time, |
|||
o.real_time, |
|||
o.`status`, |
|||
i.id as itemId, |
|||
i.`name` as itemName, |
|||
i.specification, |
|||
i.num, |
|||
UNIX_TIMESTAMP(o.created_at) * 1000 as submitTime |
|||
FROM |
|||
t_stu_order o |
|||
LEFT JOIN t_stu_order_item i on o.id = i.order_id and i.rec_status = 0 |
|||
LEFT JOIN t_sys_area a1 on o.college_id = a1.id and a1.rec_status = 0 |
|||
LEFT JOIN t_sys_area a2 on o.dormitory_id = a2.id and a2.rec_status = 0 |
|||
WHERE |
|||
o.rec_status = 0 |
|||
and o.user_id = #{userId} |
|||
<if test="status != null"> |
|||
and o.`status` = #{status} |
|||
</if> |
|||
order by submitTime DESC |
|||
</select> |
|||
|
|||
<select id="queryStuOrderNew" resultMap="stuOrder"> |
|||
SELECT |
|||
o.id, |
|||
o.`name`, |
|||
o.stu_num, |
|||
o.phone, |
|||
o.id_card, |
|||
o.college_id, |
|||
if(a1.`name` is null, o.college_name, a1.`name`) as collegeName, |
|||
o.dormitory_id, |
|||
if(a2.`name` is null, o.dormitory_name, a2.`name`) as dormitoryName, |
|||
o.address, |
|||
o.symptom, |
|||
o.broken, |
|||
o.remark, |
|||
o.plan_time, |
|||
o.real_time, |
|||
o.`status`, |
|||
i.id as itemId, |
|||
i.`name` as itemName, |
|||
i.specification, |
|||
i.num, |
|||
UNIX_TIMESTAMP(o.created_at) * 1000 as submitTime |
|||
FROM |
|||
t_stu_order o |
|||
LEFT JOIN t_stu_order_item i on o.id = i.order_id and i.rec_status = 0 |
|||
LEFT JOIN t_sys_area a1 on o.college_id = a1.id and a1.rec_status = 0 |
|||
LEFT JOIN t_sys_area a2 on o.dormitory_id = a2.id and a2.rec_status = 0 |
|||
WHERE |
|||
o.rec_status = 0 |
|||
and o.user_id = #{userId} |
|||
order by submitTime DESC |
|||
limit 1 |
|||
</select> |
|||
|
|||
<select id="queryStuOrderById" resultMap="stuOrder"> |
|||
SELECT |
|||
o.id, |
|||
o.`name`, |
|||
o.stu_num, |
|||
o.phone, |
|||
o.id_card, |
|||
o.college_id, |
|||
if(a1.`name` is null, o.college_name, a1.`name`) as collegeName, |
|||
o.dormitory_id, |
|||
if(a2.`name` is null, o.dormitory_name, a2.`name`) as dormitoryName, |
|||
o.address, |
|||
o.symptom, |
|||
o.broken, |
|||
o.remark, |
|||
o.plan_time, |
|||
o.real_time, |
|||
o.`status`, |
|||
i.id as itemId, |
|||
i.`name` as itemName, |
|||
i.specification, |
|||
i.num, |
|||
UNIX_TIMESTAMP(o.created_at) * 1000 as submitTime |
|||
FROM |
|||
t_stu_order o |
|||
LEFT JOIN t_stu_order_item i on o.id = i.order_id and i.rec_status = 0 |
|||
LEFT JOIN t_sys_area a1 on o.college_id = a1.id and a1.rec_status = 0 |
|||
LEFT JOIN t_sys_area a2 on o.dormitory_id = a2.id and a2.rec_status = 0 |
|||
WHERE |
|||
o.rec_status = 0 |
|||
and o.id = #{orderId} |
|||
</select> |
|||
|
|||
|
|||
<select id="backQueryStuOrder" resultType="com.ccsens.delivery.bean.vo.StudentVo$StudentOrder"> |
|||
SELECT |
|||
o.id, |
|||
o.`name`, |
|||
o.stu_num, |
|||
o.phone, |
|||
o.id_card, |
|||
o.college_id, |
|||
if(a1.`name` is null, o.college_name, a1.`name`) as collegeName, |
|||
o.dormitory_id, |
|||
if(a2.`name` is null, o.dormitory_name, a2.`name`) as dormitoryName, |
|||
o.address, |
|||
o.symptom, |
|||
o.broken, |
|||
o.remark, |
|||
o.plan_time, |
|||
o.real_time, |
|||
o.`status`, |
|||
UNIX_TIMESTAMP(o.created_at) * 1000 as submitTime |
|||
FROM |
|||
t_stu_order o |
|||
LEFT JOIN t_sys_area a1 on o.college_id = a1.id and a1.rec_status = 0 |
|||
LEFT JOIN t_sys_area a2 on o.dormitory_id = a2.id and a2.rec_status = 0 |
|||
LEFT JOIN t_stu_order_item i on o.id = i.order_id and i.rec_status = 0 |
|||
WHERE |
|||
o.rec_status = 0 |
|||
and o.status != 3 |
|||
<if test="param.name != null and param.name != ''"> |
|||
and o.name like CONCAT('%',#{param.name},'%') |
|||
</if> |
|||
<if test="param.stuNum != null and param.stuNum != ''"> |
|||
and o.stu_num like CONCAT('%',#{param.stuNum},'%') |
|||
</if> |
|||
<if test="param.phone != null and param.phone != ''"> |
|||
and o.phone like CONCAT('%',#{param.phone},'%') |
|||
</if> |
|||
<if test="param.idCard != null and param.idCard != ''"> |
|||
and o.id_card like CONCAT('%',#{param.idCard},'%') |
|||
</if> |
|||
<if test="param.collegeId != null"> |
|||
and o.college_id = #{param.collegeId} |
|||
</if> |
|||
<if test="param.dormitoryId != null and param.dormitoryId.size != 0"> |
|||
and o.dormitory_id in |
|||
<foreach collection="param.dormitoryId" item="item" open="(" separator="," close=")"> |
|||
#{item} |
|||
</foreach> |
|||
</if> |
|||
<if test="param.address != null and param.address != ''"> |
|||
and o.address like CONCAT('%',#{param.address},'%') |
|||
</if> |
|||
<if test="param.symptom != null and param.symptom != ''"> |
|||
and o.symptom like CONCAT('%',#{param.symptom},'%') |
|||
</if> |
|||
<if test="param.broken != null"> |
|||
and o.broken = #{param.broken} |
|||
</if> |
|||
<if test="param.status != null"> |
|||
and o.status = #{param.status} |
|||
</if> |
|||
<if test="param.startTime != null and param.endTime != null"> |
|||
and o.plan_time >= #{param.startTime} |
|||
and o.plan_time < #{param.endTime} |
|||
</if> |
|||
<if test="param.drugName != null and param.drugName != ''"> |
|||
and i.name like CONCAT('%',#{param.drugName},'%') |
|||
</if> |
|||
GROUP BY o.id |
|||
order by submitTime DESC |
|||
</select> |
|||
<select id="queryItemByOrderId" resultType="com.ccsens.delivery.bean.vo.StudentVo$StudentOrderItem"> |
|||
SELECT |
|||
id, |
|||
`name`, |
|||
specification, |
|||
num |
|||
FROM |
|||
t_stu_order_item |
|||
WHERE |
|||
order_id = #{orderId} |
|||
and rec_status = 0 |
|||
</select> |
|||
<select id="queryExportOrder" resultMap="stuOrder"> |
|||
SELECT |
|||
o.id, |
|||
o.`name`, |
|||
o.stu_num, |
|||
o.phone, |
|||
o.id_card, |
|||
o.college_id, |
|||
if(a1.`name` is null, o.college_name, a1.`name`) as collegeName, |
|||
o.dormitory_id, |
|||
if(a2.`name` is null, o.dormitory_name, a2.`name`) as dormitoryName, |
|||
o.address, |
|||
o.symptom, |
|||
o.broken, |
|||
o.remark, |
|||
o.plan_time, |
|||
o.real_time, |
|||
o.`status`, |
|||
i.id as itemId, |
|||
i.`name` as itemName, |
|||
i.specification, |
|||
i.num, |
|||
UNIX_TIMESTAMP(o.created_at) * 1000 as submitTime |
|||
FROM |
|||
t_stu_order o |
|||
LEFT JOIN t_stu_order_item i on o.id = i.order_id and i.rec_status = 0 |
|||
LEFT JOIN t_sys_area a1 on o.college_id = a1.id and a1.rec_status = 0 |
|||
LEFT JOIN t_sys_area a2 on o.dormitory_id = a2.id and a2.rec_status = 0 |
|||
WHERE |
|||
o.rec_status = 0 |
|||
and o.status != 3 |
|||
<if test="param.name != null and param.name != ''"> |
|||
and o.name like CONCAT('%',#{param.name},'%') |
|||
</if> |
|||
<if test="param.stuNum != null and param.stuNum != ''"> |
|||
and o.stu_num like CONCAT('%',#{param.stuNum},'%') |
|||
</if> |
|||
<if test="param.phone != null and param.phone != ''"> |
|||
and o.phone like CONCAT('%',#{param.phone},'%') |
|||
</if> |
|||
<if test="param.idCard != null and param.idCard != ''"> |
|||
and o.id_card like CONCAT('%',#{param.idCard},'%') |
|||
</if> |
|||
<if test="param.collegeId != null"> |
|||
and o.college_id = #{param.collegeId} |
|||
</if> |
|||
<if test="param.dormitoryId != null and param.dormitoryId.size != 0"> |
|||
and o.dormitory_id in |
|||
<foreach collection="param.dormitoryId" item="item" open="(" separator="," close=")"> |
|||
#{item} |
|||
</foreach> |
|||
</if> |
|||
<if test="param.address != null and param.address != ''"> |
|||
and o.address like CONCAT('%',#{param.address},'%') |
|||
</if> |
|||
<if test="param.symptom != null and param.symptom != ''"> |
|||
and o.symptom like CONCAT('%',#{param.symptom},'%') |
|||
</if> |
|||
<if test="param.broken != null"> |
|||
and o.broken = #{param.broken} |
|||
</if> |
|||
<if test="param.status != null"> |
|||
and o.status = #{param.status} |
|||
</if> |
|||
<if test="param.startTime != null and param.endTime != null"> |
|||
and o.plan_time >= #{param.startTime} |
|||
and o.plan_time < #{param.endTime} |
|||
</if> |
|||
<if test="param.drugName != null and param.drugName != ''"> |
|||
and i.name like CONCAT('%',#{param.drugName},'%') |
|||
</if> |
|||
order by submitTime DESC |
|||
</select> |
|||
<select id="pageQueryStuOrder" resultType="com.ccsens.delivery.bean.vo.StudentVo$PageQueryOrder"> |
|||
SELECT |
|||
o.id, |
|||
o.`status`, |
|||
i.`name` as itemName, |
|||
count(i.id) as num, |
|||
UNIX_TIMESTAMP(o.created_at) * 1000 as submitTime |
|||
FROM |
|||
t_stu_order o |
|||
LEFT JOIN t_stu_order_item i on o.id = i.order_id and i.rec_status = 0 |
|||
WHERE |
|||
o.rec_status = 0 |
|||
and o.user_id = #{userId} |
|||
<if test="status != null"> |
|||
and o.`status` = #{status} |
|||
</if> |
|||
GROUP BY o.id |
|||
order by submitTime DESC |
|||
</select> |
|||
<select id="getNewOrderByUserId" resultType="java.lang.Long"> |
|||
SELECT |
|||
id |
|||
FROM |
|||
t_stu_order |
|||
WHERE |
|||
user_id = #{userId} |
|||
and rec_status = 0 |
|||
order by created_at DESC |
|||
limit 1 |
|||
</select> |
|||
|
|||
</mapper> |
@ -0,0 +1,275 @@ |
|||
<?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.ccsens.delivery.persist.mapper.StuOrderItemMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.delivery.bean.po.StuOrderItem"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="order_id" jdbcType="BIGINT" property="orderId" /> |
|||
<result column="name" jdbcType="VARCHAR" property="name" /> |
|||
<result column="specification" jdbcType="VARCHAR" property="specification" /> |
|||
<result column="num" jdbcType="INTEGER" property="num" /> |
|||
<result column="operator" jdbcType="BIGINT" property="operator" /> |
|||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, order_id, name, specification, num, operator, created_at, updated_at, rec_status |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.delivery.bean.po.StuOrderItemExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_stu_order_item |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_stu_order_item |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_stu_order_item |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.delivery.bean.po.StuOrderItemExample"> |
|||
delete from t_stu_order_item |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.delivery.bean.po.StuOrderItem"> |
|||
insert into t_stu_order_item (id, order_id, name, |
|||
specification, num, operator, |
|||
created_at, updated_at, rec_status |
|||
) |
|||
values (#{id,jdbcType=BIGINT}, #{orderId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, |
|||
#{specification,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER}, #{operator,jdbcType=BIGINT}, |
|||
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} |
|||
) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="com.ccsens.delivery.bean.po.StuOrderItem"> |
|||
insert into t_stu_order_item |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="orderId != null"> |
|||
order_id, |
|||
</if> |
|||
<if test="name != null"> |
|||
name, |
|||
</if> |
|||
<if test="specification != null"> |
|||
specification, |
|||
</if> |
|||
<if test="num != null"> |
|||
num, |
|||
</if> |
|||
<if test="operator != null"> |
|||
operator, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="orderId != null"> |
|||
#{orderId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="name != null"> |
|||
#{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="specification != null"> |
|||
#{specification,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="num != null"> |
|||
#{num,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="operator != null"> |
|||
#{operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
#{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
#{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
#{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.delivery.bean.po.StuOrderItemExample" resultType="java.lang.Long"> |
|||
select count(*) from t_stu_order_item |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_stu_order_item |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.orderId != null"> |
|||
order_id = #{record.orderId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.name != null"> |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.specification != null"> |
|||
specification = #{record.specification,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.num != null"> |
|||
num = #{record.num,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="record.operator != null"> |
|||
operator = #{record.operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.createdAt != null"> |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updatedAt != null"> |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.recStatus != null"> |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
update t_stu_order_item |
|||
set id = #{record.id,jdbcType=BIGINT}, |
|||
order_id = #{record.orderId,jdbcType=BIGINT}, |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
specification = #{record.specification,jdbcType=VARCHAR}, |
|||
num = #{record.num,jdbcType=INTEGER}, |
|||
operator = #{record.operator,jdbcType=BIGINT}, |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.delivery.bean.po.StuOrderItem"> |
|||
update t_stu_order_item |
|||
<set> |
|||
<if test="orderId != null"> |
|||
order_id = #{orderId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="name != null"> |
|||
name = #{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="specification != null"> |
|||
specification = #{specification,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="num != null"> |
|||
num = #{num,jdbcType=INTEGER}, |
|||
</if> |
|||
<if test="operator != null"> |
|||
operator = #{operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.delivery.bean.po.StuOrderItem"> |
|||
update t_stu_order_item |
|||
set order_id = #{orderId,jdbcType=BIGINT}, |
|||
name = #{name,jdbcType=VARCHAR}, |
|||
specification = #{specification,jdbcType=VARCHAR}, |
|||
num = #{num,jdbcType=INTEGER}, |
|||
operator = #{operator,jdbcType=BIGINT}, |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{recStatus,jdbcType=TINYINT} |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
</mapper> |
@ -0,0 +1,465 @@ |
|||
<?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.ccsens.delivery.persist.mapper.StuOrderMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.delivery.bean.po.StuOrder"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="user_id" jdbcType="BIGINT" property="userId" /> |
|||
<result column="name" jdbcType="VARCHAR" property="name" /> |
|||
<result column="stu_num" jdbcType="VARCHAR" property="stuNum" /> |
|||
<result column="phone" jdbcType="VARCHAR" property="phone" /> |
|||
<result column="id_card" jdbcType="VARCHAR" property="idCard" /> |
|||
<result column="college_id" jdbcType="BIGINT" property="collegeId" /> |
|||
<result column="dormitory_id" jdbcType="BIGINT" property="dormitoryId" /> |
|||
<result column="address" jdbcType="VARCHAR" property="address" /> |
|||
<result column="symptom" jdbcType="VARCHAR" property="symptom" /> |
|||
<result column="broken" jdbcType="TINYINT" property="broken" /> |
|||
<result column="remark" jdbcType="VARCHAR" property="remark" /> |
|||
<result column="plan_time" jdbcType="BIGINT" property="planTime" /> |
|||
<result column="real_time" jdbcType="BIGINT" property="realTime" /> |
|||
<result column="status" jdbcType="TINYINT" property="status" /> |
|||
<result column="operator" jdbcType="BIGINT" property="operator" /> |
|||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|||
<result column="college_name" jdbcType="VARCHAR" property="collegeName" /> |
|||
<result column="dormitory_name" jdbcType="VARCHAR" property="dormitoryName" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, user_id, name, stu_num, phone, id_card, college_id, dormitory_id, address, symptom, |
|||
broken, remark, plan_time, real_time, status, operator, created_at, updated_at, rec_status, |
|||
college_name, dormitory_name |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.delivery.bean.po.StuOrderExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_stu_order |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_stu_order |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_stu_order |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.delivery.bean.po.StuOrderExample"> |
|||
delete from t_stu_order |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.delivery.bean.po.StuOrder"> |
|||
insert into t_stu_order (id, user_id, name, |
|||
stu_num, phone, id_card, |
|||
college_id, dormitory_id, address, |
|||
symptom, broken, remark, |
|||
plan_time, real_time, status, |
|||
operator, created_at, updated_at, |
|||
rec_status, college_name, dormitory_name |
|||
) |
|||
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, |
|||
#{stuNum,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, |
|||
#{collegeId,jdbcType=BIGINT}, #{dormitoryId,jdbcType=BIGINT}, #{address,jdbcType=VARCHAR}, |
|||
#{symptom,jdbcType=VARCHAR}, #{broken,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR}, |
|||
#{planTime,jdbcType=BIGINT}, #{realTime,jdbcType=BIGINT}, #{status,jdbcType=TINYINT}, |
|||
#{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, |
|||
#{recStatus,jdbcType=TINYINT}, #{collegeName,jdbcType=VARCHAR}, #{dormitoryName,jdbcType=VARCHAR} |
|||
) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="com.ccsens.delivery.bean.po.StuOrder"> |
|||
insert into t_stu_order |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="userId != null"> |
|||
user_id, |
|||
</if> |
|||
<if test="name != null"> |
|||
name, |
|||
</if> |
|||
<if test="stuNum != null"> |
|||
stu_num, |
|||
</if> |
|||
<if test="phone != null"> |
|||
phone, |
|||
</if> |
|||
<if test="idCard != null"> |
|||
id_card, |
|||
</if> |
|||
<if test="collegeId != null"> |
|||
college_id, |
|||
</if> |
|||
<if test="dormitoryId != null"> |
|||
dormitory_id, |
|||
</if> |
|||
<if test="address != null"> |
|||
address, |
|||
</if> |
|||
<if test="symptom != null"> |
|||
symptom, |
|||
</if> |
|||
<if test="broken != null"> |
|||
broken, |
|||
</if> |
|||
<if test="remark != null"> |
|||
remark, |
|||
</if> |
|||
<if test="planTime != null"> |
|||
plan_time, |
|||
</if> |
|||
<if test="realTime != null"> |
|||
real_time, |
|||
</if> |
|||
<if test="status != null"> |
|||
status, |
|||
</if> |
|||
<if test="operator != null"> |
|||
operator, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
<if test="collegeName != null"> |
|||
college_name, |
|||
</if> |
|||
<if test="dormitoryName != null"> |
|||
dormitory_name, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="userId != null"> |
|||
#{userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="name != null"> |
|||
#{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="stuNum != null"> |
|||
#{stuNum,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="phone != null"> |
|||
#{phone,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="idCard != null"> |
|||
#{idCard,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="collegeId != null"> |
|||
#{collegeId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="dormitoryId != null"> |
|||
#{dormitoryId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="address != null"> |
|||
#{address,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="symptom != null"> |
|||
#{symptom,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="broken != null"> |
|||
#{broken,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="remark != null"> |
|||
#{remark,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="planTime != null"> |
|||
#{planTime,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="realTime != null"> |
|||
#{realTime,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="status != null"> |
|||
#{status,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="operator != null"> |
|||
#{operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
#{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
#{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
#{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="collegeName != null"> |
|||
#{collegeName,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="dormitoryName != null"> |
|||
#{dormitoryName,jdbcType=VARCHAR}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.delivery.bean.po.StuOrderExample" resultType="java.lang.Long"> |
|||
select count(*) from t_stu_order |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_stu_order |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.userId != null"> |
|||
user_id = #{record.userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.name != null"> |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.stuNum != null"> |
|||
stu_num = #{record.stuNum,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.phone != null"> |
|||
phone = #{record.phone,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.idCard != null"> |
|||
id_card = #{record.idCard,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.collegeId != null"> |
|||
college_id = #{record.collegeId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.dormitoryId != null"> |
|||
dormitory_id = #{record.dormitoryId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.address != null"> |
|||
address = #{record.address,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.symptom != null"> |
|||
symptom = #{record.symptom,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.broken != null"> |
|||
broken = #{record.broken,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.remark != null"> |
|||
remark = #{record.remark,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.planTime != null"> |
|||
plan_time = #{record.planTime,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.realTime != null"> |
|||
real_time = #{record.realTime,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.status != null"> |
|||
status = #{record.status,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.operator != null"> |
|||
operator = #{record.operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.createdAt != null"> |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updatedAt != null"> |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.recStatus != null"> |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.collegeName != null"> |
|||
college_name = #{record.collegeName,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.dormitoryName != null"> |
|||
dormitory_name = #{record.dormitoryName,jdbcType=VARCHAR}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
update t_stu_order |
|||
set id = #{record.id,jdbcType=BIGINT}, |
|||
user_id = #{record.userId,jdbcType=BIGINT}, |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
stu_num = #{record.stuNum,jdbcType=VARCHAR}, |
|||
phone = #{record.phone,jdbcType=VARCHAR}, |
|||
id_card = #{record.idCard,jdbcType=VARCHAR}, |
|||
college_id = #{record.collegeId,jdbcType=BIGINT}, |
|||
dormitory_id = #{record.dormitoryId,jdbcType=BIGINT}, |
|||
address = #{record.address,jdbcType=VARCHAR}, |
|||
symptom = #{record.symptom,jdbcType=VARCHAR}, |
|||
broken = #{record.broken,jdbcType=TINYINT}, |
|||
remark = #{record.remark,jdbcType=VARCHAR}, |
|||
plan_time = #{record.planTime,jdbcType=BIGINT}, |
|||
real_time = #{record.realTime,jdbcType=BIGINT}, |
|||
status = #{record.status,jdbcType=TINYINT}, |
|||
operator = #{record.operator,jdbcType=BIGINT}, |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
college_name = #{record.collegeName,jdbcType=VARCHAR}, |
|||
dormitory_name = #{record.dormitoryName,jdbcType=VARCHAR} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.delivery.bean.po.StuOrder"> |
|||
update t_stu_order |
|||
<set> |
|||
<if test="userId != null"> |
|||
user_id = #{userId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="name != null"> |
|||
name = #{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="stuNum != null"> |
|||
stu_num = #{stuNum,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="phone != null"> |
|||
phone = #{phone,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="idCard != null"> |
|||
id_card = #{idCard,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="collegeId != null"> |
|||
college_id = #{collegeId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="dormitoryId != null"> |
|||
dormitory_id = #{dormitoryId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="address != null"> |
|||
address = #{address,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="symptom != null"> |
|||
symptom = #{symptom,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="broken != null"> |
|||
broken = #{broken,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="remark != null"> |
|||
remark = #{remark,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="planTime != null"> |
|||
plan_time = #{planTime,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="realTime != null"> |
|||
real_time = #{realTime,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="status != null"> |
|||
status = #{status,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="operator != null"> |
|||
operator = #{operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="collegeName != null"> |
|||
college_name = #{collegeName,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="dormitoryName != null"> |
|||
dormitory_name = #{dormitoryName,jdbcType=VARCHAR}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.delivery.bean.po.StuOrder"> |
|||
update t_stu_order |
|||
set user_id = #{userId,jdbcType=BIGINT}, |
|||
name = #{name,jdbcType=VARCHAR}, |
|||
stu_num = #{stuNum,jdbcType=VARCHAR}, |
|||
phone = #{phone,jdbcType=VARCHAR}, |
|||
id_card = #{idCard,jdbcType=VARCHAR}, |
|||
college_id = #{collegeId,jdbcType=BIGINT}, |
|||
dormitory_id = #{dormitoryId,jdbcType=BIGINT}, |
|||
address = #{address,jdbcType=VARCHAR}, |
|||
symptom = #{symptom,jdbcType=VARCHAR}, |
|||
broken = #{broken,jdbcType=TINYINT}, |
|||
remark = #{remark,jdbcType=VARCHAR}, |
|||
plan_time = #{planTime,jdbcType=BIGINT}, |
|||
real_time = #{realTime,jdbcType=BIGINT}, |
|||
status = #{status,jdbcType=TINYINT}, |
|||
operator = #{operator,jdbcType=BIGINT}, |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
college_name = #{collegeName,jdbcType=VARCHAR}, |
|||
dormitory_name = #{dormitoryName,jdbcType=VARCHAR} |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
</mapper> |
@ -0,0 +1,243 @@ |
|||
<?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.ccsens.delivery.persist.mapper.SysAreaMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.delivery.bean.po.SysArea"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="name" jdbcType="VARCHAR" property="name" /> |
|||
<result column="type" jdbcType="TINYINT" property="type" /> |
|||
<result column="operator" jdbcType="BIGINT" property="operator" /> |
|||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, name, type, operator, created_at, updated_at, rec_status |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.delivery.bean.po.SysAreaExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_sys_area |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_sys_area |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_sys_area |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.delivery.bean.po.SysAreaExample"> |
|||
delete from t_sys_area |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.delivery.bean.po.SysArea"> |
|||
insert into t_sys_area (id, name, type, |
|||
operator, created_at, updated_at, |
|||
rec_status) |
|||
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=TINYINT}, |
|||
#{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, |
|||
#{recStatus,jdbcType=TINYINT}) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="com.ccsens.delivery.bean.po.SysArea"> |
|||
insert into t_sys_area |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="name != null"> |
|||
name, |
|||
</if> |
|||
<if test="type != null"> |
|||
type, |
|||
</if> |
|||
<if test="operator != null"> |
|||
operator, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="name != null"> |
|||
#{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="type != null"> |
|||
#{type,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="operator != null"> |
|||
#{operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
#{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
#{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
#{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.delivery.bean.po.SysAreaExample" resultType="java.lang.Long"> |
|||
select count(*) from t_sys_area |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_sys_area |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.name != null"> |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.type != null"> |
|||
type = #{record.type,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.operator != null"> |
|||
operator = #{record.operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.createdAt != null"> |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updatedAt != null"> |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.recStatus != null"> |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
update t_sys_area |
|||
set id = #{record.id,jdbcType=BIGINT}, |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
type = #{record.type,jdbcType=TINYINT}, |
|||
operator = #{record.operator,jdbcType=BIGINT}, |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.delivery.bean.po.SysArea"> |
|||
update t_sys_area |
|||
<set> |
|||
<if test="name != null"> |
|||
name = #{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="type != null"> |
|||
type = #{type,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="operator != null"> |
|||
operator = #{operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.delivery.bean.po.SysArea"> |
|||
update t_sys_area |
|||
set name = #{name,jdbcType=VARCHAR}, |
|||
type = #{type,jdbcType=TINYINT}, |
|||
operator = #{operator,jdbcType=BIGINT}, |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{recStatus,jdbcType=TINYINT} |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
</mapper> |
Loading…
Reference in new issue