Commit e8a6de31 by wangnb

包活干V2.0.0功能开发--think.wang

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@28223 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent aa8aa9fc
package com.glsx.ordercenter.controller;
import javax.servlet.http.HttpServletRequest;
import javax.validation.groups.Default;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper;
......@@ -23,40 +16,19 @@ import com.glsx.ordercenter.constants.BizConstants;
import com.glsx.ordercenter.constants.OrderActiveStatusEnum;
import com.glsx.ordercenter.constants.OrderTypeEnum;
import com.glsx.ordercenter.constants.ResultCodeEnum;
import com.glsx.ordercenter.dto.BizAmountResp;
import com.glsx.ordercenter.dto.CreateAfterSaleRepairReq;
import com.glsx.ordercenter.dto.MechanicBusiness;
import com.glsx.ordercenter.dto.MechanicStatistics;
import com.glsx.ordercenter.dto.OrderActivateReq;
import com.glsx.ordercenter.dto.OrderDeviceReq;
import com.glsx.ordercenter.dto.OrderRepairReq;
import com.glsx.ordercenter.dto.OrderStastic;
import com.glsx.ordercenter.dto.QueryOrderReq;
import com.glsx.ordercenter.dto.ServiceItemScale;
import com.glsx.ordercenter.dto.*;
import com.glsx.ordercenter.dto.req.SaveOrderSubsidyInfoReq;
import com.glsx.ordercenter.exception.BusinessException;
import com.glsx.ordercenter.pojo.GroupA;
import com.glsx.ordercenter.pojo.SysOrder;
import com.glsx.ordercenter.pojo.SysOrderDevice;
import com.glsx.ordercenter.pojo.SysOrderDeviceSupplier;
import com.glsx.ordercenter.pojo.SysOrderExample;
import com.glsx.ordercenter.pojo.SysReserveInstallLog;
import com.glsx.ordercenter.pojo.SysServiceItemDeviceConfig;
import com.glsx.ordercenter.pojo.SysServiceItemPhotoConfig;
import com.glsx.ordercenter.service.DscFeedbackService;
import com.glsx.ordercenter.service.IOrderChannelService;
import com.glsx.ordercenter.service.IOrderDeviceService;
import com.glsx.ordercenter.service.IOrderService;
import com.glsx.ordercenter.service.OraOrderService;
import com.glsx.ordercenter.service.ReserveInstallLogService;
import com.glsx.ordercenter.pojo.*;
import com.glsx.ordercenter.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.validation.groups.Default;
import java.util.*;
/**
* @author Zheng Xiajun
......@@ -276,11 +248,9 @@ public class OrderController extends BaseController {
@RequestMapping(value = "/getOrderDetail", method = {RequestMethod.GET, RequestMethod.POST})
public ResultObject getOrderDetail(HttpServletRequest request, Integer id, String orderSn) {
logger.info("已登录状态---查看订单详情....orderId:" + id + ",orderSn:" + orderSn);
if (id == null) {
return new ResultObject(ResultCodeEnum.PARAM_ERROR.getCode(), "id不能为空");
}
// 获取当前用户信息 根据用户角色筛选订单
SysOrder sysOrderDetail = orderService.getOrderDetail(id, orderSn, UserUtils.getUserId(request));
return new ResultObject(ResultCodeEnum.SUCCESS.getCode(), ResultCodeEnum.SUCCESS.getMsg(), sysOrderDetail);
......
package com.glsx.ordercenter.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.glsx.common.annotation.AuthCheck;
import com.glsx.ordercenter.constants.ResultCodeEnum;
import com.glsx.ordercenter.pojo.SysOrderStatus;
import com.glsx.ordercenter.service.IOrderStatusService;
import com.glsx.plat.core.web.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.glsx.common.annotation.AuthCheck;
import com.glsx.common.constants.ResultObject;
import com.glsx.ordercenter.constants.ResultCodeEnum;
import com.glsx.ordercenter.pojo.SysOrderStatus;
import com.glsx.ordercenter.service.IOrderStatusService;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
*
* @Title OrderStatusController.java
* @Package com.glsx.ordercenter.controller
* @Description TODO 订单状态变化流水controller
* @Description 订单状态变化流水controller
* @author zhanghj
* @date 2019年7月15日 上午10:08:27
* @version 1.0.0
......@@ -35,7 +34,7 @@ public class OrderStatusController {
*
* @author zhanghj
* @Title: getOrderProgress
* @Description: TODO 获取订单进度列表
* @Description: 获取订单进度列表
* @param orderId
* @return
* ResultObject
......@@ -43,13 +42,14 @@ public class OrderStatusController {
*/
@AuthCheck
@RequestMapping(value="/getOrderProgress", method=RequestMethod.GET)
public ResultObject getOrderProgress(Integer orderId) {
public R getOrderProgress(Integer orderId) {
if (orderId == null) {
return new ResultObject(ResultCodeEnum.PARAM_ERROR.getCode(), ResultCodeEnum.PARAM_ERROR.getMsg());
return R.error(ResultCodeEnum.PARAM_ERROR.getCode(), ResultCodeEnum.PARAM_ERROR.getMsg());
}
Map<String, Object> result = new HashMap<String, Object>();
Map<String, Object> result = new HashMap<>();
List<SysOrderStatus> list = orderStatusService.getOrderProgress(orderId);
result.put("items", list);
return new ResultObject(ResultCodeEnum.SUCCESS.getCode(), ResultCodeEnum.SUCCESS.getMsg(), result);
return R.ok().data(result);
}
}
/*
* Copyright (c) 2018, 2028, glsx and/or its affiliates. All rights reserved.
* GLSX PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.glsx.ordercenter.dto;
/**
* @ClassName: ServiceItem
* @Description: TODO(这里用一句话描述这个类的作用)
* @Description: 服务项目
* @author Zheng Xiajun
* @date 2019年11月2日
*
......@@ -39,6 +15,8 @@ public class ServiceItem {
private String serviceName;
private Integer type;
public String getServiceCode() {
return serviceCode;
}
......@@ -63,4 +41,11 @@ public class ServiceItem {
this.id = id;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
}
package com.glsx.ordercenter.mapper;
import java.util.List;
import com.glsx.ordercenter.pojo.SysOrderStatus;
import org.apache.ibatis.annotations.Param;
import com.glsx.ordercenter.pojo.SysOrderStatus;
import java.util.List;
public interface SysOrderStatusMapper {
......@@ -21,20 +20,13 @@ public interface SysOrderStatusMapper {
int updateByPrimaryKey(SysOrderStatus record);
/**
*
* @author zhanghj
* @Title: getOrderProgress
* @Description: TODO 获取订单进度列表
* 获取订单进度列表
* @param orderId
* @return
* List<SysOrderStatus>
*
*/
List<SysOrderStatus> getOrderProgress(@Param("orderId")Integer orderId);
SysOrderStatus getTheLastestOrderStatus(@Param("orderId")Integer orderId);
SysOrderStatus getLastOrderStatus(@Param("orderId")Integer orderId);
int updateRemark(SysOrderStatus record);
}
\ No newline at end of file
package com.glsx.ordercenter.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.glsx.ordercenter.dto.ServiceItem;
import com.glsx.ordercenter.pojo.SysServiceItem;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
* @Title SysServiceItemMapper.java
* @Package com.glsx.ordercenter.mapper
* @Description TODO 服务项目mapper
* @Description 服务项目mapper
* @author zhanghj
* @date 2019年9月27日 下午5:32:43
* @version 1.0.0
......@@ -32,20 +31,15 @@ public interface SysServiceItemMapper {
SysServiceItem getServiceItem(SysServiceItem item);
/**
*
* @author zhanghj
* @Title: getServiceItemList
* @Description: TODO 获取服务项目列表
* 获取服务项目列表
* @param keyWord
* @return
* List<SysServiceItem>
*
*/
List<SysServiceItem> getServiceItemList(@Param("keyWord")String keyWord);
SysServiceItem selectByServiceCode(@Param("serviceCode") String serviceCode);
List<ServiceItem> selectAll();
List<ServiceItem> selectByType(@Param("type") Integer type);
List<SysServiceItem> selectListByCodes(List<String> codes);
......
package com.glsx.ordercenter.mapper;
import java.util.List;
import com.glsx.ordercenter.pojo.SysSubOrder;
import com.glsx.ordercenter.pojo.SysSubOrderExample;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface SysSubOrderMapper {
long countByExample(SysSubOrderExample example);
......@@ -20,6 +21,8 @@ public interface SysSubOrderMapper {
List<SysSubOrder> selectByExample(SysSubOrderExample example);
int getCountByParams(SysSubOrderExample example);
SysSubOrder selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") SysSubOrder record, @Param("example") SysSubOrderExample example);
......
......@@ -6,15 +6,14 @@ import javax.validation.groups.Default;
import java.util.List;
public class SysServiceItem extends BaseModel{
@NotNull(message="{param.not.null}", groups={GroupA.class})
public class SysServiceItem extends BaseModel {
@NotNull(message = "{param.not.null}", groups = {GroupA.class})
private Integer id;
/**
* 服务名称
*/
@NotBlank(message="{param.not.null}", groups={Default.class, GroupA.class})
@NotBlank(message = "{param.not.null}", groups = {Default.class, GroupA.class})
private String serviceName;
private String serviceCode;
......@@ -22,11 +21,21 @@ public class SysServiceItem extends BaseModel{
private String imgPath;
/**
* 车务单推送接口
*/
private String pushUrl;
/**
* 新增工单信息补录
*/
private Byte isUpdateInfo;
/**
* 业务类型
*/
private Byte type;
/**
* 设备配置列表
*/
private List<SysServiceItemDeviceConfig> deviceConfigList;
......@@ -42,7 +51,7 @@ public class SysServiceItem extends BaseModel{
* 设备类型名称
*/
private String deviceTypeName;
public Integer getId() {
return id;
......@@ -85,36 +94,51 @@ public class SysServiceItem extends BaseModel{
}
public List<SysServiceItemDeviceConfig> getDeviceConfigList() {
return deviceConfigList;
}
public void setDeviceConfigList(
List<SysServiceItemDeviceConfig> deviceConfigList) {
this.deviceConfigList = deviceConfigList;
}
public List<SysServiceItemPhotoConfig> getPhotoConfigList() {
return photoConfigList;
}
public void setPhotoConfigList(List<SysServiceItemPhotoConfig> photoConfigList) {
this.photoConfigList = photoConfigList;
}
public Integer getPhotoCount() {
return photoCount;
}
public void setPhotoCount(Integer photoCount) {
this.photoCount = photoCount;
}
public String getDeviceTypeName() {
return deviceTypeName;
}
public void setDeviceTypeName(String deviceTypeName) {
this.deviceTypeName = deviceTypeName;
}
return deviceConfigList;
}
public void setDeviceConfigList(
List<SysServiceItemDeviceConfig> deviceConfigList) {
this.deviceConfigList = deviceConfigList;
}
public List<SysServiceItemPhotoConfig> getPhotoConfigList() {
return photoConfigList;
}
public void setPhotoConfigList(List<SysServiceItemPhotoConfig> photoConfigList) {
this.photoConfigList = photoConfigList;
}
public Integer getPhotoCount() {
return photoCount;
}
public void setPhotoCount(Integer photoCount) {
this.photoCount = photoCount;
}
public String getDeviceTypeName() {
return deviceTypeName;
}
public void setDeviceTypeName(String deviceTypeName) {
this.deviceTypeName = deviceTypeName;
}
public String getPushUrl() {
return pushUrl;
}
public void setPushUrl(String pushUrl) {
this.pushUrl = pushUrl;
}
public Byte getType() {
return type;
}
public void setType(Byte type) {
this.type = type;
}
}
\ No newline at end of file
package com.glsx.ordercenter.service;
import java.util.List;
import com.glsx.common.utils.Page;
import com.glsx.ordercenter.dto.ServiceItem;
import com.glsx.ordercenter.pojo.SysServiceItem;
import java.util.List;
/**
*
* @Title IServiceItem.java
......@@ -18,78 +18,60 @@ import com.glsx.ordercenter.pojo.SysServiceItem;
public interface IServiceItemService {
/**
*
* @author zhanghj
* @Title: add
* @Description: TODO 增加服务项目
* 增加服务项目
* @param serviceItem
* @return
* int
*
*/
int add(SysServiceItem serviceItem);
/**
*
* @author zhanghj
* @Title: getServiceItem
* @Description: TODO 获取服务项目
* 获取服务项目
* @param item
* @return
* SysServiceItem
*
*/
SysServiceItem getServiceItem(SysServiceItem item);
/**
*
* @author zhanghj
* @Title: update
* @Description: TODO 更新某个服务项目
* 更新某个服务项目
* @param serviceItem
* @return
* int
*
*/
int update(SysServiceItem serviceItem);
/**
*
* @author zhanghj
* @Title: delete
* @Description: TODO 删除服务项目
* 删除服务项目
* @param id
* @return
* int
*
*/
int delete(Integer id);
/**
*
* @author zhanghj
* @Title: getServiceItemList
* @Description: TODO 获取服务项目列表
* 获取服务项目列表
* @param page
* @param keyWord
* @return
* List<SysServiceItem>
*
*/
List<SysServiceItem> getServiceItemList(Page page, String keyWord);
/**
*
* @author zhanghj
* @Title: getDetail
* @Description: TODO 获取服务项目详情
* 获取服务项目详情
* @param id
* @return
* SysServiceItem
*
*/
SysServiceItem getDetail(Integer id);
List<ServiceItem> selectAll();
/**
* 通过业务类型查找
* @return
*/
List<ServiceItem> selectByType(Integer type);
/**
* 通过serviceCode查找服务项目
* @param serviceCode
* @return
*/
SysServiceItem selectByServiceCode(String serviceCode);
}
package com.glsx.ordercenter.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.glsx.ordercenter.mapper.SysOrderStatusMapper;
import com.glsx.ordercenter.pojo.SysOrderStatus;
import com.glsx.ordercenter.service.IOrderStatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
*
* @Title OrderStatusServiceImpl.java
* @Package com.glsx.ordercenter.service.impl
* @Description TODO 订单状态变化流水
* @Description 订单状态变化流水
* @author zhanghj
* @date 2019年7月15日 上午10:50:09
* @version 1.0.0
......@@ -22,12 +21,11 @@ import com.glsx.ordercenter.service.IOrderStatusService;
public class OrderStatusServiceImpl implements IOrderStatusService{
@Autowired
private SysOrderStatusMapper orderStatusDao;
private SysOrderStatusMapper orderStatusMapper;
@Override
public List<SysOrderStatus> getOrderProgress(Integer orderId) {
// TODO Auto-generated method stub
return orderStatusDao.getOrderProgress(orderId);
return orderStatusMapper.getOrderProgress(orderId);
}
}
......@@ -142,8 +142,12 @@ public class ServiceItemImpl implements IServiceItemService {
}
@Override
public List<ServiceItem> selectAll() {
return serviceItemMapper.selectAll();
public List<ServiceItem> selectByType(Integer type) {
return serviceItemMapper.selectByType(type);
}
@Override
public SysServiceItem selectByServiceCode(String serviceCode) {
return serviceItemMapper.selectByServiceCode(serviceCode);
}
}
......@@ -123,7 +123,7 @@
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
and order_type!=5
and order_type != 5
<if test="orderByClause != null">
order by ${orderByClause}
</if>
......@@ -754,31 +754,20 @@
<result column="shop_id" jdbcType="INTEGER" property="shopId"/>
<result column="biz_amount" jdbcType="BIGINT" property="bizAmount"/>
</resultMap>
<!-- <select id="selectByParams" parameterType="com.glsx.ordercenter.pojo.SysOrderExample"
resultMap="OrderDetailResultMap"> SELECT so.*,sm.shop_name,su.`name`,su.phone_number
FROM sys_order so LEFT JOIN sys_merchant sm ON so.merchant_id = sm.id LEFT
JOIN sys_user su ON sm.user_id = su.id LEFT JOIN sys_mechanic smc ON so.mechanic_id
= smc.id and smc.user_id = su.id <if test="_parameter != null"> <include
refid="Example_Where_Clause" /> </if> <if test="orderByClause != null"> order
by ${orderByClause} </if> </select> -->
<select id="selectByParams" parameterType="com.glsx.ordercenter.pojo.SysOrderExample"
resultMap="OrderDetailResultMap">
SELECT
so.*, sm.shop_name
FROM
sys_order so
LEFT JOIN sys_merchant sm ON
so.merchant_id = sm.id
LEFT JOIN sys_user su ON sm.user_id = su.id
<where>
<if test="id != null">
and id = #{id,jdbcType=INTEGER}
</if>
<if test="orderSn != null">
and order_sn = #{orderSn,jdbcType=VARCHAR}
</if>
</where>
<select id="selectByParams" parameterType="com.glsx.ordercenter.pojo.SysOrderExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List"/>
from sys_order
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="countByParams" parameterType="java.util.Map" resultMap="OrderCountResultMap">
......@@ -829,8 +818,8 @@
<select id="getServiceItemScale" resultType="com.glsx.ordercenter.dto.ServiceItemInfo">
SELECT
install_device_type installDeviceType,
COUNT(install_device_type) count
so.service_code installDeviceType,
COUNT(so.service_code) count
<choose>
<when test="userType == 1">
FROM
......@@ -850,7 +839,7 @@
<if test="dateStart != null and dateEnd!=null and dateStart !='' and dateEnd !=''">
and so.complete_time between #{dateStart,jdbcType=TIMESTAMP} and #{dateEnd,jdbcType=TIMESTAMP}
</if>
GROUP BY install_device_type
GROUP BY so.service_code
</select>
<select id="getMechanicBusiness" resultType="com.glsx.ordercenter.dto.MechanicBusiness">
......@@ -1503,7 +1492,7 @@
LEFT JOIN sys_dict_data dd on so.install_device_type = dd.data_key
LEFT JOIN sys_service_item ssi on so.service_code=ssi.service_code
WHERE so.active_status &lt;&gt; 9
and so.order_type &lt;&gt; 4
AND so.order_type IN (1,2,3)
<if test="userId != null and userId!=''">
AND suo.user_id = #{userId}
</if>
......
......@@ -184,23 +184,23 @@
</update>
<select id="getOrderProgress" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
( CASE WHEN sos.update_by is NULL
SELECT
( CASE WHEN sos.update_by IS NULL
THEN so.merchant_name
ELSE su.name
END ) AS `name`,
sos.id, sos.order_id, sos.active_status, sos.update_time, sos.update_by,
sos.reason, sos.property1, sos.property2, sos.phone1, sos.phone2,
sos.remark, sos.is_show
from sys_order_status sos
FROM sys_order_status sos
LEFT JOIN sys_order so ON sos.order_id = so.id
left join sys_user su on sos.update_by = su.id
where sos.order_id = #{orderId}
and sos.is_show = 1
order by sos.update_time desc, sos.id desc
LEFT JOIN sys_user su ON sos.update_by = su.id
WHERE sos.order_id = #{orderId}
AND sos.is_show = 1
ORDER BY sos.update_time DESC, sos.id DESC
</select>
<select id="getTheLastestOrderStatus" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<select id="getLastOrderStatus" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sys_order_status
......
......@@ -6,7 +6,9 @@
<result column="service_name" jdbcType="VARCHAR" property="serviceName"/>
<result column="service_code" jdbcType="VARCHAR" property="serviceCode"/>
<result column="img_path" jdbcType="VARCHAR" property="imgPath"/>
<result column="push_url" jdbcType="VARCHAR" property="pushUrl"/>
<result column="is_update_info" jdbcType="TINYINT" property="isUpdateInfo"/>
<result column="type" jdbcType="TINYINT" property="type"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="create_by" jdbcType="INTEGER" property="createBy"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
......@@ -16,8 +18,8 @@
<result column="photoCount" jdbcType="INTEGER" property="photoCount"/>
</resultMap>
<sql id="Base_Column_List">
id, service_name, service_code, img_path, is_update_info, remark, create_by, create_time, update_by,
update_time
id, service_name, service_code, push_url, type, img_path, is_update_info, remark,
create_by, create_time, update_by,update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -70,9 +72,15 @@
<if test="imgPath != null">
img_path,
</if>
<if test="pushUrl != null">
push_url,
</if>
<if test="isUpdateInfo != null">
is_update_info,
</if>
<if test="type != null">
type,
</if>
<if test="remark != null">
remark,
</if>
......@@ -99,9 +107,15 @@
<if test="imgPath != null">
#{imgPath,jdbcType=VARCHAR},
</if>
<if test="pushUrl != null">
#{pushUrl,jdbcType=VARCHAR},
</if>
<if test="isUpdateInfo != null">
#{isUpdateInfo,jdbcType=TINYINT},
</if>
<if test="type != null">
#{type,jdbcType=TINYINT},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
......@@ -131,9 +145,15 @@
<if test="imgPath != null">
img_path = #{imgPath,jdbcType=VARCHAR},
</if>
<if test="pushUrl != null">
push_url = #{pushUrl,jdbcType=VARCHAR},
</if>
<if test="isUpdateInfo != null">
is_update_info = #{isUpdateInfo,jdbcType=TINYINT},
</if>
<if test="type != null">
type = #{type,jdbcType=TINYINT},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
......@@ -153,16 +173,19 @@
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.glsx.ordercenter.pojo.SysServiceItem">
update sys_service_item
set service_name = #{serviceName,jdbcType=VARCHAR},
service_code = #{serviceCode,jdbcType=VARCHAR},
img_path = #{imgPath,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
update sys_service_item
set service_name = #{serviceName,jdbcType=VARCHAR},
service_code = #{serviceCode,jdbcType=VARCHAR},
img_path = #{imgPath,jdbcType=VARCHAR},
push_url = #{pushUrl,jdbcType=VARCHAR},
is_update_info = #{isUpdateInfo,jdbcType=TINYINT},
type = #{type,jdbcType=TINYINT},
remark = #{remark,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="getServiceItemList" parameterType="java.lang.String" resultMap="BaseResultMap">
......@@ -178,7 +201,9 @@
ssi.service_name,
ssi.service_code,
ssi.img_path,
ssi.push_url,
ssi.is_update_info,
ssi.type,
ssi.remark,
ssi.create_by,
ssi.create_time,
......@@ -223,12 +248,16 @@
select
<include refid="Base_Column_List"/>
from sys_service_item
where service_code = #{serviceCode,jdbcType=VARCHAR}
where service_code = #{serviceCode,jdbcType=VARCHAR} limit 1
</select>
<select id="selectAll" resultType="com.glsx.ordercenter.dto.ServiceItem">
select id, service_name as serviceName,service_code as serviceCode
from sys_service_item
<select id="selectByType" parameterType="java.lang.Integer" resultType="com.glsx.ordercenter.dto.ServiceItem">
SELECT id, service_name AS serviceName,service_code AS serviceCode, `type` FROM sys_service_item
<where>
<if test="type != null">
type = #{type, jdbcType=TINYINT}
</if>
</where>
</select>
<select id="selectListByCodes" resultMap="BaseResultMap">
......
......@@ -101,6 +101,13 @@
</if>
</select>
<select id="getCountByParams" parameterType="com.glsx.ordercenter.pojo.SysSubOrderExample" resultType="java.lang.Integer">
select count(id) from sys_sub_order
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!