From 546103af40acfb6e8a5371902324d01785e61dee Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Tue, 18 May 2021 17:35:17 +0800 Subject: [PATCH] 20210518 申诉单详情 --- src/main/resources/templates/febs/views/modules/otc/otcAppealInfo.html | 138 +++++++++++++++++++++++++++ src/main/java/com/xcong/excoin/modules/otc/entity/OtcOrderAppealEntity.java | 6 src/main/java/com/xcong/excoin/modules/otc/vo/OtcAppealInfoVo.java | 53 ++++++++++ src/main/resources/templates/febs/views/modules/otc/otcAppealList.html | 12 + src/main/java/com/xcong/excoin/modules/otc/controller/ViewController.java | 15 +++ src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcServiceImpl.java | 45 +++++++++ src/main/java/com/xcong/excoin/modules/otc/service/OtcService.java | 3 7 files changed, 266 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/xcong/excoin/modules/otc/controller/ViewController.java b/src/main/java/com/xcong/excoin/modules/otc/controller/ViewController.java index 4fa9d6f..867960b 100644 --- a/src/main/java/com/xcong/excoin/modules/otc/controller/ViewController.java +++ b/src/main/java/com/xcong/excoin/modules/otc/controller/ViewController.java @@ -2,11 +2,15 @@ import com.xcong.excoin.common.entity.FebsConstant; import com.xcong.excoin.common.utils.FebsUtil; +import com.xcong.excoin.modules.member.vo.MemberAuthenticationVo; import com.xcong.excoin.modules.otc.service.OtcService; +import com.xcong.excoin.modules.otc.vo.OtcAppealInfoVo; import lombok.RequiredArgsConstructor; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; @Controller("otcView") @@ -52,4 +56,15 @@ return FebsUtil.view("modules/otc/otcAppealList"); } + /** + * 获取申诉列表--详情 + */ + @GetMapping("otcAppealInfo/{id}") + @RequiresPermissions("otcAppealInfo:update") + public String otcAppealInfo(@PathVariable long id, Model model) { + OtcAppealInfoVo data = otcService.otcAppealInfo(id); + model.addAttribute("member", data); + return FebsUtil.view("modules/otc/otcAppealInfo"); + } + } diff --git a/src/main/java/com/xcong/excoin/modules/otc/entity/OtcOrderAppealEntity.java b/src/main/java/com/xcong/excoin/modules/otc/entity/OtcOrderAppealEntity.java index 7ddc04a..3077bc0 100644 --- a/src/main/java/com/xcong/excoin/modules/otc/entity/OtcOrderAppealEntity.java +++ b/src/main/java/com/xcong/excoin/modules/otc/entity/OtcOrderAppealEntity.java @@ -14,13 +14,13 @@ private long memberId; //订单ID - private long order_id; + private long orderId; //申诉原因 - private long reason; + private String reason; //申诉内容 - private long content; + private String content; //申诉状态 1:待处理 2:处理中 3:已处理 private Integer status; diff --git a/src/main/java/com/xcong/excoin/modules/otc/service/OtcService.java b/src/main/java/com/xcong/excoin/modules/otc/service/OtcService.java index 84c3f68..916cabe 100644 --- a/src/main/java/com/xcong/excoin/modules/otc/service/OtcService.java +++ b/src/main/java/com/xcong/excoin/modules/otc/service/OtcService.java @@ -8,6 +8,7 @@ import com.xcong.excoin.modules.otc.entity.OtcMarketBussinessEntity; import com.xcong.excoin.modules.otc.entity.OtcOrderAppealEntity; import com.xcong.excoin.modules.otc.entity.OtcOrderEntity; +import com.xcong.excoin.modules.otc.vo.OtcAppealInfoVo; public interface OtcService extends IService<OtcMarketBussinessEntity> { @@ -26,4 +27,6 @@ IPage<OtcEntrustOrderEntity> otcEntrustList(OtcEntrustOrderEntity otcEntrustOrderEntity, QueryRequest request); IPage<OtcOrderEntity> otcOrderList(OtcOrderEntity otcOrderEntity, QueryRequest request); + + OtcAppealInfoVo otcAppealInfo(long id); } diff --git a/src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcServiceImpl.java b/src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcServiceImpl.java index ae69ac7..abcb588 100644 --- a/src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcServiceImpl.java +++ b/src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcServiceImpl.java @@ -1,5 +1,6 @@ package com.xcong.excoin.modules.otc.service.impl; +import cn.hutool.core.util.ObjectUtil; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -17,11 +18,14 @@ import com.xcong.excoin.modules.otc.mapper.OtcOrderAppealMapper; import com.xcong.excoin.modules.otc.mapper.OtcOrderMapper; import com.xcong.excoin.modules.otc.service.OtcService; +import com.xcong.excoin.modules.otc.vo.OtcAppealInfoVo; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; +import java.math.BigDecimal; +import java.util.Date; @Service @RequiredArgsConstructor @@ -130,4 +134,45 @@ return otcOrderEntitys; } + @Override + public OtcAppealInfoVo otcAppealInfo(long id) { + OtcAppealInfoVo otcAppealInfoVo = new OtcAppealInfoVo(); + + OtcOrderAppealEntity otcOrderAppealEntity = otcOrderAppealMapper.selectById(id); + otcAppealInfoVo.setId(id); + if(ObjectUtil.isNotEmpty(otcOrderAppealEntity)){ + String reason = otcOrderAppealEntity.getReason(); + otcAppealInfoVo.setReason(reason); + String content = otcOrderAppealEntity.getContent(); + otcAppealInfoVo.setContent(content); + } + //获取对应的订单详情 + long orderId = otcOrderAppealEntity.getOrderId(); + OtcOrderEntity otcOrderEntity = otcOrderMapper.selectById(orderId); + if(ObjectUtil.isNotEmpty(otcOrderEntity)){ + String orderNo = otcOrderEntity.getOrderNo(); + otcAppealInfoVo.setOrderNo(orderNo); + BigDecimal unitPrice = otcOrderEntity.getUnitPrice(); + otcAppealInfoVo.setUnitPrice(unitPrice); + BigDecimal coinAmount = otcOrderEntity.getCoinAmount(); + otcAppealInfoVo.setCoinAmount(coinAmount); + BigDecimal totalAmount = otcOrderEntity.getTotalAmount(); + otcAppealInfoVo.setTotalAmount(totalAmount); + Integer status = otcOrderEntity.getStatus(); + otcAppealInfoVo.setStatus(status); + Date payTime = otcOrderEntity.getPayTime(); + otcAppealInfoVo.setPayTime(payTime); + Date finishTime = otcOrderEntity.getFinishTime(); + otcAppealInfoVo.setFinishTime(finishTime); + } + //获取对应的商户信息 + long payMdId = otcOrderEntity.getPayMdId(); + OtcMarketBussinessEntity otcMarketBussinessEntity = otcMarketBussinessMapper.selectById(payMdId); + if(ObjectUtil.isNotEmpty(otcMarketBussinessEntity)){ + String nikename = otcMarketBussinessEntity.getNikename(); + otcAppealInfoVo.setNikename(nikename); + } + return otcAppealInfoVo; + } + } diff --git a/src/main/java/com/xcong/excoin/modules/otc/vo/OtcAppealInfoVo.java b/src/main/java/com/xcong/excoin/modules/otc/vo/OtcAppealInfoVo.java new file mode 100644 index 0000000..5b245d8 --- /dev/null +++ b/src/main/java/com/xcong/excoin/modules/otc/vo/OtcAppealInfoVo.java @@ -0,0 +1,53 @@ +package com.xcong.excoin.modules.otc.vo; + +import io.swagger.annotations.ApiModel; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +@Data +@ApiModel(value = "OtcAppealInfoVo", description = "参数返回类") +public class OtcAppealInfoVo { + + private long id; + + //订单编号 + private String orderNo; + + //单价 + private BigDecimal unitPrice; + + //交易数量 + private BigDecimal coinAmount; + + //交易总额 + private BigDecimal totalAmount; + + //订单状态 1-已提交未付款2-已付款3-已完成4-已取消 + private Integer status; + public static final Integer STATUS_ONE = 1; + public static final Integer STATUS_TWO = 2; + public static final Integer STATUS_THREE = 3; + public static final Integer STATUS_FOUR = 4; + + //付款时间 + private Date payTime; + + //完成时间 + private Date finishTime; + + + //昵称 + private String nikename; + + + + //申诉原因 + private String reason; + + //申诉内容 + private String content; + + +} diff --git a/src/main/resources/templates/febs/views/modules/otc/otcAppealInfo.html b/src/main/resources/templates/febs/views/modules/otc/otcAppealInfo.html new file mode 100644 index 0000000..704bef8 --- /dev/null +++ b/src/main/resources/templates/febs/views/modules/otc/otcAppealInfo.html @@ -0,0 +1,138 @@ +<style> + #user-update { + padding: 20px 25px 25px 0; + } + + #user-update .layui-treeSelect .ztree li a, .ztree li span { + margin: 0 0 2px 3px !important; + } + #user-update #data-permission-tree-block { + border: 1px solid #eee; + border-radius: 2px; + padding: 3px 0; + } + #user-add .layui-treeSelect .ztree li span.button.switch { + top: 1px; + left: 3px; + } + +</style> +<div class="layui-fluid" id="user-update"> + <form class="layui-form" action="" lay-filter="user-update-form"> + <div class="layui-form-item febs-hide"> + <label class="layui-form-label febs-form-item-require">id:</label> + <div class="layui-input-block"> + <input type="text" name="id" data-th-value="${member.id}"> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label febs-form-item-require">订单编号:</label> + <div class="layui-input-block"> + <input type="text" name="orderNo"data-th-id="${member.orderNo}" + autocomplete="off" class="layui-input" readonly> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label febs-form-item-require">单价:</label> + <div class="layui-input-block"> + <input type="number" name="unitPrice"data-th-id="${member.unitPrice}" + autocomplete="off" class="layui-input" readonly> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label febs-form-item-require">交易数量:</label> + <div class="layui-input-block"> + <input type="number" name="coinAmount"data-th-id="${member.coinAmount}" + autocomplete="off" class="layui-input" readonly> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label febs-form-item-require">交易总额:</label> + <div class="layui-input-block"> + <input type="number" name="totalAmount"data-th-id="${member.totalAmount}" + autocomplete="off" class="layui-input" readonly> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label febs-form-item-require">订单状态:</label> + <div class="layui-input-block"> + <input type="radio" name="status" value="1" title="未付款" readonly> + <input type="radio" name="status" value="2" title="已付款" readonly> + <input type="radio" name="status" value="3" title="已完成" readonly> + <input type="radio" name="status" value="4" title="已取消" readonly> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label febs-form-item-require">付款时间:</label> + <div class="layui-input-block"> + <input type="date" name="payTime"data-th-id="${member.payTime}" + autocomplete="off" class="layui-input" readonly> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label febs-form-item-require">完成时间:</label> + <div class="layui-input-block"> + <input type="date" name="finishTime"data-th-id="${member.finishTime}" + autocomplete="off" class="layui-input" readonly> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label febs-form-item-require">商户昵称:</label> + <div class="layui-input-block"> + <input type="text" name="nikename"data-th-id="${member.nikename}" + autocomplete="off" class="layui-input" readonly> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label febs-form-item-require">申诉原因:</label> + <div class="layui-input-block"> + <input type="text" name="reason"data-th-id="${member.reason}" + autocomplete="off" class="layui-input" readonly> + </div> + </div> + <div class="layui-form-item"> + <label class="layui-form-label febs-form-item-require">申诉内容:</label> + <div class="layui-input-block"> + <input type="text" name="content"data-th-id="${member.content}" + autocomplete="off" class="layui-input" readonly> + </div> + </div> + </form> +</div> + +<script data-th-inline="javascript"> + layui.use(['febs', 'form', 'formSelects', 'validate', 'treeSelect', 'eleTree'], function () { + var $ = layui.$, + febs = layui.febs, + layer = layui.layer, + formSelects = layui.formSelects, + treeSelect = layui.treeSelect, + form = layui.form, + eleTree = layui.eleTree, + member = [[${member}]], + $view = $('#user-update'), + validate = layui.validate, + _deptTree; + + form.render(); + + initUserValue(); + + formSelects.render(); + + function initUserValue() { + form.val("user-update-form", { + "orderNo": member.orderNo, + "unitPrice": member.unitPrice, + "coinAmount": member.coinAmount, + "totalAmount": member.totalAmount, + "status": member.status, + "payTime": member.payTime, + "finishTime": member.finishTime, + "nikename": member.nikename, + "reason": member.reason, + "content": member.content + }); + } + }); +</script> \ No newline at end of file diff --git a/src/main/resources/templates/febs/views/modules/otc/otcAppealList.html b/src/main/resources/templates/febs/views/modules/otc/otcAppealList.html index cc7d869..c523299 100644 --- a/src/main/resources/templates/febs/views/modules/otc/otcAppealList.html +++ b/src/main/resources/templates/febs/views/modules/otc/otcAppealList.html @@ -77,6 +77,9 @@ febs.modal.confirm('处理', '开始处理申诉?', function () { dealIng(data.id); }); + febs.modal.open( '详情', 'modules/otc/otcAppealInfo/' + data.id, { + maxmin: true, + }); } if (layEvent === 'dealDone') { febs.modal.confirm('处理结束', '确认已处理结束?', function () { @@ -120,6 +123,8 @@ {field: 'phone', title: '手机号', minWidth: 150,align:'left'}, {field: 'realName', title: '姓名', minWidth: 100,align:'left'}, {field: 'inviteId', title: '邀请码', minWidth: 80,align:'center'}, + {field: 'reason', title: '申诉原因', minWidth: 80,align:'center'}, + {field: 'content', title: '申诉内容', minWidth: 80,align:'center'}, {field: 'status', title: '状态', templet: function (d) { if (d.status === 1) { @@ -136,11 +141,12 @@ {field: 'nikename', title: '商户昵称',minWidth: 100,align:'center'}, {title: '操作',templet: function (d) { if(d.status === 1){ - return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="dealIng" shiro:hasPermission="user:update">马上处理</button>' + return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="dealIng" shiro:hasPermission="user:update">查看详情</button>' }else if(d.status === 2){ - return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="dealDone" shiro:hasPermission="user:update">已处理</button>' + return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="dealIng" shiro:hasPermission="user:update">查看详情</button>' + +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="dealDone" shiro:hasPermission="user:update">已处理</button>' }else{ - return '' + return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="dealIng" shiro:hasPermission="user:update">查看详情</button>' } },minWidth: 200,align:'center'} ]] -- Gitblit v1.9.1