Commit be7597bf authored by shiyu's avatar shiyu

Merge remote-tracking branch 'origin/master'

parents 9615e793 ecbd13ed
...@@ -124,6 +124,11 @@ ...@@ -124,6 +124,11 @@
<version>2.0</version> <version>2.0</version>
</dependency> </dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>dysmsapi20170525</artifactId>
<version>2.0.23</version>
</dependency>
</dependencies> </dependencies>
......
package com.wwdz.ch.core.notify;
import com.aliyun.dysmsapi20170525.models.SendSmsResponse;
import com.xxdxxs.utils.JsonUtils;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.Map;
@Slf4j
@Service
public class AliSmsSender implements SmsSender {
Logger logger = LoggerFactory.getLogger(getClass());
@Value("${dts.notify.alisms.accessKey}")
private String accessKeyId;
@Value("${dts.notify.alisms.secretKey}")
private String accessKeySecret;
@Value("${dts.notify.alisms.url}")
private String url;
@Value("${dts.notify.alisms.templateCode}")
private String templateCode;
//短信API产品名称(短信产品名固定,无需修改)
final String product = "Dysmsapi";
//短信API产品域名(接口地址固定,无需修改)
final String domain = "dysmsapi.aliyuncs.com";
public com.aliyun.dysmsapi20170525.Client createClient() throws Exception {
com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config()
.setAccessKeyId(accessKeyId)
.setAccessKeySecret(accessKeySecret);
// 访问的域名
config.endpoint = "dysmsapi.aliyuncs.com";
return new com.aliyun.dysmsapi20170525.Client(config);
}
@Override
public SmsResult send(String phone, String content) {
return null;
}
@Override
public SmsResult sendWithTemplate(String phone, int templateId, String[] params) {
return null;
}
public SmsResult sendWithTemplate(String phone, String verifyCode) {
try {
Map<String, Object> map = new HashMap<>();
map.put("msg", verifyCode + "短信验证码,1分钟内有效,请勿向任何人提供或泄露。");
com.aliyun.dysmsapi20170525.Client client = createClient();
com.aliyun.dysmsapi20170525.models.SendSmsRequest sendSmsRequest = new com.aliyun.dysmsapi20170525.models.SendSmsRequest()
.setPhoneNumbers(phone)
.setTemplateCode(templateCode)
.setTemplateParam(JsonUtils.fromMap(map))
.setSignName("玩物得志");
SendSmsResponse sendSmsResponse = client.sendSmsWithOptions(sendSmsRequest, new com.aliyun.teautil.models.RuntimeOptions());
logger.info("短线验证发送结果 : {} ", JsonUtils.from(sendSmsResponse));
if ("OK".equals(sendSmsResponse.getBody().code)) {
SmsResult smsResult = new SmsResult();
smsResult.setSuccessful(true);
smsResult.setResult(verifyCode);
return smsResult;
}
throw new RuntimeException("验证码发送失败");
} catch (Exception e) {
logger.error("AliSmsSender.sendWithTemplate(),mobile={}",phone,e );
throw new RuntimeException("验证码发送失败");
}
}
}
...@@ -37,6 +37,12 @@ dts: ...@@ -37,6 +37,12 @@ dts:
- name: refund - name: refund
templateId: 112233 templateId: 112233
alisms:
accessKey: LTAIehMFG7EhsJY8
secretKey: 1Q3mIc2tYaKT3tw3FCbKGu48AtiWSD
url: http://MQ_INST_1961444063236731_BXc2xu0h.cn-hangzhou.mq-internal.aliyuncs.com:8080
templateCode: SMS_212085019
# 微信模版通知配置 # 微信模版通知配置
# 微信模版用于通知客户或者运营者,注意配置格式;template-name,template-templateId 请参考 NotifyType 枚举值 # 微信模版用于通知客户或者运营者,注意配置格式;template-name,template-templateId 请参考 NotifyType 枚举值
wx: wx:
......
...@@ -37,6 +37,12 @@ dts: ...@@ -37,6 +37,12 @@ dts:
- name: refund - name: refund
templateId: 112233 templateId: 112233
alisms:
accessKey: LTAIehMFG7EhsJY8
secretKey: 1Q3mIc2tYaKT3tw3FCbKGu48AtiWSD
url: http://MQ_INST_1961444063236731_BXc2xu0h.cn-hangzhou.mq-internal.aliyuncs.com:8080
templateCode: SMS_212085019
# 微信模版通知配置 # 微信模版通知配置
# 微信模版用于通知客户或者运营者,注意配置格式;template-name,template-templateId 请参考 NotifyType 枚举值 # 微信模版用于通知客户或者运营者,注意配置格式;template-name,template-templateId 请参考 NotifyType 枚举值
wx: wx:
......
...@@ -7,10 +7,14 @@ public interface CategoryDao { ...@@ -7,10 +7,14 @@ public interface CategoryDao {
List<Category> queryByLevel(Integer level, Integer offset, Integer limit); List<Category> queryByLevel(Integer level, Integer offset, Integer limit);
List<Category> listByLevel(Integer level);
List<Category> queryByPid(Integer pid); List<Category> queryByPid(Integer pid);
Category findById(Integer id); Category findById(Integer id);
Category findByName(String name);
List<Category> querySelective(String id, String name, Integer page, Integer size, String sort, String order); List<Category> querySelective(String id, String name, Integer page, Integer size, String sort, String order);
int updateById(Category category); int updateById(Category category);
......
...@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo; ...@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo;
import com.wwdz.ch.db.domain.FavoritesItemsRelation; import com.wwdz.ch.db.domain.FavoritesItemsRelation;
import java.util.List; import java.util.List;
import java.util.Map;
public interface FavoritesItemsRelationDao { public interface FavoritesItemsRelationDao {
int insert(FavoritesItemsRelation record); int insert(FavoritesItemsRelation record);
...@@ -17,4 +18,5 @@ public interface FavoritesItemsRelationDao { ...@@ -17,4 +18,5 @@ public interface FavoritesItemsRelationDao {
long countByItemId(Long itemId); long countByItemId(Long itemId);
boolean isCollected(Long userId, Long itemId); boolean isCollected(Long userId, Long itemId);
long countByFavoritesId(Long favoritesId); long countByFavoritesId(Long favoritesId);
List<Map<String, Object>> findItemIdByCount();
} }
...@@ -8,4 +8,5 @@ public interface UserItemsRelationDao { ...@@ -8,4 +8,5 @@ public interface UserItemsRelationDao {
int insert(UserItemsRelation record); int insert(UserItemsRelation record);
List<UserItemsRelation> listByUserIds(Long userId, List<Long> userIds); List<UserItemsRelation> listByUserIds(Long userId, List<Long> userIds);
boolean isExisted(Long userId, Long itemId); boolean isExisted(Long userId, Long itemId);
UserItemsRelation find(Long itemId);
} }
...@@ -36,6 +36,12 @@ public class CategoryDaoImpl implements CategoryDao { ...@@ -36,6 +36,12 @@ public class CategoryDaoImpl implements CategoryDao {
return categoryMapper.selectByExample(example); return categoryMapper.selectByExample(example);
} }
public List<Category> listByLevel(Integer level) {
CategoryExample example = new CategoryExample();
example.or().andLevelEqualTo(level).andIsDeletedEqualTo(false);
return categoryMapper.selectByExample(example);
}
public List<Category> queryByPid(Integer pid) { public List<Category> queryByPid(Integer pid) {
CategoryExample example = new CategoryExample(); CategoryExample example = new CategoryExample();
example.or().andPidEqualTo(pid).andIsDeletedEqualTo(false); example.or().andPidEqualTo(pid).andIsDeletedEqualTo(false);
...@@ -46,6 +52,12 @@ public class CategoryDaoImpl implements CategoryDao { ...@@ -46,6 +52,12 @@ public class CategoryDaoImpl implements CategoryDao {
return categoryMapper.selectByPrimaryKey(id); return categoryMapper.selectByPrimaryKey(id);
} }
public Category findByName(String name) {
CategoryExample example = new CategoryExample();
example.or().andNameEqualTo(name).andIsDeletedEqualTo(false);
return categoryMapper.selectOneByExample(example);
}
public List<Category> querySelective(String id, String name, Integer page, Integer size, String sort, public List<Category> querySelective(String id, String name, Integer page, Integer size, String sort,
String order) { String order) {
CategoryExample example = new CategoryExample(); CategoryExample example = new CategoryExample();
......
...@@ -2,16 +2,16 @@ package com.wwdz.ch.db.impl; ...@@ -2,16 +2,16 @@ package com.wwdz.ch.db.impl;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.wwdz.ch.db.domain.Favorites; import com.wwdz.ch.db.dao.FavoritesItemsRelationDao;
import com.wwdz.ch.db.mapper.FavoritesItemsRelationMapper;
import com.wwdz.ch.db.domain.FavoritesItemsRelation; import com.wwdz.ch.db.domain.FavoritesItemsRelation;
import com.wwdz.ch.db.domain.FavoritesItemsRelationExample; import com.wwdz.ch.db.domain.FavoritesItemsRelationExample;
import com.wwdz.ch.db.dao.FavoritesItemsRelationDao; import com.wwdz.ch.db.mapper.FavoritesItemsRelationMapper;
import com.xxdxxs.db.component.JdbcHelper; import com.xxdxxs.db.component.JdbcHelper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List; import java.util.List;
import java.util.Map;
@Repository @Repository
public class FavoritesItemsRelationDaoImpl implements FavoritesItemsRelationDao { public class FavoritesItemsRelationDaoImpl implements FavoritesItemsRelationDao {
...@@ -106,4 +106,9 @@ public class FavoritesItemsRelationDaoImpl implements FavoritesItemsRelationDao ...@@ -106,4 +106,9 @@ public class FavoritesItemsRelationDaoImpl implements FavoritesItemsRelationDao
JdbcHelper.ifPresent(favoritesId, criteria::andFavoritesIdEqualTo); JdbcHelper.ifPresent(favoritesId, criteria::andFavoritesIdEqualTo);
return favoritesItemsRelationMapper.countByExample(example); return favoritesItemsRelationMapper.countByExample(example);
} }
@Override
public List<Map<String, Object>> findItemIdByCount() {
return favoritesItemsRelationMapper.selectItemIdByCount();
}
} }
...@@ -328,11 +328,12 @@ public class ItemDaoImpl implements ItemDao { ...@@ -328,11 +328,12 @@ public class ItemDaoImpl implements ItemDao {
ItemExample example = new ItemExample(); ItemExample example = new ItemExample();
ItemExample.Criteria criteria = example.createCriteria(); ItemExample.Criteria criteria = example.createCriteria();
criteria.andIsDeletedEqualTo(false); criteria.andIsDeletedEqualTo(false);
// 暂时去除华夏古泉和天眷堂的钱币, 对应编码2和7 //暂时去除华夏古泉和天眷堂的钱币, 对应编码2和7
if (!ObjectUtils.isEmpty(coinRequestDto.getIsExcluded()) && coinRequestDto.getIsExcluded() == 1) { if (!ObjectUtils.isEmpty(coinRequestDto.getIsExcluded()) && coinRequestDto.getIsExcluded() == 1) {
criteria.andSourceNotEqualTo(2); criteria.andSourceNotEqualTo(2);
criteria.andSourceNotEqualTo(7); criteria.andSourceNotEqualTo(7);
} }
criteria.andSourceIn(CHINESE_SOURCE_LIST);
if (StringUtils.hasLength(coinRequestDto.getName())) { if (StringUtils.hasLength(coinRequestDto.getName())) {
criteria.andNameLike("%" + coinRequestDto.getName() + "%"); criteria.andNameLike("%" + coinRequestDto.getName() + "%");
} }
......
...@@ -37,4 +37,12 @@ public class UserItemsRelationDaoImpl implements UserItemsRelationDao { ...@@ -37,4 +37,12 @@ public class UserItemsRelationDaoImpl implements UserItemsRelationDao {
criteria.andItemIdEqualTo(itemId); criteria.andItemIdEqualTo(itemId);
return usersItemsRelationMapper.countByExample(example) > 0; return usersItemsRelationMapper.countByExample(example) > 0;
} }
@Override
public UserItemsRelation find (Long itemId) {
UserItemsRelationExample example = new UserItemsRelationExample();
UserItemsRelationExample.Criteria criteria = example.createCriteria();
criteria.andItemIdEqualTo(itemId);
return usersItemsRelationMapper.selectOneByExample(example);
}
} }
...@@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Mapper; ...@@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map;
@Mapper @Mapper
public interface FavoritesItemsRelationMapper { public interface FavoritesItemsRelationMapper {
...@@ -50,4 +51,6 @@ public interface FavoritesItemsRelationMapper { ...@@ -50,4 +51,6 @@ public interface FavoritesItemsRelationMapper {
int updateByExampleSelective(@Param("record") FavoritesItemsRelation record, @Param("example") FavoritesItemsRelationExample example); int updateByExampleSelective(@Param("record") FavoritesItemsRelation record, @Param("example") FavoritesItemsRelationExample example);
int updateByExample(@Param("record") FavoritesItemsRelation record, @Param("example") FavoritesItemsRelationExample example); int updateByExample(@Param("record") FavoritesItemsRelation record, @Param("example") FavoritesItemsRelationExample example);
List<Map<String, Object>> selectItemIdByCount();
} }
\ No newline at end of file
...@@ -244,4 +244,7 @@ ...@@ -244,4 +244,7 @@
</if> </if>
limit 1 limit 1
</select> </select>
<select id="selectItemIdByCount" resultType="java.util.Map">
select item_id,count(*) from favorites_items_relation group by item_id order by count(*) limit 20
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -30,6 +30,6 @@ public class WxWebMvcConfiguration implements WebMvcConfigurer { ...@@ -30,6 +30,6 @@ public class WxWebMvcConfiguration implements WebMvcConfigurer {
registry.addInterceptor(loginInterceptor()) registry.addInterceptor(loginInterceptor())
.addPathPatterns("/**") .addPathPatterns("/**")
.excludePathPatterns("/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/wx/user/loginByWx" .excludePathPatterns("/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/wx/user/loginByWx"
, "/wx/user/loginByMobile", "/wx/user/loginRegCaptcha", "/wx/user/updateRegCaptcha", "/wx/item/page", "/wx/item/info"); , "/wx/user/loginByMobile", "/wx/user/loginRegCaptcha", "/wx/user/updateRegCaptcha", "/wx/item/page", "/wx/item/info", "/wx/favorites/info", "/wx/favorites/itemList");
} }
} }
...@@ -9,4 +9,5 @@ public class CategoryRequestDto implements Entity { ...@@ -9,4 +9,5 @@ public class CategoryRequestDto implements Entity {
private Integer level; private Integer level;
private Integer page; private Integer page;
private Integer size; private Integer size;
private String name;
} }
package com.wwdz.ch.wx.entity.vo;
import com.xxdxxs.entity.Entity;
import lombok.Data;
import java.util.List;
@Data
public class CategoryResponseVo implements Entity {
private Integer cid;
private Integer pid;
private String categoryName;
private List<CategoryResponseVo> child;
private Integer isChosen;
}
...@@ -23,4 +23,6 @@ public class ItemResponseVo implements Entity { ...@@ -23,4 +23,6 @@ public class ItemResponseVo implements Entity {
private String createTime; private String createTime;
private String videos; private String videos;
private Map<String, Object> homePageImage; private Map<String, Object> homePageImage;
private Integer isDeleted;
private String itemNickname;
} }
package com.wwdz.ch.wx.impl; package com.wwdz.ch.wx.impl;
import com.google.common.collect.Lists;
import com.wwdz.ch.core.type.Result; import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dao.CategoryDao; import com.wwdz.ch.db.dao.CategoryDao;
import com.wwdz.ch.db.domain.Category;
import com.wwdz.ch.wx.entity.request.CategoryRequestDto; import com.wwdz.ch.wx.entity.request.CategoryRequestDto;
import com.wwdz.ch.wx.entity.vo.CategoryResponseVo;
import com.wwdz.ch.wx.service.CategoryService; import com.wwdz.ch.wx.service.CategoryService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.*;
import java.util.stream.Collectors;
@Service @Service
public class CategoryServiceImpl implements CategoryService { public class CategoryServiceImpl implements CategoryService {
private static final Logger logger = LoggerFactory.getLogger(CategoryServiceImpl.class); private static final Logger logger = LoggerFactory.getLogger(CategoryServiceImpl.class);
...@@ -36,4 +44,70 @@ public class CategoryServiceImpl implements CategoryService { ...@@ -36,4 +44,70 @@ public class CategoryServiceImpl implements CategoryService {
return Result.failed("查询子类目失败"); return Result.failed("查询子类目失败");
} }
} }
@Override
public Result find(CategoryRequestDto dto) {
if (StringUtils.isBlank(dto.getName())) {
return Result.success(new ArrayList<>());
}
try {
Category category = categoryDao.findByName(dto.getName());
if (Objects.isNull(category)) {
return Result.success(new ArrayList<>());
}
List<Category> categoryList = new ArrayList<>();
categoryList.add(category);
int i = category.getLevel() - 1;
while (i > 0) {
categoryList.addAll(categoryDao.listByLevel(i));
i --;
}
List<CategoryResponseVo> responseVoList = categoryList.stream()
.map(this::toCategotyResongseVo).collect(Collectors.toList());
for (CategoryResponseVo vo : responseVoList) {
if (vo.getCid().equals(category.getId())) {
vo.setIsChosen(1);
}
}
return Result.success(convertVoList(responseVoList));
} catch (Exception e) {
return null;
}
}
public List<CategoryResponseVo> convertVoList(List<CategoryResponseVo> voList) {
Map<Integer, CategoryResponseVo> menuMap = new HashMap<>();
CategoryResponseVo root = new CategoryResponseVo();
root.setChild(Lists.newArrayList());
root.setCid(0);
menuMap.put(0, root);
if (CollectionUtils.isNotEmpty(voList)) {
for (CategoryResponseVo vo : voList) {
menuMap.put(vo.getCid(), vo);
}
for (CategoryResponseVo vo : voList) {
if (Objects.isNull(vo)) {
continue;
}
CategoryResponseVo parentVo = menuMap.get(vo.getPid());
if (Objects.isNull(parentVo)) {
continue;
}
if (CollectionUtils.isEmpty(parentVo.getChild())) {
parentVo.setChild(Lists.newArrayList());
}
parentVo.getChild().add(vo);
}
}
return root.getChild();
}
private CategoryResponseVo toCategotyResongseVo(Category category) {
CategoryResponseVo vo = new CategoryResponseVo();
vo.setCid(category.getId());
vo.setPid(category.getPid());
vo.setCategoryName(category.getName());
vo.setIsChosen(0);
return vo;
}
} }
...@@ -3,8 +3,8 @@ package com.wwdz.ch.wx.impl; ...@@ -3,8 +3,8 @@ package com.wwdz.ch.wx.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.wwdz.ch.core.captcha.CaptchaCodeManager; import com.wwdz.ch.core.captcha.CaptchaCodeManager;
import com.wwdz.ch.core.consts.ResultCode; import com.wwdz.ch.core.consts.ResultCode;
import com.wwdz.ch.core.notify.AliSmsSender;
import com.wwdz.ch.core.notify.NotifyService; import com.wwdz.ch.core.notify.NotifyService;
import com.wwdz.ch.core.notify.NotifyType;
import com.wwdz.ch.core.notify.SmsResult; import com.wwdz.ch.core.notify.SmsResult;
import com.wwdz.ch.core.type.Result; import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.core.type.UserTypeEnum; import com.wwdz.ch.core.type.UserTypeEnum;
...@@ -61,6 +61,8 @@ public class UserServiceImpl implements UserService { ...@@ -61,6 +61,8 @@ public class UserServiceImpl implements UserService {
@Value("${avatar-url}") @Value("${avatar-url}")
private String avatarUrl; private String avatarUrl;
@Autowired
private AliSmsSender aliSmsSender;
@Transactional @Transactional
...@@ -186,7 +188,7 @@ public class UserServiceImpl implements UserService { ...@@ -186,7 +188,7 @@ public class UserServiceImpl implements UserService {
return Result.failed("手机号格式不正确"); return Result.failed("手机号格式不正确");
} }
code = CharUtil.getRandomNum(6); code = CharUtil.getRandomNum(6);
SmsResult smsResult = notifyService.notifySmsTemplate(dto.getMobile(), NotifyType.CAPTCHA, new String[]{code, "1"}); SmsResult smsResult = aliSmsSender.sendWithTemplate(dto.getMobile(), code);
if (smsResult != null) { if (smsResult != null) {
logger.info("*****腾讯云短信发送->请求验证码,短信发送结果:{}", JSONObject.toJSONString(smsResult)); logger.info("*****腾讯云短信发送->请求验证码,短信发送结果:{}", JSONObject.toJSONString(smsResult));
} }
......
...@@ -6,4 +6,5 @@ import com.wwdz.ch.wx.entity.request.CategoryRequestDto; ...@@ -6,4 +6,5 @@ import com.wwdz.ch.wx.entity.request.CategoryRequestDto;
public interface CategoryService { public interface CategoryService {
Result top(CategoryRequestDto dto); Result top(CategoryRequestDto dto);
Result child(CategoryRequestDto dto); Result child(CategoryRequestDto dto);
Result find(CategoryRequestDto dto);
} }
...@@ -8,6 +8,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -8,6 +8,7 @@ import javax.servlet.http.HttpServletResponse;
public interface ItemService { public interface ItemService {
Result nameList(ItemRequestDto dto); Result nameList(ItemRequestDto dto);
Result recommend();
Result page(ItemRequestDto dto); Result page(ItemRequestDto dto);
Result list(ItemRequestDto dto); Result list(ItemRequestDto dto);
......
...@@ -62,4 +62,10 @@ public class WxCategoryController { ...@@ -62,4 +62,10 @@ public class WxCategoryController {
dto.setId(Integer.parseInt(id)); dto.setId(Integer.parseInt(id));
return categoryService.child(dto); return categoryService.child(dto);
} }
@ApiOperation(value = "名称查询")
@PostMapping(value = "/find")
public Result find(@RequestBody CategoryRequestDto dto) {
return categoryService.find(dto);
}
} }
...@@ -167,7 +167,10 @@ public class WxFavoritesController { ...@@ -167,7 +167,10 @@ public class WxFavoritesController {
FavoritesRequestDto dto = new FavoritesRequestDto(); FavoritesRequestDto dto = new FavoritesRequestDto();
dto.setId(Long.parseLong(id)); dto.setId(Long.parseLong(id));
dto.setUserId(Long.parseLong(userId)); dto.setUserId(0L);
if (StringUtils.isNotBlank(userId)) {
dto.setUserId(Long.parseLong(userId));
}
dto.setPage(Integer.parseInt(page)); dto.setPage(Integer.parseInt(page));
dto.setSize(Integer.parseInt(size)); dto.setSize(Integer.parseInt(size));
return favoritesService.itemList(dto); return favoritesService.itemList(dto);
......
...@@ -45,6 +45,12 @@ public class WxItemController { ...@@ -45,6 +45,12 @@ public class WxItemController {
return itemService.nameList(dto); return itemService.nameList(dto);
} }
@ApiOperation(value = "推荐词汇")
@PostMapping("/recommend")
public Result recommend() {
return itemService.recommend();
}
@ApiOperation(value = "分页查询") @ApiOperation(value = "分页查询")
@PostMapping("/page") @PostMapping("/page")
public Result page(@RequestBody KlDataRequestDto klDataRequestDto) { public Result page(@RequestBody KlDataRequestDto klDataRequestDto) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment