提交 1abd20c1 authored 作者: zhouzhigang's avatar zhouzhigang

--no commit message

上级 56cb68ae
......@@ -150,5 +150,6 @@ public class SchoolRequestPath extends BaseRequestPath {
public static final String SEMESTER = "/semester";
/**监管*/
public static final String SUPERVISE ="/supervise";
}
package com.zrqx.core.form.school.sysuser.fg.studentorder;
import java.math.BigDecimal;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "PayForm", description = "学生支付表单")
public class PayForm {
@ApiModelProperty("订单id")
private Integer id;
/**{ @link PayTypeEnum }}*/
@ApiModelProperty("支付方式 1、支付宝 2、微信 3、银联")
private String payType;
@ApiModelProperty("实际订单总额(支付金额)")
private BigDecimal payment;
}
......@@ -31,7 +31,7 @@ public class StudentOrder extends BaseModel{
private String payType;
/**{ @link StudentOrderStatusEnum }*/
@ApiModelProperty("支付状态")
@ApiModelProperty("支付状态 0待支付 1已支付")
private String payStatus;
@ApiModelProperty("订单总额")
......
......@@ -4,10 +4,12 @@ import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zrqx.core.constant.school.sysuser.SchoolRequestPath;
import com.zrqx.core.form.school.sysuser.fg.studentorder.PayForm;
import com.zrqx.core.form.school.sysuser.fg.studentorder.QueryStudentOrderForm;
import com.zrqx.core.model.member.school.School;
import com.zrqx.core.model.member.supplier.FgSupplier;
......@@ -79,5 +81,13 @@ public class StudentOrderController {
public CallBack<List<ViewOrderVo>> get(String resourceId){
return CallBack.success(studentOrderService.get(resourceId));
}
@ApiOperation( value = "确认支付", notes = "确认支付")
@PostMapping(value = SchoolRequestPath.CONFIRM + SchoolRequestPath.PAY)
public CallBack<Boolean> confirm(PayForm form){
return CallBack.success(studentOrderService.confirm(form));
}
}
......@@ -3,10 +3,12 @@ package com.zrqx.school.sysuser.controller.studentorder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zrqx.core.constant.school.sysuser.SchoolRequestPath;
import com.zrqx.core.form.school.sysuser.fg.order.QueryOrderInfoForm;
import com.zrqx.core.form.school.sysuser.fg.studentorder.PayForm;
import com.zrqx.core.util.page.PageInfo;
import com.zrqx.core.util.page.PageParam;
import com.zrqx.core.util.response.CallBack;
......@@ -36,5 +38,8 @@ public class StudentOrderInfoController {
public CallBack<PageInfo<StudentOrderInfoVo>> getByOid(PageParam pageParam,Integer orderId){
return CallBack.success(studentOrderInfoService.getByOid(pageParam,orderId));
}
}
package com.zrqx.school.sysuser.service.studentorder;
import com.zrqx.core.form.school.sysuser.fg.studentorder.PayForm;
import com.zrqx.core.model.school.studentorder.StudentOrderInfo;
import com.zrqx.core.service.BaseService;
import com.zrqx.core.util.page.PageInfo;
......@@ -26,5 +27,7 @@ public interface StudentOrderInfoService extends BaseService<StudentOrderInfo,In
* @data 2019年9月5日 上午9:14:50
*/
PageInfo<StudentOrderInfoVo> getByOid(PageParam pageParam,Integer orderId);
}
......@@ -7,6 +7,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zrqx.core.commons.redis.FgRedisManage;
import com.zrqx.core.form.school.sysuser.fg.studentorder.PayForm;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.member.classmanagement.ClassManagement;
import com.zrqx.core.model.member.major.Major;
......@@ -94,6 +95,8 @@ public class StudentOrderInfoServiceImpl extends BaseModelServiceImpl<StudentOrd
return null;
}
......
......@@ -2,6 +2,7 @@ package com.zrqx.school.sysuser.service.studentorder;
import java.util.List;
import com.zrqx.core.form.school.sysuser.fg.studentorder.PayForm;
import com.zrqx.core.form.school.sysuser.fg.studentorder.QueryStudentOrderForm;
import com.zrqx.core.model.member.school.School;
import com.zrqx.core.model.member.supplier.FgSupplier;
......@@ -76,5 +77,14 @@ public interface StudentOrderService extends BaseService<StudentOrder,Integer>{
* @data 2019年9月4日 下午3:23:45
*/
List<ViewOrderVo> get(String resourceId);
/**
* 确认支付
* @param form
* @return
* @auther zzg
* @data 2019年9月6日 上午10:19:39
*/
boolean confirm(PayForm form);
}
......@@ -6,6 +6,8 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zrqx.core.enums.school.sysuser.StudentOrderStatusEnum;
import com.zrqx.core.form.school.sysuser.fg.studentorder.PayForm;
import com.zrqx.core.form.school.sysuser.fg.studentorder.QueryStudentOrderForm;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.member.school.School;
......@@ -121,6 +123,18 @@ public class StudentOrderServiceImpl extends BaseModelServiceImpl<StudentOrder,I
});
return list;
}
@Override
public boolean confirm(PayForm form) {
StudentOrder order = super.notNull(form.getId());
order.setPayType(form.getPayType());
order.setPayStatus(StudentOrderStatusEnum.HAVE_PAID.getCode());
order.setPayment(form.getPayment());
super.updateByPrimaryKey(order);
return true;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论