Browse Source

无效退款

shenhao 4 năm trước cách đây
mục cha
commit
3d2d66d9b3
23 tập tin đã thay đổi với 903 bổ sung3 xóa
  1. 2 0
      src/main/java/com/ssj/dao/sys/jxy/dao/JxyQueryDao.java
  2. 13 0
      src/main/java/com/ssj/dao/sys/jxy/dao/impl/JxyQueryDaoImpl.java
  3. 3 0
      src/main/java/com/ssj/dao/sys/role/dao/RoleDao.java
  4. 83 0
      src/main/java/com/ssj/refund/bean/RefundAuditInfo.java
  5. 196 0
      src/main/java/com/ssj/refund/bean/RefundInfo.java
  6. 17 0
      src/main/java/com/ssj/refund/dao/IAuditInfoDao.java
  7. 16 0
      src/main/java/com/ssj/refund/dao/IMerchantRefundDao.java
  8. 13 0
      src/main/java/com/ssj/refund/service/IAuditInfoService.java
  9. 13 0
      src/main/java/com/ssj/refund/service/IMerchantRefundService.java
  10. 30 0
      src/main/java/com/ssj/refund/service/impl/AuditInfoServiceImpl.java
  11. 27 0
      src/main/java/com/ssj/refund/service/impl/MerchantRefundServiceImpl.java
  12. 8 0
      src/main/java/com/ssj/service/sys/jxy/service/JxyService.java
  13. 5 0
      src/main/java/com/ssj/service/sys/jxy/service/impl/JxyServiceImpl.java
  14. 7 0
      src/main/java/com/ssj/service/sys/role/service/RoleService.java
  15. 5 0
      src/main/java/com/ssj/service/sys/role/service/impl/RoleServiceImpl.java
  16. 3 0
      src/main/java/com/ssj/sys/controller/AppInfoController.java
  17. 142 0
      src/main/java/com/ssj/sys/controller/ErrorController.java
  18. 4 0
      src/main/java/com/ssj/sys/controller/SysOrderController.java
  19. 11 3
      src/main/resources/mybatis/mapper/CuratorMapper.xml
  20. 1 0
      src/main/resources/templates/sys/appinfo/appinfoAdd.html
  21. 141 0
      src/main/resources/templates/sys/refund/refundList.html
  22. 82 0
      src/main/resources/templates/sys/refund/refundMsgEdit.html
  23. 81 0
      src/main/resources/templates/sys/refund/studentIndex.html

+ 2 - 0
src/main/java/com/ssj/dao/sys/jxy/dao/JxyQueryDao.java

@@ -26,4 +26,6 @@ public interface JxyQueryDao {
     Map<String, Object> findWorkbook(String bookId);
 
     List<Map<String, Object>> findAnswerList(String questionIds);
+
+    Page<Map<String, Object>> refundList(Map<String, Object> params, Pageable initPage);
 }

+ 13 - 0
src/main/java/com/ssj/dao/sys/jxy/dao/impl/JxyQueryDaoImpl.java

@@ -126,5 +126,18 @@ public class JxyQueryDaoImpl implements JxyQueryDao {
 		return  dao.findMap(sb.toString(),params.toArray());
 	}
 
+	@Override
+	public Page<Map<String, Object>> refundList(Map<String, Object> map, Pageable initPage) {
+		StringBuilder sb = new StringBuilder();
+		sb.append("SELECT t.*,t11.wx_name,t13.unit_name ")
+				.append("from fx_merchant_refund t ")
+				.append("left join fx_merchant_meal_order t12 on t.meal_order_id = t12.id ")
+				.append("left join fx_merchant t13 on t12.merchant_id = t13.id ")
+				.append("left join tb_user t11 on t.user_id = t11.id ")
+				.append("order by t.audit_state asc,t.create_time desc ");
+		List<Object> params = new ArrayList<>();
+		return  dao.findPage(sb.toString(),params.toArray(),initPage);
+	}
+
 
 }

+ 3 - 0
src/main/java/com/ssj/dao/sys/role/dao/RoleDao.java

@@ -38,4 +38,7 @@ public interface RoleDao extends JpaRepository<Role, String>{
 
 	@Query(nativeQuery = true, value = "select *  from sys_role  where name =?1  ")
     Role findRoleByName(String roleName);
+
+	@Query(nativeQuery = true, value = "select b.name from sys_admin_role a join sys_role b on a.role_id = b.id   where a.admin_id = ?1 ")
+	List<String> getAdminRoleName(String adminId);
 }

+ 83 - 0
src/main/java/com/ssj/refund/bean/RefundAuditInfo.java

