提交修改
This commit is contained in:
commit
960a326043
@ -270,7 +270,7 @@ public class DingTalkUtil {
|
|||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
DingTalkUtil dingTalkUtil = new DingTalkUtil();
|
DingTalkUtil dingTalkUtil = new DingTalkUtil();
|
||||||
String token = dingTalkUtil.getAccessToken("855818566");
|
String token = dingTalkUtil.getAccessToken("856016278");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -66,7 +66,6 @@ public class ShiroConfig {
|
|||||||
filterMap.put("/dtlg/luck", "anon");
|
filterMap.put("/dtlg/luck", "anon");
|
||||||
filterMap.put("/dtlg/look", "anon");
|
filterMap.put("/dtlg/look", "anon");
|
||||||
filterMap.put("/luck/getLuckById", "anon");
|
filterMap.put("/luck/getLuckById", "anon");
|
||||||
filterMap.put("/thirdAppConfig/syn", "anon");
|
|
||||||
filterMap.put("/luck/updateLuck", "anon");
|
filterMap.put("/luck/updateLuck", "anon");
|
||||||
filterMap.put("/**", "oauth2");
|
filterMap.put("/**", "oauth2");
|
||||||
shiroFilter.setFilterChainDefinitionMap(filterMap);
|
shiroFilter.setFilterChainDefinitionMap(filterMap);
|
||||||
|
|||||||
@ -67,7 +67,7 @@ public class DingtalkBusiness {
|
|||||||
// @DataSource(name = DataSourceNames.FOUR)
|
// @DataSource(name = DataSourceNames.FOUR)
|
||||||
public void getDingTalkepartmentsIntoData(String appid) {
|
public void getDingTalkepartmentsIntoData(String appid) {
|
||||||
|
|
||||||
/*List<StaffEntity> staffEntityList = staffDao.selectByRang("535");//飞书数据更新为钉钉数据
|
/*List<StaffEntity> staffEntityList = staffDao.selectByRang("1004");//飞书数据更新为钉钉数据
|
||||||
for (StaffEntity staff:staffEntityList
|
for (StaffEntity staff:staffEntityList
|
||||||
) {
|
) {
|
||||||
List<StaffEntity> list = staffDao.selectByName(staff.getName());
|
List<StaffEntity> list = staffDao.selectByName(staff.getName());
|
||||||
|
|||||||
@ -29,7 +29,7 @@ public class DingtalkSynDataJob implements ITask {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
DingtalkBusiness dingtalkBusiness;
|
DingtalkBusiness dingtalkBusiness;
|
||||||
static String appid = "855818566";
|
static String appid = "856016278";
|
||||||
@Override
|
@Override
|
||||||
public void run(String params) {
|
public void run(String params) {
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,6 @@ import java.util.Date;
|
|||||||
* @since 2020-08-21
|
* @since 2020-08-21
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
|
||||||
@TableName("luck_record")
|
@TableName("luck_record")
|
||||||
public class LuckRecord implements java.io.Serializable {
|
public class LuckRecord implements java.io.Serializable {
|
||||||
//
|
//
|
||||||
@ -132,6 +131,14 @@ public class LuckRecord implements java.io.Serializable {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getMobile() {
|
||||||
|
return mobile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMobile(String mobile) {
|
||||||
|
this.mobile = mobile;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否中将 0为中将 1中将
|
* 是否中将 0为中将 1中将
|
||||||
* @return
|
* @return
|
||||||
@ -231,6 +238,7 @@ public class LuckRecord implements java.io.Serializable {
|
|||||||
",gmtModified=" + gmtModified +
|
",gmtModified=" + gmtModified +
|
||||||
",staffId=" + staffId +
|
",staffId=" + staffId +
|
||||||
",name=" + name +
|
",name=" + name +
|
||||||
|
",mobile=" + mobile +
|
||||||
",isLuck=" + isLuck +
|
",isLuck=" + isLuck +
|
||||||
",weight=" + weight +
|
",weight=" + weight +
|
||||||
",luckId=" + luckId +
|
",luckId=" + luckId +
|
||||||
|
|||||||
@ -10,7 +10,6 @@ import java.util.Date;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class LuckRecordReq implements java.io.Serializable {
|
public class LuckRecordReq implements java.io.Serializable {
|
||||||
|
|
||||||
|
|
||||||
@ -58,6 +57,14 @@ public class LuckRecordReq implements java.io.Serializable {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getMobile() {
|
||||||
|
return mobile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMobile(String mobile) {
|
||||||
|
this.mobile = mobile;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否中将 0为中将 1中将
|
* 是否中将 0为中将 1中将
|
||||||
* @return
|
* @return
|
||||||
@ -140,6 +147,7 @@ public class LuckRecordReq implements java.io.Serializable {
|
|||||||
return "LuckRecord{" +
|
return "LuckRecord{" +
|
||||||
",id=" + id +
|
",id=" + id +
|
||||||
",name=" + name +
|
",name=" + name +
|
||||||
|
",name=" + mobile +
|
||||||
",isLuck=" + isLuck +
|
",isLuck=" + isLuck +
|
||||||
",weight=" + weight +
|
",weight=" + weight +
|
||||||
",luckId=" + luckId +
|
",luckId=" + luckId +
|
||||||
|
|||||||
@ -26,7 +26,7 @@ public class DingTalkLoginController {
|
|||||||
LuckService luckService;
|
LuckService luckService;
|
||||||
@Autowired
|
@Autowired
|
||||||
LuckRecordService luckRecordService;
|
LuckRecordService luckRecordService;
|
||||||
static String appid = "855818566";
|
static String appid = "856016278";
|
||||||
@PostMapping("/login")
|
@PostMapping("/login")
|
||||||
public R login(@RequestBody String body){
|
public R login(@RequestBody String body){
|
||||||
log.info("钉钉免登录luck{}", body);
|
log.info("钉钉免登录luck{}", body);
|
||||||
@ -39,7 +39,7 @@ public class DingTalkLoginController {
|
|||||||
public R luck(@RequestBody String body){
|
public R luck(@RequestBody String body){
|
||||||
log.info("luck{}", body);
|
log.info("luck{}", body);
|
||||||
JSONObject json = JSONObject.parseObject(body);
|
JSONObject json = JSONObject.parseObject(body);
|
||||||
Luck luck = luckService.selectLuckById(1L);//默认第一个活动
|
Luck luck = luckService.selectLuckById(2L);//默认第一个活动
|
||||||
if(luck.getStopTime().getTime() > System.currentTimeMillis()){
|
if(luck.getStopTime().getTime() > System.currentTimeMillis()){
|
||||||
return dingtalkBusiness.luck(json.getString("code"), appid, luck.getId());
|
return dingtalkBusiness.luck(json.getString("code"), appid, luck.getId());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,9 +3,9 @@ spring:
|
|||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
druid:
|
druid:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://172.16.157.238:3306/lz_management?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://rm-bp1xhc66ruz72t68p.mysql.rds.aliyuncs.com:3306/lz_manger?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
|
||||||
username: ldd_biz
|
username: lz_manger
|
||||||
password: Hello1234
|
password: N8zfBwhOC
|
||||||
initial-size: 10
|
initial-size: 10
|
||||||
max-active: 100
|
max-active: 100
|
||||||
min-idle: 10
|
min-idle: 10
|
||||||
|
|||||||
@ -92,11 +92,11 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<insert id="addDepartment" useGeneratedKeys="true" keyProperty="id">
|
<insert id="addDepartment" useGeneratedKeys="true" keyProperty="id" parameterType="DepartmentsEntity">
|
||||||
INSERT INTO
|
INSERT INTO
|
||||||
lz_departments(department_id,department_parent_id,member_count,department_name,chat_id,leader_employee_id,leader_open_id,status)
|
lz_departments(department_id,department_parent_id,member_count,department_name,chat_id,leader_employee_id,leader_open_id,status)
|
||||||
VALUES
|
VALUES
|
||||||
(#{department.departmentId},#{department.departmentParentId},#{department.memberCount},#{department.departmentName},#{department.chatId},#{department.leaderEmployeeId},#{department.leaderOpenId},#{department.status})
|
(#{departments.departmentId},#{departments.departmentParentId},#{departments.memberCount},#{departments.departmentName},#{departments.chatId},#{departments.leaderEmployeeId},#{departments.leaderOpenId},#{departments.status})
|
||||||
|
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getRelateByStaffIdAndDepartmentId" resultType="java.lang.String">
|
<select id="getRelateByStaffIdAndDepartmentId" resultType="java.lang.String">
|
||||||
select department_id from lz_departments_staff_relate where is_delete=0 and staff_id = #{staffId} and department_id=#{departmentId}
|
select department_id from lz_departments_staff_relate where is_delete=0 and staff_id = #{staffId} and department_id=#{departmentId} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -171,7 +171,7 @@
|
|||||||
select * from lz_staff where is_delete=0 and open_id = #{openId}
|
select * from lz_staff where is_delete=0 and open_id = #{openId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateStaff">
|
<update id="updateStaff" parameterType="StaffEntity">
|
||||||
UPDATE lz_staff
|
UPDATE lz_staff
|
||||||
<set>
|
<set>
|
||||||
update_time = now(),
|
update_time = now(),
|
||||||
@ -182,7 +182,7 @@
|
|||||||
gender = #{gender,jdbcType=INTEGER},
|
gender = #{gender,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="birthday != null and birthday != '' ">
|
<if test="birthday != null and birthday != '' ">
|
||||||
birthday = #{birthday,jdbcType=DATETIME},
|
birthday = #{birthday,jdbcType=TIMESTAMP},
|
||||||
</if>
|
</if>
|
||||||
<if test="maritalStatus != null">
|
<if test="maritalStatus != null">
|
||||||
marital_status = #{maritalStatus,jdbcType=INTEGER},
|
marital_status = #{maritalStatus,jdbcType=INTEGER},
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
insert into luck_record(
|
insert into luck_record(
|
||||||
<if test="staffId != null">staff_id, </if>
|
<if test="staffId != null">staff_id, </if>
|
||||||
<if test="name != null">name, </if>
|
<if test="name != null">name, </if>
|
||||||
<if test="moblie != null">name, </if>
|
<if test="mobile != null">mobile, </if>
|
||||||
<if test="isLuck != null">is_luck, </if>
|
<if test="isLuck != null">is_luck, </if>
|
||||||
<if test="weight != null">weight, </if>
|
<if test="weight != null">weight, </if>
|
||||||
<if test="luckId != null">luck_id, </if>
|
<if test="luckId != null">luck_id, </if>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user