diff --git a/ant-design-vue-jeecg/src/config/router.config.js b/ant-design-vue-jeecg/src/config/router.config.js index ad108f89..9031de02 100644 --- a/ant-design-vue-jeecg/src/config/router.config.js +++ b/ant-design-vue-jeecg/src/config/router.config.js @@ -642,4 +642,8 @@ export const constantRouterMap = [ path: '/shopping/views/ClothDetail',//这里是你需要设置新窗口打开的页面的路径s component: () => import('@/views/shopping/pages/clothDetail'), }, + { + path: '/shopping/views/person',//这里是你需要设置新窗口打开的页面的路径s + component: () => import('@/views/shopping/pages/gerenzhongxin'), + }, ] 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 @@ + 排序 + 编辑 - - - 更多 - - - 详情 - - - - 删除 - - - - + 详情 + + + 删除 + + - + @@ -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/ant-design-vue-jeecg/src/views/customerpayment/admin/modules/CustomerPaymentList1.vue b/ant-design-vue-jeecg/src/views/customerpayment/admin/modules/CustomerPaymentList1.vue new file mode 100644 index 00000000..738d4944 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/customerpayment/admin/modules/CustomerPaymentList1.vue @@ -0,0 +1,264 @@ + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/customerpayment/admin/modules/CustomerPaymentModal1.vue b/ant-design-vue-jeecg/src/views/customerpayment/admin/modules/CustomerPaymentModal1.vue new file mode 100644 index 00000000..e64bde74 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/customerpayment/admin/modules/CustomerPaymentModal1.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/bg05.png b/ant-design-vue-jeecg/src/views/shopping/assets/bg05.png new file mode 100644 index 00000000..bc6bac21 Binary files /dev/null and b/ant-design-vue-jeecg/src/views/shopping/assets/bg05.png differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/common.css b/ant-design-vue-jeecg/src/views/shopping/assets/common.css index 8e571cd7..78cd8e36 100644 --- a/ant-design-vue-jeecg/src/views/shopping/assets/common.css +++ b/ant-design-vue-jeecg/src/views/shopping/assets/common.css @@ -90,4 +90,8 @@ a { .c_9a9b9b { color: #9A9B9B; -} \ No newline at end of file +} +.c_1B { + color: #1B1B1B; +} +.textfield {overflow: hidden;text-overflow: ellipsis;white-space: nowrap;} \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/details01.png b/ant-design-vue-jeecg/src/views/shopping/assets/details01.png new file mode 100644 index 00000000..f8273718 Binary files /dev/null and b/ant-design-vue-jeecg/src/views/shopping/assets/details01.png differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/details02.png b/ant-design-vue-jeecg/src/views/shopping/assets/details02.png new file mode 100644 index 00000000..f8273718 Binary files /dev/null and b/ant-design-vue-jeecg/src/views/shopping/assets/details02.png differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/details03.png b/ant-design-vue-jeecg/src/views/shopping/assets/details03.png new file mode 100644 index 00000000..f8273718 Binary files /dev/null and b/ant-design-vue-jeecg/src/views/shopping/assets/details03.png differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/details04.png b/ant-design-vue-jeecg/src/views/shopping/assets/details04.png new file mode 100644 index 00000000..f8273718 Binary files /dev/null and b/ant-design-vue-jeecg/src/views/shopping/assets/details04.png differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.css b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.css index ff38f99a..3439648d 100644 --- a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.css +++ b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 3854415 */ - src: url('iconfont.woff2?t=1673012900302') format('woff2'), - url('iconfont.woff?t=1673012900302') format('woff'), - url('iconfont.ttf?t=1673012900302') format('truetype'); + src: url('iconfont.woff2?t=1673860163583') format('woff2'), + url('iconfont.woff?t=1673860163583') format('woff'), + url('iconfont.ttf?t=1673860163583') format('truetype'); } .iconfont { @@ -13,6 +13,26 @@ -moz-osx-font-smoothing: grayscale; } +.icon-weishoucang:before { + content: "\e603"; +} + +.icon-yishoucang:before { + content: "\e614"; +} + +.icon-ic_jia:before { + content: "\e608"; +} + +.icon-zanting:before { + content: "\e640"; +} + +.icon-biaoqian:before { + content: "\e63d"; +} + .icon-sousuo:before { content: "\e622"; } diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.js b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.js index 9a95f567..8490ccc6 100644 --- a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.js +++ b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.js @@ -1 +1 @@ -window._iconfont_svg_string_3854415='',function(n){var t=(t=document.getElementsByTagName("script"))[t.length-1],e=t.getAttribute("data-injectcss"),t=t.getAttribute("data-disable-injectsvg");if(!t){var c,o,i,s,d,a=function(t,e){e.parentNode.insertBefore(t,e)};if(e&&!n.__iconfont__svg__cssinject__){n.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(t){console&&console.log(t)}}c=function(){var t,e=document.createElement("div");e.innerHTML=n._iconfont_svg_string_3854415,(e=e.getElementsByTagName("svg")[0])&&(e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.width=0,e.style.height=0,e.style.overflow="hidden",e=e,(t=document.body).firstChild?a(e,t.firstChild):t.appendChild(e))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(c,0):(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),c()},document.addEventListener("DOMContentLoaded",o,!1)):document.attachEvent&&(i=c,s=n.document,d=!1,h(),s.onreadystatechange=function(){"complete"==s.readyState&&(s.onreadystatechange=null,l())})}function l(){d||(d=!0,i())}function h(){try{s.documentElement.doScroll("left")}catch(t){return void setTimeout(h,50)}l()}}(window); \ No newline at end of file +window._iconfont_svg_string_3854415='',function(c){var t=(t=document.getElementsByTagName("script"))[t.length-1],e=t.getAttribute("data-injectcss"),t=t.getAttribute("data-disable-injectsvg");if(!t){var i,o,n,l,a,s=function(t,e){e.parentNode.insertBefore(t,e)};if(e&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(t){console&&console.log(t)}}i=function(){var t,e=document.createElement("div");e.innerHTML=c._iconfont_svg_string_3854415,(e=e.getElementsByTagName("svg")[0])&&(e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.width=0,e.style.height=0,e.style.overflow="hidden",e=e,(t=document.body).firstChild?s(e,t.firstChild):t.appendChild(e))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(i,0):(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),i()},document.addEventListener("DOMContentLoaded",o,!1)):document.attachEvent&&(n=i,l=c.document,a=!1,h(),l.onreadystatechange=function(){"complete"==l.readyState&&(l.onreadystatechange=null,d())})}function d(){a||(a=!0,n())}function h(){try{l.documentElement.doScroll("left")}catch(t){return void setTimeout(h,50)}d()}}(window); \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.json b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.json index acb41baa..622d2a89 100644 --- a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.json +++ b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.json @@ -5,6 +5,41 @@ "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "9526741", + "name": "未收藏", + "font_class": "weishoucang", + "unicode": "e603", + "unicode_decimal": 58883 + }, + { + "icon_id": "9526824", + "name": "已收藏", + "font_class": "yishoucang", + "unicode": "e614", + "unicode_decimal": 58900 + }, + { + "icon_id": "5219331", + "name": "衣架", + "font_class": "ic_jia", + "unicode": "e608", + "unicode_decimal": 58888 + }, + { + "icon_id": "887983", + "name": "暂停", + "font_class": "zanting", + "unicode": "e640", + "unicode_decimal": 58944 + }, + { + "icon_id": "1305451", + "name": "标签", + "font_class": "biaoqian", + "unicode": "e63d", + "unicode_decimal": 58941 + }, { "icon_id": "1304890", "name": "搜索", diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.ttf b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.ttf index 57e07f90..45e4eccf 100644 Binary files a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.ttf and b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.ttf differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.woff b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.woff index a5ceba4d..6fea7e63 100644 Binary files a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.woff and b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.woff differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.woff2 b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.woff2 index 6a42ba0b..57a48c17 100644 Binary files a/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.woff2 and b/ant-design-vue-jeecg/src/views/shopping/assets/iconfont/iconfont.woff2 differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/photo.png b/ant-design-vue-jeecg/src/views/shopping/assets/photo.png new file mode 100644 index 00000000..d6e42647 Binary files /dev/null and b/ant-design-vue-jeecg/src/views/shopping/assets/photo.png differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/selected01.png b/ant-design-vue-jeecg/src/views/shopping/assets/selected01.png new file mode 100644 index 00000000..58e1c63b Binary files /dev/null and b/ant-design-vue-jeecg/src/views/shopping/assets/selected01.png differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/selected02.png b/ant-design-vue-jeecg/src/views/shopping/assets/selected02.png new file mode 100644 index 00000000..3b122aea Binary files /dev/null and b/ant-design-vue-jeecg/src/views/shopping/assets/selected02.png differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/selected03.png b/ant-design-vue-jeecg/src/views/shopping/assets/selected03.png new file mode 100644 index 00000000..4ed8228d Binary files /dev/null and b/ant-design-vue-jeecg/src/views/shopping/assets/selected03.png differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/selected04.png b/ant-design-vue-jeecg/src/views/shopping/assets/selected04.png new file mode 100644 index 00000000..76cb95f1 Binary files /dev/null and b/ant-design-vue-jeecg/src/views/shopping/assets/selected04.png differ diff --git a/ant-design-vue-jeecg/src/views/shopping/assets/selected05.png b/ant-design-vue-jeecg/src/views/shopping/assets/selected05.png new file mode 100644 index 00000000..a054f09f Binary files /dev/null and b/ant-design-vue-jeecg/src/views/shopping/assets/selected05.png differ diff --git a/ant-design-vue-jeecg/src/views/shopping/components/Header/HeaderView.vue b/ant-design-vue-jeecg/src/views/shopping/components/Header/HeaderView.vue index c362e53a..429a792f 100644 --- a/ant-design-vue-jeecg/src/views/shopping/components/Header/HeaderView.vue +++ b/ant-design-vue-jeecg/src/views/shopping/components/Header/HeaderView.vue @@ -24,7 +24,7 @@ - +
-
- 详情页衣服id{{ this.$route.query.id }} 详情页衣服title{{ - this.$route.query.title - }} + +
+ + + +
+ + + + +
+ +
+
+
+
+
{{title}}
+

销量:{{sales}}件

+

价格:¥{{price}}

+

优惠:{{favour}}

+

促销:{{sell}}详情>>>

+
+
颜色:{{color}}
+ + + 黑 + + + 灰 + + + 橙 + + +
尺码:尺码参照表 | 找到您的尺寸
+
+ {{item.size}} +
+
+
免费配送与退货服务更多详情
+
+
使用花呗分期,最低每月¥1182.50。详细说明
+
+
加入购物袋
+
立即购买
+ +
+ +
+
+
已选
+
+
+ +

{{item.text}}

+
+
+
+
+
+ 商品介绍 + 加入购物车 +
+ + + + + + + + + + + + + + + + + + + +
商品名称:{{clothDetail.name}}商品编号:{{clothDetail.num}}风格:{{clothDetail.style}}商品毛重:{{clothDetail.weight}}
货号:{{clothDetail.itemNo}}领型:{{clothDetail.collar}}材质:{{clothDetail.material}}适用场景:{{clothDetail.scene}}
版型:{{clothDetail.type}}衣门襟:{{clothDetail.placket}}开衩设计:{{clothDetail.slit}}适用人群:{{clothDetail.people}}
+
+
@@ -24,9 +207,224 @@ } + diff --git a/ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue b/ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue new file mode 100644 index 00000000..824682e7 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue @@ -0,0 +1,93 @@ + + + + + + + + + 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); + } + } + } }