提交修改

This commit is contained in:
quyixiao 2020-08-24 14:45:26 +08:00
commit 960a326043
12 changed files with 32 additions and 17 deletions

View File

@ -270,7 +270,7 @@ public class DingTalkUtil {
public static void main(String[] args) {
DingTalkUtil dingTalkUtil = new DingTalkUtil();
String token = dingTalkUtil.getAccessToken("855818566");
String token = dingTalkUtil.getAccessToken("856016278");
}

View File

@ -66,7 +66,6 @@ public class ShiroConfig {
filterMap.put("/dtlg/luck", "anon");
filterMap.put("/dtlg/look", "anon");
filterMap.put("/luck/getLuckById", "anon");
filterMap.put("/thirdAppConfig/syn", "anon");
filterMap.put("/luck/updateLuck", "anon");
filterMap.put("/**", "oauth2");
shiroFilter.setFilterChainDefinitionMap(filterMap);

View File

@ -67,7 +67,7 @@ public class DingtalkBusiness {
// @DataSource(name = DataSourceNames.FOUR)
public void getDingTalkepartmentsIntoData(String appid) {
/*List<StaffEntity> staffEntityList = staffDao.selectByRang("535");//飞书数据更新为钉钉数据
/*List<StaffEntity> staffEntityList = staffDao.selectByRang("1004");//飞书数据更新为钉钉数据
for (StaffEntity staff:staffEntityList
) {
List<StaffEntity> list = staffDao.selectByName(staff.getName());

View File

@ -29,7 +29,7 @@ public class DingtalkSynDataJob implements ITask {
@Autowired
DingtalkBusiness dingtalkBusiness;
static String appid = "855818566";
static String appid = "856016278";
@Override
public void run(String params) {

View File

@ -12,7 +12,6 @@ import java.util.Date;
* @since 2020-08-21
*/
@Data
@TableName("luck_record")
public class LuckRecord implements java.io.Serializable {
//
@ -132,6 +131,14 @@ public class LuckRecord implements java.io.Serializable {
this.name = name;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
/**
* 是否中将 0为中将 1中将
* @return
@ -231,6 +238,7 @@ public class LuckRecord implements java.io.Serializable {
",gmtModified=" + gmtModified +
",staffId=" + staffId +
",name=" + name +
",mobile=" + mobile +
",isLuck=" + isLuck +
",weight=" + weight +
",luckId=" + luckId +

View File

@ -10,7 +10,6 @@ import java.util.Date;
*/
@Data
public class LuckRecordReq implements java.io.Serializable {
@ -58,6 +57,14 @@ public class LuckRecordReq implements java.io.Serializable {
this.name = name;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
/**
* 是否中将 0为中将 1中将
* @return
@ -140,6 +147,7 @@ public class LuckRecordReq implements java.io.Serializable {
return "LuckRecord{" +
",id=" + id +
",name=" + name +
",name=" + mobile +
",isLuck=" + isLuck +
",weight=" + weight +
",luckId=" + luckId +

View File

@ -26,7 +26,7 @@ public class DingTalkLoginController {
LuckService luckService;
@Autowired
LuckRecordService luckRecordService;
static String appid = "855818566";
static String appid = "856016278";
@PostMapping("/login")
public R login(@RequestBody String body){
log.info("钉钉免登录luck{}", body);
@ -39,7 +39,7 @@ public class DingTalkLoginController {
public R luck(@RequestBody String body){
log.info("luck{}", body);
JSONObject json = JSONObject.parseObject(body);
Luck luck = luckService.selectLuckById(1L);//默认第一个活动
Luck luck = luckService.selectLuckById(2L);//默认第一个活动
if(luck.getStopTime().getTime() > System.currentTimeMillis()){
return dingtalkBusiness.luck(json.getString("code"), appid, luck.getId());
}

View File

@ -3,9 +3,9 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
druid:
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
username: ldd_biz
password: Hello1234
url: jdbc:mysql://rm-bp1xhc66ruz72t68p.mysql.rds.aliyuncs.com:3306/lz_manger?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
username: lz_manger
password: N8zfBwhOC
initial-size: 10
max-active: 100
min-idle: 10

View File

@ -92,11 +92,11 @@
</select>
<insert id="addDepartment" useGeneratedKeys="true" keyProperty="id">
<insert id="addDepartment" useGeneratedKeys="true" keyProperty="id" parameterType="DepartmentsEntity">
INSERT INTO
lz_departments(department_id,department_parent_id,member_count,department_name,chat_id,leader_employee_id,leader_open_id,status)
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>

View File

@ -34,7 +34,7 @@
</select>
<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>

View File

@ -171,7 +171,7 @@
select * from lz_staff where is_delete=0 and open_id = #{openId}
</select>
<update id="updateStaff">
<update id="updateStaff" parameterType="StaffEntity">
UPDATE lz_staff
<set>
update_time = now(),
@ -182,7 +182,7 @@
gender = #{gender,jdbcType=INTEGER},
</if>
<if test="birthday != null and birthday != '' ">
birthday = #{birthday,jdbcType=DATETIME},
birthday = #{birthday,jdbcType=TIMESTAMP},
</if>
<if test="maritalStatus != null">
marital_status = #{maritalStatus,jdbcType=INTEGER},

View File

@ -37,7 +37,7 @@
insert into luck_record(
<if test="staffId != null">staff_id, </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="weight != null">weight, </if>
<if test="luckId != null">luck_id, </if>