Merge branch 'score-shop' of http://120.27.238.55:7000/r/xzx into score-shop
2 files added
7 files modified
| | |
| | | import com.xzx.gc.model.JsonResult; |
| | | import com.xzx.gc.shop.dto.QueryGoodsListDto; |
| | | import com.xzx.gc.shop.dto.QueryJhyOrderListDto; |
| | | import com.xzx.gc.shop.dto.ViewGoodsDto; |
| | | import com.xzx.gc.shop.dto.ViewJhyOrderDto; |
| | | import com.xzx.gc.shop.service.JhyService; |
| | | import com.xzx.gc.shop.vo.QueryGoodsListVo; |
| | | import com.xzx.gc.shop.vo.QueryJhyOrderListVo; |
| | | import com.xzx.gc.shop.vo.QueryOrderListVo; |
| | | import com.xzx.gc.shop.vo.*; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | |
| | | return JsonResult.success(result); |
| | | } |
| | | |
| | | /** |
| | | * 查看商品详情 |
| | | */ |
| | | @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/score/jhy/viewJhyOrder.json") |
| | | @ApiResponses({@ApiResponse( code = 200, message = "success", response = ViewJhyOrderVo.class)}) |
| | | @ApiOperation(value="集物员管理-查看订单详情", notes="test: 仅0有正确返回") |
| | | public JsonResult<ViewJhyOrderVo> viewJhyOrder(@RequestBody ViewJhyOrderDto viewJhyOrderDto) { |
| | | Long id = viewJhyOrderDto.getId(); |
| | | ViewJhyOrderVo viewJhyOrderVo = jhyService.viewJhyOrder(id); |
| | | return JsonResult.success(viewJhyOrderVo); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.xzx.gc.shop.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ViewJhyOrderDto { |
| | | |
| | | private Long id; |
| | | } |
| | |
| | | package com.xzx.gc.shop.service; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.convert.Convert; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.xzx.gc.common.utils.StringUtils; |
| | | import com.xzx.gc.shop.dto.QueryJhyOrderListDto; |
| | | import com.xzx.gc.shop.mapper.JhyOrderMapper; |
| | | import com.xzx.gc.shop.vo.QueryGoodsListVo; |
| | | import com.xzx.gc.shop.vo.QueryJhyOrderListVo; |
| | | import com.xzx.gc.shop.vo.QueryScoreDetailsListVo; |
| | | import com.xzx.gc.shop.vo.ViewJhyOrderVo; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | public Map<String, Object> queryOrderList(QueryJhyOrderListDto model) { |
| | | PageHelper.startPage(model.getPage(), model.getLimit()); |
| | | List<QueryJhyOrderListVo> maps = jhyOrderMapper.queryOrderList(model); |
| | | if(CollUtil.isNotEmpty(maps)){ |
| | | for(QueryJhyOrderListVo queryJhyOrderListVo : maps){ |
| | | String decode = StringUtils.decode(queryJhyOrderListVo.getName()); |
| | | queryJhyOrderListVo.setName(decode); |
| | | } |
| | | } |
| | | PageInfo pageInfo = new PageInfo(maps); |
| | | int count = Convert.toInt(pageInfo.getTotal()); |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | return map; |
| | | } |
| | | |
| | | public ViewJhyOrderVo viewJhyOrder(Long id) { |
| | | ViewJhyOrderVo viewJhyOrderVo = new ViewJhyOrderVo(); |
| | | |
| | | return viewJhyOrderVo; |
| | | } |
| | | } |
| | |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.xzx.gc.common.utils.StringUtils; |
| | | import com.xzx.gc.common.constant.Constants; |
| | | import com.xzx.gc.common.exception.RestException; |
| | | import com.xzx.gc.common.utils.IdUtils; |
| | |
| | | Date createdTimeEnd = model.getCreatedTimeEnd(); |
| | | PageHelper.startPage(model.getPage(), model.getLimit()); |
| | | List<QueryOrderListVo> maps = scoreOrderMapper.queryOrderList(name,orderNo,status,createdTimeStart,createdTimeEnd); |
| | | if(CollUtil.isNotEmpty(maps)){ |
| | | for(QueryOrderListVo queryOrderListVo : maps){ |
| | | String decode = StringUtils.decode(queryOrderListVo.getName()); |
| | | queryOrderListVo.setName(decode); |
| | | } |
| | | } |
| | | PageInfo pageInfo = new PageInfo(maps); |
| | | int count = Convert.toInt(pageInfo.getTotal()); |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | viewOrderVo.setVoucherImgs(lists); |
| | | //2-待收货3-已收货4-已完成5-已评价,获取物流信息 |
| | | Integer status = scoreOrder.getStatus() == null ? 0:scoreOrder.getStatus(); |
| | | if(ScoreOrder.STATUS_DOING == status |
| | | || ScoreOrder.STATUS_DONE == status |
| | | || ScoreOrder.STATUS_ON == status |
| | | || ScoreOrder.STATUS_EVALUATE == status){ |
| | | // if(ScoreOrder.STATUS_DOING == status |
| | | // || ScoreOrder.STATUS_DONE == status |
| | | // || ScoreOrder.STATUS_ON == status |
| | | // || ScoreOrder.STATUS_EVALUATE == status){ |
| | | Example exampleExpress = new Example(ScoreExpressInfo.class); |
| | | Example.Criteria criteriaExpress = exampleExpress.createCriteria(); |
| | | criteriaExpress.andEqualTo("orderId",id); |
| | | ScoreExpressInfo scoreExpressInfo = scoreExpressInfoMapper.selectOneByExample(exampleExpress); |
| | | ExpressInfoVo expressInfoVo = objectMapper.convertValue(scoreExpressInfo, ExpressInfoVo.class); |
| | | viewOrderVo.setExpressInfoVo(expressInfoVo); |
| | | } |
| | | // } |
| | | //订单详情 |
| | | Example exampleDetails = new Example(ScoreOrderDetails.class); |
| | | Example.Criteria criteriaDetails = exampleDetails.createCriteria(); |
| | |
| | | package com.xzx.gc.shop.service; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.convert.Convert; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.xzx.gc.common.utils.StringUtils; |
| | | import com.xzx.gc.shop.dto.QueryScoreDetailsListDto; |
| | | import com.xzx.gc.shop.mapper.ScoreDetailsMapper; |
| | | import com.xzx.gc.shop.vo.QueryOrderListVo; |
| | |
| | | public Map<String, Object> queryScoreDetailsList(QueryScoreDetailsListDto model) { |
| | | PageHelper.startPage(model.getPage(), model.getLimit()); |
| | | List<QueryScoreDetailsListVo> maps = scoreDetailsMapper.queryScoreDetailsList(model); |
| | | if(CollUtil.isNotEmpty(maps)){ |
| | | for(QueryScoreDetailsListVo queryScoreDetailsListVo : maps){ |
| | | String decode = StringUtils.decode(queryScoreDetailsListVo.getName()); |
| | | queryScoreDetailsListVo.setName(decode); |
| | | } |
| | | } |
| | | PageInfo pageInfo = new PageInfo(maps); |
| | | int count = Convert.toInt(pageInfo.getTotal()); |
| | | Map<String, Object> map = new HashMap<>(); |
New file |
| | |
| | | package com.xzx.gc.shop.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "ViewJhyOrderVo", description = "订单") |
| | | public class ViewJhyOrderVo { |
| | | |
| | | // @ApiModelProperty(value="订单编号") |
| | | // private String order_no; |
| | | // |
| | | // @ApiModelProperty(value="收件人") |
| | | // private String nick_name; |
| | | // |
| | | // @ApiModelProperty(value="电话号码") |
| | | // private String mobile_phone; |
| | | // |
| | | // @ApiModelProperty(value="地址") |
| | | // private String areaAddress; |
| | | // |
| | | // @ApiModelProperty(value="预约年月日") |
| | | // private String reserve_date; |
| | | // @ApiModelProperty(value="预约时间") |
| | | // private String reserve_time; |
| | | // |
| | | // @ApiModelProperty(value="订单状态") |
| | | // private String orderNo; |
| | | // |
| | | // @ApiModelProperty(value="集物员") |
| | | // private String orderNo; |
| | | // |
| | | // @ApiModelProperty(value="集物员联系方式") |
| | | // private String orderNo; |
| | | // |
| | | // @ApiModelProperty(value="收货时间") |
| | | // private String orderNo; |
| | | // |
| | | // @ApiModelProperty(value="备注") |
| | | // private String orderNo; |
| | | // |
| | | // @ApiModelProperty(value="评论") |
| | | // private String orderNo; |
| | | // @ApiModelProperty(value="得分 0-0分1-20分2-40分3-60分4-80分5-100分") |
| | | // private String score; |
| | | // @ApiModelProperty(value="是否匿名 1-是2-否") |
| | | // private String is_anonymous; |
| | | } |
| | |
| | | a.order_no orderNo, |
| | | a.area area, |
| | | a.address address, |
| | | CONVERT(varchar(100), reserve_date, 23) reserveDate, |
| | | a.reserve_time reserveTime, |
| | | a.status status, |
| | | a.remark remark, |
| | | b.name name, |
| | | b.nick_name name, |
| | | b.mobile_phone mobilePhone, |
| | | (select ifnull(sum(price),0) from xzx_jhy_order_items where order_id = a.id) totalPrice, |
| | | d.username username |
| | |
| | | and a.status = #{record.status} |
| | | </if> |
| | | <if test="record.account != null and record.account != ''"> |
| | | and ( b.name like concat('%',#{record.account},'%') |
| | | and ( b.nick_name like concat('%',#{record.account},'%') |
| | | or b.mobile_phone like concat('%',#{record.account},'%') ) |
| | | </if> |
| | | <if test="record.reserveTimeStart != null"> |
| | |
| | | <select id="queryScoreDetailsList" resultType="com.xzx.gc.shop.vo.QueryScoreDetailsListVo"> |
| | | SELECT |
| | | a.*, |
| | | b.nick_name name, |
| | | a.CREATED_TIME createTime |
| | | FROM |
| | | xzx_score_details a |
| | |
| | | SELECT |
| | | a.*, |
| | | a.CREATED_TIME createTime, |
| | | b.name name, |
| | | b.nick_name name, |
| | | b.mobile_phone phone, |
| | | d.express_com expressCom, |
| | | d.express_no expressNo |
| | |
| | | </if> |
| | | |
| | | <if test="name != null and name != ''"> |
| | | and b.name like concat('%',#{name},'%') |
| | | and b.nick_name like concat('%',#{name},'%') |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | and a.status = #{status} |