From 83c6497b1b350ebad30271bfe4c944ac1d47fca1 Mon Sep 17 00:00:00 2001 From: "382696293@qq.com" <382696293@qq.com> Date: Thu, 18 Jan 2024 13:45:24 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BB=AA=E5=99=A8=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=93=9D=E7=89=99=E8=BF=9E=E6=8E=A5=E3=80=81?= =?UTF-8?q?=E6=96=AD=E5=BC=80=E3=80=81=E5=A4=B1=E8=B4=A5=E7=9A=84=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E3=80=81=E6=A0=87=E9=A2=98=E3=80=81=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/domain/entity/WxInstrument.java | 92 ++++++++++++ .../core/domain/entity/WxInstrumentMode.java | 13 ++ .../core/domain/req/WxInstrumentSaveReq.java | 92 ++++++++++++ .../resources/mapper/WxInstrumentMapper.xml | 37 ++++- .../mapper/WxInstrumentModeMapper.xml | 7 +- .../src/views/system/instrument/index.vue | 134 ++++++++++++++---- 6 files changed, 347 insertions(+), 28 deletions(-) diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxInstrument.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxInstrument.java index 1f56092..e365cfc 100644 --- a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxInstrument.java +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxInstrument.java @@ -145,16 +145,51 @@ public class WxInstrument extends BaseEntity { */ private String shoppingPath; + /** + * 蓝牙连接中标题 + */ + private String bluetoothConnectingTitle; + /** * 蓝牙连接中图片 */ private String bluetoothConnecting; + /** + * 蓝牙连接中文案 + */ + private String bluetoothConnectingContent; + + /** + * 蓝牙关闭标题 + */ + private String bluetoothClosedTitle; + /** * 蓝牙关闭图片 */ private String bluetoothClosed; + /** + * 蓝牙关闭文案 + */ + private String bluetoothClosedContent; + + /** + * 蓝牙连接失败标题 + */ + private String bluetoothConnectFailTitle; + + /** + * 蓝牙连接失败图片 + */ + private String bluetoothConnectFail; + + /** + * 蓝牙连接失败文案 + */ + private String bluetoothConnectFailContent; + /** * iot版本升级说明 */ @@ -436,6 +471,63 @@ public class WxInstrument extends BaseEntity { this.bindingCredit = bindingCredit; } + public String getBluetoothConnectingTitle() { + return bluetoothConnectingTitle; + } + + public void setBluetoothConnectingTitle(String bluetoothConnectingTitle) { + this.bluetoothConnectingTitle = bluetoothConnectingTitle; + } + + public String getBluetoothClosedTitle() { + return bluetoothClosedTitle; + } + + public void setBluetoothClosedTitle(String bluetoothClosedTitle) { + this.bluetoothClosedTitle = bluetoothClosedTitle; + } + + public String getBluetoothConnectFailTitle() { + return bluetoothConnectFailTitle; + } + + public void setBluetoothConnectFailTitle(String bluetoothConnectFailTitle) { + this.bluetoothConnectFailTitle = bluetoothConnectFailTitle; + } + + public String getBluetoothConnectFail() { + return bluetoothConnectFail; + } + + public void setBluetoothConnectFail(String bluetoothConnectFail) { + this.bluetoothConnectFail = bluetoothConnectFail; + } + + public String getBluetoothConnectingContent() { + return bluetoothConnectingContent; + } + + public void setBluetoothConnectingContent(String bluetoothConnectingContent) { + this.bluetoothConnectingContent = bluetoothConnectingContent; + } + + public String getBluetoothClosedContent() { + return bluetoothClosedContent; + } + + public void setBluetoothClosedContent(String bluetoothClosedContent) { + this.bluetoothClosedContent = bluetoothClosedContent; + } + + public String getBluetoothConnectFailContent() { + return bluetoothConnectFailContent; + } + + public void setBluetoothConnectFailContent(String bluetoothConnectFailContent) { + this.bluetoothConnectFailContent = bluetoothConnectFailContent; + } + + @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxInstrumentMode.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxInstrumentMode.java index 087afaa..cf2c0dd 100644 --- a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxInstrumentMode.java +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxInstrumentMode.java @@ -32,6 +32,11 @@ public class WxInstrumentMode extends BaseEntity { @Excel(name = "模式id") private Long modeId; + /** + * 是否带new标识(0不带,1带) + */ + private Integer isNew; + /** * 排序 */ @@ -83,6 +88,14 @@ public class WxInstrumentMode extends BaseEntity { this.modeSort = modeSort; } + public Integer getIsNew() { + return isNew; + } + + public void setIsNew(Integer isNew) { + this.isNew = isNew; + } + @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/req/WxInstrumentSaveReq.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/req/WxInstrumentSaveReq.java index 4b0b708..5aff9b6 100644 --- a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/req/WxInstrumentSaveReq.java +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/req/WxInstrumentSaveReq.java @@ -141,16 +141,52 @@ public class WxInstrumentSaveReq { */ private String shoppingPath; + /** + * 蓝牙连接中标题 + */ + private String bluetoothConnectingTitle; + /** * 蓝牙连接中图片 */ private String bluetoothConnecting; + /** + * 蓝牙连接中文案 + */ + private String bluetoothConnectingContent; + + /** + * 蓝牙关闭标题 + */ + private String bluetoothClosedTitle; + /** * 蓝牙关闭图片 */ private String bluetoothClosed; + /** + * 蓝牙关闭文案 + */ + private String bluetoothClosedContent; + + /** + * 蓝牙连接失败标题 + */ + private String bluetoothConnectFailTitle; + + /** + * 蓝牙连接失败图片 + */ + private String bluetoothConnectFail; + + /** + * 蓝牙连接失败文案 + */ + private String bluetoothConnectFailContent; + + /** * iot版本升级说明 */ @@ -436,4 +472,60 @@ public class WxInstrumentSaveReq { public void setModeIdsValue(List modeIdsValue) { this.modeIdsValue = modeIdsValue; } + + public String getBluetoothConnectingTitle() { + return bluetoothConnectingTitle; + } + + public void setBluetoothConnectingTitle(String bluetoothConnectingTitle) { + this.bluetoothConnectingTitle = bluetoothConnectingTitle; + } + + public String getBluetoothConnectingContent() { + return bluetoothConnectingContent; + } + + public void setBluetoothConnectingContent(String bluetoothConnectingContent) { + this.bluetoothConnectingContent = bluetoothConnectingContent; + } + + public String getBluetoothClosedTitle() { + return bluetoothClosedTitle; + } + + public void setBluetoothClosedTitle(String bluetoothClosedTitle) { + this.bluetoothClosedTitle = bluetoothClosedTitle; + } + + public String getBluetoothClosedContent() { + return bluetoothClosedContent; + } + + public void setBluetoothClosedContent(String bluetoothClosedContent) { + this.bluetoothClosedContent = bluetoothClosedContent; + } + + public String getBluetoothConnectFailTitle() { + return bluetoothConnectFailTitle; + } + + public void setBluetoothConnectFailTitle(String bluetoothConnectFailTitle) { + this.bluetoothConnectFailTitle = bluetoothConnectFailTitle; + } + + public String getBluetoothConnectFail() { + return bluetoothConnectFail; + } + + public void setBluetoothConnectFail(String bluetoothConnectFail) { + this.bluetoothConnectFail = bluetoothConnectFail; + } + + public String getBluetoothConnectFailContent() { + return bluetoothConnectFailContent; + } + + public void setBluetoothConnectFailContent(String bluetoothConnectFailContent) { + this.bluetoothConnectFailContent = bluetoothConnectFailContent; + } } diff --git a/flossom-common/flossom-common-core/src/main/resources/mapper/WxInstrumentMapper.xml b/flossom-common/flossom-common-core/src/main/resources/mapper/WxInstrumentMapper.xml index 7c493dc..e6239d9 100644 --- a/flossom-common/flossom-common-core/src/main/resources/mapper/WxInstrumentMapper.xml +++ b/flossom-common/flossom-common-core/src/main/resources/mapper/WxInstrumentMapper.xml @@ -30,8 +30,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + + + @@ -45,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, name, type, model, banner, logo, serial, guarantee, daily_clock_credit, is_extra_clock, binding_credit, extra_clock_credit, start_time, end_time, mini_tag_ids, mini_tag_names, wecom_tag_ids, wecom_tag_names, nursing_time, iot_version, iot_upgrade_data, is_scan_code, is_purchase, shopping_appid, shopping_path, bluetooth_connecting, bluetooth_closed, iot_version_upgrade, sort_no, status, manual_code_binding, scan_code_binding, create_by, create_time, update_by, update_time, remark from wx_instrument + select id, name, type, model, banner, logo, serial, guarantee, daily_clock_credit, is_extra_clock, binding_credit, extra_clock_credit, start_time, end_time, mini_tag_ids, mini_tag_names, wecom_tag_ids, wecom_tag_names, nursing_time, iot_version, iot_upgrade_data, is_scan_code, is_purchase, shopping_appid, shopping_path, bluetooth_connecting_title, bluetooth_connecting_content,bluetooth_connecting, bluetooth_closed_title, bluetooth_closed_content, bluetooth_closed, bluetooth_connect_fail_title, bluetooth_connect_fail_content, bluetooth_connect_fail, iot_version_upgrade, sort_no, status, manual_code_binding, scan_code_binding, create_by, create_time, update_by, update_time, remark from wx_instrument @@ -23,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and instrument_id = #{instrumentId} and mode_id = #{modeId} + and is_new = #{isNew} and status = #{status} order by mode_sort @@ -39,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" instrument_id, mode_id, mode_sort, + is_new, status, create_by, create_time, @@ -47,6 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{instrumentId}, #{modeId}, #{modeSort}, + #{isNew}, #{status}, #{createBy}, #{createTime}, @@ -59,6 +63,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" instrument_id = #{instrumentId}, mode_id = #{modeId}, mode_sort = #{modeSort}, + isNew = #{isNew}, status = #{status}, create_by = #{createBy}, create_time = #{createTime}, diff --git a/flossom-ui/src/views/system/instrument/index.vue b/flossom-ui/src/views/system/instrument/index.vue index 9dc54d0..2575c74 100644 --- a/flossom-ui/src/views/system/instrument/index.vue +++ b/flossom-ui/src/views/system/instrument/index.vue @@ -716,7 +716,35 @@
只能上传一个文件
- + + + + + + + + + 点击上传 +
只能上传一个文件
+
+
+ + + + + + + 只能上传一个文件 + + + + + + Date: Thu, 18 Jan 2024 14:55:50 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BB=AA=E5=99=A8=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E5=B8=A6new=E6=A0=87=E8=AF=86=E7=9A=84=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/domain/req/WxInstrumentSaveReq.java | 13 +++++ .../service/impl/WxInstrumentServiceImpl.java | 17 +++++++ .../src/views/system/instrument/index.vue | 47 ++++++++++++++++--- 3 files changed, 70 insertions(+), 7 deletions(-) diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/req/WxInstrumentSaveReq.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/req/WxInstrumentSaveReq.java index 5aff9b6..71dac62 100644 --- a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/req/WxInstrumentSaveReq.java +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/req/WxInstrumentSaveReq.java @@ -225,6 +225,11 @@ public class WxInstrumentSaveReq { */ private List modeIdsValue; + /** + * 带new标识的模式 + */ + private List newModeIdList; + public Long getId() { return id; } @@ -528,4 +533,12 @@ public class WxInstrumentSaveReq { public void setBluetoothConnectFailContent(String bluetoothConnectFailContent) { this.bluetoothConnectFailContent = bluetoothConnectFailContent; } + + public List getNewModeIdList() { + return newModeIdList; + } + + public void setNewModeIdList(List newModeIdList) { + this.newModeIdList = newModeIdList; + } } diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxInstrumentServiceImpl.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxInstrumentServiceImpl.java index ffcf61b..3efed1a 100644 --- a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxInstrumentServiceImpl.java +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxInstrumentServiceImpl.java @@ -90,6 +90,13 @@ public class WxInstrumentServiceImpl implements IWxInstrumentService { .map(WxInstrumentMode::getModeId) .map(Long::intValue) .collect(Collectors.toList())); + + wxInstrumentSaveReq.setNewModeIdList(wxInstrumentModes.stream() + .filter(im -> im.getIsNew() == 1) + .map(WxInstrumentMode::getModeId) + .map(Long::intValue) + .collect(Collectors.toList()) + ); } return wxInstrumentSaveReq; } @@ -183,6 +190,11 @@ public class WxInstrumentServiceImpl implements IWxInstrumentService { wxInstrumentMode.setInstrumentId(wxInstrument.getId()); wxInstrumentMode.setModeId(modeIdList.get(i).longValue()); wxInstrumentMode.setModeSort(i); + if (wxInstrumentSaveReq.getNewModeIdList() != null && wxInstrumentSaveReq.getNewModeIdList().size() > 0) { + if (wxInstrumentSaveReq.getNewModeIdList().contains(modeIdList.get(i))) { + wxInstrumentMode.setIsNew(1); + } + } wxInstrumentMode.setStatus(Status.OK.getCode()); wxInstrumentMode.setCreateBy(SecurityUtils.getUsername()); wxInstrumentMode.setCreateTime(DateUtils.getNowDate()); @@ -285,6 +297,11 @@ public class WxInstrumentServiceImpl implements IWxInstrumentService { wxInstrumentMode.setInstrumentId(wxInstrumentSaveReq.getId()); wxInstrumentMode.setModeId(modeIdList.get(i).longValue()); wxInstrumentMode.setModeSort(i); + if (wxInstrumentSaveReq.getNewModeIdList() != null && wxInstrumentSaveReq.getNewModeIdList().size() > 0) { + if (wxInstrumentSaveReq.getNewModeIdList().contains(modeIdList.get(i))) { + wxInstrumentMode.setIsNew(1); + } + } wxInstrumentMode.setStatus(Status.OK.getCode()); wxInstrumentMode.setCreateBy(SecurityUtils.getUsername()); wxInstrumentMode.setCreateTime(DateUtils.getNowDate()); diff --git a/flossom-ui/src/views/system/instrument/index.vue b/flossom-ui/src/views/system/instrument/index.vue index 2575c74..9394bea 100644 --- a/flossom-ui/src/views/system/instrument/index.vue +++ b/flossom-ui/src/views/system/instrument/index.vue @@ -470,7 +470,7 @@ + + + 0) { + let temp = []; + for (let i = 0; i < this.form.modeIdsValue.length; i++) { + let filterModeArr = this.mode.modeIdsOptions.filter((item) => item.id == this.form.modeIdsValue[i]) + temp.push(filterModeArr[0]); + } + this.newModeOptionList = temp; + } }) }) }, @@ -1944,9 +1968,6 @@ export default { this.mode.modeSortVisible = true; } }, - openModeIdDialog2() { - console.log(this.form.modeIdsValue); - }, handleCloseMode() { this.mode.modeIdsValueTemp = []; this.mode.sortMode = []; @@ -1960,6 +1981,18 @@ export default { this.form.modeIdsValue = newSort; this.handleCloseMode() }, + modeIdsValueChang() { + let temp = []; + if (this.form.modeIdsValue.length > 0) { + for (let i = 0; i < this.form.modeIdsValue.length; i++) { + let filterModeArr = this.mode.modeIdsOptions.filter((item) => item.id == this.form.modeIdsValue[i]) + temp.push(filterModeArr[0]); + } + } + this.newModeOptionList = temp; + }, + + }, } From 82d3d9411f1eb94e7ae92dfe9ae1987974292137 Mon Sep 17 00:00:00 2001 From: "382696293@qq.com" <382696293@qq.com> Date: Thu, 18 Jan 2024 15:11:38 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=AE=8C=E5=96=84=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=EF=BC=8C=E8=8E=B7=E5=8F=96=E7=A7=AF=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../miniProgram/service/impl/WxUserMemberServiceImpl.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/service/impl/WxUserMemberServiceImpl.java b/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/service/impl/WxUserMemberServiceImpl.java index 76adbf8..a8e7614 100644 --- a/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/service/impl/WxUserMemberServiceImpl.java +++ b/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/service/impl/WxUserMemberServiceImpl.java @@ -182,14 +182,16 @@ public class WxUserMemberServiceImpl implements IWxUserMemberService { public LoginUserVo updateUser(UserMemberUpdateVo userMemberUpdateVo) { // 完善用户信息, 判断是否标记完善信息 WxUserMember wxUserMember = wxUserMemberMapper.selectWxUserMemberByOpenId(SecurityUtils.getLoginUser().getWxUserMember().getOpenid()); - Boolean isCompleteInformation = false; + if (wxUserMember == null) { + throw new ServiceException("用户不存在"); + } int floatScore = 0; if (wxUserMember.getIsCompleteInformation() == null || wxUserMember.getIsCompleteInformation() == 0) { - isCompleteInformation = true; // 修改完善状态 wxUserMember.setIsCompleteInformation(1); List integralGlobalList = integralGlobalMapper.selectIntegralGlobalList(new IntegralGlobal()); IntegralGlobal integralGlobal = integralGlobalList.get(0); + floatScore = integralGlobal.getIntegral().intValue(); wxUserMember.setCredit(wxUserMember.getCredit() + integralGlobal.getIntegral().intValue()); // 保存积分详情 @@ -210,7 +212,7 @@ public class WxUserMemberServiceImpl implements IWxUserMemberService { // 刷新用户信息 LoginUserVo loginUserVo = refreshWxUserInfo(); - if (isCompleteInformation) { + if (wxUserMember.getIsCompleteInformation() == 1) { loginUserVo.setIntegralText("您已完善个人信息,获得" + floatScore + "积分"); } return loginUserVo;