调整样式,增加配置

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

View File

@ -22,8 +22,8 @@ public class GridUserAuthBindDTO {
private String areaCode;
@ApiModelProperty(name = "userLevel", value = "用户级别")
private Integer userLevel;
@ApiModelProperty(name = "areaCodes", value = "地区编码列表")
private List<String> areaCodes;
@ApiModelProperty(name = "grids", value = "网格列表")
private List<UserGrid> grids;
public String getUserId() {
return userId == null ? "" : userId.trim();
@ -49,11 +49,41 @@ public class GridUserAuthBindDTO {
this.userLevel = userLevel;
}
public List<String> getAreaCodes() {
return areaCodes == null ? new ArrayList() : areaCodes;
public List<UserGrid> getGrids() {
return grids == null ? new ArrayList() : grids;
}
public void setAreaCodes(List<String> areaCodes) {
this.areaCodes = areaCodes;
public void setGrids(List<UserGrid> grids) {
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) {
// 查询小程序端要绑定的网格员账号是否正确
UserPO userPO = userService.getPOByUsername(gridUserAuthBindVO.getUsername());
if (passwordEncoder.matches(userPO.getUserPassword(), gridUserAuthBindVO.getPassword())) {
if (!passwordEncoder.matches(gridUserAuthBindVO.getPassword(), userPO.getUserPassword())) {
throw new ParamsException("用户名密码不匹配");
}
GridUserAuthBindDTO gridUserAuthBindDTO = new GridUserAuthBindDTO();
@ -395,8 +395,15 @@ public class UserExpandServiceImpl extends DefaultBaseService implements IUserEx
List<String> gridIds = gridRelationService.listGridId(userPO.getUserId());
if (!gridIds.isEmpty()) {
List<GridDTO> gridDTOS = gridService.list(gridIds);
List<String> gridCodes = ArrayListUtil.listBeanStringIdValue(gridDTOS, "gridCode", GridDTO.class);
gridUserAuthBindDTO.setAreaCodes(gridCodes);
List<GridUserAuthBindDTO.UserGrid> userGrids = new ArrayList<>();
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;
}

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 com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import ink.wgink.common.manager.env.EnvManager;
import ink.wgink.login.base.manager.ConfigManager;
import javax.net.ssl.*;
import java.io.*;
@ -34,11 +36,13 @@ public class SMCHttpUtil {
/** 请求超时时间 */
private static Integer TIMEOUT = 3000;
private static final String checkMeetingUrl = "https://10.25.248.213/sys-portal/terminalparams/search"; // 会议室终端是否存在
private static final String checkMeetingNameUrl = "https://10.25.248.213/sys-portal/meetingrooms/search/name"; // 会议室名称是否存在
private static final String getMeetingNumberUrl = "https://10.25.248.213/sys-portal/terminalparams"; // 获取随机分配的会议终端号码
private static final String createMeetingUrl = "https://10.25.248.213/sys-portal/meetingrooms/create"; // 创建会议室
private static final String deleteMeetingUrl = "https://10.25.248.213/sys-portal/meetingrooms/batch"; // 删除会议室
private static final String CHECK_MEETING_URL = "huaweiSmcCheckMeetingUrl";
private static final String CHECK_MEETING_NAME_URL = "huaweiSmcCheckMeetingNameUrl";
private static final String GET_MEETING_NUMBER_URL = "huaweiSmcGetMeetingNumberUrl";
private static final String CREATE_MEETING_URL = "huaweiSmcCreateMeetingUrl";
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 {
try {
@ -85,7 +89,7 @@ public class SMCHttpUtil {
param.put("id", meetingId);
list.add(param);
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")) {
throw new Exception("删除会议室失败");
}
@ -125,7 +129,7 @@ public class SMCHttpUtil {
String json = JSONObject.toJSONString(create);
try {
String result = doJson(createMeetingUrl, "POST", json);
String result = doJson(EnvManager.getInstance().getValue(CREATE_MEETING_URL), "POST", json);
if(result.contains("MEETINGROOM_NAME_EXIST")) {
throw new Exception("该名称已存在会议室");
}
@ -148,7 +152,7 @@ public class SMCHttpUtil {
Map<String, Object> params = new HashMap<String, Object>();
// params.put("zoneid", "06e26a21-36b9-47e9-aabd-944eb7a33e23");
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")) {
throw new Exception("获取随机的会议终端号失败");
}
@ -164,7 +168,8 @@ public class SMCHttpUtil {
Map<String, Object> params = new HashMap<String, Object>();
params.put("name", username);
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);
}
@ -175,7 +180,7 @@ public class SMCHttpUtil {
public Boolean checkMeetingNameExists(String name) throws Exception {
Map<String, Object> params = new HashMap<String, Object>();
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);
}
@ -299,8 +304,9 @@ public class SMCHttpUtil {
HttpURLConnection httpUrlConnection = (HttpURLConnection) urlConnection;
httpUrlConnection.setConnectTimeout(TIMEOUT);
// 设置请求头属性参数
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");
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("Content-Type", "application/x-www-form-urlencoded");
httpUrlConnection.setRequestProperty("accept", "application/json");
@ -394,8 +400,11 @@ public class SMCHttpUtil {
HttpURLConnection httpUrlConnection = (HttpURLConnection) urlConnection;
httpUrlConnection.setConnectTimeout(TIMEOUT);
// 设置请求头属性参数
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-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");
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("Content-Type", "application/x-www-form-urlencoded");
httpUrlConnection.setRequestProperty("accept", "application/json");

View File

@ -153,6 +153,17 @@ sms:
template:
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:
# enable-api-log: true
file:

View File

@ -153,6 +153,17 @@ sms:
template:
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:
enable-api-log: false
file:

View File

@ -160,3 +160,14 @@ params-config:
role-specialized-person: 6ac90f36-caa0-4273-9489-4d0197124c33
# 网格员角色ID
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,10 +38,18 @@ layui.define(['laytpl', 'layer', 'element', 'util'], function (exports) {
//主题配置
, theme: {
//内置主题配色方案
color: [{
color: [
{
main: '#1A4E92'
, logo: '#1A4E92'
// , selected: '#045f94'
, header: '#1A4E92'
, alias: 'default'
},
{
main: '#20222A' //主题色
, selected: '#009688' //选中色
, alias: 'default' //默认别名
// , selected: '#009688' //选中色
, alias: 'old-default' //默认别名
}, {
main: '#03152A'
, selected: '#3B91FF'

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 {
padding: 5px 0;
padding: 0 0;
}
.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
* @Version: 1.0
*/
public class BaseGridMemberTest {
public class BaseUserGridMemberTest {
// 网格员角色ID
private String gridMemberRoleId = "90675eba-e63e-4819-b45d-2c99ab78a278";