Commit 50feb6b4 authored by cy's avatar cy

方案、登录

parent 83a431b4
......@@ -78,6 +78,8 @@
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.7.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-test:5.1.7.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.xmlunit:xmlunit-core:2.6.2" level="project" />
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.1.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.2.0" level="project" />
......
......@@ -83,7 +83,7 @@
<if test="staffName != null">and staff_name like ('%' #{staffName} '%')</if>
<if test="phone != null">and phone like ('%' #{phone} '%')</if>
order by create_time desc
order by is_delete,create_time desc
<if test="pageNo != null">
limit #{pageNo},#{pageSize}
</if>
......
......@@ -145,12 +145,12 @@
<where>
is_delete=0 and is_vip = 2
<if test="startTime != null and startTime !=''">
<if test="startTime != null">
and create_time
between #{startTime}
</if>
<if test="endTime != null and endTime !=''">and #{endTime}</if>
<if test="endTime != null ">and #{endTime}</if>
<if test="userName != null and userName !=''">and user_name like ('%' #{userName} '%')</if>
......@@ -170,11 +170,11 @@
LEFT JOIN user_limit ul ON ul.user_id = u.id
<where>
is_delete=0 and is_vip = 2
<if test="startTime != null and startTime !=''">
and create_time
<if test="startTime != null">
and u.create_time
between #{startTime}
</if>
<if test="endTime != null and endTime !=''">and #{endTime}</if>
<if test="endTime != null">and #{endTime}</if>
<if test="userName != null and userName !=''">and user_name like ('%' #{userName} '%')</if>
<if test="phone != null and phone !=''">and phone like ('%' #{phone} '%')</if>
order by create_time desc
......@@ -191,11 +191,11 @@
FROM `user` u LEFT JOIN score s ON s.user_id = u.id
<where>
is_delete=0 and is_vip = 1
<if test="startTime != null and startTime !=''">
<if test="startTime != null">
and create_time
between #{startTime}
</if>
<if test="endTime != null and endTime !=''">and #{endTime}</if>
<if test="endTime != null ">and #{endTime}</if>
<if test="userName != null and userName !=''">and user_name like ('%' #{userName} '%')</if>
<if test="vipMobile != null and vipMobile !=''">and vip_mobile like ('%' #{vipMobile} '%')</if>
order by create_time desc
......@@ -210,11 +210,11 @@
FROM `user` u LEFT JOIN score s ON s.user_id = u.id
<where>
is_delete=0 and is_vip = 1
<if test="startTime != null and startTime !=''">
<if test="startTime != null ">
and create_time
between #{startTime}
</if>
<if test="endTime != null and endTime !=''">and #{endTime}</if>
<if test="endTime != null">and #{endTime}</if>
<if test="userName != null and userName !=''">and user_name like ('%' #{userName} '%')</if>
<if test="vipMobile != null and vipMobile !=''">and vip_mobile like ('%' #{vipMobile} '%')</if>
</where>
......@@ -229,11 +229,11 @@
LEFT JOIN staff_user_vip su on u.id= su.user_vip_id
<where>
u.is_delete=0 and u.is_vip = 1 and su.staff_id=#{staffId}
<if test="startTime != null and startTime !=''">
<if test="startTime != null ">
and create_time
between #{startTime}
</if>
<if test="endTime != null and endTime !=''">and #{endTime}</if>
<if test="endTime != null ">and #{endTime}</if>
<if test="userName != null and userName !=''">and user_name like ('%' #{userName} '%')</if>
<if test="vipMobile != null and vipMobile !=''">and vip_mobile like ('%' #{vipMobile} '%')</if>
order by create_time desc
......@@ -249,11 +249,11 @@
LEFT JOIN staff_user_vip su on u.id= su.user_vip_id
<where>
u.is_delete=0 and u.is_vip = 1 and su.staff_id=#{staffId}
<if test="startTime != null and startTime !=''">
<if test="startTime != null ">
and create_time
between #{startTime}
</if>
<if test="endTime != null and endTime !=''">and #{endTime}</if>
<if test="endTime != null ">and #{endTime}</if>
<if test="userName != null and userName !=''">and user_name like ('%' #{userName} '%')</if>
<if test="vipMobile != null and vipMobile !=''">and vip_mobile like ('%' #{vipMobile} '%')</if>
</where>
......
......@@ -82,6 +82,8 @@
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.7.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-test:5.1.7.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.xmlunit:xmlunit-core:2.6.2" level="project" />
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.1.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.2.0" level="project" />
......
......@@ -39,7 +39,7 @@ public class UserDto implements Serializable {
/**
* 登录来源
*/
@ApiModelProperty(name ="source",value = "登录来源:1 PC,2 WAP")
@ApiModelProperty(name ="source",value = "登录来源:1 PC,2 WAP,3 小程序")
@ExcelProperty(value = "注册来源")
private String source;
......@@ -67,16 +67,10 @@ public class UserDto implements Serializable {
/**
* 手机
*/
@ApiModelProperty(value = "手机号", name = "phone")
@ExcelProperty(value = "手机号")
@ApiModelProperty(value = "联系电话", name = "phone")
@ExcelProperty(value = "联系电话")
private String phone;
/**
* vip手机号
*/
@ApiModelProperty(value = "vip手机号", name = "vipMobile")
@ExcelProperty(value = "vip手机号")
private String vipMobile;
/**
* 学校
......
......@@ -65,22 +65,17 @@ public class UserInfoDto implements Serializable {
/**
* 登录来源
*/
@ApiModelProperty(name ="source",value = "登录来源:1 PC,2 WAP")
@ApiModelProperty(name ="source",value = "登录来源:1 PC,2 H5 ,3 小程序")
@ExcelProperty(value = "登录来源")
private Integer source;
/**
* vip用户手机
*/
@ApiModelProperty(value = "vip用户手机", name = "vipMobile")
@ExcelProperty(value = "vip用户手机")
private String vipMobile;
/**
* 手机
*/
@ApiModelProperty(value = "手机号", name = "phone")
@ExcelProperty(value = "手机号")
@ExcelProperty(value = "联系电话")
private String phone;
/**
......@@ -166,4 +161,10 @@ public class UserInfoDto implements Serializable {
@ApiModelProperty(name = "staffName",value = "员工名字")
private String staffName;
/**
* vip用户手机
*/
@ApiModelProperty(value = "vip用户手机", name = "vipMobile")
private String vipMobile;
}
......@@ -48,6 +48,5 @@ public class UserVipQueryVo implements Serializable {
* vip用户手机
*/
@ApiModelProperty(value = "vip用户手机", name = "vipMobile")
@ExcelProperty(value = "vip用户手机")
private String vipMobile;
}
......@@ -80,6 +80,8 @@
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.7.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-test:5.1.7.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.xmlunit:xmlunit-core:2.6.2" level="project" />
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.1.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.2.0" level="project" />
......
......@@ -459,7 +459,7 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp
return R.error("无美术专科录取规则!");
}
if (cultureGrade < secondRule.getCultureMin() || majorGrade < secondRule.getProfessionMin()) {
if (majorGrade < secondRule.getProfessionMin()) {
return R.error("很抱歉,客户的成绩不满足报考条件,无法查询!");
}
list = getArtsVipList(firstRule, secondRule, cultureGrade, majorGrade, totalMax, totalMin, locals, nameByIds);
......@@ -480,7 +480,7 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp
}
if (cultureGrade < secondRule.getCultureMin() || majorGrade < secondRule.getProfessionMin()) {
if (majorGrade < secondRule.getProfessionMin()) {
return R.error("很抱歉,客户的成绩不满足报考条件,无法查询!");
}
list = getLiteratureVipList(firstRule, secondRule, cultureGrade, majorGrade, totalMax, totalMin, locals, nameByIds);
......@@ -499,8 +499,8 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp
if (null == secondRule) {
return R.error("无体育专科录取规则!");
}
if (cultureGrade < secondRule.getCultureMin()) {
double total = majorGrade * 750 / 100 * 0.7 + cultureGrade * 0.3 ;
if (total < secondRule.getCultureMin()) {
return R.error("很抱歉,客户的成绩不满足报考条件,无法查询!");
}
......
......@@ -136,7 +136,7 @@ public class StaffUserVipServiceImpl extends ServiceImpl<LocalMapper, Local> imp
} catch (LockedAccountException e) {
return R.error(1, "登录失败!请联系管理员");
} catch (AuthenticationException e) {
return R.error(1, "该用户不存在");
return R.error(1, "用户不存在或账号已被禁用");
} catch (Exception e) {
return R.error(1, "系统异常");
}
......@@ -325,7 +325,6 @@ public class StaffUserVipServiceImpl extends ServiceImpl<LocalMapper, Local> imp
.registerTime(t.getRegisterTime())
.source(t.getSource()==1?"PC":"APP")
.userName(t.getUserName())
.vipMobile(t.getVipMobile())
.lastLoginTime(t.getLastLoginTime())
.school(t.getSchool())
.examType(t.getExamType()==1?"文化生":t.getExamType()==2?"美术生":t.getExamType()==3?"体育生":"文学编导考生")
......
......@@ -120,6 +120,9 @@ public class UserLoginServiceImpl extends ServiceImpl<UsersMapper, User> impleme
map.put("phone", userVo.getPhone());
map.put("is_delete", 0);
User user = usersMapper.selectOne(map);
if(null == user){
return R.error(1, "该用户不存在");
}
redisService.set(CODE_LOGIN_TYPE+"_"+user.getPhone(),SourceType.getByCode(userVo.getSource()),Common.SMS_TIMEOUT);
Subject subject = SecurityUtils.getSubject();
UserToken userToken = new UserToken(userVo.getPhone(), userVo.getCode(), CODE_LOGIN_TYPE);
......@@ -142,7 +145,7 @@ public class UserLoginServiceImpl extends ServiceImpl<UsersMapper, User> impleme
}
return R.ok(userInfoVo);
}catch (IncorrectCredentialsException e) {
return R.error(1, "账户密码错误");
return R.error(1, "验证码错误");
} catch (LockedAccountException e) {
return R.error(1, "登录失败!请联系管理员");
} catch (AuthenticationException e) {
......
......@@ -85,24 +85,19 @@ public class UserServiceImpl extends ServiceImpl<UsersMapper, User> implements U
//查询用户数据
List<User> list1 = usersMapper.getListQuery(map);
String ids = "";
for(User user : list1){
ids += user.getId()+",";
}
map.put("ids", ids.substring(0,ids.length()-1));
List<PayRecord> byIds = payRecordMapper.getByIds(ids);
List<UserInfoDto> list = new ArrayList<>();
//将集合遍历拿出用户id查询成绩信息
for (User user : list1) {
List<PayRecord> byIds = payRecordMapper.getByIds(String.valueOf(user.getId()));
UserInfoDto userInfoDto = new UserInfoDto();
//计算充值卡充值次数
int rechargeTimes = 0;
//支付宝充值总金额
Double alipayMoney = 0.00;
double alipayMoney = 0.00;
//微信充值总金额
Double weChatMoney = 0.00;
double weChatMoney = 0.00;
for(PayRecord payRecord : byIds) {
if (payRecord.getType() == 1) {
alipayMoney += null == payRecord.getMoney() ? 0 : payRecord.getMoney();
......@@ -114,8 +109,8 @@ public class UserServiceImpl extends ServiceImpl<UsersMapper, User> implements U
rechargeTimes += 1;
}
}
userInfoDto.setWeChatMoney(String.valueOf(weChatMoney));
userInfoDto.setAlipayMoney(String.valueOf(alipayMoney));
userInfoDto.setWeChatMoney(String.format("%.2f",weChatMoney));
userInfoDto.setAlipayMoney(String.format("%.2f",alipayMoney));
userInfoDto.setRechargeTimes(rechargeTimes);
userInfoDto.setQueryLimit(user.getUsableLimit());
......@@ -301,13 +296,13 @@ public class UserServiceImpl extends ServiceImpl<UsersMapper, User> implements U
List<UserDto> resultBo = list.stream().filter(Objects::nonNull)
.map(t -> UserDto.builder()
.registerTime(t.getRegisterTime())
.source(t.getSource()==1?"PC":"APP")
.userName(t.getUserName())
.phone(t.getPhone())
.lastLoginTime(t.getLastLoginTime())
.school(t.getSchool())
.examType(t.getExamType()==1?"文化生":t.getExamType()==2?"美术生":t.getExamType()==3?"体育生":"文学编导考生")
.sex(t.getSex()==0?"男":"女")
.source(t.getSource()==1?"PC":t.getSource()==2?"H5":"小程序")
.userName(t.getUserName()==null?null:t.getUserName())
.phone(t.getPhone()==null?null:t.getPhone())
.lastLoginTime(t.getLastLoginTime()==null?null:t.getLastLoginTime())
.school(t.getSchool()==null?null:t.getSchool())
.examType(t.getExamType()==null?null:t.getExamType()==1?"文化课考生":t.getExamType()==2?"美术生":t.getExamType()==3?"体育生":"文学编导考生")
.sex(t.getSex()==null?null:t.getSex()==0?"男":"女")
.rechargeTimes(t.getRechargeTimes())
.weChatMoney(t.getWeChatMoney())
.alipayMoney(t.getAlipayMoney())
......
......@@ -39,26 +39,24 @@ public class Common {
* 支付宝--回调地址
*/
//测试服务器
public static final String NOTIFY_URL = "http://111.203.232.171:8997/pay/aliPayCallBack.do";
//public static final String NOTIFY_URL = "http://111.203.232.171:8997/pay/aliPayCallBack.do";
//线上
//public static final String NOTIFY_URL = "https://jygkzy.com/api/pay/aliPayCallBack.do";
public static final String NOTIFY_URL = "https://jygkzy.com/api/pay/aliPayCallBack.do";
/***
* 支付宝--pc端支付成功跳转地址
*/
//测试服务器
public static final String RETURN_URL_PC = "http://111.203.232.171:8999/#/wallet";
//public static final String RETURN_URL_PC = "http://111.203.232.171:8999/#/wallet";
//线上
//public static final String RETURN_URL_PC = "https://jygkzy.com/#/wallet";
public static final String RETURN_URL_PC = "https://jygkzy.com/#/wallet";
/***
* 支付宝--手机网页支付成功跳转地址
*/
//测试服务器
public static final String RETURN_URL_WAP = "http://111.203.232.171:8999/#/history";
//public static final String RETURN_URL_WAP = "http://111.203.232.171:8999/#/history";
//线上
//public static final String RETURN_URL_WAP = "https://jygkzy.com/#/history";
public static final String RETURN_URL_WAP = "https://jygkzy.com/#/history";
/**
......
......@@ -18,7 +18,7 @@ public class AdminRealm extends AuthorizingRealm {
@Autowired
private AccountMapper accountMapper;
@Override
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) {
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) {
return null;
}
......
......@@ -29,7 +29,6 @@ public class WxUtil {
} catch (Exception e) {
e.printStackTrace();
}
System.out.println("code解析数据:"+map);
return map;
}
......
......@@ -12,8 +12,8 @@ public class WxCommon {
public static final String MCHID = "1606042985";
public static final String NOTIFY_URL = "http://111.203.232.171:8997/pay/wxPayCallBack.do";
//public static final String NOTIFY_URL = "https://jygkzy.com/api/pay/wxPayCallBack.do";
//public static final String NOTIFY_URL = "http://111.203.232.171:8997/pay/wxPayCallBack.do";
public static final String NOTIFY_URL = "https://jygkzy.com/api/pay/wxPayCallBack.do";
public static final String WX_PAY_URL_pc = "https://api.mch.weixin.qq.com/v3/pay/transactions/native";
......
......@@ -3,9 +3,9 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
druid:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.110.165:3306/volunteer?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
#url: jdbc:mysql://localhost:3306/volunteer?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
# url: jdbc:mysql://rm-bp1i44rtb091fk06coo.mysql.rds.aliyuncs.com:3306/volunteer?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false
#url: jdbc:mysql://192.168.110.165:3306/volunteer?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
url: jdbc:mysql://localhost:3306/volunteer?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
#url: jdbc:mysql://rm-bp1i44rtb091fk06coo.mysql.rds.aliyuncs.com:3306/volunteer?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false
username: root
password: adm4HYservice$
# username: alyxcroot
......
......@@ -3,8 +3,9 @@ server:
uri-encoding: UTF-8
max-threads: 1000
min-spare-threads: 30
port: 8997
#port: 8080
#port: 8997
port: 8080
connection-timeout: 5000ms
spring:
......
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