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

import com.tuoheng.common.utils.JsonResult; import com.tuoheng.common.utils.JsonResult;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; 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.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;


* @return * @return
*/ */
@PostMapping("/add") @PostMapping("/add")
public JsonResult add(ThWestreamTiktok entity) {
public JsonResult add(@RequestBody ThWestreamTiktok entity) {
return thWestreamTiktokService.add(entity); return thWestreamTiktokService.add(entity);
} }



+ 2
- 0
tuoheng-api/src/main/java/com/tuoheng/api/service/impl/ThWestreamTiktokServiceImpl.java View File

entity.setNickname(westreamUser.getNickname()); entity.setNickname(westreamUser.getNickname());
if (StringUtils.isNotNull(westreamUser.getIdentityId())) { if (StringUtils.isNotNull(westreamUser.getIdentityId())) {
Identity identity = identityMapper.selectById(westreamUser.getIdentityId()); Identity identity = identityMapper.selectById(westreamUser.getIdentityId());
entity.setIdentityId(identity.getId());
entity.setIdentityName(identity.getIdentityName()); entity.setIdentityName(identity.getIdentityName());
} }
entity.setCreateTime(DateUtil.date()); entity.setCreateTime(DateUtil.date());
entity.setCreateUser(westreamUser.getId());
//填充数据 //填充数据
boolean flag = this.save(entity); boolean flag = this.save(entity);
if (flag) { if (flag) {

Loading…
Cancel
Save