Merge branch 'master' into develop/express
This commit is contained in:
@@ -228,6 +228,7 @@ public class BookForumArticlesServiceController {
|
||||
public R getForumByBook(@RequestParam Integer bookId,@RequestParam Integer limit,@RequestParam Integer page){
|
||||
LambdaQueryWrapper<BookForumArticlesEntity> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(BookForumArticlesEntity::getDelflag,0);
|
||||
wrapper.eq(BookForumArticlesEntity::getBookid,bookId);
|
||||
wrapper.orderByDesc(BookForumArticlesEntity::getCreateTime);
|
||||
Page<BookForumArticlesEntity> bookForumArticlesEntityPage = bookForumArticlesService.getBaseMapper().selectPage(new Page<>(page, limit), wrapper);
|
||||
for (BookForumArticlesEntity b:bookForumArticlesEntityPage.getRecords()){
|
||||
|
||||
@@ -119,7 +119,6 @@ public class MyUserController {
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
// @RequiresPermissions("book:user:save")
|
||||
public R save(@RequestBody MyUserEntity user){
|
||||
String password = user.getPassword();
|
||||
String saltMD5 = MD5Utils.getSaltMD5(password);
|
||||
@@ -130,24 +129,33 @@ public class MyUserController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* 修改用户信息
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
// @RequiresPermissions("book:user:update")
|
||||
public R update(@RequestBody MyUserEntity user){
|
||||
|
||||
if (!StringUtils.isEmpty(user.getPassword())) {
|
||||
String password = user.getPassword();
|
||||
String saltMD5 = MD5Utils.getSaltMD5(password);
|
||||
user.setPassword(saltMD5);
|
||||
userService.updateById(user);
|
||||
}else{
|
||||
userService.update(user);
|
||||
}
|
||||
|
||||
System.out.println(user.toString());
|
||||
userService.updateById(user);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户密码
|
||||
* @param user
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/updateUserPassword")
|
||||
public R updateUserPassword(@RequestBody MyUserEntity user){
|
||||
String password = user.getPassword();
|
||||
if(password.equals(null)){
|
||||
return R.error("密码不能为空");
|
||||
}
|
||||
String saltMD5 = MD5Utils.getSaltMD5(password);
|
||||
user.setPassword(saltMD5);
|
||||
userService.updateById(user);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
|
||||
@@ -19,6 +19,6 @@ import java.util.List;
|
||||
public interface BuyOrderDao extends BaseMapper<BuyOrder> {
|
||||
List<BuyOrder> orderList(BuyOrderListRequestVo requestVo);
|
||||
|
||||
Page<BuyOrder> testPage(Page<BuyOrder> page);
|
||||
// Page<BuyOrder> testPage(Page<BuyOrder> page);
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,5 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface MyUserDao extends BaseMapper<MyUserEntity> {
|
||||
|
||||
void update(MyUserEntity user);
|
||||
|
||||
}
|
||||
|
||||
@@ -42,7 +42,6 @@ public interface MyUserService extends IService<MyUserEntity> {
|
||||
//电子书购买
|
||||
String buyEbook(String userId, String bookId,String couponId);
|
||||
|
||||
void update (MyUserEntity user);
|
||||
//第三方微信登录
|
||||
R getUserInfoByApp(UserAppAuthorEntity userAppAuthorEntity);
|
||||
|
||||
|
||||
@@ -352,16 +352,6 @@ public class MyUserServiceImpl extends ServiceImpl<MyUserDao, MyUserEntity> impl
|
||||
return "购买成功!";
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param user
|
||||
*/
|
||||
@Override
|
||||
public void update(MyUserEntity user) {
|
||||
myUserDao.update(user);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 微信授权登录
|
||||
|
||||
@@ -3,9 +3,9 @@ spring:
|
||||
redis:
|
||||
open: false # 是否开启redis缓存 true开启 false关闭
|
||||
database: 0
|
||||
host: 127.0.0.1
|
||||
host: 39.106.36.183
|
||||
port: 6379
|
||||
# password: Jgll2015 # 密码(默认为空)
|
||||
password: Jgll2015 # 密码(默认为空)
|
||||
timeout: 6000000ms # 连接超时时长(毫秒)
|
||||
jedis:
|
||||
pool:
|
||||
|
||||
@@ -27,15 +27,5 @@
|
||||
</resultMap>
|
||||
|
||||
|
||||
<update id="update">
|
||||
|
||||
update user
|
||||
<set>
|
||||
age = #{age}, sex = #{sex} ,avatar=#{avatar} ,nickname =#{nickname}
|
||||
</set>
|
||||
where id = #{id}
|
||||
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +1,6 @@
|
||||
package com;
|
||||
|
||||
import com.peanut.common.utils.MD5Utils;
|
||||
import com.peanut.modules.pay.weChatPay.config.WechatPayConfig;
|
||||
import com.peanut.modules.pay.weChatPay.dto.WechatPaymentInfo;
|
||||
import org.junit.Test;
|
||||
@@ -41,5 +42,18 @@ public class VxApiTest {
|
||||
System.out.println(wechatPaymentInfo.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mmm(){
|
||||
String saltMD5 = MD5Utils.getSaltMD5("29698073wjl");
|
||||
System.out.println(saltMD5);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mmmm(){
|
||||
// boolean saltverifyMD5 = MD5Utils.getSaltverifyMD5("29698073wjl", "15af9ed9b06a442b90b09e78d21a3635890e24196db1a61e");
|
||||
boolean saltverifyMD5 = MD5Utils.getSaltverifyMD5("29698073wjl", "f33643591f4e942d3918f582555719247f6e90131ea1dc0a");
|
||||
System.out.println(saltverifyMD5);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user