@@ -0,0 +1,83 @@
+package com.ssj.refund.bean;
+
+import com.ssj.bean.common.framework.core.domain.BaseEntity;
+
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author sh
+ * @className refundInfo
+ * @description
+ * @date 2021/7/9
+ */
+@Entity
+@Table(name="fx_merchant_refund_audit")
+public class RefundAuditInfo extends BaseEntity {
+    /**
+     * refundId
+     */
+    private String refundId;
+
+    /**
+     * 审核状态 1,通过 2拒绝
+     */
+    private int auditState;
+
+    /**
+     * 审核节点
+     */
+    private String auditPoint;
+
+    /**
+     * 审核备注
+     */
+    private String msg;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    public String getRefundId() {
+        return refundId;
+    }
+
+    public void setRefundId(String refundId) {
+        this.refundId = refundId;
+    }
+
+    public int getAuditState() {
+        return auditState;
+    }
+
+    public void setAuditState(int auditState) {
+        this.auditState = auditState;
+    }
+
+    public String getAuditPoint() {
+        return auditPoint;
+    }
+
+    public void setAuditPoint(String auditPoint) {
+        this.auditPoint = auditPoint;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+}

+ 196 - 0
src/main/java/com/ssj/refund/bean/RefundInfo.java

@@ -0,0 +1,196 @@
+package com.ssj.refund.bean;
+
+import com.ssj.bean.common.framework.core.domain.BaseEntity;
+
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author sh
+ * @className refundInfo
+ * @description
+ * @date 2021/7/9
+ */
+@Entity
+@Table(name="fx_merchant_refund")
+public class RefundInfo extends BaseEntity {
+    /**
+     * 支付订单no
+     * 没有订单默认值1
+     */
+    private String orderNo;
+    /**
+     * 服务包订单id
+     */
+    private String mealOrderId;
+    /**
+     * 收款人姓名
+     */
+    private String yourName;
+    /**
+     * 开户行
+     */
+    private String openBank;
+    /**
+     * 收款银行账号
+     */
+    private String bankAccount;
+    /**
+     * 退款原因选项
+     */
+    private String refundOption;
+    /**
+     * 其他的原因
+     */
+    private String otherReason;
+    /**
+     * 选择退费的学生
+     */
+    private String vipIds;
+    /**
+     * 审核状态
+     */
+    private int auditState;
+    /**
+     * 退费学生数量
+     */
+    private int studentCount;
+
+    private BigDecimal unitPrice;
+
+    private BigDecimal refundPrice;
+
+    /**
+     * 审核节点
+     */
+    private String auditPoint;
+
+    /**
+     * 微信用户id
+     */
+    private String userId;
+
+    private Date createTime;
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public String getMealOrderId() {
+        return mealOrderId;
+    }
+
+    public void setMealOrderId(String mealOrderId) {
+        this.mealOrderId = mealOrderId;
+    }
+
+    public String getYourName() {
+        return yourName;
+    }
+
+    public void setYourName(String yourName) {
+        this.yourName = yourName;
+    }
+
+    public String getOpenBank() {
+        return openBank;
+    }
+
+    public void setOpenBank(String openBank) {
+        this.openBank = openBank;
+    }
+
+    public String getBankAccount() {
+        return bankAccount;
+    }
+
+    public void setBankAccount(String bankAccount) {
+        this.bankAccount = bankAccount;
+    }
+
+    public String getRefundOption() {
+        return refundOption;
+    }
+
+    public void setRefundOption(String refundOption) {
+        this.refundOption = refundOption;
+    }
+
+    public String getOtherReason() {
+        return otherReason;
+    }
+
+    public void setOtherReason(String otherReason) {
+        this.otherReason = otherReason;
+    }
+
+    public String getVipIds() {
+        return vipIds;
+    }
+
+    public void setVipIds(String vipIds) {
+        this.vipIds = vipIds;
+    }
+
+    public int getAuditState() {
+        return auditState;
+    }
+
+    public void setAuditState(int auditState) {
+        this.auditState = auditState;
+    }
+
+    public int getStudentCount() {
+        return studentCount;
+    }
+
+    public void setStudentCount(int studentCount) {
+        this.studentCount = studentCount;
+    }
+
+    public String getAuditPoint() {
+        return auditPoint;
+    }
+
+    public void setAuditPoint(String auditPoint) {
+        this.auditPoint = auditPoint;
+    }
+
+    public BigDecimal getUnitPrice() {
+        return unitPrice;
+    }
+
+    public void setUnitPrice(BigDecimal unitPrice) {
+        this.unitPrice = unitPrice;
+    }
+
+    public BigDecimal getRefundPrice() {
+        return refundPrice;
+    }
+
+    public void setRefundPrice(BigDecimal refundPrice) {
+        this.refundPrice = refundPrice;
+    }
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+}

+ 17 - 0
src/main/java/com/ssj/refund/dao/IAuditInfoDao.java

@@ -0,0 +1,17 @@
+package com.ssj.refund.dao;
+
+import com.ssj.refund.bean.RefundAuditInfo;
+import com.ssj.refund.bean.RefundInfo;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
+
+/**
+ * @author sh
+ * @className IMerchantRefundDao
+ * @description dao
+ * @date 2021/7/9
+ */
+@Repository
+public interface IAuditInfoDao extends JpaRepository<RefundAuditInfo,String> {
+
+}

+ 16 - 0
src/main/java/com/ssj/refund/dao/IMerchantRefundDao.java

@@ -0,0 +1,16 @@
+package com.ssj.refund.dao;
+
+import com.ssj.refund.bean.RefundInfo;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.stereotype.Repository;
+
+/**
+ * @author sh
+ * @className IMerchantRefundDao
+ * @description dao
+ * @date 2021/7/9
+ */
+@Repository
+public interface IMerchantRefundDao extends JpaRepository<RefundInfo,String> {
+
+}

+ 13 - 0
src/main/java/com/ssj/refund/service/IAuditInfoService.java

@@ -0,0 +1,13 @@
+package com.ssj.refund.service;
+
+import com.ssj.framework.core.common.service.BaseService;
+import com.ssj.refund.bean.RefundAuditInfo;
+
+/**
+ * @author sh
+ * @className IAuditInfoService
+ * @description
+ * @date 2021/7/14
+ */
+public interface IAuditInfoService extends BaseService<RefundAuditInfo,String> {
+}

+ 13 - 0
src/main/java/com/ssj/refund/service/IMerchantRefundService.java

@@ -0,0 +1,13 @@
+package com.ssj.refund.service;
+
+import com.ssj.framework.core.common.service.BaseService;
+import com.ssj.refund.bean.RefundInfo;
+
+/**
+ * @author sh
+ * @className IMerchantRefundService
+ * @description 商户退款interface
+ * @date 2021/7/9
+ */
+public interface IMerchantRefundService extends BaseService<RefundInfo,String> {
+}

+ 30 - 0
src/main/java/com/ssj/refund/service/impl/AuditInfoServiceImpl.java

@@ -0,0 +1,30 @@
+package com.ssj.refund.service.impl;
+
+import com.ssj.framework.core.common.service.BaseServiceImpl;
+import com.ssj.refund.bean.RefundAuditInfo;
+import com.ssj.refund.bean.RefundInfo;
+import com.ssj.refund.dao.IAuditInfoDao;
+import com.ssj.refund.dao.IMerchantRefundDao;
+import com.ssj.refund.service.IAuditInfoService;
+import com.ssj.refund.service.IMerchantRefundService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.repository.PagingAndSortingRepository;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author sh
+ * @className MerchantRefundServiceImpl
+ * @description implement
+ * @date 2021/7/9
+ */
+@Service
+public class AuditInfoServiceImpl extends BaseServiceImpl<RefundAuditInfo,String> implements IAuditInfoService {
+
+    @Autowired
+    private IAuditInfoDao dao;
+
+    @Override
+    public PagingAndSortingRepository<RefundAuditInfo, String> getDao() {
+        return dao;
+    }
+}

+ 27 - 0
src/main/java/com/ssj/refund/service/impl/MerchantRefundServiceImpl.java

@@ -0,0 +1,27 @@
+package com.ssj.refund.service.impl;
+
+import com.ssj.framework.core.common.service.BaseServiceImpl;
+import com.ssj.refund.bean.RefundInfo;
+import com.ssj.refund.dao.IMerchantRefundDao;
+import com.ssj.refund.service.IMerchantRefundService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.repository.PagingAndSortingRepository;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author sh
+ * @className MerchantRefundServiceImpl
+ * @description implement
+ * @date 2021/7/9
+ */
+@Service
+public class MerchantRefundServiceImpl extends BaseServiceImpl<RefundInfo,String> implements IMerchantRefundService {
+
+    @Autowired
+    private IMerchantRefundDao dao;
+
+    @Override
+    public PagingAndSortingRepository<RefundInfo, String> getDao() {
+        return dao;
+    }
+}

+ 8 - 0
src/main/java/com/ssj/service/sys/jxy/service/JxyService.java

@@ -77,4 +77,12 @@ public interface JxyService extends BaseService<Jxy, String> {
 	 * @return
 	 */
 	List<Map<String, Object>> findAnswerList(String questionIds);
+
+	/**
+	 * 退款审核列表
+	 * @param params
+	 * @param initPage
+	 * @return
+	 */
+    Page<Map<String, Object>> refundList(Map<String, Object> params, Pageable initPage);
 }

+ 5 - 0
src/main/java/com/ssj/service/sys/jxy/service/impl/JxyServiceImpl.java

@@ -183,4 +183,9 @@ public class JxyServiceImpl extends BaseServiceImpl<Jxy, String> implements JxyS
 	public List<Map<String, Object>> findAnswerList(String questionIds) {
 		return jxyQueryDao.findAnswerList(questionIds);
 	}
+
+	@Override
+	public Page<Map<String, Object>> refundList(Map<String, Object> params, Pageable initPage) {
+		return jxyQueryDao.refundList(params,initPage);
+	}
 }

