Hotfix/bug repair
This commit is contained in:
@ -4,13 +4,13 @@ import co.yixiang.annotation.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-11-10
|
||||
*/
|
||||
* @author hupeng
|
||||
* @date 2019-11-10
|
||||
*/
|
||||
@Data
|
||||
public class YxStoreCouponUserQueryCriteria{
|
||||
|
||||
// 模糊
|
||||
@Query(type = Query.Type.INNER_LIKE)
|
||||
private String couponTitle;
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.aop.log.Log;
|
||||
import co.yixiang.constant.ShopConstants;
|
||||
import co.yixiang.enums.RedisKeyEnum;
|
||||
import co.yixiang.exception.BadRequestException;
|
||||
import co.yixiang.modules.shop.domain.YxSystemConfig;
|
||||
import co.yixiang.modules.shop.service.YxSystemConfigService;
|
||||
@ -60,11 +61,11 @@ public class SystemConfigController {
|
||||
yxSystemConfigModel.setMenuName(key);
|
||||
yxSystemConfigModel.setValue(value.toString());
|
||||
//重新配置微信相关
|
||||
if(key.equals("wechat_appid")){
|
||||
if(RedisKeyEnum.WECHAT_APPID.getValue().equals(key)){
|
||||
WxMpConfiguration.removeWxMpService();
|
||||
WxPayConfiguration.removeWxPayService();
|
||||
}
|
||||
if(key.equals("wxpay_mchId") || key.equals("wxapp_appId")){
|
||||
if( RedisKeyEnum.WXPAY_MCHID.getValue().equals(key) || RedisKeyEnum.WXAPP_APPID.getValue().equals(key)){
|
||||
WxPayConfiguration.removeWxPayService();
|
||||
}
|
||||
RedisUtil.set(key,value.toString(),0);
|
||||
@ -82,4 +83,4 @@ public class SystemConfigController {
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import co.yixiang.aop.log.Log;
|
||||
import co.yixiang.constant.ShopConstants;
|
||||
import co.yixiang.enums.RedisKeyEnum;
|
||||
import co.yixiang.exception.BadRequestException;
|
||||
import co.yixiang.modules.shop.domain.YxSystemStore;
|
||||
import co.yixiang.modules.shop.service.YxSystemStoreService;
|
||||
@ -69,7 +70,7 @@ public class SystemStoreController {
|
||||
@ApiOperation("获取经纬度")
|
||||
@PreAuthorize("@el.check('yxSystemStore:getl')")
|
||||
public ResponseEntity<Object> create(@Validated @RequestBody String jsonStr){
|
||||
String key = RedisUtil.get("tengxun_map_key");
|
||||
String key = RedisUtil.get(RedisKeyEnum.TENGXUN_MAP_KEY.getValue());
|
||||
if(StrUtil.isBlank(key)) throw new BadRequestException("请先配置腾讯地图key");
|
||||
JSONObject jsonObject = JSON.parseObject(jsonStr);
|
||||
String addr = jsonObject.getString("addr");
|
||||
@ -107,4 +108,4 @@ public class SystemStoreController {
|
||||
yxSystemStoreService.deleteAll(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -128,6 +128,7 @@ public class YxStoreCategoryServiceImpl implements YxStoreCategoryService {
|
||||
|
||||
YxStoreCategoryDTO categoryDTO = new YxStoreCategoryDTO();
|
||||
Boolean isChild;
|
||||
List<YxStoreCategory> categories = yxStoreCategoryRepository.findAll();
|
||||
for (YxStoreCategoryDTO deptDTO : categoryDTOS) {
|
||||
isChild = false;
|
||||
if ("0".equals(deptDTO.getPid().toString())) {
|
||||
@ -144,8 +145,11 @@ public class YxStoreCategoryServiceImpl implements YxStoreCategoryService {
|
||||
}
|
||||
if(isChild)
|
||||
cates.add(deptDTO);
|
||||
else if(!deptNames.contains(yxStoreCategoryRepository.findNameById(deptDTO.getPid())))
|
||||
cates.add(deptDTO);
|
||||
for (YxStoreCategory category : categories) {
|
||||
if(category.getId()==deptDTO.getPid()&&!deptNames.contains(category.getCateName())){
|
||||
cates.add(deptDTO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -164,4 +168,4 @@ public class YxStoreCategoryServiceImpl implements YxStoreCategoryService {
|
||||
return map;
|
||||
//return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user