|
@@ -414,6 +414,36 @@ public class usercenter extends Controller {
|
|
|
return getSucReturnObject().toString();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @API(title = "微信账号绑定成员", apiversion = R.ID20240524090002.v1.class)
|
|
|
+ @CACHEING_CLEAN(cms = {@cm(clazz = usercenter.class, method = {"queryUserMsg"})})
|
|
|
+ public String WechatBindingHr() throws YosException {
|
|
|
+
|
|
|
+ Long hrid = content.getLongValue("hrid");
|
|
|
+ Rows rows = dbConnect.runSqlQuery("select * from sys_hr WHERE hrid="+hrid+" and siteid='" + siteid + "'");
|
|
|
+ if (rows.isEmpty()) {
|
|
|
+ return getErrReturnObject().setErrMsg("人员不存在").toString();
|
|
|
+ }
|
|
|
+ Row hrRow = rows.get(0);
|
|
|
+
|
|
|
+ if (hrRow.getLong("userid") > 0) {
|
|
|
+ return getErrReturnObject().setErrMsg("微信已绑定").toString();
|
|
|
+ }
|
|
|
+ UpdateSQL updateSQL = SQLFactory.createUpdateSQL(this, "sys_hr");
|
|
|
+ updateSQL.setSiteid(siteid);
|
|
|
+ updateSQL.setUniqueid(hrid);
|
|
|
+ updateSQL.setValue("userid", userid);
|
|
|
+ System.err.println(updateSQL.getSQL());
|
|
|
+ updateSQL.update();
|
|
|
+
|
|
|
+ if (usertype == 99) {
|
|
|
+ new StoreHelper().updateUserType1(this);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return getSucReturnObject().toString();
|
|
|
+ }
|
|
|
+
|
|
|
@API(title = "微信公众号绑定", accesstoken = false)
|
|
|
public String WechatServceBinding() throws YosException {
|
|
|
String accesstoken = content.getStringValue("accesstoken");
|