+ 7 - 0
src/main/java/com/ssj/service/sys/role/service/RoleService.java

@@ -79,4 +79,11 @@ public interface RoleService extends BaseService<Role, String> {
 	 * @return
 	 */
 	Role findRoleByName(String roleName);
+
+	/**
+	 * 查找角色名称集合
+	 * @param adminId
+	 * @return
+	 */
+	List<String> getAdminRoleName(String adminId);
 }

+ 5 - 0
src/main/java/com/ssj/service/sys/role/service/impl/RoleServiceImpl.java

@@ -138,4 +138,9 @@ public class RoleServiceImpl  extends BaseServiceImpl<Role, String> implements R
 	public Role findRoleByName(String roleName) {
 		return roleDao.findRoleByName(roleName);
 	}
+
+	@Override
+	public List<String> getAdminRoleName(String adminId) {
+		return roleDao.getAdminRoleName(adminId);
+	}
 }

+ 3 - 0
src/main/java/com/ssj/sys/controller/AppInfoController.java

@@ -109,6 +109,9 @@ public class AppInfoController extends BaseController {
             } else if (type == 2) {
                 //家长端
                 filepath = PropertiesUtil.getValue("file_save_path") + "/app_pack/parent/";
+            }  else if (type == 12) {
+                //另外的app
+                filepath = PropertiesUtil.getValue("file_save_path") + "/app_pack/geniuswear/";
             } else {
                 filepath = PropertiesUtil.getValue("file_save_path") + "/app_pack/attachment/";
             }

