def myupdate(self,survey_id, title, content, interview_cnt, deadline, in_date, in_user_id, up_date, up_user_id):
     sql = mybatis_mapper2sql.get_child_statement(self.mapper, "update")  
     MyLog().getLogger().debug(sql)
     self.cs.execute(sql, (title, content, interview_cnt, deadline, up_user_id, survey_id))
     self.conn.commit()
     cnt = self.cs.rowcount
     return cnt
 def mydelete(self,survey_id):
     sql = mybatis_mapper2sql.get_child_statement(self.mapper, "delete") 
     MyLog().getLogger().debug(sql)
     self.cs.execute(sql, (survey_id,))
     self.conn.commit()
     cnt = self.cs.rowcount
     return cnt
 def myupdate(self, survey_id, s_seq, st_mobile, answer, in_date,
              in_user_id, up_date, up_user_id):
     sql = mybatis_mapper2sql.get_child_statement(self.mapper, "update")
     MyLog().getLogger().debug(sql)
     self.cs.execute(sql, (answer, up_user_id, survey_id, s_seq, st_mobile))
     self.conn.commit()
     cnt = self.cs.rowcount
     return cnt
 def myselect(self,in_user_id):
     sql = mybatis_mapper2sql.get_child_statement(self.mapper, "select")
     MyLog().getLogger().debug(sql)
     rs = self.cs.execute(sql,(in_user_id,))
     list = []
     for record in rs:
         list.append({'survey_id':record[0],'title':record[1],'content':record[2],'interview_cnt':record[3],'deadline':record[4], 'in_date':record[5],'in_user_id':record[6],'up_date':record[7],'up_user_id':record[8]})
     return list
Exemple #5
0
 def myinsert(self, survey_id, st_mobile, complete_yn, in_date, in_user_id,
              up_date, up_user_id):
     sql = mybatis_mapper2sql.get_child_statement(self.mapper, "insert")
     MyLog().getLogger().debug(sql)
     self.cs.execute(
         sql, (survey_id, st_mobile, complete_yn, in_user_id, up_user_id))
     self.conn.commit()
     cnt = self.cs.rowcount
     return cnt
 def myupdate(self, survey_id, s_seq, question, a1, a2, a3, a4, in_date,
              in_user_id, up_date, up_user_id):
     sql = mybatis_mapper2sql.get_child_statement(self.mapper, "update")
     MyLog().getLogger().debug(sql)
     self.cs.execute(
         sql, (question, a1, a2, a3, a4, up_user_id, survey_id, s_seq))
     self.conn.commit()
     cnt = self.cs.rowcount
     return cnt
 def myupdate(self, user_id, pwd, user_name, mobile, email, birth, in_date,
              in_user_id, up_date, up_user_id):
     sql = mybatis_mapper2sql.get_child_statement(self.mapper, "update")
     MyLog().getLogger().debug(sql)
     self.cs.execute(
         sql, (pwd, user_name, mobile, email, birth, up_user_id, user_id))
     self.conn.commit()
     cnt = self.cs.rowcount
     return cnt
    def myinsert_ans(self, survey_id, st_mobile, ans):
        anses = ans.split(",")
        sql = mybatis_mapper2sql.get_child_statement(self.mapper, "merge")
        MyLog().getLogger().debug(sql)

        for idx, a in enumerate(anses):
            self.cs.execute(sql, (survey_id, idx + 1, st_mobile, a))

        self.conn.commit()
        cnt = self.cs.rowcount
        return cnt
Exemple #9
0
 def myselect(self, survey_id):
     sql = mybatis_mapper2sql.get_child_statement(self.mapper, "select")
     MyLog().getLogger().debug(sql)
     rs = self.cs.execute(sql, (survey_id, ))
     list = []
     for record in rs:
         list.append({
             'survey_id': record[0],
             'st_mobile': record[1],
             'complete_yn': record[2],
             'in_date': record[3],
             'in_user_id': record[4],
             'up_date': record[5],
             'up_user_id': record[6]
         })
     return list
Exemple #10
0
 def myselect(self):
     sql = mybatis_mapper2sql.get_child_statement(self.mapper, "select")
     MyLog().getLogger().debug(sql)
     rs = self.cs.execute(sql)
     list = []
     for record in rs:
         list.append({
             'user_id': record[0],
             'pwd': record[1],
             'user_name': record[2],
             'mobile': record[3],
             'email': record[4],
             'birth': record[5],
             'in_date': record[6],
             'in_user_id': record[7],
             'up_date': record[8],
             'up_user_id': record[9]
         })
     return list
 def myselect(self, survey_id):
     sql = mybatis_mapper2sql.get_child_statement(self.mapper, "select")
     MyLog().getLogger().debug(sql)
     rs = self.cs.execute(sql, (survey_id, ))
     list = []
     for record in rs:
         list.append({
             'survey_id': record[0],
             's_seq': record[1],
             'question': record[2],
             'a1': record[3],
             'a2': record[4],
             'a3': record[5],
             'a4': record[6],
             'in_date': record[7],
             'in_user_id': record[8],
             'up_date': record[9],
             'up_user_id': record[10],
             'in_user_id': record[11]
         })
     return list