bug--代码规范优化
This commit is contained in:
@ -169,8 +169,12 @@ public class DeptServiceImpl extends BaseServiceImpl<DeptMapper, Dept> implement
|
|||||||
int jobCount = jobMapper.selectCount(Wrappers.<Job>lambdaQuery().in(Job::getDeptId,deptIds));
|
int jobCount = jobMapper.selectCount(Wrappers.<Job>lambdaQuery().in(Job::getDeptId,deptIds));
|
||||||
int roleCount = rolesDeptsMapper.selectCount(Wrappers.<RolesDepts>lambdaQuery()
|
int roleCount = rolesDeptsMapper.selectCount(Wrappers.<RolesDepts>lambdaQuery()
|
||||||
.in(RolesDepts::getDeptId,deptIds));
|
.in(RolesDepts::getDeptId,deptIds));
|
||||||
if(jobCount > 0) throw new BadRequestException( "所选部门中存在与岗位关联,请取消关联后再试");
|
if(jobCount > 0) {
|
||||||
if(roleCount > 0) throw new BadRequestException( "所选部门中存在与角色关联,请取消关联后再试");
|
throw new BadRequestException( "所选部门中存在与岗位关联,请取消关联后再试");
|
||||||
|
}
|
||||||
|
if(roleCount > 0) {
|
||||||
|
throw new BadRequestException( "所选部门中存在与角色关联,请取消关联后再试");
|
||||||
|
}
|
||||||
this.removeByIds(deptIds);
|
this.removeByIds(deptIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,7 +217,9 @@ public class StoreOrderController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//处理是否已经修改过订单价格,如果修改用新的单号去拉起支付
|
//处理是否已经修改过订单价格,如果修改用新的单号去拉起支付
|
||||||
if(StrUtil.isNotBlank(storeOrder.getExtendOrderId())) orderId = storeOrder.getExtendOrderId();
|
if(StrUtil.isNotBlank(storeOrder.getExtendOrderId())) {
|
||||||
|
orderId = storeOrder.getExtendOrderId();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
orderSupplyService.goPay(map,orderId,uid, param.getPaytype(),param.getFrom(),orderDTO);
|
orderSupplyService.goPay(map,orderId,uid, param.getPaytype(),param.getFrom(),orderDTO);
|
||||||
|
@ -188,7 +188,9 @@ public class CreatShareProductService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{//其他
|
else{//其他
|
||||||
if(StrUtil.isBlank(from)) from = AppFromEnum.H5.getValue();
|
if(StrUtil.isBlank(from)) {
|
||||||
|
from = AppFromEnum.H5.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
String name = uid + "_"+from+"_user_wap.jpg";
|
String name = uid + "_"+from+"_user_wap.jpg";
|
||||||
|
|
||||||
|
@ -58,7 +58,9 @@ public class LocationUtils {
|
|||||||
|
|
||||||
public static GetTencentLocationVO getLocation(String addr) {
|
public static GetTencentLocationVO getLocation(String addr) {
|
||||||
String key = RedisUtil.get(ShopKeyUtils.getTengXunMapKey());
|
String key = RedisUtil.get(ShopKeyUtils.getTengXunMapKey());
|
||||||
if (StrUtil.isBlank(key)) throw new BadRequestException("请先配置腾讯地图key");
|
if (StrUtil.isBlank(key)) {
|
||||||
|
throw new BadRequestException("请先配置腾讯地图key");
|
||||||
|
}
|
||||||
String url = StrUtil.format("?address={}&key={}", addr, key);
|
String url = StrUtil.format("?address={}&key={}", addr, key);
|
||||||
String json = HttpUtil.get(QQ_MAP_URL + url);
|
String json = HttpUtil.get(QQ_MAP_URL + url);
|
||||||
return JSONObject.parseObject(json, GetTencentLocationVO.class);
|
return JSONObject.parseObject(json, GetTencentLocationVO.class);
|
||||||
|
@ -36,6 +36,7 @@ public interface YxStoreCombinationMapper extends CoreMapper<YxStoreCombination>
|
|||||||
" AND c.stop_time > now() ORDER BY c.sort desc,c.id desc")
|
" AND c.stop_time > now() ORDER BY c.sort desc,c.id desc")
|
||||||
List<YxStoreCombinationQueryVo> getCombList(Page page);
|
List<YxStoreCombinationQueryVo> getCombList(Page page);
|
||||||
|
|
||||||
|
@Override
|
||||||
IPage<YxStoreCombination> selectPage(IPage<YxStoreCombination> page, @Param("ew") Wrapper<YxStoreCombination> queryWrapper);
|
IPage<YxStoreCombination> selectPage(IPage<YxStoreCombination> page, @Param("ew") Wrapper<YxStoreCombination> queryWrapper);
|
||||||
|
|
||||||
@Select("SELECT c.id,c.effective_time as effectiveTime,c.image,c.people,c.price,c.browse," +
|
@Select("SELECT c.id,c.effective_time as effectiveTime,c.image,c.people,c.price,c.browse," +
|
||||||
|
@ -129,7 +129,9 @@ public class YxStoreOrderQueryVo implements Serializable {
|
|||||||
private String deliveryType;
|
private String deliveryType;
|
||||||
|
|
||||||
public String getDeliveryType() {
|
public String getDeliveryType() {
|
||||||
if(StrUtil.isBlank(deliveryType)) return "express";
|
if(StrUtil.isBlank(deliveryType)) {
|
||||||
|
return "express";
|
||||||
|
}
|
||||||
return deliveryType;
|
return deliveryType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,9 @@ public class YxStoreProductReplyServiceImpl extends BaseServiceImpl<StoreProduct
|
|||||||
public ReplyCountVo getReplyCount(long productId) {
|
public ReplyCountVo getReplyCount(long productId) {
|
||||||
int sumCount = productReplyCount(productId);
|
int sumCount = productReplyCount(productId);
|
||||||
|
|
||||||
if(sumCount == 0) return new ReplyCountVo();
|
if(sumCount == 0) {
|
||||||
|
return new ReplyCountVo();
|
||||||
|
}
|
||||||
|
|
||||||
//好评
|
//好评
|
||||||
int goodCount = this.baseMapper.selectCount(Wrappers.<YxStoreProductReply>lambdaQuery()
|
int goodCount = this.baseMapper.selectCount(Wrappers.<YxStoreProductReply>lambdaQuery()
|
||||||
|
Reference in New Issue
Block a user