浏览代码

更新

tags/V1.8.0^2
xiaoying 1年前
父节点
当前提交
d10c3e07be
共有 2 个文件被更改,包括 4 次插入1 次删除
  1. +2
    -1
      tuoheng-api/src/main/java/com/tuoheng/api/controller/WestreamTiktokController.java
  2. +2
    -0
      tuoheng-api/src/main/java/com/tuoheng/api/service/impl/ThWestreamTiktokServiceImpl.java

+ 2
- 1
tuoheng-api/src/main/java/com/tuoheng/api/controller/WestreamTiktokController.java 查看文件

@@ -5,6 +5,7 @@ import com.tuoheng.api.service.ThWestreamTiktokService;
import com.tuoheng.common.utils.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@@ -28,7 +29,7 @@ public class WestreamTiktokController {
* @return
*/
@PostMapping("/add")
public JsonResult add(ThWestreamTiktok entity) {
public JsonResult add(@RequestBody ThWestreamTiktok entity) {
return thWestreamTiktokService.add(entity);
}


+ 2
- 0
tuoheng-api/src/main/java/com/tuoheng/api/service/impl/ThWestreamTiktokServiceImpl.java 查看文件

@@ -62,9 +62,11 @@ public class ThWestreamTiktokServiceImpl extends ServiceImpl<ThWestreamTiktokMap
entity.setNickname(westreamUser.getNickname());
if (StringUtils.isNotNull(westreamUser.getIdentityId())) {
Identity identity = identityMapper.selectById(westreamUser.getIdentityId());
entity.setIdentityId(identity.getId());
entity.setIdentityName(identity.getIdentityName());
}
entity.setCreateTime(DateUtil.date());
entity.setCreateUser(westreamUser.getId());
//填充数据
boolean flag = this.save(entity);
if (flag) {

正在加载...
取消
保存