Commit 0ae9b4cb authored by hanfeng's avatar hanfeng

Merge branch 'base-modify' of http://10.5.52.3/youjj/cloud-platform into base-modify

parents 8c1bc421 cf68aea7
package com.github.wxiaoqi.security.admin.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
/**
* 支付宝账号表
*/
@Table(name = "app_user_alipay")
@Data
public class AppUserAlipay {
@Id
@GeneratedValue(generator = "JDBC")//此处加上注解
private Integer id;
@ApiModelProperty("用户id")
@Column(name = "user_id")
private Integer userId;
@ApiModelProperty("支付宝账号")
@Column(name = "tx_alipay")
private String txAlipay;
@ApiModelProperty("0-否;1-是")
@Column(name = "is_default")
private Integer isDefault;
@ApiModelProperty("创建时间")
@Column(name = "crt_time")
private Long crtTime;
@ApiModelProperty("是否删除;0-正常;1-删除")
@Column(name = "is_del")
private Integer isDel;
}
\ No newline at end of file
...@@ -19,8 +19,8 @@ import lombok.Data; ...@@ -19,8 +19,8 @@ import lombok.Data;
@Table(name = "my_wallet") @Table(name = "my_wallet")
public class MyWallet implements Serializable { public class MyWallet implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* id * id
*/ */
@Column(name = "id") @Column(name = "id")
...@@ -34,15 +34,23 @@ public class MyWallet implements Serializable { ...@@ -34,15 +34,23 @@ public class MyWallet implements Serializable {
@GeneratedValue(generator = "JDBC") @GeneratedValue(generator = "JDBC")
@ApiModelProperty("用户ID") @ApiModelProperty("用户ID")
private Integer userId; private Integer userId;
/**
* 余额(分)
*/
@Column(name = "balance")
@ApiModelProperty(value = "余额(元)")
private BigDecimal balance;
/** /**
* 余额(分) * 支付密码
*/ */
@Column(name = "balance") @Column(name = "pay_password")
@ApiModelProperty(value = "余额(元)") @ApiModelProperty(value = "支付密码")
private BigDecimal balance; private String payPassword;
/** /**
* 已提现金额 * 已提现金额
*/ */
@Column(name = "withdrawals") @Column(name = "withdrawals")
......
...@@ -12,6 +12,7 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; ...@@ -12,6 +12,7 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.util.process.ResultCode; import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.github.wxiaoqi.security.common.vo.PageDataVO; import com.github.wxiaoqi.security.common.vo.PageDataVO;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.aop.framework.AopContext; import org.springframework.aop.framework.AopContext;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -46,6 +47,9 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel ...@@ -46,6 +47,9 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel
@Value("${temamember.failureTime:60}") @Value("${temamember.failureTime:60}")
private Long failureTime; private Long failureTime;
@Autowired
private AppUserDetailBiz appUserDetailBiz;
/** /**
* 关系绑定 * 关系绑定
* @param userId * @param userId
...@@ -76,6 +80,23 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel ...@@ -76,6 +80,23 @@ public class AppUserRelationBiz extends BaseBiz<AppUserRelationMapper,AppUserRel
} }
} }
} }
//首页关系绑定
public ObjectRestResponse appBindRelation(Integer userId,String code){
Integer parentId=0;
if (StringUtils.isNotBlank(code)){
//判断处理活动关键字
String[] codes = code.split("_");
if(codes.length > 1) {
code = codes[0];
}
parentId=appUserDetailBiz.getUserByCode(code);
}
if (parentId!=null&&parentId>0&&userId!=null&&userId>0){
getMyBiz().bindRelation(userId,parentId,1);
}
return ObjectRestResponse.succ();
}
//永久稳定关系 //永久稳定关系
public void foreverBind(Integer user_id ){ public void foreverBind(Integer user_id ){
AppUserRelation relation=getMyBiz().getRelationByUserId(user_id); AppUserRelation relation=getMyBiz().getRelationByUserId(user_id);
......
...@@ -9,12 +9,14 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; ...@@ -9,12 +9,14 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController; import com.github.wxiaoqi.security.common.rest.BaseController;
import com.github.wxiaoqi.security.admin.biz.AppUserRelationBiz; import com.github.wxiaoqi.security.admin.biz.AppUserRelationBiz;
import com.github.wxiaoqi.security.admin.entity.AppUserRelation; import com.github.wxiaoqi.security.admin.entity.AppUserRelation;
import com.github.wxiaoqi.security.common.util.process.ResultCode;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.HashSet;
@RestController @RestController
@RequestMapping("relation") @RequestMapping("relation")
...@@ -37,7 +39,21 @@ public class AppUserRelationController extends BaseController<AppUserRelationBiz ...@@ -37,7 +39,21 @@ public class AppUserRelationController extends BaseController<AppUserRelationBiz
return baseBiz.shareParentByUserId(userid,pid,platform_userid); return baseBiz.shareParentByUserId(userid,pid,platform_userid);
} }
@ApiOperation("查询邀请的成员") @RequestMapping(value = "/bind",method = RequestMethod.POST)
@ApiModelProperty("app分享绑定")
public ObjectRestResponse bind(
@RequestParam(value = "code",defaultValue = "")String code,
HttpServletRequest request){
try {
Integer userid = Integer.parseInt(userAuthUtil.getInfoFromToken(userAuthConfig.getToken(request)).getId());
return baseBiz.appBindRelation(userid,code);
} catch (Exception e) {
e.printStackTrace();
throw new BaseException(e);
}
}
@ApiOperation("查询邀请的成员")
@GetMapping("/pages") @GetMapping("/pages")
public ObjectRestResponse<InviteMemberVo> findInviteMemberByActivitState(@RequestParam(value = "state",required = false) Integer state, public ObjectRestResponse<InviteMemberVo> findInviteMemberByActivitState(@RequestParam(value = "state",required = false) Integer state,
@RequestParam("page") Integer page, @RequestParam("page") Integer page,
......
...@@ -273,20 +273,14 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> { ...@@ -273,20 +273,14 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
if (StringUtils.isEmpty(userCouponFindDTO.getPhone())) { if (StringUtils.isEmpty(userCouponFindDTO.getPhone())) {
List<Integer> userIds = data.stream().map(UserCouponDTO::getUserId).distinct().collect(Collectors.toList()); List<Integer> userIds = data.stream().map(UserCouponDTO::getUserId).distinct().collect(Collectors.toList());
if (log.isDebugEnabled()){
log.debug("查询的用户ids【{}】",userIds);
}
userIdAndAppuserLoginMap = userFeign.findAppUsersByUserIds(userIds); userIdAndAppuserLoginMap = userFeign.findAppUsersByUserIds(userIds);
if (log.isDebugEnabled()){
log.debug("查询的用户信息【{}】",userIdAndAppuserLoginMap);
}
} }
List<UserCouponPageVo> userCouponPageVos = new ArrayList<>(); List<UserCouponPageVo> userCouponPageVos = new ArrayList<>();
UserCouponPageVo userCouponPageVo; UserCouponPageVo userCouponPageVo;
for (UserCouponDTO userCouponDTO : data) { for (UserCouponDTO userCouponDTO : data) {
userCouponPageVo = new UserCouponPageVo(); userCouponPageVo = new UserCouponPageVo();
BeanUtils.copyProperties(userCouponDTO, userCouponPageVo); BeanUtils.copyProperties(userCouponDTO, userCouponPageVo);
if (Objects.nonNull(userCouponFindDTO.getPhone())) { if (StringUtils.isNotEmpty(userCouponFindDTO.getPhone())) {
userCouponPageVo.setPhone(userCouponFindDTO.getPhone()); userCouponPageVo.setPhone(userCouponFindDTO.getPhone());
} else { } else {
userCouponPageVo.setPhone(userIdAndAppuserLoginMap.get(userCouponDTO.getUserId()) == null ? "" : userIdAndAppuserLoginMap.get(userCouponDTO.getUserId()).getUsername()); userCouponPageVo.setPhone(userIdAndAppuserLoginMap.get(userCouponDTO.getUserId()) == null ? "" : userIdAndAppuserLoginMap.get(userCouponDTO.getUserId()).getUsername());
......
...@@ -24,6 +24,7 @@ public class DateController { ...@@ -24,6 +24,7 @@ public class DateController {
@Autowired @Autowired
private ActivityPopularizeUserBiz activityPopularizeUserBiz; private ActivityPopularizeUserBiz activityPopularizeUserBiz;
@Autowired
private UserCouponBiz userCouponBiz; private UserCouponBiz userCouponBiz;
......
...@@ -65,5 +65,6 @@ public class Cofig implements Serializable { ...@@ -65,5 +65,6 @@ public class Cofig implements Serializable {
@ApiModelProperty(value = "标题") @ApiModelProperty(value = "标题")
private String title; private String title;
@Column(name = "params")
private String params; private String params;
} }
...@@ -14,14 +14,39 @@ import java.math.BigDecimal; ...@@ -14,14 +14,39 @@ import java.math.BigDecimal;
public class WithDrawRuleVo { public class WithDrawRuleVo {
/** /**
* 提现金额 * 最低提现金额
*/ */
private BigDecimal amount; private BigDecimal minAmount;
/** /**
* 手续费率 * 提现手续费率
*/ */
private double proceduReates; private BigDecimal proceduReates;
/**
* 月额度
*/
private BigDecimal amountOfMonth;
/**
* 日额度
*/
private BigDecimal amountOfDay;
/**
* 最多提现次数(月)
*/
private Integer maxNumberOfMonth;
/**
* 最多提现次数(日)
*/
private Integer maxNumberOfDay;
/**
* 1. 线上 2.线下
*/
private Integer withdrawWay;
/** /**
* 规则说明 * 规则说明
......
package com.xxfc.platform.app.biz; package com.xxfc.platform.app.biz;
import com.ace.cache.annotation.Cache;
import com.ace.cache.annotation.CacheClear;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.github.wxiaoqi.security.common.msg.TableResultResponse; import com.github.wxiaoqi.security.common.msg.TableResultResponse;
import com.github.wxiaoqi.security.common.util.EntityUtils; import com.github.wxiaoqi.security.common.util.EntityUtils;
...@@ -37,11 +39,13 @@ public class CofigBiz extends BaseBiz<CofigMapper,Cofig> { ...@@ -37,11 +39,13 @@ public class CofigBiz extends BaseBiz<CofigMapper,Cofig> {
* @param cofig * @param cofig
* @return * @return
*/ */
@CacheClear(pre = "app:withdrawrule:",key = "config{1}")
public int updateConfig(Cofig cofig) { public int updateConfig(Cofig cofig) {
EntityUtils.setUpdatedInfo(cofig); EntityUtils.setUpdatedInfo(cofig);
return mapper.updateByPrimaryKeySelective(cofig); return mapper.updateByPrimaryKeySelective(cofig);
} }
@Cache(key = "app:withdrawrule:88")
public WithDrawRuleVo getWithDrawRule(){ public WithDrawRuleVo getWithDrawRule(){
WithDrawRuleVo withDrawRuleVo = new WithDrawRuleVo(); WithDrawRuleVo withDrawRuleVo = new WithDrawRuleVo();
Example example = new Example(Cofig.class); Example example = new Example(Cofig.class);
......
...@@ -83,6 +83,11 @@ public class MsgBiz { ...@@ -83,6 +83,11 @@ public class MsgBiz {
} }
public ObjectRestResponse getHotMsgList(Integer page, Integer limit) { public ObjectRestResponse getHotMsgList(Integer page, Integer limit) {
AppUserDTO appUserDTO = userBiz.getUserInfo();
Integer userId = null;
if(appUserDTO != null) {
userId = appUserDTO.getImUserid();
}
log.info("获取消息列表: page = {}, limit = {}, type = {}", page, limit); log.info("获取消息列表: page = {}, limit = {}, type = {}", page, limit);
page = page == null ? 1 : page; page = page == null ? 1 : page;
limit = limit == null ? 10 : limit; limit = limit == null ? 10 : limit;
...@@ -94,7 +99,7 @@ public class MsgBiz { ...@@ -94,7 +99,7 @@ public class MsgBiz {
int totalSize = mongoTemplate.find(query, Msg.class, "s_msg").size(); int totalSize = mongoTemplate.find(query, Msg.class, "s_msg").size();
query.with(pageable); query.with(pageable);
query.with(new Sort(Sort.Direction.DESC, "count.praise")); query.with(new Sort(Sort.Direction.DESC, "count.praise"));
List<Msg> msgList = mongoTemplate.find(query, Msg.class, "s_msg"); List<Msg> msgList = fetchAndAttach(mongoTemplate.find(query, Msg.class, "s_msg"), userId);
PageInfo<MsgVo> goodPageInfo = new PageInfo<>(replaceMsgResult(msgList)); PageInfo<MsgVo> goodPageInfo = new PageInfo<>(replaceMsgResult(msgList));
goodPageInfo.setPageSize(totalSize%limit == 0 ?totalSize/limit : totalSize/limit + 1); goodPageInfo.setPageSize(totalSize%limit == 0 ?totalSize/limit : totalSize/limit + 1);
return ObjectRestResponse.succ(goodPageInfo); return ObjectRestResponse.succ(goodPageInfo);
...@@ -158,7 +163,7 @@ public class MsgBiz { ...@@ -158,7 +163,7 @@ public class MsgBiz {
public boolean exists(int userId, ObjectId msgId) { public boolean exists(int userId, ObjectId msgId) {
Query query = new Query(Criteria.where("msgId").is(msgId).and("userId").is(userId)); Query query = new Query(Criteria.where("msgId").is(msgId).and("userId").is(userId));
List<Praise> praise = mongoTemplate.find(query, Praise.class, "s_praise"); List<Praise> praise = mongoTemplate.find(query, Praise.class, "s_praise");
return 0 != praise.size(); return praise.size() > 0 ? true :false;
} }
/** /**
...@@ -171,7 +176,7 @@ public class MsgBiz { ...@@ -171,7 +176,7 @@ public class MsgBiz {
public boolean existsCollect(int userId, ObjectId msgId) { public boolean existsCollect(int userId, ObjectId msgId) {
Query query = new Query(Criteria.where("msgId").is(msgId).and("userId").is(userId)); Query query = new Query(Criteria.where("msgId").is(msgId).and("userId").is(userId));
List<Comment> comments = mongoTemplate.find(query, Comment.class, "s_comment"); List<Comment> comments = mongoTemplate.find(query, Comment.class, "s_comment");
return 0 != comments.size(); return comments.size() > 0 ? true :false;
} }
public List<MsgVo> replaceMsgResult(List<Msg> list) { public List<MsgVo> replaceMsgResult(List<Msg> list) {
......
...@@ -22,7 +22,7 @@ public class ImCommentController { ...@@ -22,7 +22,7 @@ public class ImCommentController {
return imCommentBiz.add(imComment); return imCommentBiz.add(imComment);
} }
@DeleteMapping(value = "/delete") @PostMapping(value = "/delete")
@ApiOperation(value = "删除评论") @ApiOperation(value = "删除评论")
public ObjectRestResponse deleteById(ImComment imComment) { public ObjectRestResponse deleteById(ImComment imComment) {
return imCommentBiz.deleteById(imComment); return imCommentBiz.deleteById(imComment);
......
...@@ -22,7 +22,7 @@ public class ImPraiseController { ...@@ -22,7 +22,7 @@ public class ImPraiseController {
return imPraiseBiz.add(imPraise); return imPraiseBiz.add(imPraise);
} }
@DeleteMapping(value = "/delete") @PostMapping(value = "/delete")
@ApiOperation(value = "取消点赞") @ApiOperation(value = "取消点赞")
public ObjectRestResponse deleteById(ImPraiseDto imPraiseDto) { public ObjectRestResponse deleteById(ImPraiseDto imPraiseDto) {
return imPraiseBiz.deleteById(imPraiseDto); return imPraiseBiz.deleteById(imPraiseDto);
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
<select id="selectByQuestionId" resultType="com.xxfc.platform.im.entity.ImComment" parameterType="java.lang.Long"> <select id="selectByQuestionId" resultType="com.xxfc.platform.im.entity.ImComment" parameterType="java.lang.Long">
select * from im_comment select * from im_comment
where question_id = #{questionId} and is_del = 0 where question_id = #{questionId} and is_del = 0
order by time DESC
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
<select id="selectByQuestionId" resultType="com.xxfc.platform.im.entity.ImPraise" parameterType="java.lang.Long"> <select id="selectByQuestionId" resultType="com.xxfc.platform.im.entity.ImPraise" parameterType="java.lang.Long">
select * from im_praise select * from im_praise
where question_id = #{questionId} and is_del = 0 and visible = 1 where question_id = #{questionId} and is_del = 0 and visible = 1
order by time DESC
</select> </select>
<select id="selectByQuestionIdAndTime" resultType="com.xxfc.platform.im.entity.ImPraise" parameterType="com.xxfc.platform.im.dto.ImPraiseDto"> <select id="selectByQuestionIdAndTime" resultType="com.xxfc.platform.im.entity.ImPraise" parameterType="com.xxfc.platform.im.dto.ImPraiseDto">
......
package com.xxfc.platform.order.pojo.pay;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class NotifyUrlDTO {
public static final int TYPE_APP = 1;
public static final int TYPE_WX = 2;
//订单号
@ApiModelProperty(value = "订单号")
private String orderNo;
//订单号
@ApiModelProperty(value = "支付订单(流水)号")
private String tradeNo;
//支付类型
@ApiModelProperty(value = "支付类型")
private Integer type;
}
\ No newline at end of file
...@@ -375,13 +375,17 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> { ...@@ -375,13 +375,17 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
* @param refundStatus * @param refundStatus
*/ */
public void refundSubProcess(BaseOrder baseOrder, String refundDesc, BigDecimal refundAmount, Integer refundType, Integer refundStatus) { public void refundSubProcess(BaseOrder baseOrder, String refundDesc, BigDecimal refundAmount, Integer refundType, Integer refundStatus) {
OrderRefundVo orv = new OrderRefundVo(){{ String refundTradeNo = null;
setAmount(baseOrder.getRealAmount().multiply(new BigDecimal("100")).intValue()); //0 小于 退款金额
setOrderNo(baseOrder.getNo()); if(BigDecimal.ZERO.compareTo(refundAmount) < 0) {
}}; OrderRefundVo orv = new OrderRefundVo(){{
orv.setRefundDesc(refundDesc+ refundAmount.toString()); setAmount(baseOrder.getRealAmount().multiply(new BigDecimal("100")).intValue());
orv.setRefundAmount(refundAmount.multiply(new BigDecimal("100")).intValue()); setOrderNo(baseOrder.getNo());
String refundTradeNo = thirdFeign.refund(orv).getData(); }};
orv.setRefundDesc(refundDesc+ refundAmount.toString());
orv.setRefundAmount(refundAmount.multiply(new BigDecimal("100")).intValue());
refundTradeNo = thirdFeign.refund(orv).getData();
}
//记录订单退款记录 //记录订单退款记录
Integer flag = addOrderRefund(baseOrder.getId(), refundDesc, refundAmount, refundTradeNo, refundType); Integer flag = addOrderRefund(baseOrder.getId(), refundDesc, refundAmount, refundTradeNo, refundType);
......
...@@ -28,6 +28,7 @@ import com.xxfc.platform.order.entity.BaseOrder; ...@@ -28,6 +28,7 @@ import com.xxfc.platform.order.entity.BaseOrder;
import com.xxfc.platform.order.entity.OrderUserLicense; import com.xxfc.platform.order.entity.OrderUserLicense;
import com.xxfc.platform.order.mqhandler.RabbitProduct; import com.xxfc.platform.order.mqhandler.RabbitProduct;
import com.xxfc.platform.order.pojo.order.*; import com.xxfc.platform.order.pojo.order.*;
import com.xxfc.platform.order.pojo.pay.NotifyUrlDTO;
import com.xxfc.platform.order.pojo.pay.OrderPayDTO; import com.xxfc.platform.order.pojo.pay.OrderPayDTO;
import com.xxfc.platform.universal.constant.DictionaryKey; import com.xxfc.platform.universal.constant.DictionaryKey;
import com.xxfc.platform.universal.entity.Dictionary; import com.xxfc.platform.universal.entity.Dictionary;
...@@ -470,19 +471,4 @@ public class BaseOrderController extends CommonBaseController implements UserRes ...@@ -470,19 +471,4 @@ public class BaseOrderController extends CommonBaseController implements UserRes
@ApiModelProperty("每页限制") @ApiModelProperty("每页限制")
Integer limit; Integer limit;
} }
@Data
public class NotifyUrlDTO {
//订单号
@ApiModelProperty(value = "订单号")
private String orderNo;
//订单号
@ApiModelProperty(value = "支付订单(流水)号")
private String tradeNo;
//支付类型
@ApiModelProperty(value = "支付类型")
private Integer type;
}
} }
...@@ -14,6 +14,7 @@ import com.xxfc.platform.order.contant.enumerate.OrderTypeEnum; ...@@ -14,6 +14,7 @@ import com.xxfc.platform.order.contant.enumerate.OrderTypeEnum;
import com.xxfc.platform.order.entity.BaseOrder; import com.xxfc.platform.order.entity.BaseOrder;
import com.xxfc.platform.order.entity.inter.OrderDetail; import com.xxfc.platform.order.entity.inter.OrderDetail;
import com.xxfc.platform.order.mqhandler.RabbitProduct; import com.xxfc.platform.order.mqhandler.RabbitProduct;
import com.xxfc.platform.order.pojo.pay.NotifyUrlDTO;
import com.xxfc.platform.order.pojo.price.OrderPriceVO; import com.xxfc.platform.order.pojo.price.OrderPriceVO;
import com.xxfc.platform.universal.entity.Dictionary; import com.xxfc.platform.universal.entity.Dictionary;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -118,8 +119,16 @@ public abstract class AbstractOrderHandle<Biz extends BaseBiz, Detail extends Or ...@@ -118,8 +119,16 @@ public abstract class AbstractOrderHandle<Biz extends BaseBiz, Detail extends Or
return v; return v;
}).collect(Collectors.toList())); }).collect(Collectors.toList()));
} }
}
//判断是否价格为0
BigDecimal realAmount = detail.getOrder().getRealAmount();
if(BigDecimal.ZERO.compareTo(realAmount) > 0) {
throw new BaseException(ResultCode.FAILED_CODE);
}else if(BigDecimal.ZERO.compareTo(realAmount) == 0) {
//直接支付
baseOrderBiz.payNotifyHandle(detail.getOrder().getNo(), null, detail.getOrderOrigin());
}
}
/** /**
* 计算价格 * 计算价格
* @param detail * @param detail
......
...@@ -38,6 +38,8 @@ public class UsableVeicleDTO extends PageParam { ...@@ -38,6 +38,8 @@ public class UsableVeicleDTO extends PageParam {
String catasStr; String catasStr;
@ApiModelProperty(value = "分类列表", hidden = true) @ApiModelProperty(value = "分类列表", hidden = true)
Map<Integer, List<VehiclePlatCata>> catas; Map<Integer, List<VehiclePlatCata>> catas;
@ApiModelProperty("停靠公司")
String parkBranchCompanyId;
@ApiModelProperty(hidden = true) @ApiModelProperty(hidden = true)
Boolean yearNo4Where; Boolean yearNo4Where;
......
...@@ -991,10 +991,6 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> { ...@@ -991,10 +991,6 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> {
if(StrUtil.isNotBlank(dto.getStartDate()) && StrUtil.isNotBlank(dto.getEndDate())) { if(StrUtil.isNotBlank(dto.getStartDate()) && StrUtil.isNotBlank(dto.getEndDate())) {
initBookSearchParam(dto, params); initBookSearchParam(dto, params);
} }
// PageHelper.startPage(dto.getPage(), dto.getLimit());
// List<UsableVehicleModelVO> lists = mapper.searchUsableModel(params);
// PageInfo<UsableVehicleModelVO> usableVehicleModel = new PageInfo<>(lists);
// return PageDataVO.pageInfo(usableVehicleModel);
return PageDataVO.pageInfo(dto.getPage(), dto.getLimit(), () -> mapper.searchUsableModel(params)); return PageDataVO.pageInfo(dto.getPage(), dto.getLimit(), () -> mapper.searchUsableModel(params));
} }
......
...@@ -559,6 +559,9 @@ ...@@ -559,6 +559,9 @@
<if test=" hotSign != null "> <if test=" hotSign != null ">
and vm.hot_sign = #{hotSign} and vm.hot_sign = #{hotSign}
</if> </if>
<if test=" parkBranchCompanyId != null ">
and v.park_branch_company_id = #{parkBranchCompanyId}
</if>
</where> </where>
</sql> </sql>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment