Shanks 6 gadi atpakaļ
vecāks
revīzija
33a3515e98
22 mainītis faili ar 505 papildinājumiem un 116 dzēšanām
  1. 29 1
      src/main/java/com/ygj/yuemum/controller/admin/ImageUploadController.java
  2. 6 0
      src/main/java/com/ygj/yuemum/controller/order/YSOrderController.java
  3. 9 0
      src/main/java/com/ygj/yuemum/controller/pay/CustomerPayController.java
  4. 6 0
      src/main/java/com/ygj/yuemum/dao/order/YSOrderDao.java
  5. 1 0
      src/main/java/com/ygj/yuemum/dao/pay/CustomerPayDao.java
  6. 2 0
      src/main/java/com/ygj/yuemum/dao/pay/CustomerPayVoucherDao.java
  7. 46 45
      src/main/java/com/ygj/yuemum/domain/distributionchannel/DcIntroducer.java
  8. 11 5
      src/main/java/com/ygj/yuemum/domain/distributionchannel/DcIntroducerExtract.java
  9. 71 0
      src/main/java/com/ygj/yuemum/domain/order/YSOrder.java
  10. 18 0
      src/main/java/com/ygj/yuemum/domain/pay/CustomerPay.java
  11. 9 0
      src/main/java/com/ygj/yuemum/domain/pay/CustomerPayVoucher.java
  12. 2 2
      src/main/java/com/ygj/yuemum/service/distributionchannel/DcIntroducerApplicantService.java
  13. 37 7
      src/main/java/com/ygj/yuemum/service/order/YSOrderService.java
  14. 18 0
      src/main/java/com/ygj/yuemum/service/pay/CustomerPayService.java
  15. 8 0
      src/main/java/com/ygj/yuemum/service/pay/CustomerPayVoucherService.java
  16. 1 1
      src/main/resources/mybatis/mapper/admin/JlAdminUserMapper.xml
  17. 27 12
      src/main/resources/mybatis/mapper/distributionchannel/DcIntroducerExtractMapper.xml
  18. 8 8
      src/main/resources/mybatis/mapper/distributionchannel/DcIntroducerMapper.xml
  19. 142 31
      src/main/resources/mybatis/mapper/order/YSOrder.xml
  20. 30 2
      src/main/resources/mybatis/mapper/pay/CustomerPayMapper.xml
  21. 23 2
      src/main/resources/mybatis/mapper/pay/CustomerPayVoucherMapper.xml
  22. 1 0
      src/main/resources/mybatis/mapper/pay/PayMentsMapper.xml

+ 29 - 1
src/main/java/com/ygj/yuemum/controller/admin/ImageUploadController.java

