Browse Source

更新

tags/V1.8.0^2
xiaoying 1 year ago
parent
commit
d10c3e07be
2 changed files with 4 additions and 1 deletions
  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 View File

@@ -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 View File

@@ -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…
Cancel
Save