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) {

Loading…
Отказ
Запис