Commit aaa5ef62 by zhengxj

finish 新增订单属性 on 20190218 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@17442 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent f29b89bd
......@@ -104,8 +104,8 @@ public class OrderController extends BaseController{
}
@RequestMapping(value = "/deleteById", method = { RequestMethod.GET, RequestMethod.POST })
public ResultObject deleteById(Integer orderId, String orderSn) {
orderService.deleteByPrimaryKey(orderId, orderSn);
public ResultObject deleteById(Integer orderId) {
orderService.deleteByPrimaryKey(orderId);
return new ResultObject(ResultCodeEnum.SUCCESS.getCode(), ResultCodeEnum.SUCCESS.getMsg(), null);
}
......@@ -174,7 +174,7 @@ public class OrderController extends BaseController{
public ResultObject appoint(HttpServletRequest request, Integer orderId, String serviceDate) {
SysOrderExample example = new SysOrderExample();
example.createCriteria().andIdEqualTo(orderId);
SysOrder sysOrder = orderService.selectByPrimaryKey(orderId, null);
SysOrder sysOrder = orderService.selectByPrimaryKey(orderId);
if (sysOrder != null) {
sysOrder.setActiveStatus((byte) 7);
sysOrder.setInstallDate(DateUtil.parseDateYmdHms(serviceDate));
......@@ -190,7 +190,7 @@ public class OrderController extends BaseController{
public ResultObject dismantle(HttpServletRequest request, Integer orderId) {
SysOrderExample example = new SysOrderExample();
example.createCriteria().andIdEqualTo(orderId);
SysOrder sysOrder = orderService.selectByPrimaryKey(orderId, null);
SysOrder sysOrder = orderService.selectByPrimaryKey(orderId);
if (sysOrder != null) {
sysOrder.setActiveStatus((byte) 8);
sysOrder.setActiveStatusArray(DateUtil.formatDate(DateUtil.getCurrentTime()) + ":" + "拆除设备" + ";"
......
......@@ -28,7 +28,7 @@ import java.io.Serializable;
import java.util.List;
import com.glsx.ordercenter.pojo.SysArea;
import com.glsx.ordercenter.pojo.SysOrder;
import com.glsx.ordercenter.pojo.SysOrder1;
import com.glsx.ordercenter.pojo.SysOrderRepair;
/**
......@@ -38,7 +38,7 @@ import com.glsx.ordercenter.pojo.SysOrderRepair;
* @date 2019年1月25日
*
*/
public class QueryOrderResp extends SysOrder implements Serializable{
public class QueryOrderResp extends SysOrder1 implements Serializable{
/**
*
......
......@@ -2,8 +2,6 @@ package com.glsx.ordercenter.mapper;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.glsx.ordercenter.dto.ShopBizAmount;
import com.glsx.ordercenter.pojo.SysOrder;
import com.glsx.ordercenter.pojo.SysOrderExample;
......@@ -11,7 +9,7 @@ import com.glsx.ordercenter.pojo.SysOrderExample;
public interface SysOrderMapper {
long countByExample(SysOrderExample example);
int deleteByPrimaryKey(@Param("id") Integer id, @Param("orderSn")String orderSn);
int deleteByPrimaryKey( Integer id);
int insert(SysOrder record);
......@@ -19,7 +17,7 @@ public interface SysOrderMapper {
List<SysOrder> selectByExample(SysOrderExample example);
SysOrder selectByPrimaryKey(@Param("id") Integer id, @Param("orderSn")String orderSn);
SysOrder selectByPrimaryKey( Integer id);
int updateByPrimaryKeySelective(SysOrder record);
......
......@@ -3,12 +3,6 @@ package com.glsx.ordercenter.pojo;
import java.util.Date;
import java.util.List;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.groups.Default;
import org.springframework.format.annotation.DateTimeFormat;
import com.glsx.ordercenter.dto.MachanicInfo;
import com.glsx.ordercenter.dto.MerchantInfo;
......@@ -25,50 +19,24 @@ public class SysOrder {
private Integer shopId;
/**
* 订单服务区域(默认是门店地址)
*/
@NotNull(message="{param.not.null}", groups={Default.class})
private Integer district;
/**
* 详细地址
*/
@NotBlank(message="{param.not.null}", groups={Default.class})
private String address;
/**
* 联系人姓名
*/
@NotBlank(message="{param.not.null}", groups={Default.class})
private String contact;
/**
* 联系人电话
*/
@NotBlank(message="{param.not.null}", groups={Default.class})
private String phoneNumber;
private String carBrand;
private String carType;
/**
* 车架号
*/
private String vinNo;
/**
* 车辆颜色
*/
@NotBlank(message="{param.not.null}", groups={Default.class})
private String carColor;
/**
* 安装日期
*/
@NotNull(message="{param.not.null}", groups={Default.class})
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date installDate;
/**
* 服务类型
*/
@NotBlank(message="{param.not.null}", groups={Default.class})
private String serviceType;
private String carOwner;
......@@ -95,23 +63,29 @@ public class SysOrder {
private String updateBy;
private SysArea area;
private String deviceNo;
private String installLocation;
private String overdueReason;
private Byte repairType;
private Integer carPictureId;
private Integer vinNoPictureId;
private Integer installLocationPictureId;
private SysArea area;
private List<SysOrderRepair> orderRepair;
private String orderChannel;
private MerchantInfo merchantInfo;
private MachanicInfo machanicInfo;
private Integer subOrderCount;
public Integer getSubOrderCount() {
return subOrderCount;
}
public void setSubOrderCount(Integer subOrderCount) {
this.subOrderCount = subOrderCount;
}
public SysArea getArea() {
public SysArea getArea() {
return area;
}
......@@ -151,6 +125,14 @@ public class SysOrder {
this.machanicInfo = machanicInfo;
}
public Integer getSubOrderCount() {
return subOrderCount;
}
public void setSubOrderCount(Integer subOrderCount) {
this.subOrderCount = subOrderCount;
}
public Integer getId() {
return id;
}
......@@ -223,6 +205,14 @@ public class SysOrder {
this.contact = contact == null ? null : contact.trim();
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber == null ? null : phoneNumber.trim();
}
public String getCarBrand() {
return carBrand;
}
......@@ -279,23 +269,15 @@ public class SysOrder {
this.carOwner = carOwner == null ? null : carOwner.trim();
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public String getCarOwnerPhone() {
return carOwnerPhone;
}
public String getCarOwnerPhone() {
return carOwnerPhone;
}
public void setCarOwnerPhone(String carOwnerPhone) {
this.carOwnerPhone = carOwnerPhone;
}
public void setCarOwnerPhone(String carOwnerPhone) {
this.carOwnerPhone = carOwnerPhone == null ? null : carOwnerPhone.trim();
}
public Date getCancelTime() {
public Date getCancelTime() {
return cancelTime;
}
......@@ -374,4 +356,60 @@ public class SysOrder {
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy == null ? null : updateBy.trim();
}
public String getDeviceNo() {
return deviceNo;
}
public void setDeviceNo(String deviceNo) {
this.deviceNo = deviceNo == null ? null : deviceNo.trim();
}
public String getInstallLocation() {
return installLocation;
}
public void setInstallLocation(String installLocation) {
this.installLocation = installLocation == null ? null : installLocation.trim();
}
public String getOverdueReason() {
return overdueReason;
}
public void setOverdueReason(String overdueReason) {
this.overdueReason = overdueReason == null ? null : overdueReason.trim();
}
public Byte getRepairType() {
return repairType;
}
public void setRepairType(Byte repairType) {
this.repairType = repairType;
}
public Integer getCarPictureId() {
return carPictureId;
}
public void setCarPictureId(Integer carPictureId) {
this.carPictureId = carPictureId;
}
public Integer getVinNoPictureId() {
return vinNoPictureId;
}
public void setVinNoPictureId(Integer vinNoPictureId) {
this.vinNoPictureId = vinNoPictureId;
}
public Integer getInstallLocationPictureId() {
return installLocationPictureId;
}
public void setInstallLocationPictureId(Integer installLocationPictureId) {
this.installLocationPictureId = installLocationPictureId;
}
}
\ No newline at end of file
......@@ -685,52 +685,62 @@ public class SysOrderExample {
return (Criteria) this;
}
public Criteria andPhoneNumberEqualTo(Integer value) {
public Criteria andPhoneNumberEqualTo(String value) {
addCriterion("phone_number =", value, "phoneNumber");
return (Criteria) this;
}
public Criteria andPhoneNumberNotEqualTo(Integer value) {
public Criteria andPhoneNumberNotEqualTo(String value) {
addCriterion("phone_number <>", value, "phoneNumber");
return (Criteria) this;
}
public Criteria andPhoneNumberGreaterThan(Integer value) {
public Criteria andPhoneNumberGreaterThan(String value) {
addCriterion("phone_number >", value, "phoneNumber");
return (Criteria) this;
}
public Criteria andPhoneNumberGreaterThanOrEqualTo(Integer value) {
public Criteria andPhoneNumberGreaterThanOrEqualTo(String value) {
addCriterion("phone_number >=", value, "phoneNumber");
return (Criteria) this;
}
public Criteria andPhoneNumberLessThan(Integer value) {
public Criteria andPhoneNumberLessThan(String value) {
addCriterion("phone_number <", value, "phoneNumber");
return (Criteria) this;
}
public Criteria andPhoneNumberLessThanOrEqualTo(Integer value) {
public Criteria andPhoneNumberLessThanOrEqualTo(String value) {
addCriterion("phone_number <=", value, "phoneNumber");
return (Criteria) this;
}
public Criteria andPhoneNumberIn(List<Integer> values) {
public Criteria andPhoneNumberLike(String value) {
addCriterion("phone_number like", value, "phoneNumber");
return (Criteria) this;
}
public Criteria andPhoneNumberNotLike(String value) {
addCriterion("phone_number not like", value, "phoneNumber");
return (Criteria) this;
}
public Criteria andPhoneNumberIn(List<String> values) {
addCriterion("phone_number in", values, "phoneNumber");
return (Criteria) this;
}
public Criteria andPhoneNumberNotIn(List<Integer> values) {
public Criteria andPhoneNumberNotIn(List<String> values) {
addCriterion("phone_number not in", values, "phoneNumber");
return (Criteria) this;
}
public Criteria andPhoneNumberBetween(Integer value1, Integer value2) {
public Criteria andPhoneNumberBetween(String value1, String value2) {
addCriterion("phone_number between", value1, value2, "phoneNumber");
return (Criteria) this;
}
public Criteria andPhoneNumberNotBetween(Integer value1, Integer value2) {
public Criteria andPhoneNumberNotBetween(String value1, String value2) {
addCriterion("phone_number not between", value1, value2, "phoneNumber");
return (Criteria) this;
}
......@@ -1225,52 +1235,62 @@ public class SysOrderExample {
return (Criteria) this;
}
public Criteria andCarOwnerPhoneEqualTo(Integer value) {
public Criteria andCarOwnerPhoneEqualTo(String value) {
addCriterion("car_owner_phone =", value, "carOwnerPhone");
return (Criteria) this;
}
public Criteria andCarOwnerPhoneNotEqualTo(Integer value) {
public Criteria andCarOwnerPhoneNotEqualTo(String value) {
addCriterion("car_owner_phone <>", value, "carOwnerPhone");
return (Criteria) this;
}
public Criteria andCarOwnerPhoneGreaterThan(Integer value) {
public Criteria andCarOwnerPhoneGreaterThan(String value) {
addCriterion("car_owner_phone >", value, "carOwnerPhone");
return (Criteria) this;
}
public Criteria andCarOwnerPhoneGreaterThanOrEqualTo(Integer value) {
public Criteria andCarOwnerPhoneGreaterThanOrEqualTo(String value) {
addCriterion("car_owner_phone >=", value, "carOwnerPhone");
return (Criteria) this;
}
public Criteria andCarOwnerPhoneLessThan(Integer value) {
public Criteria andCarOwnerPhoneLessThan(String value) {
addCriterion("car_owner_phone <", value, "carOwnerPhone");
return (Criteria) this;
}
public Criteria andCarOwnerPhoneLessThanOrEqualTo(Integer value) {
public Criteria andCarOwnerPhoneLessThanOrEqualTo(String value) {
addCriterion("car_owner_phone <=", value, "carOwnerPhone");
return (Criteria) this;
}
public Criteria andCarOwnerPhoneIn(List<Integer> values) {
public Criteria andCarOwnerPhoneLike(String value) {
addCriterion("car_owner_phone like", value, "carOwnerPhone");
return (Criteria) this;
}
public Criteria andCarOwnerPhoneNotLike(String value) {
addCriterion("car_owner_phone not like", value, "carOwnerPhone");
return (Criteria) this;
}
public Criteria andCarOwnerPhoneIn(List<String> values) {
addCriterion("car_owner_phone in", values, "carOwnerPhone");
return (Criteria) this;
}
public Criteria andCarOwnerPhoneNotIn(List<Integer> values) {
public Criteria andCarOwnerPhoneNotIn(List<String> values) {
addCriterion("car_owner_phone not in", values, "carOwnerPhone");
return (Criteria) this;
}
public Criteria andCarOwnerPhoneBetween(Integer value1, Integer value2) {
public Criteria andCarOwnerPhoneBetween(String value1, String value2) {
addCriterion("car_owner_phone between", value1, value2, "carOwnerPhone");
return (Criteria) this;
}
public Criteria andCarOwnerPhoneNotBetween(Integer value1, Integer value2) {
public Criteria andCarOwnerPhoneNotBetween(String value1, String value2) {
addCriterion("car_owner_phone not between", value1, value2, "carOwnerPhone");
return (Criteria) this;
}
......@@ -1924,6 +1944,456 @@ public class SysOrderExample {
addCriterion("update_by not between", value1, value2, "updateBy");
return (Criteria) this;
}
public Criteria andDeviceNoIsNull() {
addCriterion("device_no is null");
return (Criteria) this;
}
public Criteria andDeviceNoIsNotNull() {
addCriterion("device_no is not null");
return (Criteria) this;
}
public Criteria andDeviceNoEqualTo(String value) {
addCriterion("device_no =", value, "deviceNo");
return (Criteria) this;
}
public Criteria andDeviceNoNotEqualTo(String value) {
addCriterion("device_no <>", value, "deviceNo");
return (Criteria) this;
}
public Criteria andDeviceNoGreaterThan(String value) {
addCriterion("device_no >", value, "deviceNo");
return (Criteria) this;
}
public Criteria andDeviceNoGreaterThanOrEqualTo(String value) {
addCriterion("device_no >=", value, "deviceNo");
return (Criteria) this;
}
public Criteria andDeviceNoLessThan(String value) {
addCriterion("device_no <", value, "deviceNo");
return (Criteria) this;
}
public Criteria andDeviceNoLessThanOrEqualTo(String value) {
addCriterion("device_no <=", value, "deviceNo");
return (Criteria) this;
}
public Criteria andDeviceNoLike(String value) {
addCriterion("device_no like", value, "deviceNo");
return (Criteria) this;
}
public Criteria andDeviceNoNotLike(String value) {
addCriterion("device_no not like", value, "deviceNo");
return (Criteria) this;
}
public Criteria andDeviceNoIn(List<String> values) {
addCriterion("device_no in", values, "deviceNo");
return (Criteria) this;
}
public Criteria andDeviceNoNotIn(List<String> values) {
addCriterion("device_no not in", values, "deviceNo");
return (Criteria) this;
}
public Criteria andDeviceNoBetween(String value1, String value2) {
addCriterion("device_no between", value1, value2, "deviceNo");
return (Criteria) this;
}
public Criteria andDeviceNoNotBetween(String value1, String value2) {
addCriterion("device_no not between", value1, value2, "deviceNo");
return (Criteria) this;
}
public Criteria andInstallLocationIsNull() {
addCriterion("install_location is null");
return (Criteria) this;
}
public Criteria andInstallLocationIsNotNull() {
addCriterion("install_location is not null");
return (Criteria) this;
}
public Criteria andInstallLocationEqualTo(String value) {
addCriterion("install_location =", value, "installLocation");
return (Criteria) this;
}
public Criteria andInstallLocationNotEqualTo(String value) {
addCriterion("install_location <>", value, "installLocation");
return (Criteria) this;
}
public Criteria andInstallLocationGreaterThan(String value) {
addCriterion("install_location >", value, "installLocation");
return (Criteria) this;
}
public Criteria andInstallLocationGreaterThanOrEqualTo(String value) {
addCriterion("install_location >=", value, "installLocation");
return (Criteria) this;
}
public Criteria andInstallLocationLessThan(String value) {
addCriterion("install_location <", value, "installLocation");
return (Criteria) this;
}
public Criteria andInstallLocationLessThanOrEqualTo(String value) {
addCriterion("install_location <=", value, "installLocation");
return (Criteria) this;
}
public Criteria andInstallLocationLike(String value) {
addCriterion("install_location like", value, "installLocation");
return (Criteria) this;
}
public Criteria andInstallLocationNotLike(String value) {
addCriterion("install_location not like", value, "installLocation");
return (Criteria) this;
}
public Criteria andInstallLocationIn(List<String> values) {
addCriterion("install_location in", values, "installLocation");
return (Criteria) this;
}
public Criteria andInstallLocationNotIn(List<String> values) {
addCriterion("install_location not in", values, "installLocation");
return (Criteria) this;
}
public Criteria andInstallLocationBetween(String value1, String value2) {
addCriterion("install_location between", value1, value2, "installLocation");
return (Criteria) this;
}
public Criteria andInstallLocationNotBetween(String value1, String value2) {
addCriterion("install_location not between", value1, value2, "installLocation");
return (Criteria) this;
}
public Criteria andOverdueReasonIsNull() {
addCriterion("overdue_reason is null");
return (Criteria) this;
}
public Criteria andOverdueReasonIsNotNull() {
addCriterion("overdue_reason is not null");
return (Criteria) this;
}
public Criteria andOverdueReasonEqualTo(String value) {
addCriterion("overdue_reason =", value, "overdueReason");
return (Criteria) this;
}
public Criteria andOverdueReasonNotEqualTo(String value) {
addCriterion("overdue_reason <>", value, "overdueReason");
return (Criteria) this;
}
public Criteria andOverdueReasonGreaterThan(String value) {
addCriterion("overdue_reason >", value, "overdueReason");
return (Criteria) this;
}
public Criteria andOverdueReasonGreaterThanOrEqualTo(String value) {
addCriterion("overdue_reason >=", value, "overdueReason");
return (Criteria) this;
}
public Criteria andOverdueReasonLessThan(String value) {
addCriterion("overdue_reason <", value, "overdueReason");
return (Criteria) this;
}
public Criteria andOverdueReasonLessThanOrEqualTo(String value) {
addCriterion("overdue_reason <=", value, "overdueReason");
return (Criteria) this;
}
public Criteria andOverdueReasonLike(String value) {
addCriterion("overdue_reason like", value, "overdueReason");
return (Criteria) this;
}
public Criteria andOverdueReasonNotLike(String value) {
addCriterion("overdue_reason not like", value, "overdueReason");
return (Criteria) this;
}
public Criteria andOverdueReasonIn(List<String> values) {
addCriterion("overdue_reason in", values, "overdueReason");
return (Criteria) this;
}
public Criteria andOverdueReasonNotIn(List<String> values) {
addCriterion("overdue_reason not in", values, "overdueReason");
return (Criteria) this;
}
public Criteria andOverdueReasonBetween(String value1, String value2) {
addCriterion("overdue_reason between", value1, value2, "overdueReason");
return (Criteria) this;
}
public Criteria andOverdueReasonNotBetween(String value1, String value2) {
addCriterion("overdue_reason not between", value1, value2, "overdueReason");
return (Criteria) this;
}
public Criteria andRepairTypeIsNull() {
addCriterion("repair_type is null");
return (Criteria) this;
}
public Criteria andRepairTypeIsNotNull() {
addCriterion("repair_type is not null");
return (Criteria) this;
}
public Criteria andRepairTypeEqualTo(Byte value) {
addCriterion("repair_type =", value, "repairType");
return (Criteria) this;
}
public Criteria andRepairTypeNotEqualTo(Byte value) {
addCriterion("repair_type <>", value, "repairType");
return (Criteria) this;
}
public Criteria andRepairTypeGreaterThan(Byte value) {
addCriterion("repair_type >", value, "repairType");
return (Criteria) this;
}
public Criteria andRepairTypeGreaterThanOrEqualTo(Byte value) {
addCriterion("repair_type >=", value, "repairType");
return (Criteria) this;
}
public Criteria andRepairTypeLessThan(Byte value) {
addCriterion("repair_type <", value, "repairType");
return (Criteria) this;
}
public Criteria andRepairTypeLessThanOrEqualTo(Byte value) {
addCriterion("repair_type <=", value, "repairType");
return (Criteria) this;
}
public Criteria andRepairTypeIn(List<Byte> values) {
addCriterion("repair_type in", values, "repairType");
return (Criteria) this;
}
public Criteria andRepairTypeNotIn(List<Byte> values) {
addCriterion("repair_type not in", values, "repairType");
return (Criteria) this;
}
public Criteria andRepairTypeBetween(Byte value1, Byte value2) {
addCriterion("repair_type between", value1, value2, "repairType");
return (Criteria) this;
}
public Criteria andRepairTypeNotBetween(Byte value1, Byte value2) {
addCriterion("repair_type not between", value1, value2, "repairType");
return (Criteria) this;
}
public Criteria andCarPictureIdIsNull() {
addCriterion("car_picture_id is null");
return (Criteria) this;
}
public Criteria andCarPictureIdIsNotNull() {
addCriterion("car_picture_id is not null");
return (Criteria) this;
}
public Criteria andCarPictureIdEqualTo(Integer value) {
addCriterion("car_picture_id =", value, "carPictureId");
return (Criteria) this;
}
public Criteria andCarPictureIdNotEqualTo(Integer value) {
addCriterion("car_picture_id <>", value, "carPictureId");
return (Criteria) this;
}
public Criteria andCarPictureIdGreaterThan(Integer value) {
addCriterion("car_picture_id >", value, "carPictureId");
return (Criteria) this;
}
public Criteria andCarPictureIdGreaterThanOrEqualTo(Integer value) {
addCriterion("car_picture_id >=", value, "carPictureId");
return (Criteria) this;
}
public Criteria andCarPictureIdLessThan(Integer value) {
addCriterion("car_picture_id <", value, "carPictureId");
return (Criteria) this;
}
public Criteria andCarPictureIdLessThanOrEqualTo(Integer value) {
addCriterion("car_picture_id <=", value, "carPictureId");
return (Criteria) this;
}
public Criteria andCarPictureIdIn(List<Integer> values) {
addCriterion("car_picture_id in", values, "carPictureId");
return (Criteria) this;
}
public Criteria andCarPictureIdNotIn(List<Integer> values) {
addCriterion("car_picture_id not in", values, "carPictureId");
return (Criteria) this;
}
public Criteria andCarPictureIdBetween(Integer value1, Integer value2) {
addCriterion("car_picture_id between", value1, value2, "carPictureId");
return (Criteria) this;
}
public Criteria andCarPictureIdNotBetween(Integer value1, Integer value2) {
addCriterion("car_picture_id not between", value1, value2, "carPictureId");
return (Criteria) this;
}
public Criteria andVinNoPictureIdIsNull() {
addCriterion("vin_no_picture_id is null");
return (Criteria) this;
}
public Criteria andVinNoPictureIdIsNotNull() {
addCriterion("vin_no_picture_id is not null");
return (Criteria) this;
}
public Criteria andVinNoPictureIdEqualTo(Integer value) {
addCriterion("vin_no_picture_id =", value, "vinNoPictureId");
return (Criteria) this;
}
public Criteria andVinNoPictureIdNotEqualTo(Integer value) {
addCriterion("vin_no_picture_id <>", value, "vinNoPictureId");
return (Criteria) this;
}
public Criteria andVinNoPictureIdGreaterThan(Integer value) {
addCriterion("vin_no_picture_id >", value, "vinNoPictureId");
return (Criteria) this;
}
public Criteria andVinNoPictureIdGreaterThanOrEqualTo(Integer value) {
addCriterion("vin_no_picture_id >=", value, "vinNoPictureId");
return (Criteria) this;
}
public Criteria andVinNoPictureIdLessThan(Integer value) {
addCriterion("vin_no_picture_id <", value, "vinNoPictureId");
return (Criteria) this;
}
public Criteria andVinNoPictureIdLessThanOrEqualTo(Integer value) {
addCriterion("vin_no_picture_id <=", value, "vinNoPictureId");
return (Criteria) this;
}
public Criteria andVinNoPictureIdIn(List<Integer> values) {
addCriterion("vin_no_picture_id in", values, "vinNoPictureId");
return (Criteria) this;
}
public Criteria andVinNoPictureIdNotIn(List<Integer> values) {
addCriterion("vin_no_picture_id not in", values, "vinNoPictureId");
return (Criteria) this;
}
public Criteria andVinNoPictureIdBetween(Integer value1, Integer value2) {
addCriterion("vin_no_picture_id between", value1, value2, "vinNoPictureId");
return (Criteria) this;
}
public Criteria andVinNoPictureIdNotBetween(Integer value1, Integer value2) {
addCriterion("vin_no_picture_id not between", value1, value2, "vinNoPictureId");
return (Criteria) this;
}
public Criteria andInstallLocationPictureIdIsNull() {
addCriterion("install_location_picture_id is null");
return (Criteria) this;
}
public Criteria andInstallLocationPictureIdIsNotNull() {
addCriterion("install_location_picture_id is not null");
return (Criteria) this;
}
public Criteria andInstallLocationPictureIdEqualTo(Integer value) {
addCriterion("install_location_picture_id =", value, "installLocationPictureId");
return (Criteria) this;
}
public Criteria andInstallLocationPictureIdNotEqualTo(Integer value) {
addCriterion("install_location_picture_id <>", value, "installLocationPictureId");
return (Criteria) this;
}
public Criteria andInstallLocationPictureIdGreaterThan(Integer value) {
addCriterion("install_location_picture_id >", value, "installLocationPictureId");
return (Criteria) this;
}
public Criteria andInstallLocationPictureIdGreaterThanOrEqualTo(Integer value) {
addCriterion("install_location_picture_id >=", value, "installLocationPictureId");
return (Criteria) this;
}
public Criteria andInstallLocationPictureIdLessThan(Integer value) {
addCriterion("install_location_picture_id <", value, "installLocationPictureId");
return (Criteria) this;
}
public Criteria andInstallLocationPictureIdLessThanOrEqualTo(Integer value) {
addCriterion("install_location_picture_id <=", value, "installLocationPictureId");
return (Criteria) this;
}
public Criteria andInstallLocationPictureIdIn(List<Integer> values) {
addCriterion("install_location_picture_id in", values, "installLocationPictureId");
return (Criteria) this;
}
public Criteria andInstallLocationPictureIdNotIn(List<Integer> values) {
addCriterion("install_location_picture_id not in", values, "installLocationPictureId");
return (Criteria) this;
}
public Criteria andInstallLocationPictureIdBetween(Integer value1, Integer value2) {
addCriterion("install_location_picture_id between", value1, value2, "installLocationPictureId");
return (Criteria) this;
}
public Criteria andInstallLocationPictureIdNotBetween(Integer value1, Integer value2) {
addCriterion("install_location_picture_id not between", value1, value2, "installLocationPictureId");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
......
......@@ -43,13 +43,13 @@ import com.glsx.ordercenter.pojo.SysOrderExample;
*/
public interface IOrderService {
int deleteByPrimaryKey( Integer id, String orderSn);
int deleteByPrimaryKey( Integer id);
int insertSelective(SysOrder record);
List<SysOrder> selectByExample(SysOrderExample example,Page page,QueryOrderReq oueryOrderReq,Integer userId);
SysOrder selectByPrimaryKey(Integer id, String orderSn);
SysOrder selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(SysOrder record);
......
......@@ -96,8 +96,8 @@ public class OrderServiceImpl implements IOrderService {
*
*/
@Override
public int deleteByPrimaryKey(Integer id, String orderSn) {
SysOrder record = orderDao.selectByPrimaryKey(id, orderSn);
public int deleteByPrimaryKey(Integer id) {
SysOrder record = orderDao.selectByPrimaryKey(id);
SysOrderRepairExample example = new SysOrderRepairExample();
example.createCriteria().andOrderIdEqualTo(id);
List<SysOrderRepair> list = orderRepairDao.selectByExample(example);
......@@ -238,13 +238,13 @@ public class OrderServiceImpl implements IOrderService {
}
@Override
public SysOrder selectByPrimaryKey(Integer id, String orderSn) {
return orderDao.selectByPrimaryKey(id, orderSn);
public SysOrder selectByPrimaryKey(Integer id) {
return orderDao.selectByPrimaryKey(id);
}
@Override
public int updateByPrimaryKeySelective(SysOrder record) {
SysOrder sysOrder = orderDao.selectByPrimaryKey(record.getId(), record.getOrderSn());
SysOrder sysOrder = orderDao.selectByPrimaryKey(record.getId());
// TODO 产品未确认具体修改内容
return orderDao.updateByPrimaryKey(record);
......@@ -908,7 +908,7 @@ public class OrderServiceImpl implements IOrderService {
*/
@Override
public SysOrder getOrderDetail(Integer id) {
SysOrder order = orderDao.selectByPrimaryKey(id, null);
SysOrder order = orderDao.selectByPrimaryKey(id);
SysOrderRepairExample exam = new SysOrderRepairExample();
exam.createCriteria().andOrderIdEqualTo(id);
List<SysOrderRepair> subOrders = orderRepairDao.selectByExample(exam);
......
......@@ -3,7 +3,7 @@
<mapper namespace="com.glsx.ordercenter.mapper.SysOrderMapper">
<resultMap id="BaseResultMap" type="com.glsx.ordercenter.pojo.SysOrder">
<id column="id" jdbcType="INTEGER" property="id" />
<id column="order_sn" jdbcType="VARCHAR" property="orderSn" />
<result column="order_sn" jdbcType="VARCHAR" property="orderSn" />
<result column="active_status" jdbcType="TINYINT" property="activeStatus" />
<result column="canceled" jdbcType="TINYINT" property="canceled" />
<result column="order_type" jdbcType="TINYINT" property="orderType" />
......@@ -30,6 +30,13 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="device_no" jdbcType="VARCHAR" property="deviceNo" />
<result column="install_location" jdbcType="VARCHAR" property="installLocation" />
<result column="overdue_reason" jdbcType="VARCHAR" property="overdueReason" />
<result column="repair_type" jdbcType="TINYINT" property="repairType" />
<result column="car_picture_id" jdbcType="INTEGER" property="carPictureId" />
<result column="vin_no_picture_id" jdbcType="INTEGER" property="vinNoPictureId" />
<result column="install_location_picture_id" jdbcType="INTEGER" property="installLocationPictureId" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
......@@ -64,7 +71,9 @@
id, order_sn, active_status, canceled, order_type, shop_id, district, address, contact,
phone_number, car_brand, car_type, vin_no, car_color, install_date, service_type,
car_owner, car_owner_phone, cancel_time, active_status_array, merchant_id, mechanic_id,
repair_reason, remark, create_time, update_time, create_by, update_by
repair_reason, remark, create_time, update_time, create_by, update_by, device_no,
install_location, overdue_reason, repair_type, car_picture_id, vin_no_picture_id,
install_location_picture_id
</sql>
<select id="selectByExample" parameterType="com.glsx.ordercenter.pojo.SysOrderExample" resultMap="BaseResultMap">
select
......@@ -81,29 +90,15 @@
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap">
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sys_order
<where>
<if test="id != null">
and id = #{id,jdbcType=INTEGER}
</if>
<if test="orderSn != null">
and order_sn = #{orderSn,jdbcType=VARCHAR}
</if>
</where>
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="map">
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from sys_order
<where>
<if test="id != null">
and id = #{id,jdbcType=INTEGER}
</if>
<if test="orderSn != null">
and order_sn = #{orderSn,jdbcType=VARCHAR}
</if>
</where>
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.glsx.ordercenter.pojo.SysOrder">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
......@@ -117,8 +112,10 @@
car_owner, car_owner_phone, cancel_time,
active_status_array, merchant_id, mechanic_id,
repair_reason, remark, create_time,
update_time, create_by, update_by
)
update_time, create_by, update_by,
device_no, install_location, overdue_reason,
repair_type, car_picture_id, vin_no_picture_id,
install_location_picture_id)
values (#{orderSn,jdbcType=VARCHAR}, #{activeStatus,jdbcType=TINYINT}, #{canceled,jdbcType=TINYINT},
#{orderType,jdbcType=TINYINT}, #{shopId,jdbcType=INTEGER}, #{district,jdbcType=INTEGER},
#{address,jdbcType=VARCHAR}, #{contact,jdbcType=VARCHAR}, #{phoneNumber,jdbcType=VARCHAR},
......@@ -127,8 +124,10 @@
#{carOwner,jdbcType=VARCHAR}, #{carOwnerPhone,jdbcType=VARCHAR}, #{cancelTime,jdbcType=TIMESTAMP},
#{activeStatusArray,jdbcType=VARCHAR}, #{merchantId,jdbcType=INTEGER}, #{mechanicId,jdbcType=INTEGER},
#{repairReason,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}
)
#{updateTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR},
#{deviceNo,jdbcType=VARCHAR}, #{installLocation,jdbcType=VARCHAR}, #{overdueReason,jdbcType=VARCHAR},
#{repairType,jdbcType=TINYINT}, #{carPictureId,jdbcType=INTEGER}, #{vinNoPictureId,jdbcType=INTEGER},
#{installLocationPictureId,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.glsx.ordercenter.pojo.SysOrder">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
......@@ -217,6 +216,27 @@
<if test="updateBy != null">
update_by,
</if>
<if test="deviceNo != null">
device_no,
</if>
<if test="installLocation != null">
install_location,
</if>
<if test="overdueReason != null">
overdue_reason,
</if>
<if test="repairType != null">
repair_type,
</if>
<if test="carPictureId != null">
car_picture_id,
</if>
<if test="vinNoPictureId != null">
vin_no_picture_id,
</if>
<if test="installLocationPictureId != null">
install_location_picture_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderSn != null">
......@@ -300,6 +320,27 @@
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="deviceNo != null">
#{deviceNo,jdbcType=VARCHAR},
</if>
<if test="installLocation != null">
#{installLocation,jdbcType=VARCHAR},
</if>
<if test="overdueReason != null">
#{overdueReason,jdbcType=VARCHAR},
</if>
<if test="repairType != null">
#{repairType,jdbcType=TINYINT},
</if>
<if test="carPictureId != null">
#{carPictureId,jdbcType=INTEGER},
</if>
<if test="vinNoPictureId != null">
#{vinNoPictureId,jdbcType=INTEGER},
</if>
<if test="installLocationPictureId != null">
#{installLocationPictureId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.glsx.ordercenter.pojo.SysOrderExample" resultType="java.lang.Long">
......@@ -311,6 +352,9 @@
<update id="updateByPrimaryKeySelective" parameterType="com.glsx.ordercenter.pojo.SysOrder">
update sys_order
<set>
<if test="orderSn != null">
order_sn = #{orderSn,jdbcType=VARCHAR},
</if>
<if test="activeStatus != null">
active_status = #{activeStatus,jdbcType=TINYINT},
</if>
......@@ -389,19 +433,34 @@
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="deviceNo != null">
device_no = #{deviceNo,jdbcType=VARCHAR},
</if>
<if test="installLocation != null">
install_location = #{installLocation,jdbcType=VARCHAR},
</if>
<if test="overdueReason != null">
overdue_reason = #{overdueReason,jdbcType=VARCHAR},
</if>
<if test="repairType != null">
repair_type = #{repairType,jdbcType=TINYINT},
</if>
<if test="carPictureId != null">
car_picture_id = #{carPictureId,jdbcType=INTEGER},
</if>
<if test="vinNoPictureId != null">
vin_no_picture_id = #{vinNoPictureId,jdbcType=INTEGER},
</if>
<if test="installLocationPictureId != null">
install_location_picture_id = #{installLocationPictureId,jdbcType=INTEGER},
</if>
</set>
<where>
<if test="id != null">
and id = #{id,jdbcType=INTEGER}
</if>
<if test="orderSn != null">
and order_sn = #{orderSn,jdbcType=VARCHAR}
</if>
</where>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.glsx.ordercenter.pojo.SysOrder">
update sys_order
set active_status = #{activeStatus,jdbcType=TINYINT},
set order_sn = #{orderSn,jdbcType=VARCHAR},
active_status = #{activeStatus,jdbcType=TINYINT},
canceled = #{canceled,jdbcType=TINYINT},
order_type = #{orderType,jdbcType=TINYINT},
shop_id = #{shopId,jdbcType=INTEGER},
......@@ -426,17 +485,18 @@
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
create_by = #{createBy,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR}
<where>
<if test="id != null">
and id = #{id,jdbcType=INTEGER}
</if>
<if test="orderSn != null">
and order_sn = #{orderSn,jdbcType=VARCHAR}
</if>
</where>
update_by = #{updateBy,jdbcType=VARCHAR},
device_no = #{deviceNo,jdbcType=VARCHAR},
install_location = #{installLocation,jdbcType=VARCHAR},
overdue_reason = #{overdueReason,jdbcType=VARCHAR},
repair_type = #{repairType,jdbcType=TINYINT},
car_picture_id = #{carPictureId,jdbcType=INTEGER},
vin_no_picture_id = #{vinNoPictureId,jdbcType=INTEGER},
install_location_picture_id = #{installLocationPictureId,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<resultMap id="OrderDetailResultMap" type="com.glsx.ordercenter.dto.QueryOrderResp"
<resultMap id="OrderDetailResultMap" type="com.glsx.ordercenter.dto.QueryOrderResp"
extends="BaseResultMap">
<result column="active_status" jdbcType="TINYINT" property="activeStatus" />
</resultMap>
......
......@@ -104,109 +104,5 @@
update sys_order_status
set active_status_array = #{activeStatusArray,jdbcType=VARCHAR}
where order_id = #{orderId,jdbcType=INTEGER}
</update>
<resultMap id="BaseResultMap" type="com.glsx.ordercenter.pojo.SysOrderStatus">
<id column="order_id" jdbcType="INTEGER" property="orderId" />
<result column="active_status_array" jdbcType="VARCHAR" property="activeStatusArray" />
</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="Base_Column_List">
order_id, active_status_array
</sql>
<select id="selectByExample" parameterType="com.glsx.ordercenter.pojo.SysOrderStatusExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'false' as QUERYID,
<include refid="Base_Column_List" />
from sys_order_status
<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.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sys_order_status
where order_id = #{orderId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from sys_order_status
where order_id = #{orderId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.glsx.ordercenter.pojo.SysOrderStatus">
insert into sys_order_status (order_id, active_status_array)
values (#{orderId,jdbcType=INTEGER}, #{activeStatusArray,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.glsx.ordercenter.pojo.SysOrderStatus">
insert into sys_order_status
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orderId != null">
order_id,
</if>
<if test="activeStatusArray != null">
active_status_array,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderId != null">
#{orderId,jdbcType=INTEGER},
</if>
<if test="activeStatusArray != null">
#{activeStatusArray,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.glsx.ordercenter.pojo.SysOrderStatusExample" resultType="java.lang.Long">
select count(*) from sys_order_status
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByPrimaryKeySelective" parameterType="com.glsx.ordercenter.pojo.SysOrderStatus">
update sys_order_status
<set>
<if test="activeStatusArray != null">
active_status_array = #{activeStatusArray,jdbcType=VARCHAR},
</if>
</set>
where order_id = #{orderId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.glsx.ordercenter.pojo.SysOrderStatus">
update sys_order_status
set active_status_array = #{activeStatusArray,jdbcType=VARCHAR}
where order_id = #{orderId,jdbcType=INTEGER}
</update>
</update>
</mapper>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!