|
|
@@ -12,6 +12,8 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
@@ -29,26 +31,29 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
UserMapper userMapper;
|
|
|
|
|
|
/**
|
|
|
- * @desc : 通过ID查询
|
|
|
+ * @desc : 通过ID查询
|
|
|
* @author : admin
|
|
|
- * @date : 2023/2/3 13:32
|
|
|
+ * @date : 2023/2/3 13:32
|
|
|
*/
|
|
|
@Override
|
|
|
- public ResponseResultVO selectById(Integer id) {
|
|
|
+ public ResponseResultVO selectById(Integer id) {
|
|
|
return ResponseResultUtil.success(companyMapper.selectById(id));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @desc : 更新微信用的公司
|
|
|
+ * @desc : 更新微信用的公司
|
|
|
* @author : admin
|
|
|
- * @date : 2023/2/3 13:32
|
|
|
+ * @date : 2023/2/3 13:32
|
|
|
*/
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public ResponseResultVO updateWxUserCompany(Map<String,Object> map) {
|
|
|
-
|
|
|
-// userMapper.updateCpid();
|
|
|
- return ResponseResultUtil.success(null);
|
|
|
+ public ResponseResultVO updateWxUserCompany(Map<String, Object> map) {
|
|
|
+ String userId = map.get("userId") + "";
|
|
|
+ Integer cpId = Integer.valueOf(map.get("cpId") + "");
|
|
|
+ List<Integer> cpIds = new ArrayList<>();
|
|
|
+ cpIds.add(cpId);
|
|
|
+ int i = userMapper.updateCpid(userId, cpId, cpIds);
|
|
|
+ return ResponseResultUtil.success(true);
|
|
|
}
|
|
|
|
|
|
/**
|