+ 142 - 0
src/main/java/com/ssj/sys/controller/ErrorController.java

@@ -4,15 +4,25 @@ import cn.afterturn.easypoi.excel.ExcelExportUtil;
 import cn.afterturn.easypoi.excel.entity.ExportParams;
 import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
 import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
+import com.alibaba.fastjson.JSON;
 import com.ssj.bean.sys.homework.domain.HomeworkPicture;
 import com.ssj.bean.sys.picturepredeal.domain.PicturePreDeal;
+import com.ssj.bean.sys.role.domain.Admin;
+import com.ssj.bean.weixin.libmy.domain.LibBookApply;
 import com.ssj.framework.basic.common.bean.SplitPage;
 import com.ssj.framework.core.common.controller.BaseController;
 import com.ssj.framework.core.util.PropertiesUtil;
 import com.ssj.framework.core.util.ResponseEntity;
+import com.ssj.refund.bean.RefundAuditInfo;
+import com.ssj.refund.bean.RefundInfo;
+import com.ssj.refund.service.IAuditInfoService;
+import com.ssj.refund.service.IMerchantRefundService;
+import com.ssj.service.reading.request.RandomBookReq;
+import com.ssj.service.sys.fx.service.SysCuratorService;
 import com.ssj.service.sys.homework.service.HomeworkPictureService;
 import com.ssj.service.sys.jxy.service.JxyService;
 import com.ssj.service.sys.picturepredeal.service.PicturePreDealService;
+import com.ssj.service.sys.role.service.RoleService;
 import com.ssj.service.sys.sort.service.SortService;
 import com.ssj.sys.model.ErrorModel;
 import org.apache.poi.ss.usermodel.Workbook;
