菜单isChild字段

userInfo支付密码 问题
This commit is contained in:
2024-05-23 11:16:31 +08:00
parent c594da4cb7
commit 0ce2a889c2
14 changed files with 43 additions and 52 deletions

View File

@@ -1,6 +1,5 @@
package com.chaozhanggui.system.cashierservice.controller; package com.chaozhanggui.system.cashierservice.controller;
import com.alibaba.fastjson.TypeReference;
import com.chaozhanggui.system.cashierservice.dao.TbPlatformDictMapper; import com.chaozhanggui.system.cashierservice.dao.TbPlatformDictMapper;
import com.chaozhanggui.system.cashierservice.entity.TbPlatformDict; import com.chaozhanggui.system.cashierservice.entity.TbPlatformDict;
import com.chaozhanggui.system.cashierservice.entity.vo.DistrictVo; import com.chaozhanggui.system.cashierservice.entity.vo.DistrictVo;

View File

@@ -329,8 +329,8 @@ public class LoginContoller {
String mdPasswordString = MD5Utils.MD5Encode(authUserDto.getPassword(), "utf-8"); String mdPasswordString = MD5Utils.MD5Encode(authUserDto.getPassword(), "utf-8");
return loginService.appLogin(authUserDto.getUsername(), mdPasswordString); return loginService.appLogin(authUserDto.getUsername(), mdPasswordString);
} else { } else {
tf = true; // tf = true;
// tf = loginService.validate(authUserDto.getCode(), authUserDto.getUsername()); tf = loginService.validate(authUserDto.getCode(), authUserDto.getUsername());
if (tf) { if (tf) {
return loginService.appLogin(authUserDto.getUsername(), null); return loginService.appLogin(authUserDto.getUsername(), null);
} else { } else {

View File

@@ -136,12 +136,14 @@ public class NotifyController {
} }
private Map<String, Object> getParameterMap(HttpServletRequest request) { private Map getParameterMap(HttpServletRequest request) {
RequestWrapper requestWrapper = new RequestWrapper(request); RequestWrapper requestWrapper = new RequestWrapper(request);
String body = requestWrapper.getBody(); String body = requestWrapper.getBody();
if (ObjectUtil.isNotEmpty(body)) { if (ObjectUtil.isNotEmpty(body)) {
return JSONUtil.toBean(body, Map.class); return JSONUtil.toBean(body, Map.class);
}else {
Map<String, String[]> parameterMap = request.getParameterMap();
return parameterMap;
} }
return null;
} }
} }

View File

