| | |
| | | INSERT INTO SYSTEM_PERMISSION(CODE, NAME, REMARK, FIXED, CREATE_USER, CREATE_TIME, UPDATE_USER, UPDATE_TIME, DELETED) VALUES ('business:baseparam:create', 'æ°å»ºç³»ç»åºç¡é
置表', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO SYSTEM_PERMISSION(CODE, NAME, REMARK, FIXED, CREATE_USER, CREATE_TIME, UPDATE_USER, UPDATE_TIME, DELETED) VALUES ('business:baseparam:delete', 'å é¤ç³»ç»åºç¡é
置表', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO SYSTEM_PERMISSION(CODE, NAME, REMARK, FIXED, CREATE_USER, CREATE_TIME, UPDATE_USER, UPDATE_TIME, DELETED) VALUES ('business:baseparam:update', 'ä¿®æ¹ç³»ç»åºç¡é
置表', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO SYSTEM_PERMISSION(CODE, NAME, REMARK, FIXED, CREATE_USER, CREATE_TIME, UPDATE_USER, UPDATE_TIME, DELETED) VALUES ('business:baseparam:query', 'æ¥è¯¢ç³»ç»åºç¡é
置表', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO SYSTEM_PERMISSION(CODE, NAME, REMARK, FIXED, CREATE_USER, CREATE_TIME, UPDATE_USER, UPDATE_TIME, DELETED) VALUES ('business:baseparam:exportExcel', '导åºç³»ç»åºç¡é
置表(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO SYSTEM_PERMISSION(CODE, NAME, REMARK, FIXED, CREATE_USER, CREATE_TIME, UPDATE_USER, UPDATE_TIME, DELETED) VALUES ('business:baseparam:create', 'æ°å»ºç³»ç»åºç¡é
置表', '', 0, 'd481dca5-7f09-49b2-a152-8dac1c2029df', CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO SYSTEM_PERMISSION(CODE, NAME, REMARK, FIXED, CREATE_USER, CREATE_TIME, UPDATE_USER, UPDATE_TIME, DELETED) VALUES ('business:baseparam:delete', 'å é¤ç³»ç»åºç¡é
置表', '', 0, 'd481dca5-7f09-49b2-a152-8dac1c2029df', CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO SYSTEM_PERMISSION(CODE, NAME, REMARK, FIXED, CREATE_USER, CREATE_TIME, UPDATE_USER, UPDATE_TIME, DELETED) VALUES ('business:baseparam:update', 'ä¿®æ¹ç³»ç»åºç¡é
置表', '', 0, 'd481dca5-7f09-49b2-a152-8dac1c2029df', CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO SYSTEM_PERMISSION(CODE, NAME, REMARK, FIXED, CREATE_USER, CREATE_TIME, UPDATE_USER, UPDATE_TIME, DELETED) VALUES ('business:baseparam:query', 'æ¥è¯¢ç³»ç»åºç¡é
置表', '', 0, 'd481dca5-7f09-49b2-a152-8dac1c2029df', CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO SYSTEM_PERMISSION(CODE, NAME, REMARK, FIXED, CREATE_USER, CREATE_TIME, UPDATE_USER, UPDATE_TIME, DELETED) VALUES ('business:baseparam:exportExcel', '导åºç³»ç»åºç¡é
置表(Excel)', '', 0, 'd481dca5-7f09-49b2-a152-8dac1c2029df', CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | |
| | |
| | | public static final Integer ZERO = 0 ; |
| | | public static final Integer ONE = 1 ; |
| | | public static final Integer TWO = 2 ; |
| | | public static final Integer THREE = 3 ; |
| | | |
| | | public static int formatIntegerNum(Integer num){ |
| | | if(num == null){ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.join; |
| | | |
| | | import com.doumee.dao.business.model.MemberRides; |
| | | import com.github.yulichang.base.mapper.MPJJoinMapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | /** |
| | | * @author T14 |
| | | */ |
| | | @Repository |
| | | public interface MemberRidesJoinMapper extends MPJJoinMapper<MemberRides> { |
| | | } |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å·²å é¤ 0æªå é¤ 1å·²å é¤", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å·²å é¤ 0æªå é¤ 1å·²å é¤") |
| | | @TableLogic |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | |
| | | |
| | | @ApiModelProperty(value = "æ¯ä»æ¹å¼ 0微信 1æ¯ä»å®") |
| | | @ExcelColumn(name="æ¯ä»æ¹å¼ 0微信 1æ¯ä»å®") |
| | | private String payWay; |
| | | private Integer payWay; |
| | | |
| | | @ApiModelProperty(value = "æ¯ä»æ¶é´") |
| | | @ExcelColumn(name="æ¯ä»æ¶é´") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å·²å é¤ 0æªå é¤ 1å·²å é¤", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å·²å é¤ 0æªå é¤ 1å·²å é¤") |
| | | @TableLogic |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | |
| | | @ApiModelProperty(value = "ç¨æ·ç¼ç ") |
| | | @ExcelColumn(name="ç¨æ·ç¼ç ") |
| | | private String memberId; |
| | | |
| | | @ApiModelProperty(value = "ç¨æ·OpenId") |
| | | @ExcelColumn(name="ç¨æ·OpenId") |
| | | @TableField(exist = false) |
| | | private String memberOpenid; |
| | | |
| | | |
| | | @ApiModelProperty(value = "车è¾ç¼ç ") |
| | | @ExcelColumn(name="车è¾ç¼ç ") |
| | |
| | | @ExcelColumn(name="车è¾ç±»åç¼ç ") |
| | | private String paramId; |
| | | |
| | | @ApiModelProperty(value = "车è¾ç±»ååç§°") |
| | | @ExcelColumn(name="车è¾ç±»ååç§°") |
| | | @TableField(exist = false) |
| | | private String paramName; |
| | | |
| | | @ApiModelProperty(value = "ç§è½¦ç«ç¹ç¼ç ") |
| | | @ExcelColumn(name="ç§è½¦ç«ç¹ç¼ç ") |
| | | private String rentSiteId; |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å·²å é¤ 0æªå é¤ 1å·²å é¤", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å·²å é¤ 0æªå é¤ 1å·²å é¤") |
| | | @TableLogic |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.web.response; |
| | | |
| | | import com.doumee.dao.business.model.MemberRides; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author T14 |
| | | */ |
| | | @Data |
| | | @ApiModel("订å详æ
") |
| | | public class GoodsorderDetailDTO { |
| | | |
| | | @ApiModelProperty(value = "æ¯ä»æç»") |
| | | private List<PayOrderDTO> payOrderDTOList; |
| | | |
| | | @ApiModelProperty(value = "éªè¡è®°å½") |
| | | private List<MemberRides> memberRidesList; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.web.response; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author T14 |
| | | */ |
| | | @Data |
| | | @ApiModel("交ææç»") |
| | | public class PayOrderDTO { |
| | | |
| | | private String orderCode; |
| | | |
| | | private Integer payType; |
| | | |
| | | private Integer refundType; |
| | | |
| | | private BigDecimal money; |
| | | |
| | | private Date payDate; |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.Bikes; |
| | | import com.doumee.dao.business.model.Goodsorder; |
| | | import com.doumee.dao.business.web.response.GoodsorderDetailDTO; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @return long |
| | | */ |
| | | long count(Goodsorder goodsorder); |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢è®¢å详æ
|
| | | * @param id |
| | | * @return |
| | | */ |
| | | GoodsorderDetailDTO getGoodsorderDetailDTO(String id); |
| | | |
| | | |
| | | /** |
| | | * 强å¶ç»ç®è®¢å |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Goodsorder closerGoodsorder(String id); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.doumee.core.constants.Constants; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.Constants; |
| | | import com.doumee.core.model.PageData; |
| | |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.GoodsorderMapper; |
| | | import com.doumee.dao.business.MemberRidesMapper; |
| | | import com.doumee.dao.business.MemberRidesMapper; |
| | | import com.doumee.dao.business.RefundMapper; |
| | | import com.doumee.dao.business.join.GoodsorderJoinMapper; |
| | | import com.doumee.dao.business.model.Bikes; |
| | | import com.doumee.dao.business.model.Goodsorder; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.MemberRides; |
| | | import com.doumee.dao.business.web.response.HomeResponse; |
| | | import com.doumee.dao.business.join.MemberRidesJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.business.web.response.GoodsorderDetailDTO; |
| | | import com.doumee.dao.business.web.response.PayOrderDTO; |
| | | import com.doumee.service.business.GoodsorderService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private MemberRidesMapper memberRidesMapper; |
| | | |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private RefundMapper refundMapper; |
| | | |
| | | @Autowired |
| | | private MemberRidesJoinMapper memberRidesJoinMapper; |
| | | |
| | | @Override |
| | | public String create(Goodsorder goodsorder) { |
| | |
| | | MPJLambdaWrapper<Goodsorder> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | |
| | | |
| | | if (pageWrap.getModel().getCode() != null) { |
| | | queryWrapper.like(Goodsorder::getCode, pageWrap.getModel().getCode()); |
| | | } |
| | |
| | | if (pageWrap.getModel().getStatus() != null) { |
| | | queryWrapper.eq(Goodsorder::getStatus, pageWrap.getModel().getStatus()); |
| | | } |
| | | |
| | | |
| | | if (pageWrap.getModel().getOnlineOrderid() != null) { |
| | | queryWrapper.eq(Goodsorder::getOnlineOrderid, pageWrap.getModel().getOnlineOrderid()); |
| | |
| | | .selectAs(Member::getName,Goodsorder::getMemberName) |
| | | .leftJoin(Member.class,Member::getId,Goodsorder::getMemberId) |
| | | .like(StringUtils.isNotBlank(pageWrap.getModel().getMemberName()),Member::getName,pageWrap.getModel().getMemberName()); |
| | | |
| | | return PageData.from(goodsorderJoinMapper.selectJoinPage(page, Goodsorder.class,queryWrapper)); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public GoodsorderDetailDTO getGoodsorderDetailDTO(String id) { |
| | | |
| | | List<PayOrderDTO> payOrderDTOList = new ArrayList<>(); |
| | | Goodsorder goodsorder = goodsorderMapper.selectById(id); |
| | | QueryWrapper<Refund> refundQuery = new QueryWrapper<>(); |
| | | refundQuery.lambda() |
| | | .eq(Refund::getObjId,id); |
| | | List<Refund> refunds = refundMapper.selectList(refundQuery); |
| | | |
| | | PayOrderDTO payOrderDTO = new PayOrderDTO(); |
| | | payOrderDTO.setOrderCode(goodsorder.getCode()); |
| | | payOrderDTO.setPayType(goodsorder.getPayWay()); |
| | | payOrderDTO.setMoney(goodsorder.getMoney()); |
| | | payOrderDTO.setPayDate(goodsorder.getPayDate()); |
| | | payOrderDTOList.add(0,payOrderDTO); |
| | | if (!CollectionUtils.isEmpty(refunds)){ |
| | | refunds.forEach(s->{ |
| | | PayOrderDTO refundOrderDTO = new PayOrderDTO(); |
| | | refundOrderDTO.setOrderCode(s.getCode()); |
| | | refundOrderDTO.setPayType(s.getPayWay()); |
| | | refundOrderDTO.setMoney(s.getMoney()); |
| | | refundOrderDTO.setPayDate(s.getDoneDate()); |
| | | payOrderDTOList.add(refundOrderDTO); |
| | | }); |
| | | } |
| | | MPJLambdaWrapper<MemberRides> wrapper = new MPJLambdaWrapper<>(); |
| | | wrapper.leftJoin(BaseParam.class,BaseParam::getId,MemberRides::getParamId) |
| | | .eq(BaseParam::getType, Constants.THREE); |
| | | List<MemberRides> memberRides = memberRidesJoinMapper.selectJoinList(MemberRides.class, wrapper); |
| | | GoodsorderDetailDTO goodsorderDetailDTO = new GoodsorderDetailDTO(); |
| | | goodsorderDetailDTO.setPayOrderDTOList(payOrderDTOList); |
| | | goodsorderDetailDTO.setMemberRidesList(memberRides); |
| | | return goodsorderDetailDTO; |
| | | } |
| | | |
| | | @Override |
| | | public Goodsorder closerGoodsorder(String id) { |
| | | |
| | | Goodsorder goodsorder = goodsorderMapper.selectById(id); |
| | | |
| | | |
| | | |
| | | return null; |
| | | } |
| | | } |