提交 0bcf3d29 authored 作者: luojie's avatar luojie

修改订单模块,修改代购信息模块,新增代购人,新增商品品名校验,用定时任务(每天每两小时查询一次)对接查询入库签收接口

上级 2f839d82
...@@ -42,7 +42,7 @@ public class SysDictController { ...@@ -42,7 +42,7 @@ public class SysDictController {
List<SysDictEntity> dictList = dictService.queryList(query); List<SysDictEntity> dictList = dictService.queryList(query);
int total = dictService.queryTotal(query); int total = dictService.queryTotal(query);
PageUtils pageUtil = new PageUtils(dictList, total, query.getLimit(), query.getPage()); PageUtils pageUtil = new PageUtils(dictList, total, query.getLimit(), query.getPage());
return R.ok().put("page", pageUtil); return R.ok().put("page", pageUtil);
} }
......
...@@ -42,7 +42,7 @@ public class TbCfAddressController { ...@@ -42,7 +42,7 @@ public class TbCfAddressController {
List<TbCfAddressEntity> tbCfAddressList = tbCfAddressService.queryList(query); List<TbCfAddressEntity> tbCfAddressList = tbCfAddressService.queryList(query);
int total = tbCfAddressService.queryTotal(query); int total = tbCfAddressService.queryTotal(query);
PageUtils pageUtil = new PageUtils(tbCfAddressList, total, query.getLimit(), query.getPage()); PageUtils pageUtil = new PageUtils(tbCfAddressList, total, query.getLimit(), query.getPage());
return R.ok().put("page", pageUtil); return R.ok().put("page", pageUtil);
} }
......
...@@ -158,7 +158,7 @@ public class TbCfFinanceController { ...@@ -158,7 +158,7 @@ public class TbCfFinanceController {
List<TbCfFinanceEntity> tbCfFinanceList = tbCfFinanceService.queryList(query); List<TbCfFinanceEntity> tbCfFinanceList = tbCfFinanceService.queryList(query);
int total = tbCfFinanceService.queryTotal(query); int total = tbCfFinanceService.queryTotal(query);
PageUtils pageUtil = new PageUtils(tbCfFinanceList, total, query.getLimit(), query.getPage()); PageUtils pageUtil = new PageUtils(tbCfFinanceList,total, query.getLimit(), query.getPage());
return R.ok().put("page", pageUtil); return R.ok().put("page", pageUtil);
} }
......
package com.platform.controller; package com.platform.controller;
import com.alibaba.fastjson.JSONArray;
import com.platform.entity.TbCfGoodstypeEntity; import com.platform.entity.TbCfGoodstypeEntity;
import com.platform.service.TbCfGoodstypeService; import com.platform.service.TbCfGoodstypeService;
import com.platform.utils.PageUtils; import com.platform.utils.PageUtils;
......
...@@ -2,14 +2,17 @@ package com.platform.controller; ...@@ -2,14 +2,17 @@ package com.platform.controller;
import com.platform.entity.TbCfItemDetailEntity; import com.platform.entity.TbCfItemDetailEntity;
import com.platform.entity.TbCfOrderEntity; import com.platform.entity.TbCfOrderEntity;
import com.platform.entity.TbCfPlatformOrderEntity; import com.platform.entity.TbCfOrderListEntity;
import com.platform.service.TbCfOrderListService;
import com.platform.service.TbCfOrderService; import com.platform.service.TbCfOrderService;
import com.platform.utils.PageUtils; import com.platform.utils.PageUtils;
import com.platform.utils.Query; import com.platform.utils.Query;
import com.platform.utils.R; import com.platform.utils.R;
import com.platform.vo.PlatformOrderVo;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.List; import java.util.List;
...@@ -22,11 +25,12 @@ import java.util.Map; ...@@ -22,11 +25,12 @@ import java.util.Map;
* @date 2019-09-20 11:03:37 * @date 2019-09-20 11:03:37
*/ */
@Controller @Controller
@RequestMapping("tbcforder") @RequestMapping(value = "tbcforder",produces = "application/json; charset=utf-8")
public class TbCfOrderController { public class TbCfOrderController {
@Autowired @Autowired
private TbCfOrderService tbCfOrderService; private TbCfOrderService tbCfOrderService;
@Autowired
private TbCfOrderListService tbCfOrderListService;
/** /**
* 查看列表 * 查看列表
*/ */
...@@ -57,6 +61,7 @@ public class TbCfOrderController { ...@@ -57,6 +61,7 @@ public class TbCfOrderController {
return R.ok().put("tbCfOrder", tbCfOrder); return R.ok().put("tbCfOrder", tbCfOrder);
} }
/** /**
* 保存 * 保存
*/ */
...@@ -105,6 +110,15 @@ public class TbCfOrderController { ...@@ -105,6 +110,15 @@ public class TbCfOrderController {
return R.ok().put("list", list); return R.ok().put("list", list);
} }
/**
* 查看订单详情
*/
@RequestMapping("/detail/{orderId}")
@ResponseBody
public R detail(@PathVariable("orderId") String orderId) {
List<TbCfOrderEntity> list = tbCfOrderService.queryOrderDetail(orderId);
return R.ok().put("list", list);
}
/** /**
* 获取订单中的商品 * 获取订单中的商品
*/ */
...@@ -125,7 +139,7 @@ public class TbCfOrderController { ...@@ -125,7 +139,7 @@ public class TbCfOrderController {
@ResponseBody @ResponseBody
public R getAgentInfo(@PathVariable("orderId") String orderId) { public R getAgentInfo(@PathVariable("orderId") String orderId) {
TbCfPlatformOrderEntity tbCfPlatformOrder = tbCfOrderService.getAgentInfo(orderId); PlatformOrderVo tbCfPlatformOrder = tbCfOrderService.getAgentInfo(orderId);
return R.ok().put("data", tbCfPlatformOrder); return R.ok().put("data", tbCfPlatformOrder);
} }
...@@ -135,10 +149,34 @@ public class TbCfOrderController { ...@@ -135,10 +149,34 @@ public class TbCfOrderController {
@PostMapping("/agent") @PostMapping("/agent")
@RequiresPermissions("tbcforder:info") @RequiresPermissions("tbcforder:info")
@ResponseBody @ResponseBody
public R saveOrUpdateAgentInfo(@RequestBody TbCfPlatformOrderEntity tbCfPlatformOrder) { public R saveOrUpdateAgentInfo(@RequestBody PlatformOrderVo platformOrderVo) {
int res = tbCfOrderService.saveOrUpdateAgentInfo(platformOrderVo);
int res = tbCfOrderService.saveOrUpdateAgentInfo(tbCfPlatformOrder);
return R.ok().put("result", res); return R.ok().put("result", res);
} }
/**
* 订单列表(运营简表)
*/
@GetMapping("/orderList")
@RequiresPermissions("tbcforder:orderlist")
@ResponseBody
public R orderList(@RequestParam Map<String, Object> params){
//查询列表数据
Query query = new Query(params);
List<TbCfOrderListEntity> tbCfOrderList = tbCfOrderListService.queryOrderList(query);
int total = tbCfOrderListService.queryOrderTotal(query);
PageUtils pageUtil = new PageUtils(tbCfOrderList,total, query.getLimit(), query.getPage());
return R.ok().put("page", pageUtil);
}
/**
* 订单列表(运营简表)
*/
@GetMapping("/totalPay")
@ResponseBody
public R totalPay(){
//查询列表数据
int totalPay = tbCfOrderListService.totalPay();
return R.ok().put("totalPay", totalPay);
}
} }
package com.platform.controller; package com.platform.controller;
import com.platform.entity.TbCfPlatformOrderEntity;
import com.platform.service.TbCfPlatformOrderService; import com.platform.service.TbCfPlatformOrderService;
import com.platform.utils.PageUtils; import com.platform.utils.PageUtils;
import com.platform.utils.Query; import com.platform.utils.Query;
import com.platform.utils.R; import com.platform.utils.R;
import com.platform.vo.PlatformOrderVo;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
...@@ -39,7 +39,7 @@ public class TbCfPlatformOrderController { ...@@ -39,7 +39,7 @@ public class TbCfPlatformOrderController {
//查询列表数据 //查询列表数据
Query query = new Query(params); Query query = new Query(params);
List<TbCfPlatformOrderEntity> tbCfPlatformOrderList = tbCfPlatformOrderService.queryList(query); List<PlatformOrderVo> tbCfPlatformOrderList = tbCfPlatformOrderService.queryList(query);
int total = tbCfPlatformOrderService.queryTotal(query); int total = tbCfPlatformOrderService.queryTotal(query);
PageUtils pageUtil = new PageUtils(tbCfPlatformOrderList, total, query.getLimit(), query.getPage()); PageUtils pageUtil = new PageUtils(tbCfPlatformOrderList, total, query.getLimit(), query.getPage());
...@@ -54,7 +54,7 @@ public class TbCfPlatformOrderController { ...@@ -54,7 +54,7 @@ public class TbCfPlatformOrderController {
@RequiresPermissions("tbcfplatformorder:info") @RequiresPermissions("tbcfplatformorder:info")
@ResponseBody @ResponseBody
public R info(@PathVariable("relativeId") String relativeId) { public R info(@PathVariable("relativeId") String relativeId) {
TbCfPlatformOrderEntity tbCfPlatformOrder = tbCfPlatformOrderService.queryObject(relativeId); PlatformOrderVo tbCfPlatformOrder = tbCfPlatformOrderService.queryObject(relativeId);
return R.ok().put("tbCfPlatformOrder", tbCfPlatformOrder); return R.ok().put("tbCfPlatformOrder", tbCfPlatformOrder);
} }
...@@ -65,9 +65,8 @@ public class TbCfPlatformOrderController { ...@@ -65,9 +65,8 @@ public class TbCfPlatformOrderController {
@RequestMapping("/save") @RequestMapping("/save")
@RequiresPermissions("tbcfplatformorder:save") @RequiresPermissions("tbcfplatformorder:save")
@ResponseBody @ResponseBody
public R save(@RequestBody TbCfPlatformOrderEntity tbCfPlatformOrder) { public R save(@RequestBody PlatformOrderVo PlatformOrderVo) {
tbCfPlatformOrderService.save(tbCfPlatformOrder); tbCfPlatformOrderService.save(PlatformOrderVo);
return R.ok(); return R.ok();
} }
...@@ -77,7 +76,7 @@ public class TbCfPlatformOrderController { ...@@ -77,7 +76,7 @@ public class TbCfPlatformOrderController {
@RequestMapping("/update") @RequestMapping("/update")
@RequiresPermissions("tbcfplatformorder:update") @RequiresPermissions("tbcfplatformorder:update")
@ResponseBody @ResponseBody
public R update(@RequestBody TbCfPlatformOrderEntity tbCfPlatformOrder) { public R update(@RequestBody PlatformOrderVo tbCfPlatformOrder) {
tbCfPlatformOrderService.update(tbCfPlatformOrder); tbCfPlatformOrderService.update(tbCfPlatformOrder);
return R.ok(); return R.ok();
...@@ -95,15 +94,15 @@ public class TbCfPlatformOrderController { ...@@ -95,15 +94,15 @@ public class TbCfPlatformOrderController {
return R.ok(); return R.ok();
} }
/** /* *//**
* 查看所有列表 * 查看所有列表
*/ *//*
@RequestMapping("/queryAll") @RequestMapping("/queryAll")
@ResponseBody @ResponseBody
public R queryAll(@RequestParam Map<String, Object> params) { public R queryAll(@RequestParam Map<String, Object> params) {
List<TbCfPlatformOrderEntity> list = tbCfPlatformOrderService.queryList(params); List<PlatformOrderVo> list = tbCfPlatformOrderService.queryList(params);
return R.ok().put("list", list); return R.ok().put("list", list);
} }*/
} }
package com.platform.controller; package com.platform.controller;
import com.platform.annotation.IgnoreAuth;
import com.platform.entity.TbCfDescripitonEntity; import com.platform.entity.TbCfDescripitonEntity;
import com.platform.entity.TbCfGoodstwotypeEntity; import com.platform.entity.TbCfGoodstwotypeEntity;
import com.platform.entity.TbCfStationItemEntity; import com.platform.entity.TbCfStationItemEntity;
import com.platform.entity.merge.GoodsTypeToGoodsTwo;
import com.platform.enums.OssFolderNameEnum; import com.platform.enums.OssFolderNameEnum;
import com.platform.service.TbCfDescripitonService; import com.platform.service.TbCfDescripitonService;
import com.platform.service.TbCfGoodstwotypeService; import com.platform.service.TbCfGoodstwotypeService;
......
...@@ -3,6 +3,7 @@ package com.platform.dao; ...@@ -3,6 +3,7 @@ package com.platform.dao;
import com.platform.entity.TbCfItemDetailEntity; import com.platform.entity.TbCfItemDetailEntity;
import com.platform.entity.TbCfOrderEntity; import com.platform.entity.TbCfOrderEntity;
import com.platform.entity.TbCfPlatformOrderEntity; import com.platform.entity.TbCfPlatformOrderEntity;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
...@@ -13,6 +14,7 @@ import java.util.List; ...@@ -13,6 +14,7 @@ import java.util.List;
* @date 2019-09-20 11:03:37 * @date 2019-09-20 11:03:37
*/ */
public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> { public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> {
/** /**
* 获取订单内商品 * 获取订单内商品
* @param orderId * @param orderId
...@@ -26,4 +28,27 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> { ...@@ -26,4 +28,27 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> {
* @param tbCfOrder2 * @param tbCfOrder2
*/ */
void updateDeliveryTime(TbCfOrderEntity tbCfOrder2); void updateDeliveryTime(TbCfOrderEntity tbCfOrder2);
List<TbCfOrderEntity> queryOrderDetail(String orderId);
/**
* 修改物流状态为入库中国仓
* @param sid
* @return
*/
int updateExpressStatus(String[] sid);
/**
* 修改物流状态为入库非洲仓
* @param sid
* @return
*/
int updateExpressStatuss(String[] sid);
/**
* 修改物流状态为已签收
* @param sid
* @return
*/
int updateExpressStatusDelivery(String[] sid);
} }
package com.platform.dao;
import com.platform.entity.TbCfOrderListEntity;
import java.util.List;
import java.util.Map;
/**
* Dao
*
* @author lipengjun
* @date 2019-09-20 11:03:37
*/
public interface TbCfOrderListDao extends BaseDao<TbCfOrderListEntity> {
/**
* 查看订单列表(运营简表)
* @param map
* @return
*/
List<TbCfOrderListEntity> queryOrderList(Map<String, Object> map);
int totalPay();
}
package com.platform.dao; package com.platform.dao;
import com.platform.entity.SysLogEntity;
import com.platform.entity.TbCfPlatformOrderEntity; import com.platform.entity.TbCfPlatformOrderEntity;
import com.platform.vo.PlatformOrderVo;
import org.apache.ibatis.annotations.Param;
/** /**
* 第三方平台对应订单信息Dao * 第三方平台对应订单信息Dao
...@@ -8,11 +11,13 @@ import com.platform.entity.TbCfPlatformOrderEntity; ...@@ -8,11 +11,13 @@ import com.platform.entity.TbCfPlatformOrderEntity;
* @author lipengjun * @author lipengjun
* @date 2019-09-20 11:03:37 * @date 2019-09-20 11:03:37
*/ */
public interface TbCfPlatformOrderDao extends BaseDao<TbCfPlatformOrderEntity> { public interface TbCfPlatformOrderDao extends BaseDao<PlatformOrderVo> {
/** /**
* 获取订单的代购信息 * 获取订单的代购信息
* @param orderId * @param orderId
* @return * @return
*/ */
TbCfPlatformOrderEntity getAgentInfo(String orderId); PlatformOrderVo getAgentInfo(String orderId);
int updates( PlatformOrderVo tbCfPlatformOrder);
} }
...@@ -105,7 +105,7 @@ public class TbCfOrderEntity implements Serializable { ...@@ -105,7 +105,7 @@ public class TbCfOrderEntity implements Serializable {
/** /**
* 优惠券减免价格 * 优惠券减免价格
*/ */
private BigDecimal couponPrice; private BigDecimal deductAmount;
/** /**
* 税费 * 税费
*/ */
...@@ -420,15 +420,15 @@ public class TbCfOrderEntity implements Serializable { ...@@ -420,15 +420,15 @@ public class TbCfOrderEntity implements Serializable {
/** /**
* 设置:优惠券减免价格 * 设置:优惠券减免价格
*/ */
public void setCouponPrice(BigDecimal couponPrice) { public void setDeductAmount(BigDecimal deductAmount) {
this.couponPrice = couponPrice; this.deductAmount = deductAmount;
} }
/** /**
* 获取:优惠券减免价格 * 获取:优惠券减免价格
*/ */
public BigDecimal getCouponPrice() { public BigDecimal getDeductAmount() {
return couponPrice; return deductAmount;
} }
/** /**
* 设置:税费 * 设置:税费
......
package com.platform.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 订单表实体
* 表名 tb_cf_order
*
* @author lipengjun
* @date 2019-10-24 14:39:47
*/
public class TbCfOrderListEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 订单id
*/
private String orderId;
/**
* 商品Id
*/
private String itemId;
/**
* 用户id
*/
private String userId;
/**
* 订单号
*/
private String orderNo;
/**
* 下单时间
*/
private Date orderTime;
/**
* 金额
*/
private BigDecimal realityPay;
/**
* 商品
*/
private String itemTitle;
/**
* 商品数量
*/
private Integer itemNum;
/**
* 收货地址
*/
private String deliveryAddress;
/**
* 快递单号
*/
private String pExpressNumber;
/**
* 支付状态
*/
private String payWayCode;
/**
* 快递状态
*/
private Integer deliveryFlag;
/**
* 代购人
*/
private String userName;
/**
* 获取:订单id
*/
public String getOrderId() {
return orderId;
}
/**
* 设置:订单id
*/
public void setOrderId(String orderId) {
this.orderId = orderId;
}
/**
* 获取:商品Id
*/
public String getItemId() {
return itemId;
}
/**
* 设置:商品Id
*/
public void setItemId(String itemId) {
this.itemId = itemId;
}
/**
* 获取:用户id
*/
public String getUserId() {
return userId;
}
/**
* 设置:用户id
*/
public void setUserId(String userId) {
this.userId = userId;
}
/**
* 获取:订单号
*/
public String getOrderNo() {
return orderNo;
}
/**
* 设置:订单号
*/
public void setOrderNo(String orderNo) {
this.orderNo = orderNo;
}
/**
* 获取:下单时间
*/
public Date getOrderTime() {
return orderTime;
}
/**
* 设置:下单时间
*/
public void setOrderTime(Date orderTime) {
this.orderTime = orderTime;
}
/**
* 获取:金额
*/
public BigDecimal getRealityPay() {
return realityPay;
}
/**
* 设置:金额
*/
public void setRealityPay(BigDecimal realityPay) {
this.realityPay = realityPay;
}
/**
* 获取:商品
*/
public String getItemTitle() {
return itemTitle;
}
/**
* 设置:商品
*/
public void setItemTitle(String itemTitle) {
this.itemTitle = itemTitle;
}
/**
* 获取:商品数量
*/
public Integer getItemNum() {
return itemNum;
}
/**
* 设置:商品数量
*/
public void setItemNum(Integer itemNum) {
this.itemNum = itemNum;
}
/**
* 获取:收货地址
*/
public String getDeliveryAddress() {
return deliveryAddress;
}
/**
* 设置:收货地址
*/
public void setDeliveryAddress(String deliveryAddress) {
this.deliveryAddress = deliveryAddress;
}
/**
* 获取:快递单号
*/
public String getpExpressNumber() {
return pExpressNumber;
}
/**
* 设置:快递单号
*/
public void setpExpressNumber(String pExpressNumber) {
this.pExpressNumber = pExpressNumber;
}
/**
* 获取:支付方式
*/
public String getPayWayCode() {
return payWayCode;
}
/**
* 设置:支付方式
*/
public void setPayWayCode(String payWayCode) {
this.payWayCode = payWayCode;
}
/**
* 获取:快递状态
*/
public Integer getDeliveryFlag() {
return deliveryFlag;
}
/**
* 设置:快递状态
*/
public void setDeliveryFlag(Integer deliveryFlag) {
this.deliveryFlag = deliveryFlag;
}
/**
* 获取:代购人
*/
public String getUserName() {
return userName;
}
/**
* 设置:代购人
*/
public void setUserName(String userName) {
this.userName = userName;
}
}
...@@ -46,6 +46,11 @@ public class TbCfPlatformOrderEntity implements Serializable { ...@@ -46,6 +46,11 @@ public class TbCfPlatformOrderEntity implements Serializable {
* 代购人id * 代购人id
*/ */
private String agentId; private String agentId;
/**
* 商品品名
*/
private String descripitionName;
/** /**
* 创建时间 * 创建时间
*/ */
...@@ -59,6 +64,21 @@ public class TbCfPlatformOrderEntity implements Serializable { ...@@ -59,6 +64,21 @@ public class TbCfPlatformOrderEntity implements Serializable {
*/ */
private String pExpressNumber; private String pExpressNumber;
/**
* 设置:商品品名
*/
public String setDescripitionName() {
return descripitionName;
}
/**
* 获取:商品品名
*/
public String getDescripitionName() {
this.descripitionName = descripitionName;
return descripitionName;
}
/** /**
* 设置:对应id * 设置:对应id
*/ */
...@@ -202,4 +222,5 @@ public class TbCfPlatformOrderEntity implements Serializable { ...@@ -202,4 +222,5 @@ public class TbCfPlatformOrderEntity implements Serializable {
public String getPExpressNumber() { public String getPExpressNumber() {
return pExpressNumber; return pExpressNumber;
} }
} }
package com.platform.service;
import com.platform.entity.TbCfOrderListEntity;
import com.platform.utils.Query;
import java.util.List;
import java.util.Map;
/**
* Service接口
*
* @author lipengjun
* @date 2019-09-20 11:03:37
*/
public interface TbCfOrderListService {
/**
* 订单列表(运营)
* @return
*/
List<TbCfOrderListEntity> queryOrderList(Map<String, Object> map);
/**
* 分页统计条数
* @return
*/
int queryOrderTotal(Map<String, Object> map);
int totalPay();
}
...@@ -2,7 +2,7 @@ package com.platform.service; ...@@ -2,7 +2,7 @@ package com.platform.service;
import com.platform.entity.TbCfItemDetailEntity; import com.platform.entity.TbCfItemDetailEntity;
import com.platform.entity.TbCfOrderEntity; import com.platform.entity.TbCfOrderEntity;
import com.platform.entity.TbCfPlatformOrderEntity; import com.platform.vo.PlatformOrderVo;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -18,7 +18,6 @@ public interface TbCfOrderService { ...@@ -18,7 +18,6 @@ public interface TbCfOrderService {
/** /**
* 根据主键查询实体 * 根据主键查询实体
* *
* @param id 主键
* @return 实体 * @return 实体
*/ */
TbCfOrderEntity queryObject(String orderId); TbCfOrderEntity queryObject(String orderId);
...@@ -83,12 +82,38 @@ public interface TbCfOrderService { ...@@ -83,12 +82,38 @@ public interface TbCfOrderService {
* @param orderId * @param orderId
* @return * @return
*/ */
TbCfPlatformOrderEntity getAgentInfo(String orderId); PlatformOrderVo getAgentInfo(String orderId);
/** /**
* 新增或者修改代购信息 * 新增或者修改代购信息
* @param tbCfPlatformOrder * @param tbCfPlatformOrder
* @return * @return
*/ */
int saveOrUpdateAgentInfo(TbCfPlatformOrderEntity tbCfPlatformOrder); int saveOrUpdateAgentInfo(PlatformOrderVo tbCfPlatformOrder);
/**
* 根据订单id查询商品详情
* @param orderId
* @return
*/
List<TbCfOrderEntity> queryOrderDetail(String orderId);
/**
* 修改物流状态为已入中国仓库
* @return
* @param sid
*/
int updateExpressStatus(String[] sid);
/**
* 修改物流状态为已入非洲仓库
* @return
*/
int updateExpressStatuss(String[] sid);
/**
* 修改物流状态为已签收
* @return
*/
int updateExpressStatusDelivery(String[] sids);
} }
package com.platform.service; package com.platform.service;
import com.platform.entity.TbCfPlatformOrderEntity; import com.platform.vo.PlatformOrderVo;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -16,10 +16,9 @@ public interface TbCfPlatformOrderService { ...@@ -16,10 +16,9 @@ public interface TbCfPlatformOrderService {
/** /**
* 根据主键查询实体 * 根据主键查询实体
* *
* @param id 主键
* @return 实体 * @return 实体
*/ */
TbCfPlatformOrderEntity queryObject(String relativeId); PlatformOrderVo queryObject(String relativeId);
/** /**
* 分页查询 * 分页查询
...@@ -27,7 +26,7 @@ public interface TbCfPlatformOrderService { ...@@ -27,7 +26,7 @@ public interface TbCfPlatformOrderService {
* @param map 参数 * @param map 参数
* @return list * @return list
*/ */
List<TbCfPlatformOrderEntity> queryList(Map<String, Object> map); List<PlatformOrderVo> queryList(Map<String, Object> map);
/** /**
* 分页统计总数 * 分页统计总数
...@@ -40,10 +39,9 @@ public interface TbCfPlatformOrderService { ...@@ -40,10 +39,9 @@ public interface TbCfPlatformOrderService {
/** /**
* 保存实体 * 保存实体
* *
* @param tbCfPlatformOrder 实体
* @return 保存条数 * @return 保存条数
*/ */
int save(TbCfPlatformOrderEntity tbCfPlatformOrder); int save(PlatformOrderVo platformOrderVo);
/** /**
* 根据主键更新实体 * 根据主键更新实体
...@@ -51,7 +49,7 @@ public interface TbCfPlatformOrderService { ...@@ -51,7 +49,7 @@ public interface TbCfPlatformOrderService {
* @param tbCfPlatformOrder 实体 * @param tbCfPlatformOrder 实体
* @return 更新条数 * @return 更新条数
*/ */
int update(TbCfPlatformOrderEntity tbCfPlatformOrder); int update(PlatformOrderVo tbCfPlatformOrder);
/** /**
* 根据主键删除 * 根据主键删除
...@@ -68,4 +66,5 @@ public interface TbCfPlatformOrderService { ...@@ -68,4 +66,5 @@ public interface TbCfPlatformOrderService {
* @return 删除条数 * @return 删除条数
*/ */
int deleteBatch(String[] relativeIds); int deleteBatch(String[] relativeIds);
} }
package com.platform.service.impl;
import com.platform.dao.TbCfOrderListDao;
import com.platform.entity.TbCfOrderListEntity;
import com.platform.service.TbCfOrderListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* Service实现类
*
* @author lipengjun
* @date 2019-09-20 11:03:37
*/
@Service("tbCfOrderListService")
public class TbCfOrderListServiceImpl implements TbCfOrderListService {
@Autowired
private TbCfOrderListDao tbCfOrderListDao;
@Override
public List<TbCfOrderListEntity> queryOrderList(Map<String, Object> map) {
return tbCfOrderListDao.queryOrderList(map);
}
@Override
public int queryOrderTotal(Map<String, Object> map) {
return tbCfOrderListDao.queryTotal(map);
}
@Override
public int totalPay() {
return tbCfOrderListDao.totalPay();
}
}
package com.platform.service.impl; package com.platform.service.impl;
import com.platform.dao.SysUserDao;
import com.platform.dao.TbCfOrderDao; import com.platform.dao.TbCfOrderDao;
import com.platform.dao.TbCfOrderListDao;
import com.platform.dao.TbCfPlatformOrderDao; import com.platform.dao.TbCfPlatformOrderDao;
import com.platform.entity.TbCfItemDetailEntity; import com.platform.entity.TbCfItemDetailEntity;
import com.platform.entity.TbCfOrderEntity; import com.platform.entity.TbCfOrderEntity;
import com.platform.entity.TbCfPlatformOrderEntity;
import com.platform.enums.DeliveryStatusEnum; import com.platform.enums.DeliveryStatusEnum;
import com.platform.enums.OrderStatusEnum; import com.platform.enums.OrderStatusEnum;
import com.platform.service.TbCfOrderService; import com.platform.service.TbCfOrderService;
import com.platform.utils.IdUtil; import com.platform.utils.IdUtil;
import com.platform.utils.ShiroUtils;
import com.platform.utils.StringUtils; import com.platform.utils.StringUtils;
import com.platform.vo.PlatformOrderVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -29,7 +32,10 @@ public class TbCfOrderServiceImpl implements TbCfOrderService { ...@@ -29,7 +32,10 @@ public class TbCfOrderServiceImpl implements TbCfOrderService {
private TbCfOrderDao tbCfOrderDao; private TbCfOrderDao tbCfOrderDao;
@Autowired @Autowired
private TbCfPlatformOrderDao tbCfPlatformOrderDao; private TbCfPlatformOrderDao tbCfPlatformOrderDao;
@Autowired
private TbCfOrderListDao tbCfOrderListDao;
@Autowired
private SysUserDao sysUserDao;
@Override @Override
public TbCfOrderEntity queryObject(String orderId) { public TbCfOrderEntity queryObject(String orderId) {
return tbCfOrderDao.queryObject(orderId); return tbCfOrderDao.queryObject(orderId);
...@@ -37,6 +43,7 @@ public class TbCfOrderServiceImpl implements TbCfOrderService { ...@@ -37,6 +43,7 @@ public class TbCfOrderServiceImpl implements TbCfOrderService {
@Override @Override
public List<TbCfOrderEntity> queryList(Map<String, Object> map) { public List<TbCfOrderEntity> queryList(Map<String, Object> map) {
return tbCfOrderDao.queryList(map); return tbCfOrderDao.queryList(map);
} }
...@@ -72,27 +79,33 @@ public class TbCfOrderServiceImpl implements TbCfOrderService { ...@@ -72,27 +79,33 @@ public class TbCfOrderServiceImpl implements TbCfOrderService {
} }
@Override @Override
public TbCfPlatformOrderEntity getAgentInfo(String orderId) { public PlatformOrderVo getAgentInfo(String orderId) {
return tbCfPlatformOrderDao.getAgentInfo(orderId); return tbCfPlatformOrderDao.getAgentInfo(orderId);
} }
@Override @Override
public int saveOrUpdateAgentInfo(TbCfPlatformOrderEntity tbCfPlatformOrder) { public int saveOrUpdateAgentInfo(PlatformOrderVo tbCfPlatformOrder) {
//tbCfPlatformOrder 有relativeId 则就是修改 //tbCfPlatformOrder 有relativeId 则就是修改
int res=0; int res=0;
if(StringUtils.isNotEmpty(tbCfPlatformOrder.getRelativeId())) { if(StringUtils.isNotEmpty(tbCfPlatformOrder.getRelativeId())) {
res=tbCfPlatformOrderDao.update(tbCfPlatformOrder); String userId=ShiroUtils.getUserId();
} else { tbCfPlatformOrder.setUserId(userId);
tbCfPlatformOrder.setUserName(sysUserDao.queryById(userId));
res = tbCfPlatformOrderDao.updates(tbCfPlatformOrder);
} else {
tbCfPlatformOrder.setCreateTime(new Date()); tbCfPlatformOrder.setCreateTime(new Date());
tbCfPlatformOrder.setRelativeId(IdUtil.createIdbyUUID()); tbCfPlatformOrder.setRelativeId(IdUtil.createIdbyUUID());
res=tbCfPlatformOrderDao.save(tbCfPlatformOrder); String userId=ShiroUtils.getUserId();
tbCfPlatformOrder.setUserId(userId);
tbCfPlatformOrder.setUserName(sysUserDao.queryById(userId));
tbCfPlatformOrder.setRealityPay(tbCfPlatformOrder.getRealityPay());
res = tbCfPlatformOrderDao.save(tbCfPlatformOrder);
} }
//如果填写了快递单号,那么意味着已经发货,需要更改发货状态 //如果填写了原网站订单号,那么意味着已发货,需要更改发货状态
if(StringUtils.isNotEmpty(tbCfPlatformOrder.getPExpressNumber())) { if(StringUtils.isNotEmpty(tbCfPlatformOrder.getPOrderId())) {
TbCfOrderEntity tbCfOrder = new TbCfOrderEntity(); TbCfOrderEntity tbCfOrder = new TbCfOrderEntity();
tbCfOrder.setOrderId(tbCfPlatformOrder.getOrderId()); tbCfOrder.setOrderId(tbCfPlatformOrder.getOrderId());
tbCfOrder.setDeliveryFlag(DeliveryStatusEnum.ON_LOAD.getValue());
tbCfOrder.setOrderStatus(OrderStatusEnum.SHIPPED.getValue()); tbCfOrder.setOrderStatus(OrderStatusEnum.SHIPPED.getValue());
tbCfOrderDao.update(tbCfOrder); tbCfOrderDao.update(tbCfOrder);
//更新发货时间,如果原值为空就更新,否则保留原值 //更新发货时间,如果原值为空就更新,否则保留原值
...@@ -101,6 +114,34 @@ public class TbCfOrderServiceImpl implements TbCfOrderService { ...@@ -101,6 +114,34 @@ public class TbCfOrderServiceImpl implements TbCfOrderService {
tbCfOrder2.setDeliveryTime(new Date()); tbCfOrder2.setDeliveryTime(new Date());
tbCfOrderDao.updateDeliveryTime(tbCfOrder2); tbCfOrderDao.updateDeliveryTime(tbCfOrder2);
} }
//如果填写了快递单号,那么意味着已代购,需要更改发货状态
if(StringUtils.isNotEmpty(tbCfPlatformOrder.getPExpressNumber())) {
TbCfOrderEntity tbCfOrder = new TbCfOrderEntity();
tbCfOrder.setOrderId(tbCfPlatformOrder.getOrderId());
tbCfOrder.setDeliveryFlag(DeliveryStatusEnum.PURCHASE.getValue());
tbCfOrderDao.update(tbCfOrder);
}
return res; return res;
} }
@Override
public List<TbCfOrderEntity> queryOrderDetail(String orderId) {
return tbCfOrderDao.queryOrderDetail(orderId);
}
@Override
public int updateExpressStatus(String[] sids) {
return tbCfOrderDao.updateExpressStatus(sids);
}
@Override
public int updateExpressStatuss(String[] sids) {
return tbCfOrderDao.updateExpressStatuss(sids);
}
@Override
public int updateExpressStatusDelivery(String[] sids) {
return tbCfOrderDao.updateExpressStatusDelivery(sids);
}
} }
package com.platform.service.impl; package com.platform.service.impl;
import com.platform.dao.SysUserDao;
import com.platform.dao.TbCfPlatformOrderDao; import com.platform.dao.TbCfPlatformOrderDao;
import com.platform.entity.TbCfPlatformOrderEntity; import com.platform.entity.SysLogEntity;
import com.platform.entity.SysUserEntity;
import com.platform.service.TbCfPlatformOrderService; import com.platform.service.TbCfPlatformOrderService;
import com.platform.utils.IdUtil; import com.platform.utils.IdUtil;
import com.platform.utils.ShiroUtils;
import com.platform.vo.PlatformOrderVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -20,15 +24,17 @@ import java.util.Map; ...@@ -20,15 +24,17 @@ import java.util.Map;
public class TbCfPlatformOrderServiceImpl implements TbCfPlatformOrderService { public class TbCfPlatformOrderServiceImpl implements TbCfPlatformOrderService {
@Autowired @Autowired
private TbCfPlatformOrderDao tbCfPlatformOrderDao; private TbCfPlatformOrderDao tbCfPlatformOrderDao;
@Autowired
private SysUserDao sysUserDao;
@Override @Override
public TbCfPlatformOrderEntity queryObject(String relativeId) { public PlatformOrderVo queryObject(String relativeId) {
return tbCfPlatformOrderDao.queryObject(relativeId); return tbCfPlatformOrderDao.queryObject(relativeId);
} }
@Override @Override
public List<TbCfPlatformOrderEntity> queryList(Map<String, Object> map) { public List<PlatformOrderVo> queryList(Map<String, Object> map) {
return tbCfPlatformOrderDao.queryList(map); return tbCfPlatformOrderDao.queryList(map);
} }
@Override @Override
...@@ -37,13 +43,17 @@ public class TbCfPlatformOrderServiceImpl implements TbCfPlatformOrderService { ...@@ -37,13 +43,17 @@ public class TbCfPlatformOrderServiceImpl implements TbCfPlatformOrderService {
} }
@Override @Override
public int save(TbCfPlatformOrderEntity tbCfPlatformOrder) { public int save(PlatformOrderVo platformOrderVo) {
tbCfPlatformOrder.setPOrderId(IdUtil.createIdbyUUID()); platformOrderVo.setPOrderId(IdUtil.createIdbyUUID());
return tbCfPlatformOrderDao.save(tbCfPlatformOrder); String userId=ShiroUtils.getUserId();
platformOrderVo.setUserId(userId);
platformOrderVo.setUserName(sysUserDao.queryById(userId));
platformOrderVo.setRealityPay(platformOrderVo.getRealityPay());
return tbCfPlatformOrderDao.save(platformOrderVo);
} }
@Override @Override
public int update(TbCfPlatformOrderEntity tbCfPlatformOrder) { public int update(PlatformOrderVo tbCfPlatformOrder) {
return tbCfPlatformOrderDao.update(tbCfPlatformOrder); return tbCfPlatformOrderDao.update(tbCfPlatformOrder);
} }
......
package com.platform.task;
import com.platform.service.TbCfOrderService;
import com.platform.utils.util.HttpUtils;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.text.SimpleDateFormat;
import java.util.*;
@Component("ExpressStatusTask")
public class ExpressStatusTask {
@Autowired
private TbCfOrderService tbCfOrderService;
@Scheduled(cron = "0 15 0/2 * * ? ")
public void expressStatusTaskForStorageC() {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String startime = sdf.format(getStartTime());
String endtime =sdf.format(getEndTime());
// String startime = "2019-09-29 00:00:00";
// String endtime ="2019-10-30 00:00:00";
String url = "http://shd.kjwlxt.com/api/checkin.php";
Map<String, String> parameters = new HashMap<>();
parameters.put("user_no", "shd806");
parameters.put("token", "d44426bd5b64dd2");
parameters.put("incomeid", "855");
parameters.put("startime", startime);
parameters.put("endtime", endtime);
String s = HttpUtils.sendPostJson(url, parameters);
JSONObject jsonObject = JSONObject.fromObject(s).getJSONObject("content");
JSONArray data = jsonObject.getJSONArray("data");
long startTime = System.currentTimeMillis();
String[] sids = new String[data.size()];
for (int i = 0; i < sids.length; i++) {
JSONObject object = JSONObject.fromObject(data.getString(i));
sids[i]=object.getString("sid");
}
if (sids.length != 0) {
tbCfOrderService.updateExpressStatus(sids);
System.out.println("修改了:"+sids.length+"条数据");
}
long endTime = System.currentTimeMillis();
String s1 = sdf.format(System.currentTimeMillis());
System.out.println("入珠海仓库查询时间:"+s1);
System.out.println("消耗时间:"+(endTime-startTime)+"ms");
}
@Scheduled(cron = "0 35 0/2 * * ? ")
public void expressStatusTaskForStorageA() {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String startime = sdf.format(getStartTime());
String endtime =sdf.format(getEndTime());
// String startime = "2019-09-29 00:00:00";
// String endtime ="2019-10-30 00:00:00";
String url="http://shd.kjwlxt.com/api/checkin.php";
Map<String,String> parameters=new HashMap<>();
parameters.put("user_no","shd806");
parameters.put("token","d44426bd5b64dd2");
parameters.put("incomeid","1170");
parameters.put("startime",startime);
parameters.put("endtime",endtime);
String s = HttpUtils.sendPostJson(url, parameters);
JSONObject jsonObject = JSONObject.fromObject(s).getJSONObject("content");
JSONArray data = jsonObject.getJSONArray("data");
long startTime = System.currentTimeMillis();
String[] sids = new String[data.size()];
for (int i = 0; i < sids.length; i++) {
JSONObject object = JSONObject.fromObject(data.getString(i));
sids[i]=object.getString("sid");
}
if (sids.length != 0) {
tbCfOrderService.updateExpressStatuss(sids);
System.out.println("修改了:"+sids.length+"条数据");
}
long endTime = System.currentTimeMillis();
String s1 = sdf.format(System.currentTimeMillis());
System.out.println("入非洲仓库查询时间:"+s1);
System.out.println("消耗时间:"+(endTime-startTime)+"ms");
}
@Scheduled(cron = "0 55 0/2 * * ? ")
public void expressStatusTaskForDelivery() {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String startime = sdf.format(getStartTime());
String endtime =sdf.format(getEndTime());
// String startime = "2019-09-29 00:00:00";
// String endtime ="2019-10-30 00:00:00";
String url="http://shd.kjwlxt.com/api/checkout.php";
Map<String,String> parameters=new HashMap<>();
parameters.put("user_no","shd806");
parameters.put("token","d44426bd5b64dd2");
parameters.put("startime",startime);
parameters.put("endtime",endtime);
String s = HttpUtils.sendPostJson(url, parameters);
JSONObject jsonObject = JSONObject.fromObject(s).getJSONObject("content");
JSONArray data = jsonObject.getJSONArray("data");
long startTime = System.currentTimeMillis();
String[] sids = new String[data.size()];
for (int i = 0; i < sids.length; i++) {
JSONObject object = JSONObject.fromObject(data.getString(i));
sids[i]=object.getString("sid");
}
if (sids.length != 0) {
tbCfOrderService.updateExpressStatusDelivery(sids);
System.out.println("修改了:"+sids.length+"条数据");
}
long endTime = System.currentTimeMillis();
String s2 = sdf.format(System.currentTimeMillis());
System.out.println("签收查询时间:"+s2);
System.out.println("消耗时间:"+(endTime-startTime)+"ms");
}
private static Date getStartTime() {
Calendar todayStart = Calendar.getInstance();
todayStart.set(Calendar.HOUR_OF_DAY, 0);
todayStart.set(Calendar.MINUTE, 0);
todayStart.set(Calendar.SECOND, 0);
todayStart.set(Calendar.MILLISECOND, 0);
return todayStart.getTime();
}
private static Date getEndTime() {
Calendar todayEnd = Calendar.getInstance();
todayEnd.set(Calendar.HOUR_OF_DAY, 23);
todayEnd.set(Calendar.MINUTE, 59);
todayEnd.set(Calendar.SECOND, 59);
todayEnd.set(Calendar.MILLISECOND, 999);
return todayEnd.getTime();
}
}
package com.platform.vo;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
public class PlatformOrderVo implements Serializable{
private static final long serialVersionUID = 1L;
/**
* 对应id
*/
private String relativeId;
/**
* 订单id
*/
private String orderId;
/**
* 第三方订单id
*/
private String pOrderId;
/**
* 第三方平台名
*/
private String platformName;
/**
* 第三方平台编号
*/
private String platformCode;
/**
* 第三方发货地址
*/
private String pDeliveryAddress;
/**
* 代购人
*/
private String userName;
/**
* 代购人id
*/
private String userId;
/**
* 商品品名
*/
private String descripitionId;
/**
* 商品品名
*/
private String templateTitle;
/**
* 创建时间
*/
private Date createTime;
/**
* 实际付款
*/
private BigDecimal realityPay;
/**
* 第三方快递单号
*/
private String pExpressNumber;
public String getTemplateTitle() {
return templateTitle;
}
public void setTemplateTitle(String templateTitle) {
this.templateTitle = templateTitle;
}
// /**
// * 设置:商品品名
// */
// public String setDescripitionId() {
// return descripitionId;
// }
// /**
// * 获取:商品品名
// */
// public String getDescripitionId() {
// this.descripitionId = descripitionId;
// return descripitionId;
// }
public String getpOrderId() {
return pOrderId;
}
public void setpOrderId(String pOrderId) {
this.pOrderId = pOrderId;
}
public String getpDeliveryAddress() {
return pDeliveryAddress;
}
public void setpDeliveryAddress(String pDeliveryAddress) {
this.pDeliveryAddress = pDeliveryAddress;
}
public String getDescripitionId() {
return descripitionId;
}
public void setDescripitionId(String descripitionId) {
this.descripitionId = descripitionId;
}
public String getpExpressNumber() {
return pExpressNumber;
}
public void setpExpressNumber(String pExpressNumber) {
this.pExpressNumber = pExpressNumber;
}
/**
* 设置:对应id
*/
public void setRelativeId(String relativeId) {
this.relativeId = relativeId;
}
/**
* 获取:对应id
*/
public String getRelativeId() {
return relativeId;
}
/**
* 设置:订单id
*/
public void setOrderId(String orderId) {
this.orderId = orderId;
}
/**
* 获取:订单id
*/
public String getOrderId() {
return orderId;
}
/**
* 设置:第三方订单id
*/
public void setPOrderId(String pOrderId) {
this.pOrderId = pOrderId;
}
/**
* 获取:第三方订单id
*/
public String getPOrderId() {
return pOrderId;
}
/**
* 设置:第三方平台名
*/
public void setPlatformName(String platformName) {
this.platformName = platformName;
}
/**
* 获取:第三方平台名
*/
public String getPlatformName() {
return platformName;
}
/**
* 设置:第三方平台编号
*/
public void setPlatformCode(String platformCode) {
this.platformCode = platformCode;
}
/**
* 获取:第三方平台编号
*/
public String getPlatformCode() {
return platformCode;
}
/**
* 设置:第三方发货地址
*/
public void setPDeliveryAddress(String pDeliveryAddress) {
this.pDeliveryAddress = pDeliveryAddress;
}
/**
* 获取:第三方发货地址
*/
public String getPDeliveryAddress() {
return pDeliveryAddress;
}
/**
* 获取:代购人
* @return
*/
public String getUserName() {
return userName;
}
/**
* 设置:代购人
* @return
*/
public void setUserName(String userName) {
this.userName = userName;
}
/**
* 设置:代购人id
*/
public void setUserId(String userId) {
this.userId = userId;
}
/**
* 获取:代购人id
*/
public String getUserId() {
return userId;
}
/**
* 设置:创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* 获取:创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 设置:实际付款
*/
public void setRealityPay(BigDecimal realityPay) {
this.realityPay = realityPay;
}
/**
* 获取:实际付款
*/
public BigDecimal getRealityPay() {
return realityPay;
}
/**
* 设置:第三方快递单号
*/
public void setPExpressNumber(String pExpressNumber) {
this.pExpressNumber = pExpressNumber;
}
/**
* 获取:第三方快递单号
*/
public String getPExpressNumber() {
return pExpressNumber;
}
}
...@@ -3,41 +3,48 @@ ...@@ -3,41 +3,48 @@
<mapper namespace="com.platform.dao.TbCfPlatformOrderDao"> <mapper namespace="com.platform.dao.TbCfPlatformOrderDao">
<resultMap type="com.platform.entity.TbCfPlatformOrderEntity" id="tbCfPlatformOrderMap"> <resultMap type="com.platform.vo.PlatformOrderVo" id="tbCfPlatformOrderMap">
<result property="relativeId" column="relative_id"/> <result property="relativeId" column="relative_id"/>
<result property="orderId" column="order_id"/> <result property="orderId" column="order_id"/>
<result property="pOrderId" column="p_order_id"/> <result property="pOrderId" column="p_order_id"/>
<result property="platformName" column="platform_name"/> <result property="platformName" column="platform_name"/>
<result property="platformCode" column="platform_code"/> <result property="platformCode" column="platform_code"/>
<result property="pDeliveryAddress" column="p_delivery_address"/> <result property="pDeliveryAddress" column="p_delivery_address"/>
<result property="agentName" column="agent_name"/> <result property="descripitionId" column="descripition_id"/>
<result property="agentId" column="agent_id"/> <result property="templateId" column="template_id"/>
<result property="templateTitle" column="template_title"/>
<result property="userName" column="user_name"/>
<result property="userId" column="user_id"/>
<result property="createTime" column="create_time"/> <result property="createTime" column="create_time"/>
<result property="realPay" column="real_pay"/> <result property="realityPay" column="reality_pay"/>
<result property="pExpressNumber" column="p_express_number"/> <result property="pExpressNumber" column="p_express_number"/>
</resultMap> </resultMap>
<select id="queryObject" resultType="com.platform.entity.TbCfPlatformOrderEntity"> <select id="queryObject" resultType="com.platform.vo.PlatformOrderVo">
select select
`relative_id`, p.relative_id,
`order_id`, p.order_id,
`p_order_id`, p.p_order_id,
`platform_name`, p.platform_name,
`platform_code`, p.platform_code,
`p_delivery_address`, p.p_delivery_address,
`agent_name`, u.user_name,
`agent_id`, u.user_id,
`create_time`, p.create_time,
`real_pay`, o.reality_pay,
`p_express_number` p.p_express_number,
from tb_cf_platform_order p.descripition_id
where relative_id = #{id} from tb_cf_platform_order p
left join tb_cf_order o on p.order_id=o.order_id
left join sys_user u on p.user_id=u.user_id
left join tb_cf_express_template e on e.template_id=p.descripition_id
where p.relative_id =#{relativeId}
</select> </select>
<select id="queryList" resultType="com.platform.entity.TbCfPlatformOrderEntity"> <!--<select id="queryList" resultType="com.platform.vo.PlatformOrderVo">
select select
`relative_id`, `relative_id`,
`order_id`, p.order_id,
`p_order_id`, `p_order_id`,
`platform_name`, `platform_name`,
`platform_code`, `platform_code`,
...@@ -47,7 +54,7 @@ ...@@ -47,7 +54,7 @@
`create_time`, `create_time`,
`real_pay`, `real_pay`,
`p_express_number` `p_express_number`
from tb_cf_platform_order from tb_cf_platform_order p left join tb_cf_order o on p.order_id=o.order_id
WHERE 1=1 WHERE 1=1
<if test="name != null and name.trim() != ''"> <if test="name != null and name.trim() != ''">
AND name LIKE concat('%',#{name},'%') AND name LIKE concat('%',#{name},'%')
...@@ -63,8 +70,9 @@ ...@@ -63,8 +70,9 @@
<if test="offset != null and limit != null"> <if test="offset != null and limit != null">
limit #{offset}, #{limit} limit #{offset}, #{limit}
</if> </if>
</select> </select>-->
<!--
<select id="queryTotal" resultType="int"> <select id="queryTotal" resultType="int">
select count(*) from tb_cf_platform_order select count(*) from tb_cf_platform_order
WHERE 1=1 WHERE 1=1
...@@ -72,8 +80,9 @@ ...@@ -72,8 +80,9 @@
AND name LIKE concat('%',#{name},'%') AND name LIKE concat('%',#{name},'%')
</if> </if>
</select> </select>
-->
<insert id="save" parameterType="com.platform.entity.TbCfPlatformOrderEntity">
<insert id="save" parameterType="com.platform.vo.PlatformOrderVo">
insert into tb_cf_platform_order( insert into tb_cf_platform_order(
`relative_id`, `relative_id`,
`order_id`, `order_id`,
...@@ -81,11 +90,12 @@ ...@@ -81,11 +90,12 @@
`platform_name`, `platform_name`,
`platform_code`, `platform_code`,
`p_delivery_address`, `p_delivery_address`,
`agent_name`, `user_name`,
`agent_id`, `user_id`,
`create_time`, `create_time`,
`real_pay`, `reality_pay`,
`p_express_number`) `p_express_number`,
`descripition_id`)
values( values(
#{relativeId}, #{relativeId},
#{orderId}, #{orderId},
...@@ -93,44 +103,80 @@ ...@@ -93,44 +103,80 @@
#{platformName}, #{platformName},
#{platformCode}, #{platformCode},
#{pDeliveryAddress}, #{pDeliveryAddress},
#{agentName}, #{userName},
#{agentId}, #{userId},
#{createTime}, #{createTime},
#{realPay}, #{realityPay},
#{pExpressNumber}) #{pExpressNumber},
#{descripitionId})
</insert> </insert>
<update id="update" parameterType="com.platform.entity.TbCfPlatformOrderEntity">
update tb_cf_platform_order <!--<update id="update" parameterType="com.platform.vo.PlatformOrderVo">
update tb_cf_platform_order
<set> <set>
<if test="orderId != null">`order_id` = #{orderId}, </if> <if test="orderId != null">`order_id` = #{orderId}, </if>
<if test="pOrderId != null">`p_order_id` = #{pOrderId}, </if> <if test="pOrderId != null">`p_order_id` = #{pOrderId}, </if>
<if test="platformName != null">`platform_name` = #{platformName}, </if> <if test="platformName != null">`platform_name` = #{platformName}, </if>
<if test="platformCode != null">`platform_code` = #{platformCode}, </if> <if test="platformCode != null">`platform_code` = #{platformCode}, </if>
<if test="pDeliveryAddress != null">`p_delivery_address` = #{pDeliveryAddress}, </if> <if test="pDeliveryAddress != null">`p_delivery_address` = #{pDeliveryAddress}, </if>
<if test="agentName != null">`agent_name` = #{agentName}, </if> <if test="userName != null">`user_name` = #{userName}, </if>
<if test="agentId != null">`agent_id` = #{agentId}, </if> <if test="userId != null">`user_id` = #{userId}, </if>
<if test="createTime != null">`create_time` = #{createTime}, </if> <if test="createTime != null">`create_time` = #{createTime}, </if>
<if test="realPay != null">`real_pay` = #{realPay}, </if> <if test="realityPay != null">`reality_pay` = #{realityPay}, </if>
<if test="pExpressNumber != null">`p_express_number` = #{pExpressNumber}</if> <if test="pExpressNumber != null">`p_express_number` = #{pExpressNumber}</if>
</set> </set>
where relative_id = #{relativeId} where relative_id = #{relativeId}
</update>-->
<update id="updates" parameterType="com.platform.vo.PlatformOrderVo">
update tb_cf_platform_order p left join tb_cf_express_template e on e.template_id=p.descripition_id
<set>
<if test="orderId != null">p.order_id = #{orderId}, </if>
<if test="pOrderId != null">p.p_order_id = #{pOrderId}, </if>
<if test="platformName != null">p.platform_name = #{platformName}, </if>
<if test="platformCode != null">p.platform_code = #{platformCode}, </if>
<if test="pDeliveryAddress != null">p.p_delivery_address = #{pDeliveryAddress}, </if>
<if test="userName != null">p.user_name = #{userName}, </if>
<if test="userId != null">p.user_id = #{userId}, </if>
<if test="createTime != null">p.create_time = #{createTime}, </if>
<if test="realityPay != null">p.reality_pay = #{realityPay}, </if>
<if test="pExpressNumber != null">p.p_express_number = #{pExpressNumber},</if>
<if test="descripitionId != null">p.descripition_id = #{descripitionId}</if>
</set>
where p.relative_id = #{relativeId}
</update> </update>
<delete id="delete"> <!-- <delete id="delete">
delete from tb_cf_platform_order where relative_id = #{value} delete from tb_cf_platform_order where relative_id = #{value}
</delete> </delete>
<delete id="deleteBatch"> <delete id="deleteBatch">
delete from tb_cf_platform_order where relative_id in delete from tb_cf_platform_order where relative_id in
<foreach item="relativeId" collection="array" open="(" separator="," close=")"> <foreach item="relativeId" collection="array" open="(" separator="," close=")">
#{relativeId} #{relativeId}
</foreach> </foreach>
</delete> </delete>-->
<!--获取订单的代购信息--> <!--获取订单的代购信息-->
<select id="getAgentInfo" resultType="com.platform.entity.TbCfPlatformOrderEntity"> <select id="getAgentInfo" resultType="com.platform.vo.PlatformOrderVo">
select * from tb_cf_platform_order where order_id=#{orderId}; select
p.relative_id,
p.order_id,
p.p_order_id,
p.platform_name,
p.platform_code,
p.p_delivery_address,
u.user_name,
u.user_id,
p.create_time,
o.reality_pay,
p.p_express_number,
p.descripition_id
from tb_cf_platform_order p
left join tb_cf_order o on p.order_id=o.order_id
left join sys_user u on p.user_id=u.user_id
left join tb_cf_express_template e on e.template_id=p.descripition_id
where p.order_id=#{orderId};
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -59,14 +59,14 @@ ...@@ -59,14 +59,14 @@
i.create_time, i.create_time,
i.item_categorytwo, i.item_categorytwo,
i.item_descrition_id, i.item_descrition_id,
d.descripition_name dname, e.template_title dname,
t.goodstwotype_title title, t.goodstwotype_title title,
o.goodstype_title goodtype o.goodstype_title goodtype
FROM FROM
tb_cf_station_item i tb_cf_station_item i
left JOIN tb_cf_goodstype o ON o.goodstype_id = i.item_category left JOIN tb_cf_goodstype o ON o.goodstype_id = i.item_category
left JOIN tb_cf_goodstwotype t ON i.item_categorytwo=t.goodstwotype_id left JOIN tb_cf_goodstwotype t ON i.item_categorytwo=t.goodstwotype_id
left JOIN tb_cf_descripiton d ON i.item_descrition_id = d.descripition_id left JOIN tb_cf_express_template e ON i.item_descrition_id = e.template_id
WHERE 1=1 WHERE 1=1
<if test="name != null and name.trim() != ''"> <if test="name != null and name.trim() != ''">
AND name LIKE concat('%',#{name},'%') AND name LIKE concat('%',#{name},'%')
......
#jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8 #jdbc.url=jdbc:mysql://localhost:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
#jdbc.username=root #jdbc.username=root
#jdbc.password=diaoyun666 #jdbc.password=root
jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8 jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
jdbc.username=root jdbc.username=root
...@@ -11,4 +11,4 @@ jdbc.maxActive=30 ...@@ -11,4 +11,4 @@ jdbc.maxActive=30
jdbc.minPoolSize=2 jdbc.minPoolSize=2
jdbc.maxIdleTime=30000 jdbc.maxIdleTime=30000
jdbc.idleConnectionTestPeriod=100 jdbc.idleConnectionTestPeriod=100
\ No newline at end of file \ No newline at end of file
#jdbc.url=jdbc:mysql://localhost:3306/platform?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
#jdbc.username=root
#jdbc.password=root
jdbc.url=jdbc:mysql://47.106.242.175:3306/platform?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8 jdbc.url=jdbc:mysql://47.106.242.175:3306/platform?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
jdbc.username=root jdbc.username=root
jdbc.password=diaoyun666 jdbc.password=diaoyun666
jdbc.initialSize=5
jdbc.initialSize=5
jdbc.maxActive=30 jdbc.maxActive=30
jdbc.minPoolSize=2 jdbc.minPoolSize=2
jdbc.maxIdleTime=30000 jdbc.maxIdleTime=30000
jdbc.idleConnectionTestPeriod=100 jdbc.idleConnectionTestPeriod=100
\ No newline at end of file \ No newline at end of file
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
xmlns:context="http://www.springframework.org/schema/context" xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation=" xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
...@@ -11,8 +12,10 @@ ...@@ -11,8 +12,10 @@
http://www.springframework.org/schema/context/spring-context-4.2.xsd http://www.springframework.org/schema/context/spring-context-4.2.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-4.2.xsd http://www.springframework.org/schema/aop/spring-aop-4.2.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd"> http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd
http://www.springframework.org/schema/task
http://www.springframework.org/schema/task/spring-task-3.0.xsd">
<context:component-scan base-package="com.platform"/> <context:component-scan base-package="com.platform"/>
<context:annotation-config/> <context:annotation-config/>
...@@ -124,5 +127,9 @@ ...@@ -124,5 +127,9 @@
</bean> </bean>
</property> </property>
</bean> </bean>
<context:annotation-config />
<!--开启这个配置,spring才能识别@Scheduled注解 -->
<task:annotation-driven scheduler="qbScheduler" mode="proxy"/>
<task:scheduler id="qbScheduler" pool-size="10"/>
</beans> </beans>
\ No newline at end of file
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</div> </div>
<div class="buttons-group"> <div class="buttons-group">
<i-button type="info" @click="insertcoupon">新增优惠券类型</i-button> <i-button type="info" @click="insertcoupon">新增优惠券类型</i-button>
<i-button type="info" @click="showTake">查看领取情况</i-button> <!-- <i-button type="info" @click="showTake">查看领取情况</i-button>-->
<i-button type="info" @click="showIssue">查看发放情况</i-button> <i-button type="info" @click="showIssue">查看发放情况</i-button>
<!--<i-button type="info" @click="showUse"><i class="fa fa-plus"></i>&nbsp;查看使用情况</i-button>--> <!--<i-button type="info" @click="showUse"><i class="fa fa-plus"></i>&nbsp;查看使用情况</i-button>-->
#if($shiro.hasPermission("tbcfcoupon:save")) #if($shiro.hasPermission("tbcfcoupon:save"))
...@@ -52,16 +52,16 @@ ...@@ -52,16 +52,16 @@
<p slot="title">{{title}}</p> <p slot="title">{{title}}</p>
<i-form ref="formValidate" :model="tbCfCoupon" :rules="ruleValidate" :label-width="80"> <i-form ref="formValidate" :model="tbCfCoupon" :rules="ruleValidate" :label-width="80">
<Form-item label="优惠券类型" prop="couponCategoryId"> <Form-item label="优惠券类型" prop="couponCategoryId">
<i-select placeholder="请选择" v-model="tbCfCoupon.couponCategoryId" @on-change="changeCouponCategory"> <i-select placeholder="优惠券类型" v-model="tbCfCoupon.couponCategoryId" @on-change="changeCouponCategory">
<i-option <i-option
v-for="(el,i) in CouponCategory" :key = 'i' v-for="(el,i) in CouponCategory" :key = 'i'
:value="el.couponCategoryId">{{el.couponCategoryName}}</i-option> :value="el.couponCategoryId">{{el.couponCategoryName}}</i-option>
</i-select> </i-select>
</Form-item> </Form-item>
<Form-item label="设置是否为注册就送该优惠券" prop="couponVaild"> <Form-item label="设置是否为注册就送该优惠券" prop="couponVaild">
<i-select placeholder="请选择" v-model="tbCfCoupon.couponVaild"> <i-select placeholder="是否注册就送" v-model="tbCfCoupon.couponVaild">
<i-option value="0">0</i-option> <i-option value="0"></i-option>
<i-option value="1">1</i-option> <i-option value="1"></i-option>
</i-select> </i-select>
</Form-item> </Form-item>
<!--<Form-item label="可用于类目" prop="couponUse"> <!--<Form-item label="可用于类目" prop="couponUse">
...@@ -174,7 +174,6 @@ ...@@ -174,7 +174,6 @@
:value="el.couponId">{{el.couponTitle}} :value="el.couponId">{{el.couponTitle}}
</i-option> </i-option>
</i-select> </i-select>
</Form-item> </Form-item>
<Form-item prop="userStatus"> <Form-item prop="userStatus">
<!-- <i-input v-model="tbCfCoupon.couponCategory" placeholder="优惠券类型"/>--> <!-- <i-input v-model="tbCfCoupon.couponCategory" placeholder="优惠券类型"/>-->
......
<!DOCTYPE html>
<html>
<!--element-ui-->
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
<head>
<title></title>
#parse("sys/header.html")
<style>
.ui-jqgrid .ui-jqgrid-bdiv{
height:auto!important;
}
.el-select{
width:120px;
}
.el-date-editor{
width:220px;
}
.el-date-editor--daterange.el-input, .el-date-editor--daterange.el-input__inner, .el-date-editor--timerange.el-input, .el-date-editor--timerange.el-input__inner {
width: 230px;
}
.ivu-col{
width: 280px;
}
.ivu-input{
height: 40px;
}
</style>
</head>
<body>
<div id="rrapp" v-cloak style="width:1680px;
height: -webkit-calc(100% - 15px);
height: -moz-calc(100% - 15px);
height: calc(100% - 15px);">
<div v-show="showList" style="height: 100%;">
<Row :gutter="16">
<div class="search-group">
<i-col span="4">
<i-input v-model="orderNo" placeholder="订单号"/>
</i-col>
<el-date-picker
v-model="value"
type="daterange"
align="right"
unlink-panels
range-separator="~"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
<el-select v-model="deliveryFlag" placeholder="物流状态">
<el-option
v-for="item in deliveryFlagOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model="payWayCode" placeholder="支付方式">
<el-option
v-for="item in payWayCodeOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<i-button type="success" @click="queryAll">查询</i-button>
<i-button type="warning" @click="reloadSearch">重置</i-button>
</div>
</Row>
<table id="jqGrid"></table>
</div>
<Card v-show="!showList">
<p slot="title">{{title}}</p>
<i-form ref="formValidate" :model="tbCfOrderList" :rules="ruleValidate">
<Form-item label="orderId" prop="orderId">
<i-input v-model="tbCfOrderList.orderId" placeholder="订单Id"/>
</Form-item>
<Form-item label="商品Id" prop="itemId">
<i-input v-model="tbCfOrderList.itemId" placeholder="商品Id"/>
</Form-item>
<Form-item label="用户id" prop="userId">
<i-input v-model="tbCfOrderList.userId" placeholder="用户id"/>
</Form-item>
<Form-item label="订单号" prop="orderNo">
<i-input v-model="tbCfOrderList.orderNo" placeholder="订单号"/>
</Form-item>
<Form-item label="下单时间" prop="orderTime">
<i-input v-model="tbCfOrderList.orderTime" placeholder="下单时间"/>
</Form-item>
<Form-item label="金额" prop="realityPay">
<i-input v-model="tbCfOrderList.realityPay" placeholder="金额"/>
</Form-item>
<Form-item label="商品" prop="itemTitle">
<i-input v-model="tbCfOrderList.itemTitle" placeholder="商品"/>
</Form-item>
<Form-item label="商品数量" prop="itemNum">
<i-input v-model="tbCfOrderList.itemNum" placeholder="商品数量"/>
</Form-item>
<Form-item label="收货地址" prop="deliveryAddress">
<i-input v-model="tbCfOrderList.deliveryAddress" placeholder="收货地址"/>
</Form-item>
<Form-item label="快递单号" prop="pExpressNumber">
<i-input v-model="tbCfOrderList.pExpressNumber" placeholder="快递单号"/>
</Form-item>
<Form-item label="支付状态" prop="payWayCode">
<i-input v-model="tbCfOrderList.payWayCode" placeholder="支付方式"/>
</Form-item>
<Form-item label="物流状态" prop="expressStatus">
<i-input v-model="tbCfOrderList.expressStatus" placeholder="快递状态"/>
</Form-item>
<Form-item>
<i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
<i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
<i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
</Form-item>
</i-form>
</Card>
</div>
<!--element-ui-->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="${rc.contextPath}/js/sys/tbcforderList.js?_${date.systemTime}"></script>
</body>
</html>
\ No newline at end of file
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
<!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<link rel="stylesheet" href="statics/css/iview.css"> <link rel="stylesheet" href="statics/css/iview.css">
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
...@@ -63,6 +62,9 @@ ...@@ -63,6 +62,9 @@
class="fa fa-bars"></i> </a> class="fa fa-bars"></i> </a>
</div> </div>
<ul class="nav navbar-top-links navbar-right"> <ul class="nav navbar-top-links navbar-right">
<li class="form-group">
<span class="label label-primary" >欢迎用户:{{user.userName}}</span>
</li>
<li class="dropdown"> <li class="dropdown">
<a href="javascript:;" @click="toggleFullScreen"><i class="fa fa-arrows-alt"></i> &nbsp;全屏</a> <a href="javascript:;" @click="toggleFullScreen"><i class="fa fa-arrows-alt"></i> &nbsp;全屏</a>
</li> </li>
...@@ -122,7 +124,7 @@ ...@@ -122,7 +124,7 @@
data-id="main" seamless></iframe> data-id="main" seamless></iframe>
</div> </div>
<div class="footer"> <div class="footer">
<div class="pull-right">&copy; 2018-2018 <a href="#" target="_blank">综合管理平台</a> <div class="pull-right">&copy; 2018-2020 <a href="#" target="_blank">综合管理平台</a>
</div> </div>
</div> </div>
</div> </div>
...@@ -142,6 +144,7 @@ ...@@ -142,6 +144,7 @@
</div> </div>
</div> </div>
<!--右侧边栏结束--> <!--右侧边栏结束-->
<!-- 修改密码 --> <!-- 修改密码 -->
<div id="passwordLayer" style="display: none;"> <div id="passwordLayer" style="display: none;">
<form class="form-horizontal" style="width: 350px;"> <form class="form-horizontal" style="width: 350px;">
......
...@@ -551,22 +551,44 @@ orderStatusFormat = function (cellvalue) { ...@@ -551,22 +551,44 @@ orderStatusFormat = function (cellvalue) {
} }
return returnStr; return returnStr;
}; };
/** /**
* 支付状态翻译 ,0未支付,1已支付 * 支付状态翻译 ,10未支付,20已支付
* @param cellvalue * @param cellvalue
* @returns {string} * @returns {string}
*/ */
payStatusFormat = function (cellvalue) { payStatusFormat = function (cellvalue) {
var returnStr = "未知"; var returnStr = "未支付";
if (!!cellvalue||cellvalue == '0') { if (!!cellvalue||cellvalue == '10') {
if (cellvalue == '10') { if (cellvalue == '20') {
returnStr = "未支付";
} else if (cellvalue == '20') {
returnStr = "已支付"; returnStr = "已支付";
} }
} }
return returnStr; return returnStr;
}; };
/**
* 快递状态翻译
* @param cellvalue
* @returns {string}
*/
deliveryFlagFormat = function (cellvalue) {
var returnStr="等待处理"
if(!!cellvalue||cellvalue == '0'){
if (cellvalue == '10') {
returnStr = "已代购";
} else if (cellvalue == '20') {
returnStr = "已到达中国仓";
} else if (cellvalue == '30') {
returnStr = "正运往非洲";
} else if (cellvalue == '40') {
returnStr = "已到达非洲仓";
}else if (cellvalue == '50') {
returnStr = "买家已签收";
}
}
return returnStr;
}
/** /**
* 用户类型翻译 * 用户类型翻译
* @param cellvalue * @param cellvalue
...@@ -606,12 +628,10 @@ yesOrNoFormat = function (cellvalue) { ...@@ -606,12 +628,10 @@ yesOrNoFormat = function (cellvalue) {
* @param cellvalue * @param cellvalue
*/ */
agentFormat = function (cellvalue) { agentFormat = function (cellvalue) {
var returnStr = "未"; var returnStr = "未代购";
if (!!cellvalue||cellvalue == '0') { if (!!cellvalue||cellvalue == '0') {
if (cellvalue == '1') { if (cellvalue == '10') {
returnStr = "已发起代购"; returnStr = "已代购";
} else if (cellvalue == '0') {
returnStr = "未代购";
} }
} }
return returnStr; return returnStr;
......
...@@ -128,7 +128,6 @@ let vm = new Vue({ ...@@ -128,7 +128,6 @@ let vm = new Vue({
} }
}, },
methods: { methods: {
//获取商品类型
changeCouponCategory(){ changeCouponCategory(){
let url = `/africa_shop/tbcfcouponcategory/queryByCouponCategoryId?categoryId=${this.tbCfCoupon.couponCategoryId}`; let url = `/africa_shop/tbcfcouponcategory/queryByCouponCategoryId?categoryId=${this.tbCfCoupon.couponCategoryId}`;
console.log('url',url) console.log('url',url)
...@@ -381,10 +380,10 @@ let vm = new Vue({ ...@@ -381,10 +380,10 @@ let vm = new Vue({
handleReset2: function (name) { handleReset2: function (name) {
handleResetForm(this, name); handleResetForm(this, name);
}, }
},
},
created(){ created(){
debugger
var that = this var that = this
$.get('../tbcfcoupon/queryAll',function (res) { $.get('../tbcfcoupon/queryAll',function (res) {
console.log(res.list) console.log(res.list)
......
$(function () {
$("#jqGrid").Grid({
url: '../tbcforder/orderList',
//colNames: ['orderId', 'itemId', '用户id', '订单号', '下单时间', '金额', '商品', '商品数量', '收货地址', '快递单号', '支付方式', '物流状态'],
/* cellEdit: true,
cellsubmit: "remote",
cellurl:'../tbcforder/changeDeliveryFlag/',*/
colModel: [
//显示字段
{label: 'orderId', name: 'orderId', index: 'order_id', key: true, hidden: true},
{label: 'itemId', name: 'itemId', index: 'item_id', key: true, hidden: true},
{label: '用户id', name: 'userId', index: 'user_id', width: 120},
{label: '订单号', name: 'orderNo', index: 'order_no', width: 80},
{label: '下单时间', name: 'orderTime', index: 'order_time', width: 70},
{label: '金额',name: 'realityPay', index: 'reality_pay', width: 45},
// formatter: "currency",formatoptions: {thousandsSeparator:",",decimalSeparator:".",decimalPlaces:"2", prefix:"$"}}, //在金额前加上$,加上后,页合计无法正常显示。
{label: '商品', name: 'itemTitle', index: 'item_title', width: 90},
{label: '商品数量', name: 'itemNum', index: 'item_num', width: 30},
{label: '收货地址', name: 'deliveryAddress', index: 'delivery_address', width: 100},
{label: '快递单号', name: 'pExpressNumber', index: 'p_express_number', width: 80,sortable:false},
{label: '支付方式', name: 'payWayCode', index: 'pay_way_code', width: 35},
{label: '物流状态', name: 'deliveryFlag', index: 'delivery_flag', width: 40,formatter:deliveryFlagFormat},
{label: '代购人', name: 'userName', index: 'user_name', width: 40},
{label: '总金额', name: 'totalPay', index: 'totalPay', width: 40,hidden:true}
/* , editable:true,edittype:'select',editoptions:{value:{
0:'等待处理', 10:'已经代购', 20:'正在配送', 30:'已到达中国仓', 40:'正运往非洲',50:'买家已签收'}*/
],
footerrow: true,
gridComplete:function(){
// 页合计
let rowNum = parseInt($(this).getGridParam('records'),10);
// let totalPay= $(this).getGridParam('totalSum');
if (rowNum > 0) {
$(".ui-jqgrid-sdiv").show();
let realityPay = jQuery(this).getCol('realityPay', false, 'sum');
//let totalPay = jQuery(this).getCol('realityPay', false, 'sum');
$(this).footerData("set", {
"orderTime": "<font color='red'>页合计<font>",
"realityPay": "<font color='red'>"+"$" + realityPay.toFixed(2) + "<font>",
/* "itemNum": "<font color='red'>总合计<font>",
"deliveryAddress": "<font color='red'>"+"$" + totalPay.toFixed(2) + "<font>",*/
});
} else {
$(".ui-jqgrid-sdiv").hide();
}
}
});
});
let vm = new Vue({
el: '#rrapp',
data: {
showList: true,
title: null,
tbCfOrderList: {},
deliveryFlagOptions:[{
value: '0',
label: '等待处理'
},{
value: '10',
label: '已代购'
},{
value: '20',
label: '已到达中国仓'
},{
value: '30',
label: '正运往非洲'
},{
value: '40',
label: '已到达非洲仓'
},{
value: '50',
label: '买家已签收'
}],
payWayCodeOptions:[{
value:'stripe',
label:'stripe',
},{
value:'paypal',
label:'paypal',
},{
value:'flutterWave',
label:'flutterWave',
}],
deliveryFlag:'',
payWayCode:'',
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
ruleValidate: {
name: [
{required: true, message: '名称不能为空', trigger: 'blur'}
]
},
orderId:'',
orderNo:'',
value:'',
},
methods: {
queryAll: function () {
vm.reload();
},
handleCommand:function(value){
alert('click on item ' + value);
},
/* handlePayCode:function(value){
debugger;
Ajax.request({
url: "../tbcforder/orderList?pay=" + value,
async: true,
successCallback: function (r) {
vm.tbCfOrderList = r.tbCfOrderList;
}
});
},*/
/* saveOrUpdate: function (event) {
let url = vm.tbCfOrderList.orderId == null ? "../tbcforder/save" : "../tbcforder/update";
Ajax.request({
url: url,
params: JSON.stringify(vm.tbCfOrderList),
type: "POST",
contentType: "application/json",
successCallback: function (r) {
alert('操作成功', function (index) {
vm.reload();
});
}
});
},*/
/*del: function (event) {
let orderIds = getSelectedRows("#jqGrid");
if (orderIds == null) {
return;
}
confirm('确定要删除选中的记录?', function () {
Ajax.request({
url: "../tbcforder/delete",
params: JSON.stringify(orderIds),
type: "POST",
contentType: "application/json",
successCallback: function () {
alert('操作成功', function (index) {
vm.reload();
});
}
});
});
},*/
/* getInfo: function (orderId) {
Ajax.request({
url: "../tbcforder/info/" + orderId,
async: true,
successCallback: function (r) {
vm.tbCfOrderList = r.tbCfOrderList;
}
});
},*/
reload: function (event) {
vm.showList = true;
let start=vm.value[0];
let end=vm.value[1];
let payWayCode=vm.payWayCode;
let deliveryFlag=vm.deliveryFlag;
let page = $("#jqGrid").jqGrid('getGridParam', 'page');
$("#jqGrid").jqGrid('setGridParam', {
postData: {'name':vm.orderNo,'start':start,'end':end,'payWayCode':payWayCode,'deliveryFlag':deliveryFlag},
page: page
}).trigger("reloadGrid");
vm.handleReset('formValidate');
},
reloadSearch: function() {
vm.deliveryFlag='';
vm.orderNo='';
vm.value='';
vm.payWayCode='';
vm.expressStatus = '';
vm.reload();
},
handleSubmit: function (name) {
handleSubmitValidate(this, name, function () {
vm.saveOrUpdate()
});
},
handleReset: function (name) {
handleResetForm(this, name);
}
}
});
...@@ -8,10 +8,10 @@ $(function () { ...@@ -8,10 +8,10 @@ $(function () {
{label: '第三方平台名', name: 'platformName', index: 'platform_name', width: 80}, {label: '第三方平台名', name: 'platformName', index: 'platform_name', width: 80},
{label: '第三方平台编号', name: 'platformCode', index: 'platform_code', width: 80}, {label: '第三方平台编号', name: 'platformCode', index: 'platform_code', width: 80},
{label: '第三方发货地址', name: 'pDeliveryAddress', index: 'p_delivery_address', width: 80}, {label: '第三方发货地址', name: 'pDeliveryAddress', index: 'p_delivery_address', width: 80},
{label: '代购人', name: 'agentName', index: 'agent_name', width: 80}, {label: '代购人', name: 'userName', index: 'user_name', width: 80},
{label: '代购人id', name: 'agentId', index: 'agent_id', width: 80}, {label: '代购人id', name: 'userId', index: 'user_id', width: 80},
{label: '创建时间', name: 'createTime', index: 'create_time', width: 80}, {label: '创建时间', name: 'createTime', index: 'create_time', width: 80},
{label: '实际付款', name: 'realPay', index: 'real_pay', width: 80}, {label: '实际付款', name: 'realityPay', index: 'reality_pay', width: 80},
{label: '第三方快递单号', name: 'pExpressNumber', index: 'p_express_number', width: 80}] {label: '第三方快递单号', name: 'pExpressNumber', index: 'p_express_number', width: 80}]
}); });
}); });
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</div> </div>
<div class="signup-footer"> <div class="signup-footer">
<div class="pull-left"> <div class="pull-left">
2018~2018 &copy; 抵奥云提供技术支持! 2018~2020 &copy; 抵奥云提供技术支持!
</div> </div>
</div> </div>
</div> </div>
...@@ -79,8 +79,8 @@ ...@@ -79,8 +79,8 @@
var vm = new Vue({ var vm = new Vue({
el: '#loginBox', el: '#loginBox',
data: { data: {
username: 'admin', username: '',//admin
password: 'admin', password: '',//admin
captcha: '', captcha: '',
src: 'captcha.jpg' src: 'captcha.jpg'
}, },
......
/*!
* Datetimepicker for Bootstrap v3
//! version : 3.1.3
* https://github.com/Eonasdan/bootstrap-datetimepicker/
*/
.bootstrap-datetimepicker-widget {
top: 0;
left: 0;
width: 250px;
padding: 4px;
margin-top: 1px;
z-index: 99999 !important;
border-radius: 4px;
}
.bootstrap-datetimepicker-widget.timepicker-sbs {
width: 600px;
}
.bootstrap-datetimepicker-widget.bottom:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #ccc;
border-bottom-color: rgba(0, 0, 0, 0.2);
position: absolute;
top: -7px;
left: 7px;
}
.bootstrap-datetimepicker-widget.bottom:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid white;
position: absolute;
top: -6px;
left: 8px;
}
.bootstrap-datetimepicker-widget.top:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-top: 7px solid #ccc;
border-top-color: rgba(0, 0, 0, 0.2);
position: absolute;
bottom: -7px;
left: 6px;
}
.bootstrap-datetimepicker-widget.top:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-top: 6px solid white;
position: absolute;
bottom: -6px;
left: 7px;
}
.bootstrap-datetimepicker-widget .dow {
width: 14.2857%;
}
.bootstrap-datetimepicker-widget.pull-right:before {
left: auto;
right: 6px;
}
.bootstrap-datetimepicker-widget.pull-right:after {
left: auto;
right: 7px;
}
.bootstrap-datetimepicker-widget > ul {
list-style-type: none;
margin: 0;
}
.bootstrap-datetimepicker-widget a[data-action] {
padding: 6px 0;
}
.bootstrap-datetimepicker-widget a[data-action]:active {
box-shadow: none;
}
.bootstrap-datetimepicker-widget .timepicker-hour,
.bootstrap-datetimepicker-widget .timepicker-minute,
.bootstrap-datetimepicker-widget .timepicker-second {
width: 54px;
font-weight: bold;
font-size: 1.2em;
margin: 0;
}
.bootstrap-datetimepicker-widget button[data-action] {
padding: 6px;
}
.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator {
width: 4px;
padding: 0;
margin: 0;
}
.bootstrap-datetimepicker-widget .datepicker > div {
display: none;
}
.bootstrap-datetimepicker-widget .picker-switch {
text-align: center;
}
.bootstrap-datetimepicker-widget table {
width: 100%;
margin: 0;
}
.bootstrap-datetimepicker-widget td,
.bootstrap-datetimepicker-widget th {
text-align: center;
border-radius: 4px;
}
.bootstrap-datetimepicker-widget td {
height: 54px;
line-height: 54px;
width: 54px;
}
.bootstrap-datetimepicker-widget td.cw {
font-size: 10px;
height: 20px;
line-height: 20px;
color: #777777;
}
.bootstrap-datetimepicker-widget td.day {
height: 20px;
line-height: 20px;
width: 20px;
}
.bootstrap-datetimepicker-widget td.day:hover,
.bootstrap-datetimepicker-widget td.hour:hover,
.bootstrap-datetimepicker-widget td.minute:hover,
.bootstrap-datetimepicker-widget td.second:hover {
background: #eeeeee;
cursor: pointer;
}
.bootstrap-datetimepicker-widget td.old,
.bootstrap-datetimepicker-widget td.new {
color: #777777;
}
.bootstrap-datetimepicker-widget td.today {
position: relative;
}
.bootstrap-datetimepicker-widget td.today:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-bottom: 7px solid #428bca;
border-top-color: rgba(0, 0, 0, 0.2);
position: absolute;
bottom: 4px;
right: 4px;
}
.bootstrap-datetimepicker-widget td.active,
.bootstrap-datetimepicker-widget td.active:hover {
background-color: #428bca;
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.bootstrap-datetimepicker-widget td.active.today:before {
border-bottom-color: #fff;
}
.bootstrap-datetimepicker-widget td.disabled,
.bootstrap-datetimepicker-widget td.disabled:hover {
background: none;
color: #777777;
cursor: not-allowed;
}
.bootstrap-datetimepicker-widget td span {
display: inline-block;
width: 54px;
height: 54px;
line-height: 54px;
margin: 2px 1.5px;
cursor: pointer;
border-radius: 4px;
}
.bootstrap-datetimepicker-widget td span:hover {
background: #eeeeee;
}
.bootstrap-datetimepicker-widget td span.active {
background-color: #428bca;
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.bootstrap-datetimepicker-widget td span.old {
color: #777777;
}
.bootstrap-datetimepicker-widget td span.disabled,
.bootstrap-datetimepicker-widget td span.disabled:hover {
background: none;
color: #777777;
cursor: not-allowed;
}
.bootstrap-datetimepicker-widget th {
height: 20px;
line-height: 20px;
width: 20px;
}
.bootstrap-datetimepicker-widget th.picker-switch {
width: 145px;
}
.bootstrap-datetimepicker-widget th.next,
.bootstrap-datetimepicker-widget th.prev {
font-size: 21px;
}
.bootstrap-datetimepicker-widget th.disabled,
.bootstrap-datetimepicker-widget th.disabled:hover {
background: none;
color: #777777;
cursor: not-allowed;
}
.bootstrap-datetimepicker-widget thead tr:first-child th {
cursor: pointer;
}
.bootstrap-datetimepicker-widget thead tr:first-child th:hover {
background: #eeeeee;
}
.input-group.date .input-group-addon span {
display: block;
cursor: pointer;
width: 16px;
height: 16px;
}
.bootstrap-datetimepicker-widget.left-oriented:before {
left: auto;
right: 6px;
}
.bootstrap-datetimepicker-widget.left-oriented:after {
left: auto;
right: 7px;
}
.bootstrap-datetimepicker-widget ul.list-unstyled li div.timepicker div.timepicker-picker table.table-condensed tbody > tr > td {
padding: 0px !important;
}
@media screen and (max-width: 767px) {
.bootstrap-datetimepicker-widget.timepicker-sbs {
width: 283px;
}
}
/*!
* Timepicker Component for Twitter Bootstrap
*
* Copyright 2013 Joris de Wit
*
* Contributors https://github.com/jdewit/bootstrap-timepicker/graphs/contributors
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
.bootstrap-timepicker {
position: relative;
}
.bootstrap-timepicker.pull-right .bootstrap-timepicker-widget.dropdown-menu {
left: auto;
right: 0;
}
.bootstrap-timepicker.pull-right .bootstrap-timepicker-widget.dropdown-menu:before {
left: auto;
right: 12px;
}
.bootstrap-timepicker.pull-right .bootstrap-timepicker-widget.dropdown-menu:after {
left: auto;
right: 13px;
}
.bootstrap-timepicker .add-on {
cursor: pointer;
}
.bootstrap-timepicker .add-on i {
display: inline-block;
width: 16px;
height: 16px;
}
.bootstrap-timepicker-widget.dropdown-menu {
padding: 4px;
}
.bootstrap-timepicker-widget.dropdown-menu.open {
display: inline-block;
}
.bootstrap-timepicker-widget.dropdown-menu:before {
border-bottom: 7px solid rgba(0, 0, 0, 0.2);
border-left: 7px solid transparent;
border-right: 7px solid transparent;
content: "";
display: inline-block;
position: absolute;
}
.bootstrap-timepicker-widget.dropdown-menu:after {
border-bottom: 6px solid #FFFFFF;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
content: "";
display: inline-block;
position: absolute;
}
.bootstrap-timepicker-widget.timepicker-orient-left:before {
left: 6px;
}
.bootstrap-timepicker-widget.timepicker-orient-left:after {
left: 7px;
}
.bootstrap-timepicker-widget.timepicker-orient-right:before {
right: 6px;
}
.bootstrap-timepicker-widget.timepicker-orient-right:after {
right: 7px;
}
.bootstrap-timepicker-widget.timepicker-orient-top:before {
top: -7px;
}
.bootstrap-timepicker-widget.timepicker-orient-top:after {
top: -6px;
}
.bootstrap-timepicker-widget.timepicker-orient-bottom:before {
bottom: -7px;
border-bottom: 0;
border-top: 7px solid #999;
}
.bootstrap-timepicker-widget.timepicker-orient-bottom:after {
bottom: -6px;
border-bottom: 0;
border-top: 6px solid #ffffff;
}
.bootstrap-timepicker-widget a.btn,
.bootstrap-timepicker-widget input {
border-radius: 4px;
}
.bootstrap-timepicker-widget table {
width: 100%;
margin: 0;
}
.bootstrap-timepicker-widget table td {
text-align: center;
height: 30px;
margin: 0;
padding: 2px;
}
.bootstrap-timepicker-widget table td:not(.separator) {
min-width: 30px;
}
.bootstrap-timepicker-widget table td span {
width: 100%;
}
.bootstrap-timepicker-widget table td a {
border: 1px transparent solid;
width: 100%;
display: inline-block;
margin: 0;
padding: 8px 0;
outline: 0;
color: #333;
}
.bootstrap-timepicker-widget table td a:hover {
text-decoration: none;
background-color: #eee;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
border-color: #ddd;
}
.bootstrap-timepicker-widget table td a i {
margin-top: 2px;
font-size: 18px;
}
.bootstrap-timepicker-widget table td input {
width: 25px;
margin: 0;
text-align: center;
}
.bootstrap-timepicker-widget .modal-content {
padding: 4px;
}
@media (min-width: 767px) {
.bootstrap-timepicker-widget.modal {
width: 200px;
margin-left: -100px;
}
}
@media (max-width: 767px) {
.bootstrap-timepicker {
width: 100%;
}
.bootstrap-timepicker .dropdown-menu {
width: 100%;
}
}
...@@ -4147,7 +4147,7 @@ tbody.collapse.in { ...@@ -4147,7 +4147,7 @@ tbody.collapse.in {
position: relative; position: relative;
z-index: 2; z-index: 2;
float: left; float: left;
width: 100%; width: 10%;
margin-bottom: 0 margin-bottom: 0
} }
......
...@@ -101,13 +101,20 @@ tbody > tr > th { ...@@ -101,13 +101,20 @@ tbody > tr > th {
} }
.search-group { .search-group {
padding-left: 10px; display:inline;
padding-left: 6px;
padding-top: 5px; padding-top: 5px;
}
.block {
display:inline; display:inline;
/*float: right;*/
padding-right: 10px;
padding-left: 10px;
} }
.buttons-group { .buttons-group {
display:inline; display:inline;
/*float: right;*/ /*float: right;*/
padding-right: 10px; padding-right: 10px;
padding-left: 50px; padding-left: 30px;
} }
\ No newline at end of file
...@@ -32,4 +32,11 @@ public interface SysUserDao extends BaseDao<SysUserEntity> { ...@@ -32,4 +32,11 @@ public interface SysUserDao extends BaseDao<SysUserEntity> {
* 修改密码 * 修改密码
*/ */
int updatePassword(Map<String, Object> map); int updatePassword(Map<String, Object> map);
/**
* 根据id查询用户名
* @param userId
* @return
*/
String queryById(String userId);
} }
...@@ -8,12 +8,14 @@ package com.platform.enums; ...@@ -8,12 +8,14 @@ package com.platform.enums;
*/ */
public enum DeliveryStatusEnum implements EnumItemable<DeliveryStatusEnum> { public enum DeliveryStatusEnum implements EnumItemable<DeliveryStatusEnum> {
/**
* 代购及物流状态
*/
PROCESSING("等待处理", 0), PROCESSING("等待处理", 0),
PURCHASE("已经代购", 10), PURCHASE("已采购并发货", 10),
ON_LOAD("正在配送", 20), ON_LOAD("已到达中国仓", 20),
WAREHOUSE("已到达中国仓", 30), ON_AFRICA("已到达非洲仓", 40),
ON_AFRICA("正运往非洲", 40), ARRIVALS("买家已签收", 50);
ARRIVALS("到达", 50);
private String label; private String label;
private Integer value; private Integer value;
......
...@@ -22,8 +22,8 @@ public class PageUtils implements Serializable { ...@@ -22,8 +22,8 @@ public class PageUtils implements Serializable {
/** /**
* 分页 * 分页
* * @param list 列表数据
* @param list 列表数据 * @param totalPay
* @param totalCount 总记录数 * @param totalCount 总记录数
* @param pageSize 每页记录数 * @param pageSize 每页记录数
* @param currPage 当前页数 * @param currPage 当前页数
......
...@@ -8,6 +8,7 @@ import java.io.PrintWriter; ...@@ -8,6 +8,7 @@ import java.io.PrintWriter;
import java.net.HttpURLConnection; import java.net.HttpURLConnection;
import java.net.URL; import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
...@@ -146,8 +147,8 @@ public class HttpUtils { ...@@ -146,8 +147,8 @@ public class HttpUtils {
// 打开URL连接 // 打开URL连接
HttpURLConnection httpConn = (HttpURLConnection) connURL HttpURLConnection httpConn = (HttpURLConnection) connURL
.openConnection(); .openConnection();
// 设置通用属性 // 设置通用属性
httpConn.setRequestProperty("Accept", "*/*"); httpConn.setRequestProperty("Accept", "*/*");
httpConn.setRequestProperty("Connection", "Keep-Alive"); httpConn.setRequestProperty("Connection", "Keep-Alive");
httpConn.setRequestProperty("User-Agent", httpConn.setRequestProperty("User-Agent",
"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)"); "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)");
...@@ -382,13 +383,13 @@ public class HttpUtils { ...@@ -382,13 +383,13 @@ public class HttpUtils {
* *
* @param args * @param args
*/ */
// public static void main(String[] args) { // public static void main(String[] args) {
// Map<String, String> parameters = new HashMap<String, String>(); // Map<String, String> parameters = new HashMap<String, String>();
// parameters.put("name", "sarin"); // parameters.put("name", "sarin");
// String result =sendGet("http://www.baidu.com", parameters); // String result =sendGet("http://www.baidu.com", parameters);
// System.out.println(result); // System.out.println(result);
// } // }
//
/** /**
* 获取网络图片流 * 获取网络图片流
* *
......
...@@ -125,5 +125,7 @@ ...@@ -125,5 +125,7 @@
#{userId} #{userId}
</foreach> </foreach>
</delete> </delete>
<select id="queryById" resultType="string">
select user_name from sys_user where user_id=#{id}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -46,7 +46,7 @@ public class SysGeneratorController { ...@@ -46,7 +46,7 @@ public class SysGeneratorController {
List<Map<String, Object>> list = sysGeneratorService.queryList(query); List<Map<String, Object>> list = sysGeneratorService.queryList(query);
int total = sysGeneratorService.queryTotal(query); int total = sysGeneratorService.queryTotal(query);
PageUtils pageUtil = new PageUtils(list, total, query.getLimit(), query.getPage()); PageUtils pageUtil = new PageUtils(list,total, query.getLimit(), query.getPage());
return R.ok().put("page", pageUtil); return R.ok().put("page", pageUtil);
} }
......
...@@ -7,7 +7,6 @@ import com.platform.utils.Query; ...@@ -7,7 +7,6 @@ import com.platform.utils.Query;
import com.platform.utils.R; import com.platform.utils.R;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -42,7 +41,7 @@ public class ${className}Controller { ...@@ -42,7 +41,7 @@ public class ${className}Controller {
List<${className}Entity> ${classname}List = ${classname}Service.queryList(query); List<${className}Entity> ${classname}List = ${classname}Service.queryList(query);
int total = ${classname}Service.queryTotal(query); int total = ${classname}Service.queryTotal(query);
PageUtils pageUtil = new PageUtils(${classname}List, total, query.getLimit(), query.getPage()); PageUtils pageUtil = new PageUtils(${classname}List, totalPay, total, query.getLimit(), query.getPage());
return R.ok().put("page", pageUtil); return R.ok().put("page", pageUtil);
} }
......
...@@ -38,7 +38,7 @@ public class ScheduleJobLogController { ...@@ -38,7 +38,7 @@ public class ScheduleJobLogController {
List<ScheduleJobLogEntity> jobList = scheduleJobLogService.queryList(query); List<ScheduleJobLogEntity> jobList = scheduleJobLogService.queryList(query);
int total = scheduleJobLogService.queryTotal(query); int total = scheduleJobLogService.queryTotal(query);
PageUtils pageUtil = new PageUtils(jobList, total, query.getLimit(), query.getPage()); PageUtils pageUtil = new PageUtils(jobList, total, query.getLimit(), query.getPage());
return R.ok().put("page", pageUtil); return R.ok().put("page", pageUtil);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论