@@ -342,7 +342,8 @@ public class ImageUploadController {
     @RequestMapping(value = "/uploadPayImg", method = RequestMethod.POST)
     @ResponseBody
     public int uploadPayImg(@RequestParam("file") MultipartFile file,
-                            @RequestParam(value = "eh_code") String eh_code) {
+                            @RequestParam(value = "eh_code") String eh_code,
+                            @RequestParam(value = "cv_orderstaus") Integer cv_orderstaus) {
         int dot = file.getOriginalFilename().lastIndexOf('.');
         String newName = file.getOriginalFilename().substring(dot);
         CustomerPayVoucher customerPayVoucher  = new CustomerPayVoucher();
@@ -357,6 +358,7 @@ public class ImageUploadController {
             file.transferTo(dest); //保存文件
             customerPayVoucher.setEh_code(eh_code);
             customerPayVoucher.setCv_filename(eh_code + sdf.format(date) +newName);
+            customerPayVoucher.setCv_orderstaus(cv_orderstaus);
             customerPayVoucher.setCv_filepath(httppayvoucher + "/"+ eh_code + sdf.format(date) +newName);
             customerPayVoucherService.insertCustomerPayVoucher(customerPayVoucher);
             return 1;
@@ -408,6 +410,32 @@ public class ImageUploadController {
         return jso;
     }
 
+
+    @PostMapping ("/queryOrderPayPhoto")
+    public String queryOrderPayPhoto(@ModelAttribute CustomerPayVoucher customerPayVoucher) throws ParseException {
+        List<CustomerPayVoucher> customerPays= customerPayVoucherService.queryOrderPayPhoto(customerPayVoucher);
+        String jso = JSONObject.toJSONString(customerPays);
+        jso = jso.replaceAll("cv_filepath","url");
+        jso = jso.replaceAll("cv_filename","name");
+        return jso;
+    }
+
+    @PostMapping("/deleteOrderPayPhoto")
+    public int deleteOrderPayPhoto(@ModelAttribute CustomerPayVoucher customerPayVoucher) throws ParseException {
+        try {
+            List<CustomerPayVoucher> customerPays= customerPayVoucherService.queryOrderPayPhoto(customerPayVoucher);
+            for(CustomerPayVoucher cpv:customerPays){
+                String path =  payvoucher + "/"+ cpv.getCv_filename();
+                File dest = new File(path);
+                dest.delete();
+            }
+            return customerPayVoucherService.deleteOrderPayPhoto(customerPayVoucher);
+        } catch (Exception ex){
+            ex.printStackTrace();
+            return 0;
+        }
+    }
+
     @RequestMapping(value = "/uploadPromotionImg", method = RequestMethod.POST)
     @ResponseBody
     public String uploadPromotionImg(@RequestParam(value = "file", required = false) MultipartFile file) {

+ 6 - 0
src/main/java/com/ygj/yuemum/controller/order/YSOrderController.java

@@ -35,6 +35,11 @@ public class YSOrderController {
             return YSOrderService.getAll();
     }
 
+    @GetMapping("/selectByOdNo")
+    public YSOrder selectByOdNo(@RequestParam("od_no") String od_no) {
+        return YSOrderService.selectByOdNo(od_no);
+    }
+
     @PostMapping("/addYSOrder")
     public int addYSOrder(@ModelAttribute YSOrder YSOrder) {
         return YSOrderService.addYSOrder(YSOrder);
@@ -55,4 +60,5 @@ public class YSOrderController {
     public YSOrder getYSOrder(@RequestParam("id") Integer id) {
         return YSOrderService.getYSOrder(id);
     }
+
 }

+ 9 - 0
src/main/java/com/ygj/yuemum/controller/pay/CustomerPayController.java

@@ -13,15 +13,24 @@ public class CustomerPayController {
 
     @Autowired
     private CustomerPayService customerPayService;
+
     @GetMapping("/selectCustomerPay")
     public List<CustomerPay> selectCustomerPay(@RequestParam("cp_orderno") String cp_orderno) {
         List<CustomerPay> customerPays = customerPayService.selectCustomerPay(cp_orderno);
         return customerPays;
     }
+    @PostMapping("/queryYSOrderPay")
+    public CustomerPay queryYSOrderPay(@ModelAttribute CustomerPay customerPay){
+        return customerPayService.queryYSOrderPay(customerPay);
+    }
 
     @PostMapping("/insertCustomerPay")
     public int insertCustomerPay(@ModelAttribute CustomerPay customerPay) {
         return  customerPayService.insertCustomerPay(customerPay);
     }
+    @PostMapping("/insertYsOrderPay")
+    public int insertYsOrderPay(@ModelAttribute CustomerPay customerPay) {
+        return  customerPayService.insertYsOrderPay(customerPay);
+    }
 
 }

+ 6 - 0
src/main/java/com/ygj/yuemum/dao/order/YSOrderDao.java

@@ -16,6 +16,12 @@ public interface YSOrderDao {
 
     int insertSelective(YSOrder record);
 
+    int getAESeq();
+
+    int updateYsOrderStatus(YSOrder ysOrder);
+
+    YSOrder selectByOdNo(String od_no);
+
     YSOrder selectByPrimaryKey(Integer id);
 
     int getCount();

+ 1 - 0
src/main/java/com/ygj/yuemum/dao/pay/CustomerPayDao.java

@@ -10,4 +10,5 @@ public interface CustomerPayDao {
 
     List<CustomerPay> selectCustomerPay(String cp_orderno);
     int insertCustomerPay(CustomerPay customerPay);
+    CustomerPay queryYSOrderPay(CustomerPay customerPay);
 }

+ 2 - 0
src/main/java/com/ygj/yuemum/dao/pay/CustomerPayVoucherDao.java

@@ -9,7 +9,9 @@ import java.util.List;
 public interface CustomerPayVoucherDao {
 
     List<CustomerPayVoucher> selectCustomerPayVoucher(String cp_orderno);
+    List<CustomerPayVoucher> queryOrderPayPhoto(CustomerPayVoucher customerPayVoucher);
     int insertCustomerPayVoucher(CustomerPayVoucher customerPayVoucher);
     int deleteCustomerPayVoucher(String cv_filename);
     int deleteCustomerPayVoucherAll(String eh_code);
+    int deleteOrderPayPhoto(CustomerPayVoucher customerPayVoucher);
 }

+ 46 - 45
src/main/java/com/ygj/yuemum/domain/distributionchannel/DcIntroducer.java

@@ -5,8 +5,8 @@ public class DcIntroducer {
     private Integer id;
     private String wv_phone;
     private Integer wv_gradeid;
-    private Integer wv_Introduction_total;
-    private Integer wv_withdraw_total;
+    private Double wv_Introduction_total;
+    private Double wv_withdraw_total;
     private Integer wv_Introduction_count;
     private Integer wv_order_count;
     private String wv_qrcode;
@@ -22,29 +22,6 @@ public class DcIntroducer {
     private Integer page;
     private Integer limit;
 
-    public String getWv_account_bank() {
-        return wv_account_bank;
-    }
-
-    public void setWv_account_bank(String wv_account_bank) {
-        this.wv_account_bank = wv_account_bank;
-    }
-
-    public String getWv_account_number_path() {
-        return wv_account_number_path;
-    }
-
-    public void setWv_account_number_path(String wv_account_number_path) {
-        this.wv_account_number_path = wv_account_number_path;
-    }
-
-    public String getWv_account_number() {
-        return wv_account_number;
-    }
-
-    public void setWv_account_number(String wv_account_number) {
-        this.wv_account_number = wv_account_number;
-    }
 
     public Integer getId() {
         return id;
@@ -70,19 +47,19 @@ public class DcIntroducer {
         this.wv_gradeid = wv_gradeid;
     }
 
-    public Integer getWv_Introduction_total() {
+    public Double getWv_Introduction_total() {
         return wv_Introduction_total;
     }
 
-    public void setWv_Introduction_total(Integer wv_Introduction_total) {
+    public void setWv_Introduction_total(Double wv_Introduction_total) {
         this.wv_Introduction_total = wv_Introduction_total;
     }
 
-    public Integer getWv_withdraw_total() {
+    public Double getWv_withdraw_total() {
         return wv_withdraw_total;
     }
 
-    public void setWv_withdraw_total(Integer wv_withdraw_total) {
+    public void setWv_withdraw_total(Double wv_withdraw_total) {
         this.wv_withdraw_total = wv_withdraw_total;
     }
 
@@ -126,22 +103,6 @@ public class DcIntroducer {
         this.wv_people_count = wv_people_count;
     }
 
-    public Integer getPage() {
-        return page;
-    }
-
-    public void setPage(Integer page) {
-        this.page = page;
-    }
-
-    public Integer getLimit() {
-        return limit;
-    }
-
-    public void setLimit(Integer limit) {
-        this.limit = limit;
-    }
-
     public Integer getWv_register_count() {
         return wv_register_count;
     }
@@ -173,4 +134,44 @@ public class DcIntroducer {
     public void setWv_consultant(Integer wv_consultant) {
         this.wv_consultant = wv_consultant;
     }
+
+    public String getWv_account_number() {
+        return wv_account_number;
+    }
+
+    public void setWv_account_number(String wv_account_number) {
+        this.wv_account_number = wv_account_number;
+    }
+
+    public String getWv_account_bank() {
+        return wv_account_bank;
+    }
+
+    public void setWv_account_bank(String wv_account_bank) {
+        this.wv_account_bank = wv_account_bank;
+    }
+
+    public String getWv_account_number_path() {
+        return wv_account_number_path;
+    }
+
+    public void setWv_account_number_path(String wv_account_number_path) {
+        this.wv_account_number_path = wv_account_number_path;
+    }
+
+    public Integer getPage() {
+        return page;
+    }
+
+    public void setPage(Integer page) {
+        this.page = page;
+    }
+
+    public Integer getLimit() {
+        return limit;
+    }
+
+    public void setLimit(Integer limit) {
+        this.limit = limit;
+    }
 }

+ 11 - 5
src/main/java/com/ygj/yuemum/domain/distributionchannel/DcIntroducerExtract.java

@@ -8,14 +8,22 @@ public class DcIntroducerExtract {
     private String wue_orderno;
     private Integer wue_type;
     private String wue_applydate;
-    private Integer wue_applysum;
+    private Double wue_applysum;
     private String wue_approverdate;
     private Integer wue_approversum;
     private String wue_approveruser;
     private String wue_paydate;
+    private String wue_remarks;
     private Integer page;
     private Integer limit;
 
+    public String getWue_remarks() {
+        return wue_remarks;
+    }
+
+    public void setWue_remarks(String wue_remarks) {
+        this.wue_remarks = wue_remarks;
+    }
 
     public String getWue_bank_card() {
         return wue_bank_card;
@@ -57,16 +65,14 @@ public class DcIntroducerExtract {
         this.wue_type = wue_type;
     }
 
-
-    public Integer getWue_applysum() {
+    public Double getWue_applysum() {
         return wue_applysum;
     }
 
-    public void setWue_applysum(Integer wue_applysum) {
+    public void setWue_applysum(Double wue_applysum) {
         this.wue_applysum = wue_applysum;
     }
 
-
     public Integer getWue_approversum() {
         return wue_approversum;
     }

+ 71 - 0
src/main/java/com/ygj/yuemum/domain/order/YSOrder.java

@@ -5,30 +5,101 @@ public class YSOrder {
     private Integer id;
     private String od_no;
     private String od_user_name;
+    private String od_user_address;
     private Integer od_status;
     private String od_phone;
     private String od_startdate;
     private String od_enddate;
     private Integer od_mmid;
+    private String od_mmname;
     private Integer od_product_id;
     private Integer od_product_item_id;
     private Integer od_cityid;
+    private String od_cityidname;
     private String od_contract;
     private Integer od_consultantid;
+    private String od_consultantname;
     private String od_introducer_phone;
     private Integer od_introducer_consultant;
     private Integer od_order_amount;
     private Integer od_mdj_amount;
     private Integer od_vip_cash;
+    private Double od_earnestpay;
+    private Double od_balancepay;
     private Integer od_ismdj;
     private String od_mdjstartdate;
     private String od_mdjenddate;
     private Integer od_user;
+    private String od_username;
     private String od_date;
+    private String od_product_name;
 
     private Integer page;
     private Integer limit;
 
+    public Double getOd_earnestpay() {
+        return od_earnestpay;
+    }
+
+    public void setOd_earnestpay(Double od_earnestpay) {
+        this.od_earnestpay = od_earnestpay;
+    }
+
+    public Double getOd_balancepay() {
+        return od_balancepay;
+    }
+
+    public void setOd_balancepay(Double od_balancepay) {
+        this.od_balancepay = od_balancepay;
+    }
+
+    public String getOd_user_address() {
+        return od_user_address;
+    }
+
+    public void setOd_user_address(String od_user_address) {
+        this.od_user_address = od_user_address;
+    }
+
+    public String getOd_username() {
+        return od_username;
+    }
+
+    public void setOd_username(String od_username) {
+        this.od_username = od_username;
+    }
+
+    public String getOd_consultantname() {
+        return od_consultantname;
+    }
+
+    public void setOd_consultantname(String od_consultantname) {
+        this.od_consultantname = od_consultantname;
+    }
+
+    public String getOd_cityidname() {
+        return od_cityidname;
+    }
+
+    public void setOd_cityidname(String od_cityidname) {
+        this.od_cityidname = od_cityidname;
+    }
+
+    public String getOd_product_name() {
+        return od_product_name;
+    }
+
+    public void setOd_product_name(String od_product_name) {
+        this.od_product_name = od_product_name;
+    }
+
+    public String getOd_mmname() {
+        return od_mmname;
+    }
+
+    public void setOd_mmname(String od_mmname) {
+        this.od_mmname = od_mmname;
+    }
 
     public Integer getId() {
         return id;

+ 18 - 0
src/main/java/com/ygj/yuemum/domain/pay/CustomerPay.java

@@ -5,16 +5,34 @@ public class CustomerPay {
     private Integer id;
     private Integer cp_ordertype;
     private String cp_orderno;
+    private Integer cp_orderstatus;
     private Integer cp_channel;
     private Double cp_discount;
     private String cp_paytype;
     private Double cp_payamount;
     private String cp_comments;
     private String cp_usercode;
+    private String cp_username;
     private String cp_date;
     private Integer page;
     private Integer limit;
 
+    public String getCp_username() {
+        return cp_username;
+    }
+
+    public void setCp_username(String cp_username) {
+        this.cp_username = cp_username;
+    }
+
+    public Integer getCp_orderstatus() {
+        return cp_orderstatus;
+    }
+
+    public void setCp_orderstatus(Integer cp_orderstatus) {
+        this.cp_orderstatus = cp_orderstatus;
+    }
+
     public Integer getId() {
         return id;
     }

+ 9 - 0
src/main/java/com/ygj/yuemum/domain/pay/CustomerPayVoucher.java

@@ -4,9 +4,18 @@ public class CustomerPayVoucher {
 
     private Integer id;
     private String eh_code;
+    private Integer cv_orderstaus;
     private String cv_filename;
     private String cv_filepath;
 
+    public Integer getCv_orderstaus() {
+        return cv_orderstaus;
+    }
+
+    public void setCv_orderstaus(Integer cv_orderstaus) {
+        this.cv_orderstaus = cv_orderstaus;
+    }
+
     public Integer getId() {
         return id;
     }

+ 2 - 2
src/main/java/com/ygj/yuemum/service/distributionchannel/DcIntroducerApplicantService.java

@@ -67,8 +67,8 @@ public class DcIntroducerApplicantService {
             DcIntroducer dcIntroducer = new DcIntroducer();
             dcIntroducer.setWv_phone(dcIntroducerApplicant.getWva_phone());
             dcIntroducer.setWv_gradeid(1); //再调整
-            dcIntroducer.setWv_Introduction_total(0);
-            dcIntroducer.setWv_withdraw_total(0);
+            dcIntroducer.setWv_Introduction_total(0.00);
+            dcIntroducer.setWv_withdraw_total(0.00);
             dcIntroducer.setWv_Introduction_count(0);
             dcIntroducer.setWv_qrcode(qrcodePath);
             dcIntroducer.setWv_people_count(0);

+ 37 - 7
src/main/java/com/ygj/yuemum/service/order/YSOrderService.java

@@ -9,6 +9,7 @@ import com.ygj.yuemum.domain.order.YSOrder;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.text.DecimalFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.HashMap;
@@ -53,16 +54,14 @@ public class YSOrderService {
     }
 
     public int addYSOrder(YSOrder YSOrder) {
+        //生成订单号
+        DecimalFormat dfseq = new DecimalFormat("000");
+        int seq = YSOrderDao.getAESeq() + 1;
         SimpleDateFormat dateFormat= new SimpleDateFormat("yyyyMMdd");
         Date date = new Date();
-        YSOrder.setOd_no("ON"+dateFormat.format(date)+(int)((Math.random()*9+1)*10000));
+        YSOrder.setOd_no("YSDD"+dateFormat.format(date)+dfseq.format(seq));
+        //调用接口
         try {
-            MmStock mmStock = new MmStock();
-            mmStock.setServant_code(YSOrder.getOd_mmid());
-            mmStock.setStart_date(YSOrder.getOd_startdate());
-            mmStock.setEnd_date(YSOrder.getOd_enddate());
-            mmStock.setOrderno(YSOrder.getOd_no());
-            mmStockDao.insertSelective(mmStock);
             YSOrderDao.insertSelective(YSOrder);
         }catch (Exception ex){
             ex.printStackTrace();
@@ -81,6 +80,11 @@ public class YSOrderService {
     public YSOrder getYSOrder(Integer id) {
         return YSOrderDao.selectByPrimaryKey(id);
     }
+
+    public YSOrder selectByOdNo(String od_no) {
+        return YSOrderDao.selectByOdNo(od_no);
+    }
+
     public int checkOrder(String phone) {
         return YSOrderDao.checkOrder(phone);
     }
@@ -90,4 +94,30 @@ public class YSOrderService {
         return YSOrderDao.updateByPrimaryKeySelective(YSOrder);
     }
 
+    public int updateYsOrderStatus(String od_no,Integer od_stauts, Double amount){
+        //更新订单状态&锁定月嫂签约
+        YSOrder ysOrder = YSOrderDao.selectByOdNo(od_no);
+        try {
+            if (ysOrder.getOd_status() == 1) {
+                MmStock mmStock = new MmStock();
+                mmStock.setServant_code(ysOrder.getOd_mmid());
+                mmStock.setStart_date(ysOrder.getOd_startdate());
+                mmStock.setStock_status(2);
+                mmStock.setEnd_date(ysOrder.getOd_enddate());
+                mmStock.setOrderno(ysOrder.getOd_no());
+                mmStockDao.insertSelective(mmStock);
+                ysOrder.setOd_earnestpay(amount);
+            } else {
+                ysOrder.setOd_balancepay(amount);
+            }
+            ysOrder.setOd_status(od_stauts);
+            YSOrderDao.updateYsOrderStatus(ysOrder);
+        }catch (Exception ex){
+            ex.printStackTrace();
+            return 0;
+        }
+        return 1;
+    }
+
+
 }

+ 18 - 0
src/main/java/com/ygj/yuemum/service/pay/CustomerPayService.java

@@ -9,6 +9,7 @@ import com.ygj.yuemum.domain.equipment.EquipmenteHireHead;
 import com.ygj.yuemum.domain.pay.CustomerPay;
 import com.ygj.yuemum.service.equipment.EquipmentInfoService;
 import com.ygj.yuemum.service.equipment.EquipmentLogService;
+import com.ygj.yuemum.service.order.YSOrderService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -30,10 +31,15 @@ public class CustomerPayService {
     private EquipmenteHireHeadDao equipmenteHireHeadDao;
     @Autowired
     private EquipmenteHireDetailDao equipmenteHireDetailDao;
+    @Autowired
+    private YSOrderService ysOrderService;
 
     public List<CustomerPay> selectCustomerPay(String cp_orderno) {
         return customerPayDao.selectCustomerPay(cp_orderno);
     }
+    public CustomerPay queryYSOrderPay (CustomerPay customerPay){
+        return customerPayDao.queryYSOrderPay(customerPay);
+    }
     public int insertCustomerPay(CustomerPay customerPay) {
         try{
             SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -64,6 +70,18 @@ public class CustomerPayService {
     public int insertCustomerPayOnLine(CustomerPay customerPay) {
         try{
             customerPayDao.insertCustomerPay(customerPay);
+        }catch (Exception ex){
+            ex.printStackTrace();
+            return 0;
+        }
+        return 1;
+    }
+
+    public int insertYsOrderPay(CustomerPay customerPay) {
+        try{
+            customerPayDao.insertCustomerPay(customerPay);
+            //更新订单状态&锁定月嫂
+            ysOrderService.updateYsOrderStatus(customerPay.getCp_orderno(),customerPay.getCp_orderstatus(),customerPay.getCp_payamount());
 
         }catch (Exception ex){
             ex.printStackTrace();

+ 8 - 0
src/main/java/com/ygj/yuemum/service/pay/CustomerPayVoucherService.java

@@ -17,6 +17,11 @@ public class CustomerPayVoucherService {
     public List<CustomerPayVoucher> selectCustomerPayVoucher(String eh_code) {
         return customerPayVoucherDao.selectCustomerPayVoucher(eh_code);
     }
+
+    public List<CustomerPayVoucher> queryOrderPayPhoto(CustomerPayVoucher customerPayVoucher) {
+        return customerPayVoucherDao.queryOrderPayPhoto(customerPayVoucher);
+    }
+
     public int insertCustomerPayVoucher(CustomerPayVoucher customerPayVoucher) {
         return customerPayVoucherDao.insertCustomerPayVoucher(customerPayVoucher);
     }
@@ -26,6 +31,9 @@ public class CustomerPayVoucherService {
     public int deleteCustomerPayVoucherAll(String eh_code){
         return  customerPayVoucherDao.deleteCustomerPayVoucherAll(eh_code);
     }
+    public int deleteOrderPayPhoto(CustomerPayVoucher customerPayVoucher) {
+        return customerPayVoucherDao.deleteOrderPayPhoto(customerPayVoucher);
+    }
 
 
 }

+ 1 - 1
src/main/resources/mybatis/mapper/admin/JlAdminUserMapper.xml

@@ -26,7 +26,7 @@
     </resultMap>
 
     <sql id="Base_Column_List" >
-        id,username,email,password,create_time,last_login_time,last_login_ip,role,status,org,last_login_location,remark,phone,province,city,district,enabled,update_time
+        id,username,name,email,password,create_time,last_login_time,last_login_ip,role,status,org,last_login_location,remark,phone,province,city,district,enabled,update_time
     </sql>
 
     <select id="checkUsername"  resultType="java.lang.Integer" parameterType="java.lang.String">

+ 27 - 12
src/main/resources/mybatis/mapper/distributionchannel/DcIntroducerExtractMapper.xml

@@ -9,11 +9,12 @@
         <result column="wue_bank_card" property="wue_bank_card" jdbcType="VARCHAR" />
         <result column="wue_type" property="wue_type" jdbcType="INTEGER" />
         <result column="wue_applydate" property="wue_applydate" jdbcType="DATE" />
-        <result column="wue_applysum" property="wue_applysum" jdbcType="INTEGER" />
+        <result column="wue_applysum" property="wue_applysum" jdbcType="DECIMAL" />
         <result column="wue_approverdate" property="wue_approverdate" jdbcType="DATE" />
         <result column="wue_approversum" property="wue_approversum" jdbcType="INTEGER" />
         <result column="wue_approveruser" property="wue_approveruser" jdbcType="INTEGER" />
         <result column="wue_paydate" property="wue_paydate" jdbcType="DATE" />
+        <result column="wue_remarks" property="wue_remarks" jdbcType="VARCHAR" />
     </resultMap>
 
     <!--获取所有数据-->
@@ -29,7 +30,8 @@
         DATE_FORMAT(wue_approverdate, '%Y-%m-%d') wue_approverdate,
         wue_approversum,
         fgetuser_name(wue_approveruser) wue_approveruser,
-        DATE_FORMAT(wue_paydate, '%Y-%m-%d') wue_paydate
+        DATE_FORMAT(wue_paydate, '%Y-%m-%d') wue_paydate,
+        wue_remarks
         from dc_introducer_extract
         where wue_phone = #{phone,jdbcType=VARCHAR}
         order by wue_type asc ,id desc
@@ -47,7 +49,8 @@
         DATE_FORMAT(wue_approverdate, '%Y-%m-%d') wue_approverdate,
         wue_approversum,
         fgetuser_name(wue_approveruser) wue_approveruser,
-        DATE_FORMAT(wue_paydate, '%Y-%m-%d') wue_paydate
+        DATE_FORMAT(wue_paydate, '%Y-%m-%d') wue_paydate,
+        wue_remarks
         from dc_introducer_extract
         where id = #{id,jdbcType=VARCHAR}
         order by wue_type asc ,id desc
@@ -66,7 +69,8 @@
         DATE_FORMAT(wue_approverdate, '%Y-%m-%d') wue_approverdate,
         wue_approversum,
         fgetuser_name(wue_approveruser) wue_approveruser,
-        DATE_FORMAT(wue_paydate, '%Y-%m-%d') wue_paydate
+        DATE_FORMAT(wue_paydate, '%Y-%m-%d') wue_paydate,
+        wue_remarks
         from dc_introducer_extract
         where DATE_FORMAT(wue_applydate, '%Y-%m-%d') = #{applydate,jdbcType=VARCHAR}
         order by wue_type asc ,id desc
@@ -84,7 +88,8 @@
         wue_approverdate,
         wue_approversum,
         fgetuser_name(wue_approveruser) wue_approveruser,
-        wue_paydate
+        wue_paydate,
+        wue_remarks
         from dc_introducer_extract
         where 1=1
         <if test="id != null and id != ''">
@@ -97,19 +102,19 @@
             and wue_phone = #{wue_phone,jdbcType=VARCHAR}
         </if>
         <if test="wue_bank_card != null and wue_bank_card != ''">
-            and wue_bank_card = #{wue_bank_card,jdbcType=VARCHAR}
+            and wue_bank_card like  "%"#{wue_bank_card,jdbcType=VARCHAR}"%"
         </if>
         <if test="wue_type != null and wue_type != ''">
             and wue_type = #{wue_type,jdbcType=INTEGER}
         </if>
         <if test="wue_applydate != null and wue_applydate != ''">
-            and wue_applydate = #{wue_applydate,jdbcType=DATE}
+            and DATE_FORMAT(wue_applydate, '%Y-%m-%d') = #{wue_applydate,jdbcType=DATE}
         </if>
         <if test="wue_applysum != null and wue_applysum != ''">
-            and wue_applysum = #{wue_applysum,jdbcType=INTEGER}
+            and wue_applysum = #{wue_applysum,jdbcType=DECIMAL}
         </if>
         <if test="wue_approverdate != null and wue_approverdate != ''">
-            and wue_approverdate = #{wue_approverdate,jdbcType=DATE}
+            and DATE_FORMAT(wue_approverdate, '%Y-%m-%d') = #{wue_approverdate,jdbcType=DATE}
         </if>
         <if test="wue_approversum != null and wue_approversum != ''">
             and wue_approversum = #{wue_approversum,jdbcType=INTEGER}
@@ -118,7 +123,7 @@
             and wue_approveruser = #{wue_approveruser,jdbcType=INTEGER}
         </if>
         <if test="wue_paydate != null and wue_paydate != ''">
-            and wue_paydate = #{wue_paydate,jdbcType=DATE}
+            and DATE_FORMAT(wue_paydate, '%Y-%m-%d') = #{wue_paydate,jdbcType=DATE}
         </if>
         order by id desc
     </select>
@@ -142,7 +147,7 @@
                 wue_applydate = #{wue_applydate,jdbcType=DATE},
             </if>
             <if test="wue_applysum != null" >
-                wue_applysum = #{wue_applysum,jdbcType=INTEGER},
+                wue_applysum = #{wue_applysum,jdbcType=DECIMAL},
             </if>
             <if test="wue_approverdate != null" >
                 wue_approverdate = #{wue_approverdate,jdbcType=DATE},
@@ -153,10 +158,14 @@
             <if test="wue_approveruser != null" >
                 wue_approveruser = #{wue_approveruser,jdbcType=INTEGER},
             </if>
+            <if test="wue_remarks != null" >
+                wue_remarks = #{wue_remarks,jdbcType=VARCHAR},
+            </if>
             <if test="wue_paydate != null" >
                 wue_paydate = #{wue_paydate,jdbcType=DATE}
             </if>
         </set>
+        where id = #{id,jdbcType=INTEGER}
     </update>
 
     <insert id="insertDcIntroducerExtract" parameterType="com.ygj.yuemum.domain.distributionchannel.DcIntroducerExtract" >
@@ -189,6 +198,9 @@
             <if test="wue_approveruser != null" >
                 wue_approveruser,
             </if>
+            <if test="wue_remarks != null" >
+                wue_remarks,
+            </if>
             <if test="wue_paydate != null" >
                 wue_paydate
             </if>
@@ -210,7 +222,7 @@
                 #{wue_applydate,jdbcType=DATE},
             </if>
             <if test="wue_applysum != null" >
-                #{wue_applysum,jdbcType=INTEGER},
+                #{wue_applysum,jdbcType=DECIMAL},
             </if>
             <if test="wue_approverdate != null" >
                 #{wue_approverdate,jdbcType=DATE},
@@ -221,6 +233,9 @@
             <if test="wue_approveruser != null" >
                 #{wue_approveruser,jdbcType=INTEGER},
             </if>
+            <if test="wue_remarks != null" >
+                #{wue_remarks,jdbcType=INTEGER},
+            </if>
             <if test="wue_paydate != null" >
                 #{wue_paydate,jdbcType=DATE}
             </if>

+ 8 - 8
src/main/resources/mybatis/mapper/distributionchannel/DcIntroducerMapper.xml

@@ -6,8 +6,8 @@
         <result column="id" property="id" jdbcType="INTEGER" />
         <result column="wv_phone" property="wv_phone" jdbcType="VARCHAR" />
         <result column="wv_gradeid" property="wv_gradeid" jdbcType="INTEGER" />
-        <result column="wv_Introduction_total" property="wv_Introduction_total" jdbcType="INTEGER" />
-        <result column="wv_withdraw_total" property="wv_withdraw_total" jdbcType="INTEGER" />
+        <result column="wv_Introduction_total" property="wv_Introduction_total" jdbcType="DECIMAL" />
+        <result column="wv_withdraw_total" property="wv_withdraw_total" jdbcType="DECIMAL" />
         <result column="wv_Introduction_count" property="wv_Introduction_count" jdbcType="INTEGER" />
         <result column="wv_order_count" property="wv_order_count" jdbcType="INTEGER" />
         <result column="wv_extract_count" property="wv_extract_count" jdbcType="INTEGER" />
@@ -68,10 +68,10 @@
             and wv_gradeid = #{wv_gradeid,jdbcType=INTEGER}
         </if>
         <if test="wv_Introduction_total != null and wv_Introduction_total != ''">
-            and wv_Introduction_total = #{wv_Introduction_total,jdbcType=INTEGER}
+            and wv_Introduction_total = #{wv_Introduction_total,jdbcType=DECIMAL}
         </if>
         <if test="wv_withdraw_total != null and wv_withdraw_total != ''">
-            and wv_withdraw_total = #{wv_withdraw_total,jdbcType=INTEGER}
+            and wv_withdraw_total = #{wv_withdraw_total,jdbcType=DECIMAL}
         </if>
         <if test="wv_Introduction_count != null and wv_Introduction_count != ''">
             and wv_Introduction_count = #{wv_Introduction_count,jdbcType=INTEGER}
@@ -122,10 +122,10 @@
                 wv_gradeid = #{wv_gradeid,jdbcType=INTEGER},
             </if>
             <if test="wv_Introduction_total != null" >
-                wv_Introduction_total = #{wv_Introduction_total,jdbcType=INTEGER},
+                wv_Introduction_total = #{wv_Introduction_total,jdbcType=DECIMAL},
             </if>
             <if test="wv_withdraw_total != null" >
-                wv_withdraw_total = #{wv_withdraw_total,jdbcType=INTEGER},
+                wv_withdraw_total = #{wv_withdraw_total,jdbcType=DECIMAL},
             </if>
             <if test="wv_Introduction_count != null" >
                 wv_Introduction_count = #{wv_Introduction_count,jdbcType=INTEGER},
@@ -242,10 +242,10 @@
                 #{wv_gradeid,jdbcType=INTEGER},
             </if>
             <if test="wv_Introduction_total != null" >
-                #{wv_Introduction_total,jdbcType=INTEGER},
+                #{wv_Introduction_total,jdbcType=DECIMAL},
             </if>
             <if test="wv_withdraw_total != null" >
-                #{wv_withdraw_total,jdbcType=INTEGER},
+                #{wv_withdraw_total,jdbcType=DECIMAL},
             </if>
             <if test="wv_extract_count != null" >
                 #{wv_extract_count,jdbcType=INTEGER},

+ 142 - 31
src/main/resources/mybatis/mapper/order/YSOrder.xml

@@ -6,6 +6,7 @@
         <id column="id" property="id" jdbcType="INTEGER" />
         <result column="od_no" property="od_no" jdbcType="VARCHAR" />
         <result column="od_user_name" property="od_user_name" jdbcType="VARCHAR" />
+        <result column="od_user_address" property="od_user_address" jdbcType="VARCHAR" />
         <result column="od_status" property="od_status" jdbcType="INTEGER" />
         <result column="od_phone" property="od_phone" jdbcType="VARCHAR" />
         <result column="od_startdate" property="od_startdate" jdbcType="DATE" />
@@ -21,6 +22,8 @@
         <result column="od_order_amount" property="od_order_amount" jdbcType="INTEGER" />
         <result column="od_mdj_amount" property="od_mdj_amount" jdbcType="INTEGER" />
         <result column="od_vip_cash" property="od_vip_cash" jdbcType="INTEGER" />
+        <result column="od_earnestpay" property="od_earnestpay" jdbcType="INTEGER" />
+        <result column="od_balancepay" property="od_balancepay" jdbcType="INTEGER" />
         <result column="od_ismdj" property="od_ismdj" jdbcType="INTEGER" />
         <result column="od_mdjstartdate" property="od_mdjstartdate" jdbcType="DATE" />
         <result column="od_mdjenddate" property="od_mdjenddate" jdbcType="DATE" />
@@ -30,9 +33,9 @@
     </resultMap>
 
     <sql id="Base_Column_List" >
-        id,od_no, od_user_name,od_status,od_phone,od_startdate,od_enddate,od_mmid,od_product_id
+        id,od_no, od_user_name,od_user_address,od_status,od_phone,od_startdate,od_enddate,od_mmid,od_product_id,
         od_product_item_id,od_cityid,od_contract,od_consultantid,od_introducer_phone,od_introducer_consultant,
-        od_order_amount,od_mdj_amount,od_vip_cash,od_ismdj,od_mdjstartdate,od_mdjenddate,od_user,od_date
+        od_order_amount,od_mdj_amount,od_vip_cash,od_earnestpay,od_balancepay,od_ismdj,od_mdjstartdate,od_mdjenddate,od_user,od_date
     </sql>
 
     <!--获取所有数据-->
@@ -59,68 +62,97 @@
 
     <select id="getAll" resultMap="BaseResultMap" >
         select
-        id,od_no, od_user_name,od_status,od_phone,od_startdate,od_enddate,fgetmmname(od_mmid) od_mmid,
-        fgetpackagename(od_product_id) od_product_id
+        id,od_no, od_user_name,od_user_address,od_status,od_phone,od_startdate,od_enddate,od_mmid,fgetmmname(od_mmid) od_mmname,
+        fgetpackagename(od_product_id) od_product_name,od_product_id,
         od_product_item_id,
-        fgetcityname(od_cityid) cityid,od_contract,od_consultantid,od_introducer_phone,od_introducer_consultant,
-        od_order_amount,od_mdj_amount,od_vip_cash,od_ismdj,od_mdjstartdate,od_mdjenddate,od_user,od_date
+        fgetcityname(od_cityid) od_cityidname, od_cityid,od_contract,od_consultantid,od_introducer_phone,od_introducer_consultant,
+        od_order_amount,od_mdj_amount,od_vip_cash,od_earnestpay,od_balancepay,od_ismdj,od_mdjstartdate,od_mdjenddate,od_user,od_date
         from ys_order
         order by id desc
     </select>
 
     <select id="queryYSOrder" resultMap="BaseResultMap" parameterType="com.ygj.yuemum.domain.order.YSOrder">
         select
-        id,od_no, od_user_name,od_status,od_phone,od_startdate,od_enddate,fgetmmname(od_mmid) od_mmid,
-        fgetpackagename(od_product_id) od_product_id
+        id,
+        od_no,
+        od_user_name,
+        od_user_address,
+        od_status,
+        od_phone,
+        od_startdate,
+        od_enddate,
+        od_mmid,
+        fgetmmname (od_mmid) od_mmname,
+        fgetpackagename (od_product_id) od_product_name,
+        od_product_id,
         od_product_item_id,
-        fgetcityname(od_cityid) cityid,od_contract,od_consultantid,od_introducer_phone,od_introducer_consultant,
-        od_order_amount,od_mdj_amount,od_vip_cash,od_ismdj,od_mdjstartdate,od_mdjenddate,od_user,od_date
+        od_cityid,
+        fgetbranches_name (od_cityid) od_cityidname,
+        od_contract,
+        od_consultantid,
+        fgetuser_name(od_consultantid) od_consultantname,
+        od_introducer_phone,
+        od_introducer_consultant,
+        od_order_amount,
+        od_mdj_amount,
+        od_vip_cash,
+        od_earnestpay,
+        od_balancepay,
+        od_ismdj,
+        od_mdjstartdate,
+        od_mdjenddate,
+        od_user,
+        fgetuser_name(od_user) od_username,
+        od_date
         from ys_order
         where 1=1
         <if test="od_no != null and od_no != ''">
             and od_no like "%"#{od_no,jdbcType=VARCHAR}"%"
         </if>
+        <if test="od_user_address != null and od_user_address != ''">
+            and od_user_address like "%"#{od_user_address,jdbcType=VARCHAR}"%"
+        </if>
         <if test="od_user_name != null and od_user_name != ''">
-            and od_user_name = #{od_user_name,jdbcType=VARCHAR}
+            and od_user_name like "%"#{od_user_name,jdbcType=VARCHAR}"%"
         </if>
         <if test="od_startdate != null and od_startdate != ''">
-            and od_startdate &gt;= #{od_startdate,jdbcType=DATE}
+            and DATE_FORMAT(od_startdate,'%Y-%m-%d') &gt;= DATE_FORMAT(#{od_startdate,jdbcType=DATE},'%Y-%m-%d')
         </if>
         <if test="od_enddate != null and od_enddate != ''">
-            od_enddate &lt;= #{od_enddate,jdbcType=DATE}
+            and DATE_FORMAT(od_enddate,'%Y-%m-%d') &lt;= DATE_FORMAT(#{od_enddate,jdbcType=DATE},'%Y-%m-%d')
         </if>
         <if test="od_status != null and od_status != ''">
-            and od_status = #{od_status,jdbcType=VARCHAR}
+            and od_status = #{od_status,jdbcType=INTEGER}
         </if>
         <if test="od_phone != null and od_phone != ''">
             and od_phone = #{od_phone,jdbcType=VARCHAR}
         </if>
         <if test="od_mmid != null and od_mmid != ''">
-            and od_mmid = #{od_mmid,jdbcType=VARCHAR}
+            and od_mmid = #{od_mmid,jdbcType=INTEGER}
         </if>
         <if test="od_product_id != null and od_product_id != ''">
-            and od_product_id = #{od_product_id,jdbcType=VARCHAR}
+            and od_product_id = #{od_product_id,jdbcType=INTEGER}
         </if>
         <if test="od_product_item_id != null and od_product_item_id != ''">
-            and od_product_item_id = #{od_product_item_id,jdbcType=VARCHAR}
+            and od_product_item_id = #{od_product_item_id,jdbcType=INTEGER}
         </if>
         <if test="od_cityid != null and od_cityid != ''">
-            and od_cityid = #{od_cityid,jdbcType=VARCHAR}
+            and od_cityid = #{od_cityid,jdbcType=INTEGER}
         </if>
         <if test="od_contract != null and od_contract != ''">
-            and od_contract = #{od_contract,jdbcType=VARCHAR}
+            and od_contract like "%"#{od_contract,jdbcType=VARCHAR}"%"
         </if>
         <if test="od_consultantid != null and od_consultantid != ''">
-            and od_consultantid = #{od_consultantid,jdbcType=VARCHAR}
+            and od_consultantid = #{od_consultantid,jdbcType=INTEGER}
         </if>
         <if test="od_introducer_phone != null and od_introducer_phone != ''">
             and od_introducer_phone = #{od_introducer_phone,jdbcType=VARCHAR}
         </if>
         <if test="od_ismdj != null and od_ismdj != ''">
-            and od_ismdj = #{od_ismdj,jdbcType=VARCHAR}
+            and od_ismdj = #{od_ismdj,jdbcType=INTEGER}
         </if>
         <if test="od_user != null and od_user != ''">
-            and od_user = #{od_user,jdbcType=VARCHAR}
+            and od_user = #{od_user,jdbcType=INTEGER}
         </if>
         order by id desc
     </select>
@@ -132,6 +164,42 @@
         where id = #{id,jdbcType=INTEGER}
     </select>
 
+    <select id="selectByOdNo" resultMap="BaseResultMap" parameterType="java.lang.String" >
+        select
+        od_no,
+        od_user_name,
+        od_user_address,
+        od_status,
+        od_phone,
+        od_startdate,
+        od_enddate,
+        od_mmid,
+        fgetmmname (od_mmid) od_mmname,
+        fgetpackagename (od_product_id) od_product_name,
+        od_product_id,
+        od_product_item_id,
+        od_cityid,
+        fgetbranches_name (od_cityid) od_cityidname,
+        od_contract,
+        od_consultantid,
+        fgetuser_name(od_consultantid) od_consultantname,
+        od_introducer_phone,
+        od_introducer_consultant,
+        od_order_amount,
+        od_mdj_amount,
+        od_vip_cash,
+        od_earnestpay,
+        od_balancepay,
+        od_ismdj,
+        od_mdjstartdate,
+        od_mdjenddate,
+        od_user,
+        fgetuser_name(od_user) od_username,
+        od_date
+        from ys_order
+        where od_no = #{od_no,jdbcType=INTEGER}
+    </select>
+
     <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
         delete from ys_order
         where id = #{id,jdbcType=VARCHAR}
@@ -147,6 +215,9 @@
             <if test="od_user_name != null" >
                 od_user_name,
             </if>
+            <if test="od_user_address != null" >
+                od_user_address,
+            </if>
             <if test="od_status != null" >
                 od_status,
             </if>
@@ -192,7 +263,12 @@
             <if test="od_vip_cash != null" >
                 od_vip_cash,
             </if>
-
+            <if test="od_earnestpay != null" >
+                od_earnestpay,
+            </if>
+            <if test="od_balancepay != null" >
+                od_balancepay,
+            </if>
             <if test="od_ismdj != null" >
                 od_ismdj,
             </if>
@@ -216,6 +292,9 @@
             <if test="od_user_name != null" >
                 #{od_user_name,jdbcType=VARCHAR},
             </if>
+            <if test="od_user_address != null" >
+                #{od_user_address,jdbcType=VARCHAR},
+            </if>
             <if test="od_status != null" >
                 #{od_status,jdbcType=INTEGER},
             </if>
@@ -228,9 +307,6 @@
             <if test="od_enddate != null" >
                 #{od_enddate,jdbcType=DATE},
             </if>
-            <if test="cm_phone != null" >
-                #{cm_phone,jdbcType=VARCHAR},
-            </if>
             <if test="od_mmid != null" >
                 #{od_mmid,jdbcType=INTEGER},
             </if>
@@ -264,6 +340,12 @@
             <if test="od_vip_cash != null" >
                 #{od_vip_cash,jdbcType=INTEGER},
             </if>
+            <if test="od_earnestpay != null" >
+                #{od_earnestpay,jdbcType=INTEGER},
+            </if>
+            <if test="od_balancepay != null" >
+                #{od_balancepay,jdbcType=INTEGER},
+            </if>
             <if test="od_ismdj != null" >
                 #{od_ismdj,jdbcType=INTEGER},
             </if>
@@ -274,7 +356,7 @@
                 #{od_mdjenddate,jdbcType=DATE},
             </if>
             <if test="od_user != null" >
-                #{od_user,jdbcType=VARCHAR},
+                #{od_user,jdbcType=INTEGER},
             </if>
             <if test="od_date != null" >
                 #{od_date,jdbcType=VARCHAR}
@@ -292,6 +374,9 @@
             <if test="od_user_name != null" >
                 od_user_name = #{od_user_name,jdbcType=VARCHAR},
             </if>
+            <if test="od_user_address != null" >
+                od_user_address = #{od_user_address,jdbcType=VARCHAR},
+            </if>
             <if test="od_status != null" >
                 od_status = #{od_status,jdbcType=INTEGER},
             </if>
@@ -322,9 +407,6 @@
             <if test="od_contract != null" >
                 od_contract = #{od_contract,jdbcType=VARCHAR},
             </if>
-            <if test="packageid != null" >
-                packageid = #{packageid,jdbcType=VARCHAR},
-            </if>
             <if test="od_consultantid != null" >
                 od_consultantid = #{od_consultantid,jdbcType=INTEGER},
             </if>
@@ -343,6 +425,12 @@
             <if test="od_vip_cash != null" >
                 od_vip_cash = #{od_vip_cash,jdbcType=INTEGER},
             </if>
+            <if test="od_earnestpay != null" >
+                od_earnestpay = #{od_earnestpay,jdbcType=INTEGER},
+            </if>
+            <if test="od_balancepay != null" >
+                od_balancepay = #{od_balancepay,jdbcType=INTEGER},
+            </if>
             <if test="od_ismdj != null" >
                 od_ismdj = #{od_ismdj,jdbcType=INTEGER},
             </if>
@@ -353,7 +441,7 @@
                 od_mdjenddate = #{od_mdjenddate,jdbcType=DATE},
             </if>
             <if test="od_user != null" >
-                od_user = #{od_user,jdbcType=INTEGER}
+                od_user = #{od_user,jdbcType=INTEGER},
             </if>
             <if test="od_date != null" >
                 od_date = #{od_date,jdbcType=VARCHAR}
@@ -362,4 +450,27 @@
         where id = #{id,jdbcType=INTEGER}
     </update>
 
+    <select id="getAESeq" resultType="java.lang.Integer" >
+        select
+        count(1)
+        from ys_order
+        where date_format(od_date,'%Y-%m-%d') = date_format(now(),'%Y-%m-%d')
+    </select>
+
+    <update id="updateYsOrderStatus" parameterType="com.ygj.yuemum.domain.order.YSOrder" >
+        update ys_order
+        <set >
+            <if test="od_status != null" >
+                od_status = #{od_status,jdbcType=INTEGER},
+            </if>
+            <if test="od_earnestpay != null" >
+                od_earnestpay = #{od_earnestpay,jdbcType=INTEGER},
+            </if>
+            <if test="od_balancepay != null" >
+                od_balancepay = #{od_balancepay,jdbcType=INTEGER}
+            </if>
+        </set>
+        where od_no = #{od_no,jdbcType=INTEGER}
+    </update>
+
 </mapper>

+ 30 - 2
src/main/resources/mybatis/mapper/pay/CustomerPayMapper.xml

@@ -6,27 +6,49 @@
         <id column="id" property="id" jdbcType="INTEGER" />
         <result column="cp_ordertype" property="cp_ordertype" jdbcType="INTEGER" />
         <result column="cp_orderno" property="cp_orderno" jdbcType="VARCHAR" />
+        <result column="cp_orderstatus" property="cp_orderstatus" jdbcType="INTEGER" />
         <result column="cp_channel" property="cp_channel" jdbcType="INTEGER" />
         <result column="cp_discount" property="cp_discount" jdbcType="INTEGER" />
         <result column="cp_paytype" property="cp_paytype" jdbcType="VARCHAR" />
         <result column="cp_payamount" property="cp_payamount" jdbcType="INTEGER" />
         <result column="cp_comments" property="cp_comments" jdbcType="VARCHAR" />
         <result column="cp_usercode" property="cp_usercode" jdbcType="VARCHAR" />
+        <result column="cp_username" property="cp_username" jdbcType="VARCHAR" />
         <result column="cp_date" property="cp_date" jdbcType="DATE" />
     </resultMap>
 
     <sql id="Base_Column_List" >
-        id, cp_ordertype,cp_orderno,cp_channel,cp_discount,cp_paytype,cp_payamount,cp_comments,cp_usercode,cp_date
+        id, cp_ordertype,cp_orderno,cp_orderstatus,cp_channel,cp_discount,cp_paytype,cp_payamount,cp_comments,cp_usercode,cp_date
     </sql>
     <!-- 此处添加查询信息-->
     <select id="selectCustomerPay" resultMap="BaseResultMap" parameterType="java.lang.String" >
         select
-        id, cp_ordertype,cp_orderno,cp_channel,cp_discount,fgetequipmenpayname(cp_paytype) cp_paytype,cp_payamount,cp_comments,cp_usercode,cp_date
+        id, cp_ordertype,cp_orderno,cp_orderstatus,cp_channel,cp_discount,fgetequipmenpayname(cp_paytype) cp_paytype,cp_payamount,cp_comments,cp_usercode,cp_date
         from customer_pay
         where cp_orderno = #{cp_orderno,jdbcType=VARCHAR}
         order by id desc
     </select>
 
+    <select id="queryYSOrderPay" resultMap="BaseResultMap" parameterType="com.ygj.yuemum.domain.pay.CustomerPay" >
+        select
+        id,
+        cp_ordertype,
+        cp_orderno,
+        cp_orderstatus,
+        cp_channel,
+        cp_discount,
+        fgetequipmenpayname(cp_paytype) cp_paytype,
+        cp_payamount,
+        cp_comments,
+        cp_usercode,
+        fgetuser_name(cp_usercode) cp_username,
+        cp_date
+        from customer_pay
+        where cp_orderno = #{cp_orderno,jdbcType=VARCHAR}
+        and cp_orderstatus = #{cp_orderstatus,jdbcType=INTEGER}
+        order by id desc
+    </select>
+
     <!-- 插入一条培训信息 -->
     <insert id="insertCustomerPay" parameterType="com.ygj.yuemum.domain.pay.CustomerPay" >
         insert into customer_pay
@@ -37,6 +59,9 @@
             <if test="cp_orderno != null" >
                 cp_orderno,
             </if>
+            <if test="cp_orderstatus != null" >
+                cp_orderstatus,
+            </if>
             <if test="cp_channel != null" >
                 cp_channel,
             </if>
@@ -66,6 +91,9 @@
             <if test="cp_orderno != null" >
                 #{cp_orderno,jdbcType=VARCHAR},
             </if>
+            <if test="cp_orderstatus != null" >
+                #{cp_orderstatus,jdbcType=INTEGER},
+            </if>
             <if test="cp_channel != null" >
                 #{cp_channel,jdbcType=INTEGER},
             </if>

+ 23 - 2
src/main/resources/mybatis/mapper/pay/CustomerPayVoucherMapper.xml

@@ -5,22 +5,32 @@
     <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.pay.CustomerPayVoucher" >
         <id column="id" property="id" jdbcType="INTEGER" />
         <result column="eh_code" property="eh_code" jdbcType="VARCHAR" />
+        <result column="cv_orderstaus" property="cv_orderstaus" jdbcType="INTEGER" />
         <result column="cv_filename" property="cv_filename" jdbcType="VARCHAR" />
         <result column="cv_filepath" property="cv_filepath" jdbcType="VARCHAR" />
     </resultMap>
 
     <sql id="Base_Column_List" >
-        id, eh_code,cv_filename,cv_filepath
+        id, eh_code,cv_orderstaus,cv_filename,cv_filepath
     </sql>
     <!-- 此处添加查询信息-->
     <select id="selectCustomerPayVoucher" resultMap="BaseResultMap" parameterType="java.lang.String" >
         select
-        id, eh_code,cv_filename,cv_filepath
+        id, eh_code,cv_filename,cv_orderstaus,cv_filepath
         from customer_pay_voucher
         where eh_code = #{eh_code,jdbcType=VARCHAR}
         order by id desc
     </select>
 
+    <select id="queryOrderPayPhoto" resultMap="BaseResultMap" parameterType="com.ygj.yuemum.domain.pay.CustomerPayVoucher" >
+        select
+        id, eh_code,cv_filename,cv_orderstaus,cv_filepath
+        from customer_pay_voucher
+        where eh_code = #{eh_code,jdbcType=VARCHAR}
+        and cv_orderstaus = #{cv_orderstaus,jdbcType=INTEGER}
+        order by id desc
+    </select>
+
     <!-- 插入一条培训信息 -->
     <insert id="insertCustomerPayVoucher" parameterType="com.ygj.yuemum.domain.pay.CustomerPayVoucher" >
         insert into customer_pay_voucher
@@ -31,6 +41,9 @@
             <if test="cv_filename != null" >
                 cv_filename,
             </if>
+            <if test="cv_orderstaus != null" >
+                cv_orderstaus,
+            </if>
             <if test="cv_filepath != null" >
                 cv_filepath
             </if>
@@ -42,6 +55,9 @@
             <if test="cv_filename != null" >
                 #{cv_filename,jdbcType=VARCHAR},
             </if>
+            <if test="cv_orderstaus != null" >
+                #{cv_orderstaus,jdbcType=INTEGER},
+            </if>
             <if test="cv_filepath != null" >
                 #{cv_filepath,jdbcType=VARCHAR}
             </if>
@@ -55,4 +71,9 @@
         delete from customer_pay_voucher
         where eh_code = #{eh_code,jdbcType=VARCHAR}
     </delete>
+    <delete id="deleteOrderPayPhoto" parameterType="com.ygj.yuemum.domain.pay.CustomerPayVoucher"  >
+        delete from customer_pay_voucher
+        where eh_code = #{eh_code,jdbcType=VARCHAR}
+        and cv_orderstaus = #{cv_orderstaus,jdbcType=INTEGER}
+    </delete>
 </mapper>

+ 1 - 0
src/main/resources/mybatis/mapper/pay/PayMentsMapper.xml

@@ -18,6 +18,7 @@
         select
         id,pm_code,pm_name,pm_desc,pm_order,pm_config,pm_enable,pm_isonline
         from payments
+        where pm_enable = '1'
     </select>
 
     <select id="getPayMentAll" resultType="com.ygj.yuemum.domain.pay.PayMents" >