@@ -53,6 +63,18 @@ public class ErrorController extends BaseController {
     @Autowired
     private HomeworkPictureService homeworkPictureService;
 
+    @Autowired
+    private RoleService roleService;
+
+    @Autowired
+    private IMerchantRefundService merchantRefundService;
+
+    @Autowired
+    private IAuditInfoService auditInfoService;
+
+    @Autowired
+    private SysCuratorService sysCuratorService;
+
     @RequestMapping("/errorList")
     public String errorList(Model model,
                             @RequestParam(required = false, defaultValue = "10") int pageSize,
@@ -233,4 +255,124 @@ public class ErrorController extends BaseController {
         }
         return "sys/error/answerInfo";
     }
+
+    /**
+     * 退款审核列表
+     * @param model
+     * @param pageSize
+     * @param pageNo
+     * @return
+     */
+    @RequestMapping("/refundList")
+    public String refundList(Model model,
+                            @RequestParam(required = false, defaultValue = "10") int pageSize,
+                            @RequestParam(required = false, defaultValue = "1") int pageNo){
+
+        Map<String, Object> params = new HashMap<String, Object>();
+        SplitPage sp = new SplitPage();
+        sp.setAction(request.getRequestURI());
+        sp.setPageNo(pageNo);
+        sp.setPageSize(pageSize);
+        sp.setParams(params);
+        Page<Map<String,Object>> page= jxyService.refundList(params, initPage(pageNo,pageSize));
+        sp.setRowCnt((int) page.getTotalElements());
+        model.addAttribute("list", page.getContent());
+        model.addAttribute("listNavigatHtml", sp.getSysPaginHtml());
+        model.addAttribute("page", sp);
+        model.addAttribute("search", params);
+        model.addAttribute("roleList", roleService.getAdminRoleName(adminId()));
+        return  "sys/refund/refundList";
+    }
+    @RequestMapping("/libRefundEdit")
+    public String libRefundEdit(Model model, @RequestParam(required = false, defaultValue = "1") String id) throws Exception{
+
+        model.addAttribute("id", id);
+
+        return "sys/refund/refundMsgEdit";
+    }
+
+
+    @RequestMapping(value="/saveRefundAudit",method = RequestMethod.POST)
+    @ResponseBody
+    public ResponseEntity saveRefundAudit(@RequestParam String id, @RequestParam int state,String msg){
+        ResponseEntity responseEntity = new ResponseEntity();
+        try {
+            RefundInfo apply = merchantRefundService.getById(id);
+            if(apply == null){
+                responseEntity.failure("000","审核数据不存在");
+                return responseEntity;
+            }
+            RefundAuditInfo info = new RefundAuditInfo();
+            info.setAuditPoint(apply.getAuditPoint());
+            info.setCreateTime(new Date());
+            info.setAuditState(state);
+            info.setMsg(msg);
+            info.setRefundId(apply.getId());
+            auditInfoService.save(info);
+            if(state==2){
+                //拒绝才设置
+                apply.setAuditState(state);
+            }else{
+                if("业务审核".equals(apply.getAuditPoint())){
+                    apply.setAuditPoint("财务审核");
+                }else{
+                    apply.setAuditState(state);
+                }
+            }
+            merchantRefundService.save(apply);
+            responseEntity.success("审核成功");
+        }catch (Exception e){
+            responseEntity.failure("系统出现异常,保存失败");
+            logger.error("异常", e);
+        }
+
+        return responseEntity;
+    }
+
+    /**
+     * 退款审核列表
+     * @param model
+     * @param pageSize
+     * @param pageNo
+     * @return
+     */
+    @RequestMapping("/vipList")
+    public String vipList(Model model,
+                             @RequestParam(required = false, defaultValue = "10") int pageSize,
+                             @RequestParam(required = false, defaultValue = "1") int pageNo){
+
+        Map<String, Object> params = new HashMap<String, Object>();
+        //是否显示编辑服务时间 1不显示 2显示
+        params.put("showEdit",1);
+        params.put("stat",request.getParameter("stat")==null?"":request.getParameter("stat"));
+        params.put("startDate",request.getParameter("startDate")==null?"":request.getParameter("startDate"));
+        params.put("endDate",request.getParameter("endDate")==null?"":request.getParameter("endDate"));
+        params.put("serviceType",request.getParameter("serviceType")==null?"":request.getParameter("serviceType"));
+        params.put("pageSize",pageSize);
+        params.put("pageNo",pageNo);
+        String vipIds = request.getParameter("vipIds")==null?"":request.getParameter("vipIds");
+        if(!"".equals(vipIds)){
+            params.put("vipIds",vipIds.replace("[","").replace("]","").split(","));
+        }
+
+        String classId = request.getParameter("classId")==null?"":request.getParameter("classId");
+        params.put("classId",classId);
+        Map<String,Object> data = sysCuratorService.studentIndex("",params);
+        getModel(model,data,params,pageSize,pageNo);
+        return "sys/refund/studentIndex";
+    }
+
+    public Model getModel(Model model,Map<String,Object> data,Map<String, Object> params,int pageSize,int pageNo){
+        SplitPage sp = new SplitPage();
+        sp.setAction(request.getRequestURI());
+        sp.setPageNo(pageNo);
+        sp.setPageSize(pageSize);
+        sp.setParams(params);
+        sp.setRowCnt(Integer.parseInt(data.get("total").toString()));
+        model.addAttribute("page", sp);
+        model.addAllAttributes(data);
+        model.addAttribute("search", params);
+        model.addAttribute("listNavigatHtml", sp.getSysPaginHtml());
+        return  model;
+    }
 }

+ 4 - 0
src/main/java/com/ssj/sys/controller/SysOrderController.java

