diff --git a/ant-design-vue-jeecg/src/views/customerpayment/admin/CustomerPaymentList.vue b/ant-design-vue-jeecg/src/views/customerpayment/admin/CustomerPaymentList.vue
index 1cec0273..87572524 100644
--- a/ant-design-vue-jeecg/src/views/customerpayment/admin/CustomerPaymentList.vue
+++ b/ant-design-vue-jeecg/src/views/customerpayment/admin/CustomerPaymentList.vue
@@ -100,27 +100,21 @@
+ 排序
+
编辑
-
-
- 更多
-
-
- 详情
-
-
- handleDelete(record.id)">
- 删除
-
-
-
-
+ 详情
+
+ handleDelete(record.id)">
+ 删除
+
+
-
+
@@ -131,13 +125,15 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import CustomerPaymentModal from './modules/CustomerPaymentModal'
+ import CustomerPaymentModal1 from './modules/CustomerPaymentModal1'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'CustomerPaymentList',
mixins:[JeecgListMixin, mixinDevice],
components: {
- CustomerPaymentModal
+ CustomerPaymentModal,
+ CustomerPaymentModal1
},
data () {
return {
@@ -161,6 +157,12 @@
align:"center",
dataIndex: 'userId_dictText'
},
+ {
+ title:'排序',
+ align:"center",
+ sorter: true,
+ dataIndex: 'sort'
+ },
{
title:'支付类型',
align:"center",
@@ -201,6 +203,8 @@
}
],
url: {
+ up: "/customerpayment/customerPayment/up",
+ down: "/customerpayment/customerPayment/down",
list: "/customerpayment/customerPayment/list",
delete: "/customerpayment/customerPayment/delete",
deleteBatch: "/customerpayment/customerPayment/deleteBatch",
@@ -221,6 +225,11 @@
},
},
methods: {
+ paixu: function (record) {
+ this.$refs.modalFormpaixu.edit(record.userId);
+ this.$refs.modalFormpaixu.title = record.userId_dictText+"测体管理";
+ this.$refs.modalFormpaixu.disableSubmit = false;
+ },
initDictConfig(){
},
getSuperFieldList(){
diff --git a/ant-design-vue-jeecg/src/views/customerpayment/admin/modules/CustomerPaymentForm.vue b/ant-design-vue-jeecg/src/views/customerpayment/admin/modules/CustomerPaymentForm.vue
index d6960db9..9fa82511 100644
--- a/ant-design-vue-jeecg/src/views/customerpayment/admin/modules/CustomerPaymentForm.vue
+++ b/ant-design-vue-jeecg/src/views/customerpayment/admin/modules/CustomerPaymentForm.vue
@@ -16,6 +16,12 @@
/>
+
+
+
+
+
+
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/controller/CustomerPaymentController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/controller/CustomerPaymentController.java
index a8362916..ce6f561a 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/controller/CustomerPaymentController.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/controller/CustomerPaymentController.java
@@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.demo.customermeasure.entity.CustomerMeasure;
import org.jeecg.modules.demo.customerpayment.entity.CustomerPayment;
import org.jeecg.modules.demo.customerpayment.service.ICustomerPaymentService;
@@ -73,6 +74,23 @@ public class CustomerPaymentController extends JeecgController queryPageList1(CustomerPayment customerPayment,
+ @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+ HttpServletRequest req) {
+ QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(customerPayment, req.getParameterMap());
+ queryWrapper.eq("user_id",customerPayment.getUserId());
+ Page page = new Page(pageNo, pageSize);
+ IPage pageList = customerPaymentService.page(page, queryWrapper);
+ return Result.OK(pageList);
+ }
+
/**
* 添加
*
@@ -192,4 +210,26 @@ public class CustomerPaymentController extends JeecgController shang(@RequestParam(name="id",required=true) String id) {
+ customerPaymentService.up(id);
+ return Result.ok("升序成功");
+ }
+
+
+ @AutoLog(value = "排序")
+ @ApiOperation(value="排序", notes="排序")
+ @GetMapping(value = "/down")
+ public Result> xia(@RequestParam(name="id",required=true) String id) {
+ int a=customerPaymentService.findSort(id);
+ if(a==0){
+ return Result.error("当前已经是最低级别!!!");}else {
+ customerPaymentService.down(id);
+ return Result.ok("降序成功");
+ }
+ }
+
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/entity/CustomerPayment.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/entity/CustomerPayment.java
index 3f337bdf..369f1084 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/entity/CustomerPayment.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/entity/CustomerPayment.java
@@ -86,4 +86,8 @@ public class CustomerPayment implements Serializable {
@Excel(name = "开户支行", width = 15)
@ApiModelProperty(value = "开户支行")
private java.lang.String bankzh;
+ /**排序*/
+ @Excel(name = "排序", width = 15)
+ @ApiModelProperty(value = "排序")
+ private java.lang.Integer sort;
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/mapper/CustomerPaymentMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/mapper/CustomerPaymentMapper.java
index 18baa625..13a07c5a 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/mapper/CustomerPaymentMapper.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/mapper/CustomerPaymentMapper.java
@@ -5,6 +5,8 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
import org.jeecg.modules.demo.customerpayment.entity.CustomerPayment;
/**
@@ -15,4 +17,18 @@ import org.jeecg.modules.demo.customerpayment.entity.CustomerPayment;
*/
public interface CustomerPaymentMapper extends BaseMapper {
+ @Select("select sort from customer_payment where id=#{id} ")
+ Integer upfindsort(String id);
+
+ @Select("select id from customer_payment where sort=#{i} ")
+ String findproid(int i);
+
+ @Update("update customer_payment set sort =#{i} where id = #{id} ")
+ void innew(String id, int i);
+
+ @Update("update customer_payment set sort =#{sort} where id = #{proid} ")
+ void innewpro(String proid, Integer sort);
+
+ @Select("select sort from customer_payment where id=#{id} ")
+ int findSort(String id);
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/service/ICustomerPaymentService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/service/ICustomerPaymentService.java
index a01a559e..a549c4e2 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/service/ICustomerPaymentService.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/service/ICustomerPaymentService.java
@@ -11,4 +11,9 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface ICustomerPaymentService extends IService {
+ void up(String id);
+
+ int findSort(String id);
+
+ void down(String id);
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/service/impl/CustomerPaymentServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/service/impl/CustomerPaymentServiceImpl.java
index 7ec889c6..58d88097 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/service/impl/CustomerPaymentServiceImpl.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerpayment/service/impl/CustomerPaymentServiceImpl.java
@@ -3,6 +3,7 @@ package org.jeecg.modules.demo.customerpayment.service.impl;
import org.jeecg.modules.demo.customerpayment.entity.CustomerPayment;
import org.jeecg.modules.demo.customerpayment.mapper.CustomerPaymentMapper;
import org.jeecg.modules.demo.customerpayment.service.ICustomerPaymentService;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -16,4 +17,38 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class CustomerPaymentServiceImpl extends ServiceImpl implements ICustomerPaymentService {
+ @Autowired
+ CustomerPaymentMapper customerPaymentMapper;
+
+
+ @Override
+ public void up(String id) {
+ Integer sort = customerPaymentMapper.upfindsort(id);
+ if (sort>0) {
+ //升序前找到后一个排序
+ String proid = customerPaymentMapper.findproid(sort + 1);
+ if (proid!="") {
+ //调换排序
+ customerPaymentMapper.innew(id,sort+1);
+ customerPaymentMapper.innewpro(proid,sort);
+ }
+ }
+ }
+
+ @Override
+ public int findSort(String id) {
+ return customerPaymentMapper.findSort(id);
+ }
+
+ @Override
+ public void down(String id) {
+ Integer sort = customerPaymentMapper.upfindsort(id);
+ if (sort>0) {
+ String proid = customerPaymentMapper.findproid(sort - 1);
+ if (proid!="") {
+ customerPaymentMapper.innew(id,sort-1);
+ customerPaymentMapper.innewpro(proid,sort);
+ }
+ }
+ }
}