Commit 36a7a866 by dengtt

V1.6.0——对账单-运营--对账单详情--垫付明细列表.

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@25728 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 8e827702
Showing 21 changed files with 836 additions and 16 deletions
......@@ -5,7 +5,7 @@ import java.io.Serializable;
import com.alibaba.fastjson.JSON;
/**
*
*
* @Title ResultObject.java
* @Package com.glsx.common.constants
* @Description TODO
......@@ -16,10 +16,10 @@ import com.alibaba.fastjson.JSON;
public class ResultObject implements Serializable{
/**
*
*
*/
private static final long serialVersionUID = 1L;
private int code;//返回码 200成功,500系统异常
private String message;//消息
private Object data;//数据
......@@ -67,6 +67,18 @@ public class ResultObject implements Serializable{
this.message = message;
this.data = data;
}
public ResultObject(ResultCodeEnum resultCodeEnum){
this.code = resultCodeEnum.getCode();
this.message = resultCodeEnum.getMsg();
}
public ResultObject(ResultCodeEnum resultCodeEnum,Object data){
this.code = resultCodeEnum.getCode();
this.message = resultCodeEnum.getMsg();
this.data = data;
}
public ResultObject message(String msg) {
this.message = msg;
return this;
......@@ -138,5 +150,5 @@ public class ResultObject implements Serializable{
return "ResultObject [code=" + code + ", message=" + message
+ ", data=" + data + ", error=" + error + "]";
}
}
package com.glsx.ordercenter.constants;
/**
*
*
* @Title OrderTypeEnum.java
* @Package com.glsx.ordercenter.constants
* @Description TODO 订单类型enum
......@@ -14,20 +14,20 @@ public enum OrderTypeEnum {
/**
* 安装单
*/
INSTALL(1, 8128),
INSTALL(1, 8128,"安装单"),
/**
* 拆除
*/
DISMANTLE(2, 6006),
DISMANTLE(2, 6006,"拆除单"),
/**
* 检修
*/
REPAIR(3, 4220),
REPAIR(3, 4220,"检修单"),
/**
* 竞价单
*/
BIDDING(4, 8128);
BIDDING(4, 8128,"竞价单");
/**
* 订单类型
*/
......@@ -36,11 +36,14 @@ public enum OrderTypeEnum {
* 订单编号前缀
*/
private int orderNoPrefis;
private OrderTypeEnum(int orderType, int orderNoPrefis) {
private String orderTypeName; // 订单类型的称呼
private OrderTypeEnum(int orderType, int orderNoPrefis,String orderTypeName) {
this.orderType = orderType;
this.orderNoPrefis = orderNoPrefis;
this.orderTypeName = orderTypeName;
}
public int getOrderType() {
return orderType;
......@@ -54,7 +57,15 @@ public enum OrderTypeEnum {
public void setOrderNoPrefis(int orderNoPrefis) {
this.orderNoPrefis = orderNoPrefis;
}
public String getOrderTypeName() {
return orderTypeName;
}
public void setOrderTypeName(String orderTypeName) {
this.orderTypeName = orderTypeName;
}
public static Integer getOrderNoPrefix(int orderType) {
for (OrderTypeEnum ote : values()) {
if (orderType == ote.getOrderType()) {
......@@ -63,5 +74,14 @@ public enum OrderTypeEnum {
}
return null;
}
public static String getTypeNameByTypeCode(Integer orderType){
for (OrderTypeEnum ote : values()) {
if (orderType == ote.getOrderType()) {
return ote.getOrderTypeName();
}
}
return null;
}
}
package com.glsx.ordercenter.controller;
import com.alibaba.fastjson.JSON;
import com.github.pagehelper.PageInfo;
import com.glsx.common.constants.ResultCodeEnum;
import com.glsx.common.constants.ResultObject;
import com.glsx.ordercenter.dto.OperationAdvanceQuery;
import com.glsx.ordercenter.dto.OperationAdvanceVO;
import com.glsx.ordercenter.service.OperationAdvanceService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 垫付明细Controller
*
* @author dengtt
* @date 2019年12月27日14:14:25
*/
@RestController
@RequestMapping("/operationAdvance")
public class OperationAdvanceController {
private static final Logger log = LoggerFactory.getLogger(OperationAdvanceController.class);
@Resource
private OperationAdvanceService operationAdvanceService;
/**
* (分页)查询垫付明细记录列表
*/
@GetMapping("/list")
public ResultObject list(OperationAdvanceQuery query) {
log.info("【对账单——(分页)查询垫付明细列表】请求参数:{}", JSON.toJSONString(query, true));
PageInfo<OperationAdvanceVO> pageInfo = operationAdvanceService.queryPageList(query);
log.info("【对账单——(分页)查询垫付明细列表】响应数据:{}", JSON.toJSONString(pageInfo, true));
return new ResultObject(ResultCodeEnum.SUCCESS, pageInfo);
}
//TODO 请求参数还是要分下组。。
@PostMapping("/download")
public void download(OperationAdvanceQuery query){
}
}
package com.glsx.ordercenter.dto;
import javax.validation.constraints.NotNull;
/**
* 运营垫付记录的查询实体
*
* @author dengtt
* @date 2019年12月26日16:58:09
*/
public class OperationAdvanceQuery {
private Integer reconciliationMonthlyId;
private String reconciliationSn;
private Integer orderType;
private String keyWord;
@NotNull(message = "分页参数pageNum不能为空.")
private Integer pageNum;
@NotNull(message = "分页参数pageSize不能为空.")
private Integer pageSize;
public Integer getReconciliationMonthlyId() {
return reconciliationMonthlyId;
}
public void setReconciliationMonthlyId(Integer reconciliationMonthlyId) {
this.reconciliationMonthlyId = reconciliationMonthlyId;
}
public String getReconciliationSn() {
return reconciliationSn;
}
public void setReconciliationSn(String reconciliationSn) {
this.reconciliationSn = reconciliationSn;
}
public Integer getOrderType() {
return orderType;
}
public void setOrderType(Integer orderType) {
this.orderType = orderType;
}
public String getKeyWord() {
return keyWord;
}
public void setKeyWord(String keyWord) {
this.keyWord = keyWord;
}
public Integer getPageNum() {
return pageNum;
}
public void setPageNum(Integer pageNum) {
this.pageNum = pageNum;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
}
package com.glsx.ordercenter.dto;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
/**
* 运营垫付记录的展示实体
*
* @author dengtt
* @date 2019年12月26日16:58:09
*/
public class OperationAdvanceVO {
private String orderSn; // 订单号
private String shopName; // 商户名称
private String carOwner; //姓名 车主姓名
private String vinNo; // 车架号
private String serviceName; // 服务项目
private Integer orderType; // 订单类型
private String orderTypeName; // 订单类型名称
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date reassignMechanicTime; // 指派或改派技工时间
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date completeTime; // 实际安装完成时间
private BigDecimal amount; //垫付金额
public String getOrderSn() {
return orderSn;
}
public void setOrderSn(String orderSn) {
this.orderSn = orderSn;
}
public String getShopName() {
return shopName;
}
public void setShopName(String shopName) {
this.shopName = shopName;
}
public String getCarOwner() {
return carOwner;
}
public void setCarOwner(String carOwner) {
this.carOwner = carOwner;
}
public String getVinNo() {
return vinNo;
}
public void setVinNo(String vinNo) {
this.vinNo = vinNo;
}
public String getServiceName() {
return serviceName;
}
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
public Integer getOrderType() {
return orderType;
}
public void setOrderType(Integer orderType) {
this.orderType = orderType;
}
public String getOrderTypeName() {
return orderTypeName;
}
public void setOrderTypeName(String orderTypeName) {
this.orderTypeName = orderTypeName;
}
public Date getReassignMechanicTime() {
return reassignMechanicTime;
}
public void setReassignMechanicTime(Date reassignMechanicTime) {
this.reassignMechanicTime = reassignMechanicTime;
}
public Date getCompleteTime() {
return completeTime;
}
public void setCompleteTime(Date completeTime) {
this.completeTime = completeTime;
}
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
}
......@@ -21,4 +21,6 @@ public interface SysMerchantMapper {
int updateByPrimaryKeySelective(SysMerchant record);
int updateByPrimaryKey(SysMerchant record);
List<SysMerchant> selectListByShopIds(List<Integer> shopIds);
}
\ No newline at end of file
package com.glsx.ordercenter.mapper;
import com.glsx.ordercenter.dto.OperationAdvanceQuery;
import com.glsx.ordercenter.pojo.SysOperationAdvance;
import java.util.List;
/**
* 运营垫付表Mapper
*
* @author dengtt
* @date 2019年12月26日15:42:21
*/
public interface SysOperationAdvanceMapper {
List<SysOperationAdvance> selectList(OperationAdvanceQuery query);
}
......@@ -210,4 +210,7 @@ public interface SysOrderMapper {
int countByOrderStatusAndUserType(@Param("userId") Integer userId, @Param("userType") int userType,
@Param("orderStatus") int orderStatus);
List<SysOrder> selectListBySNs(List<String> sns);
}
\ No newline at end of file
package com.glsx.ordercenter.mapper;
public interface SysReconciliationDetailMapper {
}
......@@ -46,4 +46,7 @@ public interface SysServiceItemMapper {
SysServiceItem selectByServiceCode(@Param("serviceCode") String serviceCode);
List<ServiceItem> selectAll();
List<SysServiceItem> selectListByCodes(List<String> codes);
}
\ No newline at end of file
package com.glsx.ordercenter.pojo;
import java.math.BigDecimal;
/**
* 运营垫付表(sys_operation_advance)
*
* @author dengtt
* @date 2019年12月26日10:56:28
*/
public class SysOperationAdvance extends BaseModel {
private Integer id; // id主键
private Integer reconciliationMonthlyId; //对账周期id
private String reconciliationSn; // 对账单号
private String orderSn; // 订单编号
private Integer orderType; // 订单类型 1.安装单、2.拆除单、3.检修单
private String carOwner; // 车主姓名
private String vinNo; // 车架号
private BigDecimal amount; // 垫付金额
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getReconciliationMonthlyId() {
return reconciliationMonthlyId;
}
public void setReconciliationMonthlyId(Integer reconciliationMonthlyId) {
this.reconciliationMonthlyId = reconciliationMonthlyId;
}
public String getReconciliationSn() {
return reconciliationSn;
}
public void setReconciliationSn(String reconciliationSn) {
this.reconciliationSn = reconciliationSn;
}
public String getOrderSn() {
return orderSn;
}
public void setOrderSn(String orderSn) {
this.orderSn = orderSn;
}
public Integer getOrderType() {
return orderType;
}
public void setOrderType(Integer orderType) {
this.orderType = orderType;
}
public String getCarOwner() {
return carOwner;
}
public void setCarOwner(String carOwner) {
this.carOwner = carOwner;
}
public String getVinNo() {
return vinNo;
}
public void setVinNo(String vinNo) {
this.vinNo = vinNo;
}
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
}
package com.glsx.ordercenter.pojo;
import java.math.BigDecimal;
/**
* 对账明细表(sys_reconciliation_detail)
*
* @author dengtt
* @date 2019年12月26日11:02:17
*/
public class SysReconciliationDetail extends BaseModel {
private Integer id; // 主键,唯一标识
private String reconciliationSn; // 对账编号
private String orderSn; // 订单编号
private Integer orderType; // 订单类型 1.安装单、2.拆除单、3.检修单
private String carOwner; // 车主姓名
private String vinNo; // 车架号
private BigDecimal quasiSettlementAmount; // 拟结算金额
private BigDecimal settlementAmount; // 结算金额
private Integer userId; // 用户id|服务商id
private Integer userType; // 用户类型(0:系统管理员,1:服务商,2:门店,3:技工,4:订单助手用户)
private String userName; // 用户name|服务商name
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getReconciliationSn() {
return reconciliationSn;
}
public void setReconciliationSn(String reconciliationSn) {
this.reconciliationSn = reconciliationSn;
}
public String getOrderSn() {
return orderSn;
}
public void setOrderSn(String orderSn) {
this.orderSn = orderSn;
}
public Integer getOrderType() {
return orderType;
}
public void setOrderType(Integer orderType) {
this.orderType = orderType;
}
public String getCarOwner() {
return carOwner;
}
public void setCarOwner(String carOwner) {
this.carOwner = carOwner;
}
public String getVinNo() {
return vinNo;
}
public void setVinNo(String vinNo) {
this.vinNo = vinNo;
}
public BigDecimal getQuasiSettlementAmount() {
return quasiSettlementAmount;
}
public void setQuasiSettlementAmount(BigDecimal quasiSettlementAmount) {
this.quasiSettlementAmount = quasiSettlementAmount;
}
public BigDecimal getSettlementAmount() {
return settlementAmount;
}
public void setSettlementAmount(BigDecimal settlementAmount) {
this.settlementAmount = settlementAmount;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public Integer getUserType() {
return userType;
}
public void setUserType(Integer userType) {
this.userType = userType;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
}
package com.glsx.ordercenter.service;
import com.github.pagehelper.PageInfo;
import com.glsx.ordercenter.dto.OperationAdvanceQuery;
import com.glsx.ordercenter.dto.OperationAdvanceVO;
/**
* 运营垫付记录的服务
*
* @author dengtt
* @date 2019年12月26日17:02:13
*/
public interface OperationAdvanceService {
PageInfo<OperationAdvanceVO> queryPageList(OperationAdvanceQuery query);
}
package com.glsx.ordercenter.service.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.glsx.ordercenter.constants.OrderTypeEnum;
import com.glsx.ordercenter.dto.OperationAdvanceQuery;
import com.glsx.ordercenter.dto.OperationAdvanceVO;
import com.glsx.ordercenter.mapper.SysMerchantMapper;
import com.glsx.ordercenter.mapper.SysOperationAdvanceMapper;
import com.glsx.ordercenter.mapper.SysOrderMapper;
import com.glsx.ordercenter.mapper.SysServiceItemMapper;
import com.glsx.ordercenter.pojo.SysOperationAdvance;
import com.glsx.ordercenter.pojo.SysOrder;
import com.glsx.ordercenter.pojo.SysServiceItem;
import com.glsx.ordercenter.pojo.user.SysMerchant;
import com.glsx.ordercenter.service.OperationAdvanceService;
import com.glsx.ordercenter.utils.PageInfoUtil;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
@Service
@Transactional
public class OperationAdvanceServiceImpl implements OperationAdvanceService {
private static final Logger log = LoggerFactory.getLogger(OperationAdvanceServiceImpl.class);
@Resource
private SysOperationAdvanceMapper operationAdvanceMapper;
@Resource
private SysOrderMapper orderMapper;
@Resource
private SysMerchantMapper merchantMapper;
@Resource
private SysServiceItemMapper serviceItemMapper;
/**
* 分页查询垫付明细列表
*/
@Override
public PageInfo<OperationAdvanceVO> queryPageList(OperationAdvanceQuery query) {
PageHelper.startPage(query.getPageNum(), query.getPageSize());
List<SysOperationAdvance> advanceList = operationAdvanceMapper.selectList(query);
List<OperationAdvanceVO> advanceVOS = convertAndSupplementList(advanceList);
PageInfo<SysOperationAdvance> sourceInfo = PageInfo.of(advanceList);
return PageInfoUtil.listReplace(sourceInfo, advanceVOS);
}
/**
* 转换并补充List<SysOperationAdvance>到List<OperationAdvanceVO>
*/
private List<OperationAdvanceVO> convertAndSupplementList(List<SysOperationAdvance> list) {
List<OperationAdvanceVO> result = Lists.newArrayList();
// 准备所需数据
List<String> sns = Lists.newArrayList();
List<SysOrder> orders = Lists.newArrayList();
Map<String, SysOrder> orderMaps = Maps.newHashMap();
List<Integer> shopIds = Lists.newArrayList();
List<String> codes = Lists.newArrayList();
Map<Integer, SysMerchant> merchantMaps = Maps.newHashMap();
Map<String, SysServiceItem> serviceItemMaps = Maps.newHashMap();
if (CollectionUtils.isNotEmpty(list))
sns.addAll(list.stream().map(SysOperationAdvance::getOrderSn).collect(Collectors.toList()));
if (CollectionUtils.isNotEmpty(sns)) {
orders.addAll(orderMapper.selectListBySNs(sns));
orderMaps.putAll(orders.stream().collect(Collectors.toMap(SysOrder::getOrderSn, Function.identity(), (key1, key2) -> key2)));
}
if (CollectionUtils.isNotEmpty(orders)) {
shopIds.addAll(orders.stream().map(SysOrder::getShopId).collect(Collectors.toList()));
codes.addAll(orders.stream().map(SysOrder::getServiceCode).collect(Collectors.toList()));
}
if (CollectionUtils.isNotEmpty(shopIds))
merchantMaps.putAll(merchantMapper.selectListByShopIds(shopIds).stream().collect(Collectors.toMap(SysMerchant::getUserId, Function.identity(), (key1, key2) -> key2)));
if (CollectionUtils.isNotEmpty(codes))
serviceItemMaps.putAll(serviceItemMapper.selectListByCodes(codes).stream().collect(Collectors.toMap(SysServiceItem::getServiceCode, Function.identity(), (key1, key2) -> key2)));
// 开始组装数据(太麻烦不判空了.正常数据不会为空.)
list.forEach(x -> {
OperationAdvanceVO vo = new OperationAdvanceVO();
vo.setOrderSn(x.getOrderSn());
vo.setCarOwner(x.getCarOwner());
vo.setVinNo(x.getVinNo());
vo.setOrderType(x.getOrderType());
vo.setOrderTypeName(OrderTypeEnum.getTypeNameByTypeCode(x.getOrderType()));
vo.setAmount(x.getAmount());
vo.setCompleteTime(orderMaps.get(x.getOrderSn()).getCompleteTime());
vo.setReassignMechanicTime(orderMaps.get(x.getOrderSn()).getReassignMechanicTime());
vo.setShopName(merchantMaps.get(orderMaps.get(x.getOrderSn()).getShopId()).getShopName());
vo.setServiceName(serviceItemMaps.get(orderMaps.get(x.getOrderSn()).getServiceCode()).getServiceName());
result.add(vo);
});
return result;
}
}
package com.glsx.ordercenter.utils;
import com.github.pagehelper.PageInfo;
import org.apache.commons.beanutils.BeanUtilsBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
import java.util.Map;
/**
* 针对分页工具的PageInfo的工具类.
*
* @author dengtt
* @date 2019年12月27日09:18:23
*/
public class PageInfoUtil {
private static final Logger log = LoggerFactory.getLogger(PageInfoUtil.class);
/**
* 替换PageInfo<T>的泛型类型——即替换PageInfo的list属性.
*/
@SuppressWarnings({"unchecked"})
public static <R, S> PageInfo<R> listReplace(PageInfo<S> source, List<R> target) {
PageInfo<R> result = new PageInfo<>();
try {
Map map = BeanUtilsBean.getInstance().describe(source);
map.put("list", target);
BeanUtilsBean.getInstance().populate(result, map);
} catch (Exception e) {
log.error("PageInfo<T>泛型类型转换失败!list替换失败.");
e.printStackTrace();
}
return result;
}
}
......@@ -163,5 +163,18 @@
service_type = #{serviceType,jdbcType=TINYINT},
merchant_status = #{merchantStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=INTEGER}
</update>
</update>
<select id="selectListByShopIds" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from
sys_merchant
where
user_id in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{item}
</foreach>
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glsx.ordercenter.mapper.SysOperationAdvanceMapper">
<resultMap id="BaseResultMap" type="com.glsx.ordercenter.pojo.SysOperationAdvance">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="reconciliation_monthly_id" jdbcType="INTEGER" property="reconciliationMonthlyId"/>
<result column="reconciliation_sn" jdbcType="VARCHAR" property="reconciliationSn"/>
<result column="order_sn" jdbcType="VARCHAR" property="orderSn"/>
<result column="order_type" jdbcType="INTEGER" property="orderType"/>
<result column="car_owner" jdbcType="VARCHAR" property="carOwner"/>
<result column="vin_no" jdbcType="VARCHAR" property="vinNo"/>
<result column="amount" jdbcType="DECIMAL" property="amount"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="create_by" jdbcType="INTEGER" property="createBy"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_by" jdbcType="INTEGER" property="updateBy"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap>
<sql id="Base_Column_List">
id, reconciliation_monthly_id, reconciliation_sn, order_sn, order_type, car_owner, vin_no, amount, remark, create_by, create_time, update_by, update_time
</sql>
<select id="selectList" parameterType="com.glsx.ordercenter.dto.OperationAdvanceQuery" resultMap="BaseResultMap">
<if test="keyWord != null and keyWord != ''">
<bind name="keyWord" value="'%'+keyWord+'%'"/>
</if>
select
<include refid="Base_Column_List"/>
from
sys_operation_advance
<where>
<if test="reconciliationMonthlyId != null">
and reconciliation_monthly_id = #{reconciliationMonthlyId}
</if>
<if test="reconciliationSn != null and reconciliationSn !=''">
and reconciliation_sn = #{reconciliationSn}
</if>
<if test="orderType != null">
and order_type = #{orderType}
</if>
<if test="keyWord != null and keyWord != ''">
and (
order_sn like #{keyWord} or
car_owner like #{keyWord} or
vin_no like #{keyWord}
)
</if>
</where>
order by
create_time desc
</select>
</mapper>
\ No newline at end of file
......@@ -1571,5 +1571,17 @@
</choose>
and so.order_type != 4
</select>
<select id="selectListBySNs" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from
sys_order
where
order_sn in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{item}
</foreach>
</select>
</mapper>
\ No newline at end of file
......@@ -219,5 +219,18 @@
select service_name as serviceName,service_code as serviceCode
from sys_service_item
</select>
<select id="selectListByCodes" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from
sys_service_item
where
service_code in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{item}
</foreach>
</select>
</mapper>
\ No newline at end of file
package com.glsx.ordercenter.service;
import com.alibaba.fastjson.JSON;
import com.github.pagehelper.PageInfo;
import com.glsx.ordercenter.Application;
import com.glsx.ordercenter.dto.OperationAdvanceQuery;
import com.glsx.ordercenter.dto.OperationAdvanceVO;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import javax.annotation.Resource;
/**
* 测试——垫付明细相关服务
*
* @author dengtt
* @date 2019年12月27日13:47:24
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = {Application.class}, webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
public class OperationAdvanceServiceTest {
@Resource
private OperationAdvanceService operationAdvanceService;
/**
* 测试——获取垫付明细列表服务.
*/
@Test
public void listTest() {
OperationAdvanceQuery query = new OperationAdvanceQuery();
query.setPageNum(1);
query.setPageSize(10);
// query.setReconciliationMonthlyId(1);
// query.setReconciliationSn("1111");
query.setKeyWord("测试3");
PageInfo<OperationAdvanceVO> pageInfo = operationAdvanceService.queryPageList(query);
System.out.println(JSON.toJSONString(pageInfo, true));
}
}
......@@ -101,6 +101,12 @@
<artifactId>commons-pool2</artifactId>
<version>2.6.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>28.1-jre</version>
</dependency>
</dependencies>
<build>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!