调整样式,增加配置

This commit is contained in:
wanggeng 2022-07-14 15:50:05 +08:00
parent 6590546865
commit 78564136d4
11 changed files with 194 additions and 101 deletions

View File

@ -106,7 +106,7 @@
<dependency> <dependency>
<groupId>ink.wgink</groupId> <groupId>ink.wgink</groupId>
<artifactId>login-wechat</artifactId> <artifactId>service-role</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
</dependency> </dependency>
@ -169,6 +169,12 @@
<artifactId>redis-cache</artifactId> <artifactId>redis-cache</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>ink.wgink</groupId>
<artifactId>module-wechat-miniapp</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -22,8 +22,8 @@ public class GridUserAuthBindDTO {
private String areaCode; private String areaCode;
@ApiModelProperty(name = "userLevel", value = "用户级别") @ApiModelProperty(name = "userLevel", value = "用户级别")
private Integer userLevel; private Integer userLevel;
@ApiModelProperty(name = "areaCodes", value = "地区编码列表") @ApiModelProperty(name = "grids", value = "网格列表")
private List<String> areaCodes; private List<UserGrid> grids;
public String getUserId() { public String getUserId() {
return userId == null ? "" : userId.trim(); return userId == null ? "" : userId.trim();
@ -49,11 +49,41 @@ public class GridUserAuthBindDTO {
this.userLevel = userLevel; this.userLevel = userLevel;
} }
public List<String> getAreaCodes() { public List<UserGrid> getGrids() {
return areaCodes == null ? new ArrayList() : areaCodes; return grids == null ? new ArrayList() : grids;
} }
public void setAreaCodes(List<String> areaCodes) { public void setGrids(List<UserGrid> grids) {
this.areaCodes = areaCodes; this.grids = grids;
}
public static class UserGrid {
private String gridId;
private String gridCode;
private String gridName;
public String getGridId() {
return gridId == null ? "" : gridId.trim();
}
public void setGridId(String gridId) {
this.gridId = gridId;
}
public String getGridCode() {
return gridCode == null ? "" : gridCode.trim();
}
public void setGridCode(String gridCode) {
this.gridCode = gridCode;
}
public String getGridName() {
return gridName == null ? "" : gridName.trim();
}
public void setGridName(String gridName) {
this.gridName = gridName;
}
} }
} }

View File

@ -380,7 +380,7 @@ public class UserExpandServiceImpl extends DefaultBaseService implements IUserEx
public GridUserAuthBindDTO getAuthAndBindResult(GridUserAuthBindVO gridUserAuthBindVO) { public GridUserAuthBindDTO getAuthAndBindResult(GridUserAuthBindVO gridUserAuthBindVO) {
// 查询小程序端要绑定的网格员账号是否正确 // 查询小程序端要绑定的网格员账号是否正确
UserPO userPO = userService.getPOByUsername(gridUserAuthBindVO.getUsername()); UserPO userPO = userService.getPOByUsername(gridUserAuthBindVO.getUsername());
if (passwordEncoder.matches(userPO.getUserPassword(), gridUserAuthBindVO.getPassword())) { if (!passwordEncoder.matches(gridUserAuthBindVO.getPassword(), userPO.getUserPassword())) {
throw new ParamsException("用户名密码不匹配"); throw new ParamsException("用户名密码不匹配");
} }
GridUserAuthBindDTO gridUserAuthBindDTO = new GridUserAuthBindDTO(); GridUserAuthBindDTO gridUserAuthBindDTO = new GridUserAuthBindDTO();
@ -395,8 +395,15 @@ public class UserExpandServiceImpl extends DefaultBaseService implements IUserEx
List<String> gridIds = gridRelationService.listGridId(userPO.getUserId()); List<String> gridIds = gridRelationService.listGridId(userPO.getUserId());
if (!gridIds.isEmpty()) { if (!gridIds.isEmpty()) {
List<GridDTO> gridDTOS = gridService.list(gridIds); List<GridDTO> gridDTOS = gridService.list(gridIds);
List<String> gridCodes = ArrayListUtil.listBeanStringIdValue(gridDTOS, "gridCode", GridDTO.class); List<GridUserAuthBindDTO.UserGrid> userGrids = new ArrayList<>();
gridUserAuthBindDTO.setAreaCodes(gridCodes); gridDTOS.forEach(gridDTO -> {
GridUserAuthBindDTO.UserGrid userGrid = new GridUserAuthBindDTO.UserGrid();
userGrid.setGridId(gridDTO.getGridId());
userGrid.setGridCode(gridDTO.getGridCode());
userGrid.setGridName(gridDTO.getGridName());
userGrids.add(userGrid);
});
gridUserAuthBindDTO.setGrids(userGrids);
} }
return gridUserAuthBindDTO; return gridUserAuthBindDTO;
} }

