Compare commits

...

2 Commits

Author SHA1 Message Date
lwy ae4358a5a6 add file
2 years ago
lwy 65ad741fc9 weixin and weibo success
2 years ago

@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.5</version>
<version>3.0.6</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>top.liangwy</groupId>
@ -15,6 +15,8 @@
<description>read_statistics</description>
<properties>
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>
<dependencies>
<dependency>
@ -32,7 +34,7 @@
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
</dependency>
<dependency>
@ -56,7 +58,11 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.28</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
@ -80,6 +86,28 @@
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
<include>**/*.html</include>
<include>**/**/*.js</include>
<include>**/**/*.css</include>
<include>**/*</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>
</project>

@ -1,9 +1,11 @@
package top.liangwy.read_statistics;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
@MapperScan("top.liangwy.read_statistics.dao")
public class ReadStatisticsApplication {
public static void main(String[] args) {

@ -0,0 +1,22 @@
package top.liangwy.read_statistics.common;
public class BaseController {
// 云上伊川积分
public String[] free = { "梁文元", "闫露", "姜琰", "方伊东", "李元", "孙飞飞" };
/**
* url
*/
public String url = "http://app2.dxhmt.cn:10329/system/uUser/list";
// 快手积分
public String ksFree = "Joy,5429264664,是姜姜呀呀,老方聊青铜,李元668,人生充满阳光715,陶利,郭明杰563,旷野幽兰50808," +
"吴晓晖,张建校,王晓华,钟响亮,田津辉,张睿祥.,韩晓娜,杨玉明,宁霞,cht135236,13608656363,13938862929,15038503566,王晓芳," +
"13938803441,李辉晓\uD83D\uDC83,";
// 微信看一看
// public String ScanFree = "梁文元,闫露,姜琰,方伊东,李元,孙飞飞,陶利平,郭明杰,赵艳红,吴晓晖,张建校,王晓芳,";
public String ScanFree = "";
// 微博
public String WbFree = "孙飞32207,用户3hms2qw5ml,元元-ly,Joy-9716,姜姜_呦,大肋肋,小淘气rui,高静亚,小淘气rui,yiqili_,周雅丽yl,Mayajie3,赵yiman,用户928003530,用户7624278904,7728498387,";
}

@ -0,0 +1,105 @@
package top.liangwy.read_statistics.controller;
import org.apache.ibatis.session.SqlSession;
//import org.joda.time.DateTime;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import top.liangwy.read_statistics.common.BaseController;
import top.liangwy.read_statistics.dao.DeptMapper;
import top.liangwy.read_statistics.dao.ScanMapper;
import top.liangwy.read_statistics.dao.UserMapper;
import top.liangwy.read_statistics.pojo.Dept;
import top.liangwy.read_statistics.pojo.User;
import top.liangwy.read_statistics.pojo.Result.UserScan;
import top.liangwy.read_statistics.utils.MybatisUtils;
import java.time.LocalDateTime;
import java.util.*;
/**
* @author lwy
* @
*/
@Controller
@RequestMapping("/scan")
public class ScanController extends BaseController {
@GetMapping("/today")
public String home(Model model) {
SqlSession sqlSession = MybatisUtils.getSqlSession();
UserMapper userMapper = sqlSession.getMapper(UserMapper.class);
DeptMapper deptMapper = sqlSession.getMapper(DeptMapper.class);
ScanMapper scanMapper = sqlSession.getMapper(ScanMapper.class);
int status = 0;
LocalDateTime now = LocalDateTime.now();
int year = now.getYear();
int month = now.getMonthValue();
int day = now.getDayOfMonth();
int hour = now.getHour();
int minute = now.getMinute();
int second = now.getSecond();
String userScanString = scanMapper.getUserScanList();
System.out.println(year + "年" + month + "月" + day + "日 " + hour + "" + minute + "" + second +
" 点击在看的人员是:" + userScanString);
if (null == userScanString) {
status = 1;
} else {
String newUserScanString = userScanString.replace(" ", "");
String[] a = newUserScanString.split(",");
model.addAttribute("date", year + "年" + month + "月" + day + "日");
// 获取所有部门名称
List<Dept> deptList = deptMapper.getAllDeptName();
// 创建有序键值对储存总的数据
Map<String, List<UserScan>> map = new LinkedHashMap<String, List<UserScan>>(deptList.size());
for (int i = 0; i < deptList.size(); i++) {
// 获取指定部门的人员信息
List<User> arrayList = userMapper.getUserByDeptId(deptList.get(i).getDeptId());
List<UserScan> userList = new ArrayList<>();
for (int j = 0; j < arrayList.size(); j++) {
UserScan us = new UserScan();
us.setUserName(arrayList.get(j).getUserName());
for (int k = 0; k < a.length; k++) {
if (us.getUserName().equals(a[k])) {
us.setScanStatus("已完成");
}
}
userList.add(us);
}
map.put(deptList.get(i).getDeptName(), userList);
}
sqlSession.close();
model.addAttribute("list", map);
}
sqlSession.close();
model.addAttribute("status", status);
return "/scan/today";
}
@RequestMapping("/insert")
public String edit(String userScanList, Model model) {
System.out.println("123insert");
SqlSession sqlSession = MybatisUtils.getSqlSession();
ScanMapper scanMapper = sqlSession.getMapper(ScanMapper.class);
String newUserScanList = ScanFree + userScanList;
if (userScanList != null) {
int i = scanMapper.setUserScanList(newUserScanList);
if (i == 1) {
sqlSession.commit();
sqlSession.close();
model.addAttribute("info", "success");
}
}
sqlSession.close();
return "/scan/insert";
}
}

@ -0,0 +1,118 @@
package top.liangwy.read_statistics.controller;
import org.apache.ibatis.session.SqlSession;
//import org.joda.time.DateTime;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import top.liangwy.read_statistics.common.BaseController;
import top.liangwy.read_statistics.dao.DeptMapper;
import top.liangwy.read_statistics.dao.UserMapper;
import top.liangwy.read_statistics.dao.WbMapper;
import top.liangwy.read_statistics.pojo.Dept;
import top.liangwy.read_statistics.pojo.User;
import top.liangwy.read_statistics.pojo.Result.UserScan;
import top.liangwy.read_statistics.utils.MybatisUtils;
import java.time.LocalDateTime;
import java.util.*;
/**
* @author lwy
* @
*/
@Controller
@RequestMapping("/wb")
public class WbController extends BaseController {
@GetMapping("/today")
public String today(Model model) {
int status = 0;
SqlSession sqlSession = MybatisUtils.getSqlSession();
UserMapper userMapper = sqlSession.getMapper(UserMapper.class);
DeptMapper deptMapper = sqlSession.getMapper((DeptMapper.class));
WbMapper wbMapper = sqlSession.getMapper(WbMapper.class);
LocalDateTime now = LocalDateTime.now();
int year = now.getYear();
int month = now.getMonthValue();
int day = now.getDayOfMonth();
int hour = now.getHour();
int minute = now.getMinute();
int second = now.getSecond();
String wbUserScanString = wbMapper.getWbUserScanList();
if (null == wbUserScanString) {
status = 1;
} else {
System.out
.println(year + "年" + month + "月" + day + "日 " + hour + "" + minute + "" + second +
" 微博点赞评论人员是:" + wbUserScanString);
String newWbUserScanString = WbFree + wbUserScanString.replace(" ", "");
System.out.println(newWbUserScanString);
String[] a = newWbUserScanString.split(",");
model.addAttribute("date", year + "年" + month + "月" + day + "日");
// 获取所有部门名称
List<Dept> deptList = deptMapper.getAllDeptName();
// 创建有序键值对储存总的数据
Map<String, List<UserScan>> map = new LinkedHashMap<String, List<UserScan>>(deptList.size());
for (int i = 1; i < deptList.size(); i++) {
// 获取指定部门的人员信息
List<User> arrayList = userMapper.getUserByDeptId(deptList.get(i).getDeptId());
List<UserScan> userList = new ArrayList<>();
for (int j = 0; j < arrayList.size(); j++) {
if (i == 3) {
System.out.println(arrayList.get(j).getUserName());
System.out.println(arrayList.get(j).getWbNickName());
}
UserScan us = new UserScan();
us.setUserName(arrayList.get(j).getUserName());
us.setKsNickName(arrayList.get(j).getWbNickName());
for (int k = 0; k < a.length; k++) {
if (null == us.getKsNickName()) {
us.setKsNickName("");
}
if (us.getKsNickName().equals(a[k])) {
us.setScanStatus("已完成");
}
}
userList.add(us);
}
map.put(deptList.get(i).getDeptName(), userList);
}
model.addAttribute("list", map);
}
sqlSession.close();
model.addAttribute("status", status);
return "/wb/today";
}
@RequestMapping("/insert")
public String edit(String wbUserScanList, Model model) {
SqlSession sqlSession = MybatisUtils.getSqlSession();
WbMapper wbMapper = sqlSession.getMapper(WbMapper.class);
String newWbUserScanList = ScanFree + wbUserScanList;
System.out.println(wbUserScanList);
if (wbUserScanList != null) {
int i = wbMapper.setWbUserScanList(newWbUserScanList);
if (i == 1) {
sqlSession.commit();
sqlSession.close();
model.addAttribute("info", "success");
}
}
sqlSession.close();
return "/wb/insert";
}
}

@ -0,0 +1,20 @@
package top.liangwy.read_statistics.dao;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import top.liangwy.read_statistics.pojo.Dept;
import java.util.List;
/**
* @author lwy
*/
@Mapper
@Repository
public interface DeptMapper {
String getDeptName(Integer deptId);
List<Dept> getAllDeptName();
}

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="top.liangwy.read_statistics.dao.DeptMapper">
<select id="getDeptName" parameterType="int" resultType="String">
select deptName from dept where deptId = #{deptId}
</select>
<select id="getAllDeptName" resultType="top.liangwy.read_statistics.pojo.Dept">
select * from dept where deleted = 0 order by `order`
</select>
</mapper>

@ -0,0 +1,18 @@
package top.liangwy.read_statistics.dao;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import top.liangwy.read_statistics.pojo.Integral;
/**
* @author lwy
*/
@Mapper
@Repository
public interface IntegralMapper {
Integral getTodayIntegral(Integer id);
Integral getYesterdayIntegral(Integer id);
Boolean addUserInteralNum(Integral integral);
Boolean userInteralNumAdd30(Integral integral);
Integral getYesterdayYesterdayIntegral(Integer id);
}

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="top.liangwy.read_statistics.dao.IntegralMapper">
<select id="getTodayIntegral" parameterType="int" resultType="top.liangwy.read_statistics.pojo.Integral">
select integralNum
from integral
where userId = #{id}
and to_days(createTime) = to_days(now())
order by createTime desc limit 1
</select>
<select id="getYesterdayIntegral" parameterType="int" resultType="top.liangwy.read_statistics.pojo.Integral">
select integralNum
from integral
where userId = #{id}
and TO_DAYS(NOW()) - TO_DAYS(createTime) = 1
and really = 0
order by createTime desc limit 1
</select>
<select id="getYesterdayYesterdayIntegral" parameterType="int" resultType="top.liangwy.read_statistics.pojo.Integral">
select integralNum
from integral
where userId = #{id}
and TO_DAYS(NOW()) - TO_DAYS(createTime) = 2
and really = 0
order by createTime desc limit 1
</select>
<insert id="addUserInteralNum" parameterType="top.liangwy.read_statistics.pojo.Integral">
insert into integral (userId, integralNum, really)
values (#{userId}, #{integralNum}, 0)
</insert>
<insert id="userInteralNumAdd30" parameterType="top.liangwy.read_statistics.pojo.Integral">
insert into integral (userId, integralNum, really)
values (#{userId}, #{integralNum}, #{really})
</insert>
</mapper>

@ -0,0 +1,17 @@
package top.liangwy.read_statistics.dao;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
/**
* @author lwy
*/
@Mapper
@Repository
public interface KsMapper {
String getUserKsList();
int setUserKsList(String userKsList);
}

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="top.liangwy.read_statistics.dao.KsMapper">
<select id="getUserKsList" resultType="String">
select userKsList from ks order by id desc limit 1;
</select>
<insert id="setUserKsList" parameterType="String">
insert into ks (userKsList) values (#{userKsList})
</insert>
</mapper>

@ -0,0 +1,17 @@
package top.liangwy.read_statistics.dao;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
/**
* @author lwy
*/
@Mapper
@Repository
public interface ScanMapper {
String getUserScanList();
int setUserScanList(String userScanList);
}

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="top.liangwy.read_statistics.dao.ScanMapper">
<select id="getUserScanList" resultType="String">
select userScanList from scan where to_days(now()) - to_days(createTime) = 0
order by createTime desc limit 1;
</select>
<insert id="setUserScanList" parameterType="String">
insert into scan (userScanList) values (#{userScanList})
</insert>
</mapper>

@ -0,0 +1,23 @@
package top.liangwy.read_statistics.dao;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import top.liangwy.read_statistics.pojo.User;
import java.util.List;
/**
* @author lwy
*/
@Mapper
@Repository
public interface UserMapper {
List<User> getUserList();
String getUserIdByTelephone(String telephone);
List<User> getUserTelephoneByDeptName(String deptName);
List<User> getUserByDeptId(Integer deptId);
List<String> getUserTelphone();
}

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="top.liangwy.read_statistics.dao.UserMapper">
<select id="getUserList" resultType="top.liangwy.read_statistics.pojo.User">
select * from user where deleted = 0
</select>
<select id="getUserIdByTelphone" resultType="String">
select userId from user where telphone = #{telephone} and deleted = 0 limit 1
</select>
<select id="getUserTelphoneByDeptName" resultType="top.liangwy.read_statistics.pojo.User">
select * from user, where deptName = #{deptName} and deleted = 0
</select>
<select id="getUserByDeptId" resultType="top.liangwy.read_statistics.pojo.User">
select * from user where deptId = #{deptId} and deleted = 0 order by `order`
</select>
</mapper>

@ -0,0 +1,17 @@
package top.liangwy.read_statistics.dao;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
/**
* @author lwy
*/
@Mapper
@Repository
public interface WbMapper {
String getWbUserScanList();
int setWbUserScanList(String wbUserScanList);
}

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="top.liangwy.read_statistics.dao.WbMapper">
<select id="getWbUserScanList" resultType="String">
select wbUserScanList from wb where to_days(now()) - to_days(createTime) = 0
order by createTime desc limit 1;
</select>
<insert id="setWbUserScanList" parameterType="String">
insert into wb (wbUserScanList) values (#{wbUserScanList})
</insert>
</mapper>

@ -0,0 +1,11 @@
package top.liangwy.read_statistics.pojo;
import lombok.Data;
@Data
public class Dept {
private Integer deptId;
private String deptName;
private Integer deleted;
private Integer order;
}

@ -0,0 +1,46 @@
package top.liangwy.read_statistics.pojo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@Data
public class Integral {
/**
* id
*/
private Integer integralId;
/**
* id
*/
private Integer userId;
/**
*
*/
private Integer integralNum;
/**
*
*/
private Integer really;
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss",
timezone = "GMT+8"
)
private Date createTime;
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss",
timezone = "GMT+8"
)
private Date updateTime;
}

@ -0,0 +1,23 @@
package top.liangwy.read_statistics.pojo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* @author lwy
*/
@Data
public class Ks {
private Integer id;
private String userKsList;
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss",
timezone = "GMT+8"
)
private Date createTime;
}

@ -0,0 +1,20 @@
package top.liangwy.read_statistics.pojo.Result;
import lombok.Data;
@Data
public class ResultMsg {
//错误信息
private String msg;
//状态
private String status;
//返回数据不需要的时候为null即可
private Object data;
public ResultMsg(String msg, String status, Object data) {
this.msg = msg;
this.status = status;
this.data = data;
}
}

@ -0,0 +1,13 @@
package top.liangwy.read_statistics.pojo.Result;
import lombok.Data;
/**
* @author lwy
*/
@Data
public class UserScan {
private String userName;
private String ksNickName;
private String scanStatus;
}

@ -0,0 +1,17 @@
package top.liangwy.read_statistics.pojo.Result;
import lombok.Data;
/**
* @author lwy
*/
@Data
public class UserScore {
private Integer userId;
private String userName;
private Integer todayScore;
private Integer yesterdayScore;
// private Integer addScore;
}

@ -0,0 +1,23 @@
package top.liangwy.read_statistics.pojo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* @author lwy
*/
@Data
public class Scan {
private Integer id;
private String userScanList;
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss",
timezone = "GMT+8"
)
private Date createTime;
}

@ -0,0 +1,32 @@
package top.liangwy.read_statistics.pojo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* @author lwy
*/
@Data
public class User {
private Integer userId;
private String userName;
private Integer deptId;
private String telephone;
private String ksNickName;
private String wbNickName;
private Integer deleted;
private Integer order;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateTime;
}

@ -0,0 +1,20 @@
package top.liangwy.read_statistics.pojo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* @author lwy
*/
@Data
public class Wb {
private Integer id;
private String wbUserScanList;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
}

@ -0,0 +1,32 @@
package top.liangwy.read_statistics.utils;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import java.io.IOException;
import java.io.InputStream;
/**
* @author lwy
*/
public class MybatisUtils {
private static SqlSessionFactory sqlSessionFactory;
static {
try {
String resource = "mybatis-config.xml";
InputStream inputStream = Resources.getResourceAsStream(resource);
sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream);
} catch (IOException e) {
e.printStackTrace();
}
}
public static SqlSession getSqlSession() {
return sqlSessionFactory.openSession();
}
}

@ -2,4 +2,7 @@ server.port=8080
spring.datasource.url=jdbc:mysql://39.97.211.66:3306/dblwy?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
spring.datasource.username=DBLwy
spring.datasource.password=tx8yH88dJseWt72x
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
mybatis.type-aliases-package=top.liangwy.read_statistics.cyc.pojo
mybatis.mapper-locations=classpath:/dao/*.xml

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<environments default="development">
<environment id="development">
<transactionManager type="JDBC"/>
<dataSource type="POOLED">
<property name="driver" value="com.mysql.cj.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://39.97.211.66/dblwy?useUnicode=true&amp;characterEncoding=UTF-8&amp;serverTimezone=Asia/Shanghai"/>
<property name="username" value="DBLwy"/>
<property name="password" value="tx8yH88dJseWt72x"/>
<property name="poolPingQuery" value="SELECT NOW()" />
<property name="poolPingEnabled" value="true" />
</dataSource>
</environment>
</environments>
<mappers>
<mapper resource="top/liangwy/read_statistics/dao/UserMapper.xml"/>
<mapper resource="top/liangwy/read_statistics/dao/IntegralMapper.xml"/>
<mapper resource="top/liangwy/read_statistics/dao/DeptMapper.xml"/>
<mapper resource="top/liangwy/read_statistics/dao/ScanMapper.xml"/>
<mapper resource="top/liangwy/read_statistics/dao/IntegralMapper.xml"/>
<mapper resource="top/liangwy/read_statistics/dao/KsMapper.xml"/>
<mapper resource="top/liangwy/read_statistics/dao/WbMapper.xml"/>
</mappers>
</configuration>

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,28 @@
//增加30分
function addScore(userId) {
console.log(userId);
$.ajax({
type: "post",
contentType: "application/json",
url: "/api/score/edit",
dataType: 'json',
cache: false,
timeout: 600000,
data: JSON.stringify({ "userId": userId }
)
}).done(function (result) {
console.log(result);
if ($("td").eq("增加30分")) {
$("#" + userId).text("已增加").css("color", "red");
}
})
}
function f(userName) {
console.log(userName);
if ($("#" + userName).next().text() == "") {
$("#" + userName).next().text("已完成");
}
else{
$("#" + userName).next().text("");
}
}

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="UTF-8">
<title>Home</title>
<!-- <div th:replace="common/head :: head"></div>-->
<title th:text="'快手评论统计表'"></title>
<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
<script th:src="@{/js/bootstrap.min.js}"></script>
<script th:src="@{/js/jquery-3.6.0.min.js}"></script>
</head>
<body>
<br>
<br>
<div class="container">
<div class="panel panel-primary">
<div class="panel-heading">
<h2 class="panel-title">添加今天的快手评论名单:</h2>
</div>
<div class="panel-body">
<form th:action="@{/ks/edit}" method="post">
<h3>请输入人员名单:</h3>
<!-- <input type="text" name="userScanList"/>-->
<textarea class="form-control" name="userKsList" id="userKsList" rows="5"></textarea>
<br>
<div class="align:center">
<button class="btn btn-primary m-2" type="submit">提交</button>
</div>
</form>
</div>
</div>
<div th:if="${info}">
<div class="alert alert-success">提交成功!</div>
</div>
</div>
</body>
</html>

@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title th:text="'快手评论统计表('+${date}+''"></title>
<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
<script th:src="@{/js/bootstrap.min.js}"></script>
<script th:src="@{/js/jquery-3.6.0.min.js}"></script>
</head>
<body>
<br>
<div class="text-center">
<h1 th:text="'快手评论统计表('+${date}+''"></h1>
</div>
<div class="text-center" th:each="dept:${list}">
<br>
<h2>
<strong>
<p th:text="${dept.key}"></p>
</strong>
<div class="container">
<table class="table table-striped table-bordered">
<tr>
<td><strong>姓名</strong></td>
<td><strong>是否评论</strong></td>
</tr>
<tr th:each="v:${dept.value}">
<td th:text="${v.userName}"></td>
<td th:text="${v.scanStatus}"></td>
</tr>
</table>
</div>
</h2>
</div>
</body>
</html>

@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="UTF-8">
<title>Home</title>
<!-- <div th:replace="common/head :: head"></div>-->
<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
<script th:src="@{/js/bootstrap.min.js}"></script>
<script th:src="@{/js/jquery-3.6.0.min.js}"></script>
</script>
</head>
<body>
<br>
<br>
<div class="container">
<div class="panel panel-primary">
<div class="panel-heading">
<h2 class="panel-title">添加今天的在看名单</h2>
</div>
<div class="panel-body">
<form th:action="@{/scan/insert}" method="post">
<h3>请输入人员名单:</h3>
<!-- <input type="text" name="userScanList"/>-->
<textarea class="form-control" name="userScanList" id="userScanList" rows="5"></textarea>
<br>
<div class="align:center">
<button class="btn btn-primary m-2" type="submit">提交</button>
</div>
</form>
</div>
</div>
<div th:if="${info}">
<div class="alert alert-success">提交成功!<a th:href="@{/scan/today}">查看</a></div>
</div>
</div>
</body>
</html>

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title th:text="'微信点“在看”统计表('+${date}+''"></title>
<!-- <div th:insert="/common/head.html :: head"></div>-->
<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
<script th:src="@{/js/bootstrap.min.js}"></script>
<script th:src="@{/js/jquery-3.6.0.min.js}"></script>
<script type="text/javascript" th:src="@{/js/js.js}"></script>
</script>
</head>
<body>
<!--<p>ceshi</p>-->
<br>
<div th:if="${status ==1}">
<p>没有获取到名单</p>
<a th:href="@{/scan/insert}">跳转到insert页面</a>
</div>
<div class="text-center">
<h1 th:text="'微信点“在看”统计表('+${date}+''"></h1>
</div>
<div th:if="${status ==0}" class="text-center" th:each="dept:${list}">
<br>
<h2>
<strong>
<p th:text="${dept.key}"></p>
</strong>
<div class="container">
<table class="table table-striped table-bordered">
<tr>
<td><strong>姓名</strong></td>
<td><strong>是否点在看</strong></td>
</tr>
<tr th:each="v:${dept.value}">
<td th:id="${v.userName}" th:text="${v.userName}" th:onclick="f([[${v.userName}]]);"></td>
<td th:text="${v.scanStatus}"></td>
</tr>
</table>
</div>
</h2>
</div>
</body>
</html>

@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title th:text="'云上伊川积分统计表('+${date}+''"></title>
<!-- <div th:replace="common/head :: head"></div>-->
<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
<script th:src="@{/js/bootstrap.min.js}"></script>
<script th:src="@{/js/jquery-3.6.0.min.js}"></script>
<script type="text/javascript" th:src="@{/js/js.js}"></script>
</head>
<body>
<br>
<div th:if="${status ==1}">
<p>没有获取到今日积分</p>
<a th:href="@{/score/insert}">跳转到insert页面</a>
</div>
<div th:if="${status ==2}">
<p>没有获取到昨日积分</p>
<a th:href="@{/score/insert}">跳转到insert页面</a>
</div>
<div class="text-center">
<h1 th:text="'云上伊川积分统计表('
+${date}+''"></h1>
</div>
<div th:if="${status ==0}" class="text-center" th:each="dept:${list}">
<br>
<h2>
<strong><p th:text="${dept.key}"></p></strong>
<div class="container">
<table class="table table-striped table-bordered">
<tr>
<td><strong>姓名</strong></td>
<td><strong>昨日积分</strong></td>
<td><strong>今日积分</strong></td>
<td><strong>增加</strong></td>
<td>操作</td>
</tr>
<tr th:each="v:${dept.value}">
<td id="userName" th:text="${v.userName}"></td>
<td id="yesterdayScore" th:text="${v.yesterdayScore}"></td>
<td id="todayScore" th:text="${v.todayScore}"></td>
<td id="add" th:text="${v.todayScore - v.yesterdayScore}"></td>
<td th:if="${v.todayScore - v.yesterdayScore <30}" th:id="${v.userId}"
th:onclick="|addScore(${v.userId})|">增加30
</td>
</table>
</div>
</h2>
</div>
</body>
</html>

@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="UTF-8">
<title>Home</title>
<!-- <div th:replace="common/head :: head"></div>-->
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
<script th:src="@{/js/bootstrap.min.js}"></script>
<script th:src="@{/js/jquery-3.6.0.min.js}"></script>
</head>
<body>
<br>
<br>
<div class="container">
<div class="panel panel-primary">
<div class="panel-heading">
<h2 class="panel-title">云上伊川积分统计</h2>
</div>
<div class="panel-body">
<form th:action="@{/score/edit}" method="post">
<h3>请输入null_SESSIONID</h3>
<textarea class="form-control" name="n" id="n" rows="5"></textarea>
<br>
<div class="align:center">
<button class="btn btn-primary m-2" type="submit">提交</button>
</div>
</form>
</div>
</div>
<div th:if="${info}">
<div class="alert alert-success">提交成功!<a th:href="@{/scan/today}">链接</a></div>
</div>
</div>
</body>
</html>

@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title th:text="'云上伊川积分统计表('+${date}+''"></title>
<!-- <div th:replace="common/head :: head"></div>-->
<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
<script th:src="@{/js/bootstrap.min.js}"></script>
<script th:src="@{/js/jquery-3.6.0.min.js}"></script>
</head>
<body>
<!--<p>ceshi</p>-->
<br>
<div th:if="${status == 1}">
<p>没有获取到今日积分</p>
<a th:href="@{/score/insert}">跳转到insert页面</a>
</div>
<div th:if="${status == 2}">
<p>没有获取到昨日积分</p>
<a th:href="@{/score/insert}">跳转到insert页面</a>
</div>
<div class="text-center">
<h1 th:text="'云上伊川积分统计表('+${date}+''"></h1>
</div>
<div th:if="${status ==0}" class="text-center" th:each="dept:${list}">
<br>
<h2>
<strong>
<p th:text="${dept.key}"></p>
</strong>
<div class="container">
<table class="table table-striped table-bordered">
<tr>
<td><strong>姓名</strong></td>
<td><strong>昨日积分</strong></td>
<td><strong>今日积分</strong></td>
<td><strong>增加</strong></td>
</tr>
<tr th:each="v:${dept.value}">
<td th:text="${v.userName}"></td>
<td th:text="${v.yesterdayScore}"></td>
<td th:text="${v.todayScore}"></td>
<td th:text="${v.todayScore - v.yesterdayScore}"></td>
</tr>
</table>
</div>
</h2>
</div>
</body>
</html>

@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="UTF-8">
<title>微博统计</title>
<!-- <div th:replace="common/head :: head"></div>-->
<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
<script th:src="@{/js/bootstrap.min.js}"></script>
<script th:src="@{/js/jquery-3.6.0.min.js}"></script>
</script>
</head>
<body>
<br>
<br>
<div class="container">
<div class="panel panel-primary">
<div class="panel-heading">
<h2 class="panel-title">添加今天的微博名单</h2>
</div>
<div class="panel-body">
<form th:action="@{/wb/insert}" method="post">
<h3>请输入人员名单:</h3>
<!-- <input type="text" name="userScanList"/>-->
<textarea class="form-control" name="wbUserScanList" id="wbUserScanList" rows="5"></textarea>
<br>
<div class="align:center">
<button class="btn btn-primary m-2" type="submit">提交</button>
</div>
</form>
</div>
</div>
<div th:if="${info}">
<div class="alert alert-success">提交成功!<a th:href="@{/wb/today}">查看</a></div>
</div>
</div>
</body>
</html>

@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title th:text="'微博统计表('+${date}+''"></title>
<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
<script th:src="@{/js/bootstrap.min.js}"></script>
<script th:src="@{/js/jquery-3.6.0.min.js}"></script>
<script type="text/javascript" th:src="@{/js/js.js}"></script>
</head>
<body>
<br>
<div th:if="${status == 1}">
<p>没有获取到名单</p>
<a th:href="@{/wb/insert}">跳转到insert页面</a>
</div>
<div class="text-center">
<h1 th:text="'微博统计表('+${date}+''"></h1>
</div>
<div class="text-center" th:each="dept:${list}">
<br>
<h2>
<strong>
<p th:text="${dept.key}"></p>
</strong>
<div class="container">
<table class="table table-striped table-bordered">
<tr>
<td><strong>姓名</strong></td>
<td><strong>是否点赞、评论、转发</strong></td>
</tr>
<tr th:each="v:${dept.value}">
<td th:id="${v.userName}" th:text="${v.userName}" th:onclick="f([[${v.userName}]]);"></td>
<td th:text="${v.scanStatus}"></td>
</tr>
</table>
</div>
</h2>
</div>
</body>
</html>
Loading…
Cancel
Save