@@ -96,6 +96,10 @@ public class SysOrderController extends BaseController {
 		 params.put("beginDate", request.getParameter("beginDate")==null?DateHelper.format(DateHelper.getTheMonthFirstDay(), "yyyy-MM-dd"):request.getParameter("beginDate"));
 		 params.put("endDate", request.getParameter("endDate")==null?DateHelper.format(new Date(), "yyyy-MM-dd"):request.getParameter("endDate"));
 		 params.put("order_no", request.getParameter("order_no")==null?"":request.getParameter("order_no"));
+		 if(request.getParameter("order_no")!=null){
+			 params.put("beginDate","");
+			 params.put("endDate", "");
+		 }
 		SplitPage sp = new SplitPage();
 	        sp.setAction(request.getRequestURI().toString());
 	        sp.setPageNo(pageNo);

+ 11 - 3
src/main/resources/mybatis/mapper/CuratorMapper.xml

@@ -442,9 +442,11 @@
         left join tb_lib_vip t2 on t1.vip_id=t2.id
         left join tb_user t3 on t2.user_id=t3.id
         left join tb_lib_vip_service t4 on t2.id = t4.vip_id
-            where t.lib_id=#{map.libId}
-             and t1.status=1
+            where  t1.status=1
              and t2.stat=1
+        <if test="map.libId != null and map.libId != '' ">
+            and t.lib_id=#{map.libId}
+        </if>
         <if test="map.searchValue != null and map.searchValue != '' ">
             and t2.child_name regexp #{map.searchValue}
         </if>
@@ -464,7 +466,13 @@
             and t4.species='S999'
         </if>
         <if test="map.serviceType != null and map.serviceType != '' and map.serviceType!='S999'">
-            and t4.correct_type=#{map.serviceType}
+        and t4.correct_type=#{map.serviceType}
+    </if>
+        <if test="map.vipIds != null and map.vipIds != '' ">
+            where t2.id in
+            <foreach collection="map.vipIds" open="(" item="type" separator="," close=")">
+                #{type}
+            </foreach>
         </if>
         group by t2.id
     </select>

+ 1 - 0
src/main/resources/templates/sys/appinfo/appinfoAdd.html

@@ -84,6 +84,7 @@
 						<option  value="11" th:selected="${entity.type==11}" >小塾学伴pad(Android)</option>
 						<option  value="10" th:selected="${entity.type==10}" >小塾学伴(iOS)</option>
 						<option  value="9" th:selected="${entity.type==9}" >小塾学伴(Android)</option>
+						<option  value="9" th:selected="${entity.type==12}" >小塾学伴(小天才Android平台)</option>
 					</select>
 				</div>
 			</li>

+ 141 - 0
src/main/resources/templates/sys/refund/refundList.html

@@ -0,0 +1,141 @@
+<html xmlns:th="http://www.thymeleaf.org">
+<head>
+<title>私塾家</title>
+<script th:include="sys/common/metaCSS" th:remove="tag"></script> 
+<script th:include="sys/common/metaJS" th:remove="tag"></script>
+	<script src="sys/js/My97DatePicker/WdatePicker.js" th:src="@{/static/sys/js/My97DatePicker/WdatePicker.js}"></script>
+</head>
+<style>
+	.tablelink{margin-right:10px;}
+	.stylecss{
+	      color: red;
+	}
+	.select_width{
+	     width: 70px;
+	}
+	.select_width2{
+		width: 120px;
+	}
+	.imgshow{
+		width:100%;
+		margin-top: 10px;
+		margin-left:10px;
+	}
+</style>
+<body>
+<div class="place">
+	<span>位置:</span>
+	<ul class="placeul">
+		<li><a href="#">平台管理</a></li>
+		<li><a href="#">退款申请</a></li>
+	</ul>
+</div>
+<div class="rightinfo">
+	<form id="seachform" th:action="@{/sys/error/refundList.html}" method="post">
+<!--	<ul class="seachform">-->
+<!--		<li>-->
+<!--			<label>开始时间</label>-->
+<!--			<input type="text" id="beginDate" name="beginDate"  onclick="WdatePicker({readOnly:true,maxDate:'#F{$dp.$D(\'endDate\')}'})" th:value="${search.beginDate }" class="scinput date_width " placeholder="开始时间">-->
+<!--		</li>-->
+
+
+<!--		<li>-->
+<!--			<label>结束时间</label>-->
+<!--			<input type="text" id="endDate" name="endDate"  onclick="WdatePicker({minDate:'#F{$dp.$D(\'beginDate\')}',maxDate:'%y-%M-%d'})" th:value="${search.endDate }" class="scinput date_width" placeholder="结束时间">-->
+<!--		</li>-->
+<!--		<li>-->
+<!--			<label>校区</label>-->
+<!--			<input name="lib_name" type="text" class="scinput" th:value="${search.get('lib_name')}"/>-->
+<!--		</li>-->
+<!--		<li>-->
+<!--		<label>科目</label>-->
+<!--			<select class="scinput select_width" name="subject" id="subject">-->
+<!--				 <option value=""  th:selected="${ search.get('subject') eq '' }"  >全部</option>-->
+<!--				 <option  th:each="sort:${zyb_course}"  th:value="${sort.name}"  th:if="${sort.name ne '总体'}" th:selected="${ search.get('subject')  eq sort.name }" th:text="${sort.name}" ></option>-->
+<!--			</select>-->
+<!--		</li>-->
+
+
+<!--		<li>-->
+<!--			<label>&nbsp;</label>-->
+<!--			<input type="button" class="scbtn" value="查询" />-->
+<!--		</li>-->
+<!--		<li>-->
+<!--			<input type="button" id="button" style="width: 100px;" class="scbtnbution" value="导出" />-->
+<!--		</li>-->
+<!--		</ul>-->
+	</form>
+	<table class="tablelist">
+		<thead>
+		    <tr>
+		        <th style="width: 80px;">序号</th>
+		        <th>校区</th>
+		        <th>支付订单编号</th>
+		        <th>服务订单编号</th>
+		        <th>退款原因</th>
+		        <th>其他原因</th>
+		        <th>退款学生人数</th>
+		        <th>单价</th>
+		        <th>参考退款总额</th>
+		        <th>审核状态</th>
+		        <th>审核节点</th>
+		        <th>申请时间</th>
+		        <th>申请人微信昵称</th>
+		        <th>退款人开户姓名</th>
+		        <th>退款人开户行</th>
+		        <th>退款人银行账号</th>
+		        <th>操作</th>
+		    </tr>
+		</thead>
+		<tbody>
+			<tr th:each="item:${list}" >
+				<td th:text="${itemStat.count}"></td>
+					<td th:text="${item.get('unit_name')}"  th:title="${item.get('unit_name')}" ></td>
+					<td><a th:if="${item.get('order_no')}" th:href="@{/sys/order/orderList.html(order_no=${item.get('order_no')})}"  th:text="${item.get('order_no')}"></a></td>
+					<td><a th:if="${item.get('meal_order_id')}" th:href="@{/sys/fx/merchantMealList.html(orderId=${item.get('meal_order_id')})}"  class="tablelink" th:text="${item.get('meal_order_id')}"></a></td>
+					<td th:text="${item.get('refund_option')}"></td>
+					<td th:text="${item.get('other_reason')}"></td>
+					<td><a th:if="${item.get('student_count')}" th:href="@{/sys/error/vipList.html(vipIds=${item.get('vip_ids')})}"  class="tablelink" th:text="${item.get('student_count')}"></a></td>
+					<td th:text="${item.get('unit_price')}"></td>
+					<td th:text="${item.get('refund_price')}"></td>
+					<td th:switch="${item.get('audit_state')}">
+						<span th:case="0">审核中</span>
+						<span th:case="1">审核通过</span>
+						<span th:case="2">审核拒绝</span>
+					</td>
+					<td th:text="${item.get('audit_point')}"></td>
+					<td  th:text="${#calendars.format(item.get('create_time'),'yyyy-MM-dd HH:mm:ss')}" ></td>
+<!--					<td  class="imgtd">-->
+<!--						<img th:if="${item.fileKey}!=null" th:src="${imgUrl}+''+${item.fileKey}" style="width: 50px;height: 50px;" />-->
+<!--					</td>-->
+				<td  th:text="${item.get('wx_name')}" ></td>
+				<td  th:text="${item.get('your_name')}" ></td>
+				<td  th:text="${item.get('open_bank')}" ></td>
+				<td  th:text="${item.get('bank_account')}" ></td>
+				<td>
+					<a th:if="${#lists.contains(roleList,item.get('audit_point')) && item.get('audit_state')==0 }"  href="javascript:;" th:onclick="'openById(\''+${item.id}+'\')'"  class="tablelink">审核</a>
+				</td>
+			</tr>
+		</tbody>
+	</table>
+	<!-- 分页 -->
+	<div class="pagin">
+    	<div class="message">共<i class="blue">[[${page.rowCnt}]]</i>条记录,当前显示第&nbsp;<i class="blue">[[${page.pageNo }]]&nbsp;</i>页</div>
+    	<div th:utext='${listNavigatHtml}' th:remove="tag" ></div>
+   	</div>
+</div>
+</body>
+<script type="text/javascript">
+	function openById(id){
+		layer.open({
+			type: 2,
+			title: "审核留言",
+			closeBtn: 1, //不显示关闭按钮
+			shift: 0.8,
+			//offset: '100px',
+			area: ['55%', '55%'],
+			content: "[[${sysUrl}]]/sys/error/libRefundEdit.html?id="+id
+		});
+	}
+</script>
+</html>

+ 82 - 0
src/main/resources/templates/sys/refund/refundMsgEdit.html

@@ -0,0 +1,82 @@
+<html xmlns:th="http://www.thymeleaf.org">
+<head>
+	<title>私塾家</title>
+	<script th:include="sys/common/metaCSS" th:remove="tag"></script>
+	<script th:include="sys/common/metaJS" th:remove="tag"></script>
+	<script src="sys/js/jquery.validate.min.js" th:src="@{/static/sys/js/jquery.validate.min.js}"></script>
+	<script src="sys/js/jquery-validation/messages_zh.js" th:src="@{/static/sys/js/jquery-validation/messages_zh.js}"></script>
+
+
+	<style>
+		body {
+			min-width: 180px;
+		}
+
+		.btn {
+			width: 100px;
+		}
+
+		label.control-label-error {
+			color: Red;
+		}
+
+		.forminfo li label {
+			width: 85px;
+			line-height: 34px;
+			display: block;
+			float: left;
+		}
+	</style>
+</head>
+
+<body>
+<div class="formbody">
+		<input type="hidden" name="id" id="hid" th:if="${id}" th:value="${id}"/>
+		<ul class="forminfo">
+			<li class="clearfix">
+				<label>留言:<b>*</b></label>
+				<textarea rows="10" cols="80" id="name" class="textinput"></textarea>
+			</li>
+			<li>
+				<label>&nbsp;</label>
+				<button onclick="roleFrom(1)" class="btn">通过</button>
+				<button onclick="roleFrom(2)"class="btn">拒绝</button>
+				<button type="button" class="btn" onclick="closeWin();">取消</button>
+			</li>
+		</ul>
+</div>
+</body>
+<script type="text/javascript">
+
+	function roleFrom(state){
+		var url="[[${sysUrl}]]/sys/error/saveRefundAudit";
+		$.post(url,{
+			'id': $("#hid").val(),
+			'msg': $("#name").val(),
+			"state":state
+		},function(data){
+			console.log(data);
+			if(data != null){
+				if(data.code == "999"){
+					parent.layer.msg("操作成功",{icon:1});
+					closeWin();
+				}else{
+					parent.layer.msg(data.msg,{icon:11});
+					closeWin();
+				}
+			}
+
+		});
+	}
+	function closeWin(){
+		setTimeout(function(){
+			parent.location.reload();
+			parent.layer.close(parent.layer.getFrameIndex(window.name));
+		},1000);
+
+	}
+
+
+
+</script>
+</html>

+ 81 - 0
src/main/resources/templates/sys/refund/studentIndex.html

@@ -0,0 +1,81 @@
+<html xmlns:th="http://www.thymeleaf.org">
+<head>
+<title>私塾家</title>
+<script th:include="sys/common/metaCSS" th:remove="tag"></script> 
+<script th:include="sys/common/metaJS" th:remove="tag"></script>
+<script src="sys/js/My97DatePicker/WdatePicker.js" th:src="@{/static/sys/js/My97DatePicker/WdatePicker.js}"></script>
+</head>
+<style>
+	.tablelink{margin-right:10px;}
+	.stylecss{
+	      color: red;
+	}
+	.select_width{
+	     width: 70px;
+	}
+	.date_width{
+	     width: 100px;
+	}
+	td div{
+     word-break:break-all;
+	}
+</style>
+<body>
+<div class="rightinfo">
+
+	<table class="tablelist">
+		<thead>
+		    <tr>
+		        <th style="width: 40px;">序号</th>
+		        <th>学生姓名</th>
+		        <th>班级名称</th>
+		        <th>头像</th>
+		        <th>年级</th>
+		        <th>电话号码</th>
+		    </tr>
+		</thead>
+		<tbody>
+			<tr th:each="item:${list}" >
+				<td th:text="${itemStat.count}" ></td>
+					<td th:title="${item.get('childName')}" th:text="${item.get('childName')}">
+					</td>
+					<td th:text="${item.get('className')}" ></td>
+					<td  class="imgtd">
+							<img  th:if="${item.get('imgUrl')}!=null" th:src="${imgUrl}+''+${item.get('imgUrl')}" class="tablelink" style="width: 50px;height: 50px;" />
+					</td>
+					</td>
+					<td th:text="${item.get('grade')}" ></td>
+					<td th:text="${item.get('phone')}" ></td>
+			</tr>
+		</tbody>
+	</table>
+	<!-- 分页 -->
+	<div class="pagin">
+    	<div class="message">共<i class="blue">[[${page.rowCnt}]]</i>条记录,当前显示第&nbsp;<i class="blue">[[${page.pageNo }]]&nbsp;</i>页</div>
+    	<div th:utext='${listNavigatHtml}' th:remove="tag" ></div>
+   	</div>
+</div>
+</body>
+<script type="text/javascript">
+	$("#button").on('click',function(){
+		document.getElementById("seachform").action = "[[${sysUrl}]]/sys/admin/curator/exportDetail";
+		$("#seachform").submit();
+		window.setTimeout(function(){
+			document.getElementById("seachform").action = "[[${sysUrl}]]//sys/admin/curator/studentIndex.html";
+		},3000);
+	});
+
+	function studentService(vipId,libId) {
+		var   title ='修改服务';
+		layer.open({
+			type: 2,
+			title: title,
+			closeBtn: 1, //不显示关闭按钮
+			shift: 0.8,
+			//offset: '100px',
+			area: ['80%', '80%'],
+			content:'[[${sysUrl}]]/sys/admin/curator/serviceEdit.html?libId='+libId+"&vipId="+vipId
+		});
+	}
+</script>
+</html>