View File

@ -4,6 +4,8 @@ import cn.com.tenlion.usercenter.pojo.dtos.huawei.MeetingCreateDTO;
import cn.com.tenlion.usercenter.pojo.dtos.huawei.SMCMeetingDTO; import cn.com.tenlion.usercenter.pojo.dtos.huawei.SMCMeetingDTO;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import ink.wgink.common.manager.env.EnvManager;
import ink.wgink.login.base.manager.ConfigManager;
import javax.net.ssl.*; import javax.net.ssl.*;
import java.io.*; import java.io.*;
@ -34,11 +36,13 @@ public class SMCHttpUtil {
/** 请求超时时间 */ /** 请求超时时间 */
private static Integer TIMEOUT = 3000; private static Integer TIMEOUT = 3000;
private static final String checkMeetingUrl = "https://10.25.248.213/sys-portal/terminalparams/search"; // 会议室终端是否存在 private static final String CHECK_MEETING_URL = "huaweiSmcCheckMeetingUrl";
private static final String checkMeetingNameUrl = "https://10.25.248.213/sys-portal/meetingrooms/search/name"; // 会议室名称是否存在 private static final String CHECK_MEETING_NAME_URL = "huaweiSmcCheckMeetingNameUrl";
private static final String getMeetingNumberUrl = "https://10.25.248.213/sys-portal/terminalparams"; // 获取随机分配的会议终端号码 private static final String GET_MEETING_NUMBER_URL = "huaweiSmcGetMeetingNumberUrl";
private static final String createMeetingUrl = "https://10.25.248.213/sys-portal/meetingrooms/create"; // 创建会议室 private static final String CREATE_MEETING_URL = "huaweiSmcCreateMeetingUrl";
private static final String deleteMeetingUrl = "https://10.25.248.213/sys-portal/meetingrooms/batch"; // 删除会议室 private static final String DELETE_MEETING_URL = "huaweiSmcDeleteMeetingUrl";
private static final String X_HW_ID = "huaweiSmcXHwId";
private static final String X_HW_APPKEY = "huaweiSmcXHwAppkey";
static { static {
try { try {
@ -85,7 +89,7 @@ public class SMCHttpUtil {
param.put("id", meetingId); param.put("id", meetingId);
list.add(param); list.add(param);
String json = JSONObject.toJSONString(list); String json = JSONObject.toJSONString(list);
String result = doJson(deleteMeetingUrl, "DELETE", json); String result = doJson(EnvManager.getInstance().getValue(DELETE_MEETING_URL), "DELETE", json);
if(result.contains("error")) { if(result.contains("error")) {
throw new Exception("删除会议室失败"); throw new Exception("删除会议室失败");
} }
@ -125,7 +129,7 @@ public class SMCHttpUtil {
String json = JSONObject.toJSONString(create); String json = JSONObject.toJSONString(create);
try { try {
String result = doJson(createMeetingUrl, "POST", json); String result = doJson(EnvManager.getInstance().getValue(CREATE_MEETING_URL), "POST", json);
if(result.contains("MEETINGROOM_NAME_EXIST")) { if(result.contains("MEETINGROOM_NAME_EXIST")) {
throw new Exception("该名称已存在会议室"); throw new Exception("该名称已存在会议室");
} }
@ -148,7 +152,7 @@ public class SMCHttpUtil {
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
// params.put("zoneid", "06e26a21-36b9-47e9-aabd-944eb7a33e23"); // params.put("zoneid", "06e26a21-36b9-47e9-aabd-944eb7a33e23");
params.put("number", 1); // 数量 params.put("number", 1); // 数量
String result = doPost(getMeetingNumberUrl, params, null); String result = doPost(EnvManager.getInstance().getValue(GET_MEETING_NUMBER_URL), params, null);
if(result.contains("error")) { if(result.contains("error")) {
throw new Exception("获取随机的会议终端号失败"); throw new Exception("获取随机的会议终端号失败");
} }
@ -164,7 +168,8 @@ public class SMCHttpUtil {
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
params.put("name", username); params.put("name", username);
params.put("accountType", "SMC"); params.put("accountType", "SMC");
String result = doGet(checkMeetingUrl, params, null); // EnvManager.getInstance().getValue(checkMeetingUrl);
String result = doGet(EnvManager.getInstance().getValue(CHECK_MEETING_URL), params, null);
return Boolean.parseBoolean(result); return Boolean.parseBoolean(result);
} }
@ -175,7 +180,7 @@ public class SMCHttpUtil {
public Boolean checkMeetingNameExists(String name) throws Exception { public Boolean checkMeetingNameExists(String name) throws Exception {
Map<String, Object> params = new HashMap<String, Object>(); Map<String, Object> params = new HashMap<String, Object>();
params.put("name", name); params.put("name", name);
String result = doGet(checkMeetingNameUrl, params, null); String result = doGet(EnvManager.getInstance().getValue(CHECK_MEETING_NAME_URL), params, null);
return Boolean.parseBoolean(result); return Boolean.parseBoolean(result);
} }
@ -299,8 +304,9 @@ public class SMCHttpUtil {
HttpURLConnection httpUrlConnection = (HttpURLConnection) urlConnection; HttpURLConnection httpUrlConnection = (HttpURLConnection) urlConnection;
httpUrlConnection.setConnectTimeout(TIMEOUT); httpUrlConnection.setConnectTimeout(TIMEOUT);
// 设置请求头属性参数 // 设置请求头属性参数
httpUrlConnection.setRequestProperty("X-HW-ID", "697db861-bc1b-4e31-bc75-969e1ab5a9a5"); EnvManager envManager = EnvManager.getInstance();
httpUrlConnection.setRequestProperty("X-HW-APPKEY", "H!UkcRIWb/lI1034/w5T3h%c5..4#8.+L-085%g!3Kq$w.vg3w$QD0!%i#nqE=83"); httpUrlConnection.setRequestProperty("X-HW-ID", envManager.getValue(X_HW_ID));
httpUrlConnection.setRequestProperty("X-HW-APPKEY", envManager.getValue(X_HW_APPKEY));
httpUrlConnection.setRequestProperty("charset", "UTF-8"); httpUrlConnection.setRequestProperty("charset", "UTF-8");
httpUrlConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); httpUrlConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
httpUrlConnection.setRequestProperty("accept", "application/json"); httpUrlConnection.setRequestProperty("accept", "application/json");
@ -394,8 +400,11 @@ public class SMCHttpUtil {
HttpURLConnection httpUrlConnection = (HttpURLConnection) urlConnection; HttpURLConnection httpUrlConnection = (HttpURLConnection) urlConnection;
httpUrlConnection.setConnectTimeout(TIMEOUT); httpUrlConnection.setConnectTimeout(TIMEOUT);
// 设置请求头属性参数 // 设置请求头属性参数
httpUrlConnection.setRequestProperty("X-HW-ID", "697db861-bc1b-4e31-bc75-969e1ab5a9a5"); // httpUrlConnection.setRequestProperty("X-HW-ID", "697db861-bc1b-4e31-bc75-969e1ab5a9a5");
httpUrlConnection.setRequestProperty("X-HW-APPKEY", "H!UkcRIWb/lI1034/w5T3h%c5..4#8.+L-085%g!3Kq$w.vg3w$QD0!%i#nqE=83"); // httpUrlConnection.setRequestProperty("X-HW-APPKEY", "H!UkcRIWb/lI1034/w5T3h%c5..4#8.+L-085%g!3Kq$w.vg3w$QD0!%i#nqE=83");
EnvManager envManager = EnvManager.getInstance();
httpUrlConnection.setRequestProperty("X-HW-ID", envManager.getValue(X_HW_ID));
httpUrlConnection.setRequestProperty("X-HW-APPKEY", envManager.getValue(X_HW_APPKEY));
httpUrlConnection.setRequestProperty("charset", "UTF-8"); httpUrlConnection.setRequestProperty("charset", "UTF-8");
httpUrlConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); httpUrlConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
httpUrlConnection.setRequestProperty("accept", "application/json"); httpUrlConnection.setRequestProperty("accept", "application/json");

View File

@ -153,6 +153,17 @@ sms:
template: template:
verification-code: '{sign} 您的验证码为 {content}, 有效时间为120秒若非本人操作请忽略。' verification-code: '{sign} 您的验证码为 {content}, 有效时间为120秒若非本人操作请忽略。'
open-platform:
wechat:
mini-app:
# 激活状态
active: true
api-url: https://api.weixin.qq.com
authorize-url: ${open-platform.wechat.mini-app.api-url}/sns/jscode2session
grantType: authorization_code
appKey: wxa5e5552f8a3b1616
appSecret: 2453238e30359b5f0a4b31c44443a8af
logging: logging:
# enable-api-log: true # enable-api-log: true
file: file:

View File

@ -153,6 +153,17 @@ sms:
template: template:
verification-code: '{sign} 您的验证码为 {content}, 有效时间为120秒若非本人操作请忽略。' verification-code: '{sign} 您的验证码为 {content}, 有效时间为120秒若非本人操作请忽略。'
open-platform:
wechat:
mini-app:
# 激活状态
active: true
api-url: https://api.weixin.qq.com
authorize-url: ${open-platform.wechat.mini-app.api-url}/sns/jscode2session
grantType: authorization_code
appKey: wxa5e5552f8a3b1616
appSecret: 2453238e30359b5f0a4b31c44443a8af
logging: logging:
enable-api-log: false enable-api-log: false
file: file:

View File

@ -159,4 +159,15 @@ params-config:
# 专管员角色ID # 专管员角色ID
role-specialized-person: 6ac90f36-caa0-4273-9489-4d0197124c33 role-specialized-person: 6ac90f36-caa0-4273-9489-4d0197124c33
# 网格员角色ID # 网格员角色ID
role-grid-member: 90675eba-e63e-4819-b45d-2c99ab78a278 role-grid-member: 90675eba-e63e-4819-b45d-2c99ab78a278
open-platform:
wechat:
mini-app:
# 激活状态
active: true
api-url: https://api.weixin.qq.com
authorize-url: ${open-platform.wechat.mini-app.api-url}/sns/jscode2session
grantType: authorization_code
appKey: wxa5e5552f8a3b1616
appSecret: 2453238e30359b5f0a4b31c44443a8af

View File

@ -38,79 +38,87 @@ layui.define(['laytpl', 'layer', 'element', 'util'], function (exports) {
//主题配置 //主题配置
, theme: { , theme: {
//内置主题配色方案 //内置主题配色方案
color: [{ color: [
main: '#20222A' //主题色 {
, selected: '#009688' //选中色 main: '#1A4E92'
, alias: 'default' //默认别名 , logo: '#1A4E92'
}, { // , selected: '#045f94'
main: '#03152A' , header: '#1A4E92'
, selected: '#3B91FF' , alias: 'default'
, alias: 'dark-blue' //藏蓝 },
}, { {
main: '#2E241B' main: '#20222A' //主题色
, selected: '#A48566' // , selected: '#009688' //选中色
, alias: 'coffee' //咖啡 , alias: 'old-default' //默认别名
}, { }, {
main: '#50314F' main: '#03152A'
, selected: '#7A4D7B' , selected: '#3B91FF'
, alias: 'purple-red' //紫红 , alias: 'dark-blue' //藏蓝
}, { }, {
main: '#344058' main: '#2E241B'
, logo: '#1E9FFF' , selected: '#A48566'
, selected: '#1E9FFF' , alias: 'coffee' //咖啡
, alias: 'ocean' //海洋 }, {
}, { main: '#50314F'
main: '#3A3D49' , selected: '#7A4D7B'
, logo: '#2F9688' , alias: 'purple-red' //紫红
, selected: '#5FB878' }, {
, alias: 'green' //墨绿 main: '#344058'
}, { , logo: '#1E9FFF'
main: '#20222A' , selected: '#1E9FFF'
, logo: '#F78400' , alias: 'ocean' //海洋
, selected: '#F78400' }, {
, alias: 'red' //橙色 main: '#3A3D49'
}, { , logo: '#2F9688'
main: '#28333E' , selected: '#5FB878'
, logo: '#AA3130' , alias: 'green' //墨绿
, selected: '#AA3130' }, {
, alias: 'fashion-red' //时尚红 main: '#20222A'
}, { , logo: '#F78400'
main: '#24262F' , selected: '#F78400'
, logo: '#3A3D49' , alias: 'red' //橙色
, selected: '#009688' }, {
, alias: 'classic-black' //经典黑 main: '#28333E'
}, { , logo: '#AA3130'
logo: '#226A62' , selected: '#AA3130'
, header: '#2F9688' , alias: 'fashion-red' //时尚红
, alias: 'green-header' //墨绿头 }, {
}, { main: '#24262F'
main: '#344058' , logo: '#3A3D49'
, logo: '#0085E8' , selected: '#009688'
, selected: '#1E9FFF' , alias: 'classic-black' //经典黑
, header: '#1E9FFF' }, {
, alias: 'ocean-header' //海洋头 logo: '#226A62'
}, { , header: '#2F9688'
header: '#393D49' , alias: 'green-header' //墨绿头
, alias: 'classic-black-header' //经典黑头 }, {
}, { main: '#344058'
main: '#50314F' , logo: '#0085E8'
, logo: '#50314F' , selected: '#1E9FFF'
, selected: '#7A4D7B' , header: '#1E9FFF'
, header: '#50314F' , alias: 'ocean-header' //海洋头
, alias: 'purple-red-header' //紫红头 }, {
}, { header: '#393D49'
main: '#28333E' , alias: 'classic-black-header' //经典黑头
, logo: '#28333E' }, {
, selected: '#AA3130' main: '#50314F'
, header: '#AA3130' , logo: '#50314F'
, alias: 'fashion-red-header' //时尚红头 , selected: '#7A4D7B'
}, { , header: '#50314F'
main: '#28333E' , alias: 'purple-red-header' //紫红头
, logo: '#009688' }, {
, selected: '#009688' main: '#28333E'
, header: '#009688' , logo: '#28333E'
, alias: 'green-header' //墨绿头 , selected: '#AA3130'
}] , header: '#AA3130'
, alias: 'fashion-red-header' //时尚红头
}, {
main: '#28333E'
, logo: '#009688'
, selected: '#009688'
, header: '#009688'
, alias: 'green-header' //墨绿头
}]
//初始的颜色索引,对应上面的配色方案数组索引 //初始的颜色索引,对应上面的配色方案数组索引
//如果本地已经有主题色记录则以本地记录为优先除非请求本地数据localStorage //如果本地已经有主题色记录则以本地记录为优先除非请求本地数据localStorage

File diff suppressed because one or more lines are too long

View File

@ -386,7 +386,7 @@ html {
} }
.layui-side-menu .layui-nav .layui-nav-itemed > .layui-nav-child { .layui-side-menu .layui-nav .layui-nav-itemed > .layui-nav-child {
padding: 5px 0; padding: 0 0;
} }
.layui-side-menu .layui-nav .layui-nav-item .layui-icon { .layui-side-menu .layui-nav .layui-nav-item .layui-icon {

View File

@ -28,7 +28,7 @@ import java.util.Map;
* @Date: 2022/1/24 10:19 AM * @Date: 2022/1/24 10:19 AM
* @Version: 1.0 * @Version: 1.0
*/ */
public class BaseGridMemberTest { public class BaseUserGridMemberTest {
// 网格员角色ID // 网格员角色ID
private String gridMemberRoleId = "90675eba-e63e-4819-b45d-2c99ab78a278"; private String gridMemberRoleId = "90675eba-e63e-4819-b45d-2c99ab78a278";