@@ -55,26 +55,26 @@ public class UserContoller {
@Autowired @Autowired
private TbUserInfoMapper userInfoMapper; private TbUserInfoMapper userInfoMapper;
@GetMapping("/userInfo") // @GetMapping("/userInfo")
public JSONObject userInfo(@RequestParam("openId") String openId ) throws Exception { // public JSONObject userInfo(@RequestParam("openId") String openId ) throws Exception {
TbUserInfo shopUser = userInfoMapper.selectByOpenId(openId); // TbUserInfo shopUser = userInfoMapper.selectByOpenId(openId);
JSONObject jsonObject = new JSONObject(); // JSONObject jsonObject = new JSONObject();
if (Objects.isNull(shopUser)){ // if (Objects.isNull(shopUser)){
jsonObject.put("status","fail"); // jsonObject.put("status","fail");
jsonObject.put("msg","用户不存在"); // jsonObject.put("msg","用户不存在");
return jsonObject; // return jsonObject;
} // }
String userSign = UUID.randomUUID().toString().replaceAll("-",""); // String userSign = UUID.randomUUID().toString().replaceAll("-","");
String token = TokenUtil.generateJfToken(openId,userSign); // String token = TokenUtil.generateJfToken(openId,userSign);
JSONObject object = new JSONObject(); // JSONObject object = new JSONObject();
object.put("token",token); // object.put("token",token);
object.put("userSign",userSign); // object.put("userSign",userSign);
object.put("num",shopUser.getTotalScore()); // object.put("num",shopUser.getTotalScore());
jsonObject.put("status","success"); // jsonObject.put("status","success");
jsonObject.put("msg","成功"); // jsonObject.put("msg","成功");
jsonObject.put("data",object); // jsonObject.put("data",object);
return jsonObject; // return jsonObject;
} // }
@GetMapping("/shopUserInfo") @GetMapping("/shopUserInfo")
public Result shopUserInfo(@RequestParam("userId") String userId ,@RequestParam("shopId") String shopId ) throws Exception { public Result shopUserInfo(@RequestParam("userId") String userId ,@RequestParam("shopId") String shopId ) throws Exception {
TbShopUser shopUser = shopUserMapper.selectByUserIdAndShopId(userId,shopId); TbShopUser shopUser = shopUserMapper.selectByUserIdAndShopId(userId,shopId);

View File

@@ -19,7 +19,7 @@ public class SysDict implements Serializable {
/** /**
* 是否有子类0否1是 * 是否有子类0否1是
*/ */
private Integer isChild; private Object isChild;
/** /**
* 值 * 值

View File

@@ -97,25 +97,11 @@ public class TbUserInfo implements Serializable {
private String avatar = ""; private String avatar = "";
private String phone="";
private String isPwd; private String isPwd;
private String pwd; private String pwd;
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getAvatar() { public String getAvatar() {
return avatar; return avatar;
} }

View File

@@ -1,7 +1,6 @@
package com.chaozhanggui.system.cashierservice.entity.vo; package com.chaozhanggui.system.cashierservice.entity.vo;
import com.chaozhanggui.system.cashierservice.entity.SysDict; import com.chaozhanggui.system.cashierservice.entity.SysDict;
import com.chaozhanggui.system.cashierservice.entity.TbPlatformDict;
import java.util.List; import java.util.List;

View File

@@ -1,6 +1,7 @@
package com.chaozhanggui.system.cashierservice.entity.vo; package com.chaozhanggui.system.cashierservice.entity.vo;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
@Data @Data
@@ -19,12 +20,12 @@ public class OrderConfirmVo {
* 可用时间说明 * 可用时间说明
* 周一至周日 * 周一至周日
*/ */
private String avaTime; private String avaTime = "周一至周日";
/** /**
* 商品描述 * 商品描述
* 随时退·过期自动退·到店 * 随时退·过期自动退·到店
*/ */
private String proDetail="随时退·过期自动退·到店"; private String proDetail = "随时退·过期自动退·到店";
/** /**
* 商品原价/划线价 * 商品原价/划线价
*/ */
@@ -46,5 +47,4 @@ public class OrderConfirmVo {
private TagVo couponDetail; private TagVo couponDetail;
} }

View File

@@ -65,7 +65,7 @@ public class ProductInfoVo {
/** /**
* 营业时间 * 营业时间
*/ */
private String businessTime; private String businessTime = "全天营业";
/** /**
* 距离 * 距离
*/ */
@@ -86,5 +86,5 @@ public class ProductInfoVo {
/** /**
* 购买须知/价格说明 * 购买须知/价格说明
*/ */
private TbPurchaseNotice purchaseNotice=new TbPurchaseNotice(); private TbPurchaseNotice purchaseNotice = new TbPurchaseNotice();
} }

View File

@@ -62,9 +62,10 @@ public class HomeDistrictService {
} }
List<SysDict> sysDicts = sysDictMapper.selectByType(null); List<SysDict> sysDicts = sysDictMapper.selectByType(null);
for (SysDict sysDict : sysDicts) { for (SysDict sysDict : sysDicts) {
if (sysDict.getIsChild()==1) { if (sysDict.getIsChild().equals("1")) {
sysDict.setDetail(sysDictMapper.selectByDictId(sysDict.getDictId())); sysDict.setDetail(sysDictMapper.selectByDictId(sysDict.getDictId()));
} }
sysDict.setIsChild((sysDict.getIsChild() == null || sysDict.getIsChild().equals("0")) ? false : true);
} }
result.setMenu(sysDicts); result.setMenu(sysDicts);
} }
@@ -84,9 +85,10 @@ public class HomeDistrictService {
result.setTitle("热榜推荐"); result.setTitle("热榜推荐");
List<SysDict> sysDicts = sysDictMapper.selectHot(); List<SysDict> sysDicts = sysDictMapper.selectHot();
for (SysDict sysDict : sysDicts) { for (SysDict sysDict : sysDicts) {
if (sysDict.getIsChild()==1) { if (sysDict.getIsChild().equals("1")) {
sysDict.setDetail(sysDictMapper.selectByDictId(sysDict.getDictId())); sysDict.setDetail(sysDictMapper.selectByDictId(sysDict.getDictId()));
} }
sysDict.setIsChild((sysDict.getIsChild() == null || sysDict.getIsChild().equals("0")) ? false : true);
} }
result.setMenu(sysDicts); result.setMenu(sysDicts);
} }

View File

@@ -56,9 +56,10 @@ public class HomePageService {
//菜单 //菜单
List<SysDict> sysDicts = sysDictMapper.selectByType("home"); List<SysDict> sysDicts = sysDictMapper.selectByType("home");
for (SysDict sysDict : sysDicts) { for (SysDict sysDict : sysDicts) {
if (sysDict.getIsChild()==1) { if (sysDict.getIsChild().equals("1")) {
sysDict.setDetail(sysDictMapper.selectByDictId(sysDict.getDictId())); sysDict.setDetail(sysDictMapper.selectByDictId(sysDict.getDictId()));
} }
sysDict.setIsChild((sysDict.getIsChild() == null || sysDict.getIsChild().equals("0")) ? false : true);
} }
homeUpVO.setMenu(sysDicts); homeUpVO.setMenu(sysDicts);
/** /**

View File

@@ -284,7 +284,7 @@ public class LoginService {
} }
TbUserInfo userInfo=tbUserInfoMapper.selectByPrimaryKey(Integer.valueOf(userId)); TbUserInfo userInfo=tbUserInfoMapper.selectByPrimaryKey(Integer.valueOf(userId));
boolean flag= validate(map.get("code").toString(), userInfo.getPhone()); boolean flag= validate(map.get("code").toString(), userInfo.getTelephone());
if(!flag){ if(!flag){
return Result.fail("验证码错误"); return Result.fail("验证码错误");
} }

View File

@@ -330,7 +330,9 @@ public class ProductService {
productInfo.setPhone(tbShopInfo.getPhone()); productInfo.setPhone(tbShopInfo.getPhone());
productInfo.setLat(tbShopInfo.getLat()); productInfo.setLat(tbShopInfo.getLat());
productInfo.setLng(tbShopInfo.getLng()); productInfo.setLng(tbShopInfo.getLng());
productInfo.setBusinessTime(tbShopInfo.getBusinessStartDay() + "" + tbShopInfo.getBusinessEndDay() + " " + tbShopInfo.getBusinessTime()); if(StringUtils.isNotBlank(tbShopInfo.getBusinessStartDay())){
productInfo.setBusinessTime(tbShopInfo.getBusinessStartDay() + "" + tbShopInfo.getBusinessEndDay() + " " + tbShopInfo.getBusinessTime());
}
String distance = LocationUtils.getDistanceString( String distance = LocationUtils.getDistanceString(
Double.parseDouble(lng), Double.parseDouble(lat), Double.parseDouble(lng), Double.parseDouble(lat),
Double.parseDouble(tbShopInfo.getLng()), Double.parseDouble(tbShopInfo.getLat())); Double.parseDouble(tbShopInfo.getLng()), Double.parseDouble(tbShopInfo.getLat()));

View File

@@ -577,7 +577,7 @@
bind_parent_at = #{bindParentAt,jdbcType=BIGINT}, bind_parent_at = #{bindParentAt,jdbcType=BIGINT},
grand_parent_id = #{grandParentId,jdbcType=VARCHAR}, grand_parent_id = #{grandParentId,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR}, password = #{password,jdbcType=VARCHAR},
is_pwd=${isPwd,jdbcType=VARCHAR}, is_pwd=#{isPwd,jdbcType=VARCHAR},
pwd=#{pwd,jdbcType=VARCHAR} pwd=#{pwd,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>