Commit b931f5fb authored by nie'hong's avatar nie'hong

限制h5账号登录

parent bbd98c86
......@@ -288,7 +288,11 @@
<version>2.4</version>
<classifier>jdk15</classifier>
</dependency>
<dependency>
<groupId>net.duguying.pinyin</groupId>
<artifactId>pinyin</artifactId>
<version>0.0.1</version>
</dependency>
</dependencies>
<build>
......
package cn.chnmuseum.party.common.util;
import net.duguying.pinyin.Pinyin;
import net.duguying.pinyin.PinyinException;
import net.sourceforge.pinyin4j.PinyinHelper;
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
......@@ -25,7 +27,8 @@ public class PinYinUtil {
* @return 中文对应的拼音
*/
public static String getPinYin(String chinese, Boolean firstWord, Boolean appendNonChinese) {
//汉语拼音输出格式
/* 6月1日修改前
//汉语拼音输出格式
HanyuPinyinOutputFormat pinyinOutputFormat = new HanyuPinyinOutputFormat();
//大小写设置 大写
pinyinOutputFormat.setCaseType(HanyuPinyinCaseType.UPPERCASE);
......@@ -60,7 +63,21 @@ public class PinYinUtil {
}
}
}
return stringBuilder.toString();
return stringBuilder.toString();*/
// 6月1日修改后
try {
Pinyin pinyin = new Pinyin();
String test = pinyin.translateWithSepNoMark(chinese);
System.out.println(test);
} catch (PinyinException e) {
e.printStackTrace();
}
return null;
}
public static void main(String[] args) {
getPinYin("abc def", null, null);
}
}
......@@ -196,7 +196,7 @@ public class LoginController extends BaseController {
}
}
if (StringUtils.isNotBlank(administrator) && "2".equals(administrator)) {
if (!"2".equals(user.getType()) || !"4".equals(user.getType())) {
if (!"2".equals(user.getType()) && !"4".equals(user.getType())) {
resultMap.put("resultCode", "400");
resultMap.put("message", "您登录的账号既不是运维账号也不是单位用户账号,不能使用h5的功能");
return resultMap;
......
......@@ -652,9 +652,9 @@ public class RoleController extends BaseController {
ew.eq("is_deleted", 0);
ew.eq("status", 1);
// 不要这三个单位管理员 统计管理员 互动审核员
ew.ne("alias", "dwgly");
ew.ne("alias", "tjgly");
ew.ne("alias", "hdshy");
// ew.ne("alias", "dwgly");
// ew.ne("alias", "tjgly");
// ew.ne("alias", "hdshy");
ew.orderByAsc("sortorder");
ew.orderByDesc("create_time");
List<Role> list = roleService.list(ew);
......
......@@ -130,7 +130,7 @@ public class TBoardStatisticController extends BaseController {
List<String> areaIds = findAllAreaIdByParentCode(trend.getAreaCode());
trend.setAreaIds(areaIds);
Page<TBoardPlayTrend> page = this.tBoardStatisticService.getBoardTrendPageList(getPage(),trend);
Page<TBoardPlayTrend> page = this.tBoardStatisticService.getBoardTrendPageList(getPage(), trend);
// List<TBoardPlayTrend> records = this.tBoardStatisticService.getBoardTrendPageList(getPage(), trend);
// 处理数据为展板趋势图
......@@ -151,7 +151,7 @@ public class TBoardStatisticController extends BaseController {
// page.getRecords().sort(Comparator.comparing(TBoardPlayTrend::getPlayNumber).reversed());
map.put("dateList", dateList);
map.put("cntList", cntList);
map.put("page",page);
map.put("page", page);
return getResult(map);
}
......@@ -295,13 +295,13 @@ public class TBoardStatisticController extends BaseController {
String orgCode = null;
try {
TUser user = getcurUser();
if (user.getRoleList().size()>0&&!user.getRoleList().contains("1")) {
if (user.getRoleList().size() > 0 && !user.getRoleList().contains("1")) {
orgCode = user.getOrgCode();
}
} catch (Exception e) {
orgCode = null;
}
List list = this.tBoardStatisticService.getBoardCityPlayTotalList(areaCode,orgCode);
List list = this.tBoardStatisticService.getBoardCityPlayTotalList(areaCode, orgCode);
return getResult(list);
}
......@@ -313,7 +313,7 @@ public class TBoardStatisticController extends BaseController {
@PostMapping("/getInteractionFrequencyPageList")
// @RequiresAuthentication //@RequiresPermissions("t:board:statistic:districtPage")
@ApiOperation(value = "获取互动频次统计信息", notes = "获取互动频次统计信息")
public Map<String, Object> getInteractionFrequencyPageList(String frequencyDate,String areaCode) {
public Map<String, Object> getInteractionFrequencyPageList(String frequencyDate, String areaCode) {
String orgCode = null;
try {
TUser user = getcurUser();
......@@ -329,7 +329,7 @@ public class TBoardStatisticController extends BaseController {
//加上区域条件
List<String> areaIds = findAllAreaIdByParentCode(areaCode);
Page page = this.tBoardStatisticService.getInteractionFrequency(getPage(), frequencyDate, orgCode,areaIds);
Page page = this.tBoardStatisticService.getInteractionFrequency(getPage(), frequencyDate, orgCode, areaIds);
//
Map map = new HashMap();
List organList = new ArrayList<>();
......
......@@ -227,18 +227,7 @@ public class TUserController extends BaseController {
} else {
user.setPassword(StringUtils.trimToNull(user.getPassword()));
}
if (StringUtils.isBlank(user.getPhone())) {
resultMap.put("resultCode", "400");
resultMap.put("message", "请填写手机号码!");
return resultMap;
}
String s1 = StringUtils.trimToNull(user.getPhone());
byte[] bytes = s1.getBytes();
if (bytes.length != 11) {
resultMap.put("resultCode", "400");
resultMap.put("message", "手机号码长度错误!");
return resultMap;
}
if (StringUtils.isBlank(user.getOrgId())) {
resultMap.put("resultCode", "400");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment