菜单isChild字段

userInfo支付密码 问题
This commit is contained in:
wangw 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;
import com.alibaba.fastjson.TypeReference;
import com.chaozhanggui.system.cashierservice.dao.TbPlatformDictMapper;
import com.chaozhanggui.system.cashierservice.entity.TbPlatformDict;
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");
return loginService.appLogin(authUserDto.getUsername(), mdPasswordString);
} else {
tf = true;
// tf = loginService.validate(authUserDto.getCode(), authUserDto.getUsername());
// tf = true;
tf = loginService.validate(authUserDto.getCode(), authUserDto.getUsername());
if (tf) {
return loginService.appLogin(authUserDto.getUsername(), null);
} 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);
String body = requestWrapper.getBody();
if (ObjectUtil.isNotEmpty(body)) {
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
private TbUserInfoMapper userInfoMapper;
@GetMapping("/userInfo")
public JSONObject userInfo(@RequestParam("openId") String openId ) throws Exception {
TbUserInfo shopUser = userInfoMapper.selectByOpenId(openId);
JSONObject jsonObject = new JSONObject();
if (Objects.isNull(shopUser)){
jsonObject.put("status","fail");
jsonObject.put("msg","用户不存在");
return jsonObject;
}
String userSign = UUID.randomUUID().toString().replaceAll("-","");
String token = TokenUtil.generateJfToken(openId,userSign);
JSONObject object = new JSONObject();
object.put("token",token);
object.put("userSign",userSign);
object.put("num",shopUser.getTotalScore());
jsonObject.put("status","success");
jsonObject.put("msg","成功");
jsonObject.put("data",object);
return jsonObject;
}
// @GetMapping("/userInfo")
// public JSONObject userInfo(@RequestParam("openId") String openId ) throws Exception {
// TbUserInfo shopUser = userInfoMapper.selectByOpenId(openId);
// JSONObject jsonObject = new JSONObject();
// if (Objects.isNull(shopUser)){
// jsonObject.put("status","fail");
// jsonObject.put("msg","用户不存在");
// return jsonObject;
// }
// String userSign = UUID.randomUUID().toString().replaceAll("-","");
// String token = TokenUtil.generateJfToken(openId,userSign);
// JSONObject object = new JSONObject();
// object.put("token",token);
// object.put("userSign",userSign);
// object.put("num",shopUser.getTotalScore());
// jsonObject.put("status","success");
// jsonObject.put("msg","成功");
// jsonObject.put("data",object);
// return jsonObject;
// }
@GetMapping("/shopUserInfo")
public Result shopUserInfo(@RequestParam("userId") String userId ,@RequestParam("shopId") String shopId ) throws Exception {
TbShopUser shopUser = shopUserMapper.selectByUserIdAndShopId(userId,shopId);

View File

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

View File

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

View File

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

View File

@ -1,6 +1,7 @@
package com.chaozhanggui.system.cashierservice.entity.vo;
import lombok.Data;
import java.math.BigDecimal;
@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;
}

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

View File

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

View File

@ -284,7 +284,7 @@ public class LoginService {
}
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){
return Result.fail("验证码错误");
}

View File

@ -330,7 +330,9 @@ public class ProductService {
productInfo.setPhone(tbShopInfo.getPhone());
productInfo.setLat(tbShopInfo.getLat());
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(
Double.parseDouble(lng), Double.parseDouble(lat),
Double.parseDouble(tbShopInfo.getLng()), Double.parseDouble(tbShopInfo.getLat()));

View File

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